Help with code language?

Discussion in 'vBulletin Discussions' started by Peacelily, Aug 12, 2009.

  1. Peacelily

    Peacelily Adept

    Joined:
    Jul 5, 2009
    Messages:
    245
    Likes Received:
    10
    I recently installed a hack and I like it, but there is a section in it where I can select replacement variables? This is an "auto-tagging" hack.

    Can anyone help me understand this variable language so I could make changes myself?

    For example, I do not want / to always change to "or", I would rather have it be a space.

    But all I can figure out is that I can either put in a word or character or it just smooshes it all together like

    17germany
    germany or 17

    etc.

    I have copied in all the code variables it gave me below.

    If I should not ask this and only should ask the coder, forgive me. :o


    Code:
    ''s'=>''
    '"'=>''
    '&'=>''
    '('=>''
    ')'=>''
    '"'=>''
    '''=>''
    '!'=>''
    '^'=>''
    '*'=>''
    '['=>''
    ']'=>''
    '{'=>''
    '}'=>''
    '~'=>''
    '?'=>''
    '<'=>''
    '>'=>''
    ':'=>''
    ';'=>''
    '='=>''
    '+'=>''
    '-'=>' '
    '_'=>''
    '/'=>' or '
    '\'=>' or '
    '.'=>''
    ' & '=>'and'
     
  2. Ak Worm

    Ak Worm Grand Master

    Joined:
    May 22, 2009
    Messages:
    979
    Likes Received:
    20
    First Name:
    Corey
    I'd Say Dont Mess With It. Might Ruin, Unless You Know What Your Doing.
     
  3. Chris

    Chris Regular Member

    Joined:
    Dec 27, 2007
    Messages:
    5,422
    Likes Received:
    86
    Presumably, this is why the original poster is asking for assistance in the matter. ;)
     
  4. Ak Worm

    Ak Worm Grand Master

    Joined:
    May 22, 2009
    Messages:
    979
    Likes Received:
    20
    First Name:
    Corey
    I Know Hes Asking For Assistance. The Script He Should Not Mess With
    Unless He Knows What Hes Doing. (Stated Again)
     
  5. Peacelily

    Peacelily Adept

    Joined:
    Jul 5, 2009
    Messages:
    245
    Likes Received:
    10
    Oh golly, I did not explain it well.

    It's not actually script, these are actual settings I can change in the Admin CP.

    I just have no idea what I am doing.

    I have attached a screenshot of where it can be changed. It just looks like it is probably standard code language of some kind.
     
  6. Wayne Luke

    Wayne Luke Regular Member

    Joined:
    Apr 2, 2009
    Messages:
    992
    Likes Received:
    276
    Basically what it is doing is taking the first string and converting it the second string on the line.

    'take this string' => 'convert to this string'

    So you need to take what you want to replace and put it to the left of => within the single quotes. Then to the right of the => you would put the string it should be replaced by within the single quotes.

    For instance:
    'peacelily' => 'peacerose'

    Change:
    '/'=>' or '

    To:

    '/'=>' '


    If you want spaces guaranteed in something than you should put them in the string to the right.
     
  7. Soliloquy

    Soliloquy Regular Member

    Joined:
    Jun 3, 2009
    Messages:
    2,402
    Likes Received:
    66
    Location:
    New York City
    I have no experience with the mod in question, but I'll take a crack at answering the question anyway. It looks like you have to enclose both the characters/strings you want changed and what you want them changed into, in single quotes. (') Between them, put the arrow => , which is being used to indicate what you want something turned into.

    For example. In the first rule that they've set by default
    Code:
    ''s'=>''
    they have 's enclosed in single quotes (I know, it's confusing because you have two single quotes at the beginning), then the pointer => to indicate they want it changed into the next thing, then two single quotes with nothing between them. This means they want the 's stripped off all words and replaced with nothing, so if someone tagged the thread as "Peacelily's", it would change it to just "Peacelily".

    The second one is a little trickier.
    Code:
    '"'=>''
    We have " enclosed in the single quotes. " is the escaped version of the quote symbol, used to distinguish it from the double quotes used in the programming language. There's a whole bunch of symbols used in programming that you might also want to use in your text, and in order to use them without breaking your code you have to find the equivalent in a table like this:
    HTML 4.0 Special Entities

    So that means the software will look for quote symbols, and replace them with nothing (strip them out).

    If you don't mess with code, how are you ever going to learn? Just do it carefully: keep a current backup, test everything after changing EVEN A SINGLE CHARACTER, be ready to completely undo all your changes and start over.
     

Share This Page