PDA

View Full Version : How do you enter php into phrases?


checkmail
08-17-2009, 06:25 PM
How do you enter some php into phrases. I have welcome headers and would like to post different messages based on different variables.

Edit.. I would like to know how to add php to notices or the above.^^

Lynne
08-17-2009, 07:09 PM
Adding it to phrases is done in the templates like this (example from the navbar):
<phrase 1="$bbuserinfo[username]" 2="$vboptions[bburl]/member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[welcome_x_link_y]</phrase>

To be able to use them in notices, you'd need to write a plugin, probably using the nocies_noticebit hook location, to make these variables available for use.

checkmail
08-17-2009, 07:19 PM
Thanks for the reply. But I wanted to add an if then statement in php. Not just variables.

Lynne
08-17-2009, 07:26 PM
You have to use a plugin to do the if/else and the output from that would be a variable you can then use in the phrase.

checkmail
08-17-2009, 07:57 PM
thank you. I will have someone make it in the paid section. =)