Simple PHP question

Posted by Yves Julien 
Simple PHP question
January 15, 2014 06:05PM
HI Folks,

I know nothing of PHP but would like to ad a simple ELSE function after an {IF}. What is the syntax for a ELSE statement?

On my Forum, I have the Change User Module enable for members only that look like this:

{IF mod_change_username_enabled}
{HOOK mod_change_username_field PROFILE}
<tr>
<td colspan="2"><font color="#FF0000">{LANG->NewUsername}</font></td>
</tr>
{/IF}

I would like to have an ELSE statement to ad a message for non-member explaining to them that changing username is reserved to member only and direct them how to request to join the group.

What is the proper PHP syntax that will allow me to ad a new variable {LANG->NonMemberMessage}. Would it be something like this (I'm taking a guess...) :

{ELSE}
<tr>
<td colspan="2"><font color="#FF0000">{LANG->NonMemberMessage}</font></td>
</tr>
{/ELSE}

Thanks for your help,

Yves
Re: Simple PHP question
January 16, 2014 12:45AM
There is no php, thats the phorum template language.
The if else syntax there is:
{IF}
....
{ELSE}
...
{/IF}


Thomas Seifert
Re: Simple PHP question
January 16, 2014 07:09PM
Thanks it works :D
Sorry, only registered users may post in this forum.

Click here to login