| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
AndyG
Joined: 24 Mar 2008 Posts: 4
|
Posted: Fri Mar 28, 2008 9:37 pm Post subject: Can Someone HELP with this one |
|
|
I am fairly new to PHPBB3 coding and i am struggling to get an if statement tp work.
What i want to do is if part of a string is equal to something , do one thing else do another.
I have so far
<!-- $mem = substr(memerrow.USERNAME) -->
<!-- IF $mem = "ZC" --><td class="genmed" align="center"><a href="{memberrow.U_VIEW_PROFILE}"><img src="http://card.mygamercard.net/royale/green/{memberrow.USERNAME}.png" border=0><!-- ELSE --><td class="genmed" align="center"><a href="{memberrow.U_VIEW_PROFILE}"><img src="http://card.mygamercard.net/royale/orange/{memberrow.USERNAME}.png" border=0><!-- ENDIF -->
can someone help me here as i cant get it to work.
regards |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Mon Mar 31, 2008 8:40 am Post subject: Re: Can Someone HELP with this one |
|
|
Well, I'm not sure you can assign variable and use php function within templates like you do.
Besides, I don't get the idea behind :
| Code: | | substr(memerrow.USERNAME) |
substr requires more parameters to make sens.
What you can for sure do is to manipulate the tpl vars within templates.
So instead of :
| Code: | <!-- $mem = substr(memerrow.USERNAME) -->
<!-- IF $mem = "ZC" --> |
You can directly use something like :
| Code: | | <!-- IF memerrow.USERNAME eq "ZC" --> |
Note that "eq" stands for equals.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |