Can we use template conditionals as like
<if forumid=4> then ???
i would like to display something if the forum id = the required forum id or else display something else.
It's possible, but not the way you posted it.
And no, I can't give example code because it's different depending on where it's used. But it usually be a check of $fid and use == for equivalence.
If you used for example in postbit, try $forum['fid'] == 4.
I used this code in "forumdisplay_thread"
Code:
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%">
<if in_array($forum['fid'], array(142,157,158)) then>
{$GLOBALS['threadfields']['timg']['value']}
<else>
<a href="{$forumurl_q}filterxt_icon={$thread['icon']}">{$icon}</a><a href="{$forumurl_q}filterxt_prefix={$thread['prefix']}">{$thread['threadprefix']}</a>
</if>
</td>
|
not working tritop.
I'm trying to display topic images instead of prefixes in particular forum ids and prefixes in other forums
Take a look at the forumdisplay_threadlist to see what the correct variables are.
i changed the if line to
<if in_array(fid={$fid}, array() then>
and also
<if in_array({$fid}, array() then>
displaying the codes at the top of thread name and ignoring the if statements
(12-02-2010 08:16 AM)1master1 Wrote: [ -> ]i changed the if line to
<if in_array(fid={$fid}, array() then>
and also
<if in_array({$fid}, array() then>
displaying the codes at the top of thread name and ignoring the if statements
Maybe something like this?
Code:
<if in_array($fid, array(x,y,z)) then>
|
no use. may be something like (Global{$fid}) is needed?
This?
Code:
<if in_array($thread['fid'], array(x,y,z)) then>
|
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in D:\Program Files\wamp\www\com\forumdisplay.php(1123) : eval()'d code on line 3