PDA

View Full Version : Variables in messages


NoMatt3r
12-26-2013, 11:55 AM
Hi.

There's a mod on my board which allows to replace parts of a sentence like:
Hello, {1}. You have donated {2} Dollars at {3} o'clock.

I was wondering how i can add more variables and what they are actually called?

kh99
12-26-2013, 12:07 PM
I don't know if there's a mod that works that way, but that's how phrases work. If you create a phrase like you posted above, then in a plugin or template you can specify what you want to use for the variables.

NoMatt3r
12-26-2013, 03:14 PM
To be more specific i would like to add more variables like here:

http://puu.sh/5ZdRL.png

Is it easy to add more variables like {5} for userfield3, {6} for donation description and so on?

kh99
12-26-2013, 03:40 PM
Well, if it's mod then you need to ask in the mod thread. Edit:... but the answer is that you'd probably need to add code, unless the mod is written to allow it to be customized.

NoMatt3r
12-27-2013, 01:02 PM
Okay. Thank you for your help. Very appreciated!