I don't really understand these conditionals
I want to do this:
if ({VALUE$1} == {VALUE$2})
return {VALUE$1};
else
return {VALUE$1} / {VALUE$2}; //that's a slash, not a math op.
Can you translate this to ZiNgA Conditionals?
Maybe something like this:
Code:
<if {VALUE$1} == {VALUE$2} then>
{VALUE$1}
<else>
{VALUE$1} / {VALUE$2}
</if>
|
What is the correct syntax for using functions with this plugin? I have tried many ways, bu didn't succeed.
Like:
<func format_name>$name, $usergroup, $adittionalgroups</func>
<func format_name>{$name}, {$usergroup}, {$adittionalgroups}</func>
<func format_name>($name, $usergroup, $adittionalgroups)</func>
<func format_name>({$name}, {$usergroup}, {$adittionalgroups})</func>
Haved tried many ways, even with other functions like get_(forum|thread|post|user) or get_(forum|thread|post|user)_link.
Will really appreciate some examples of how it is suppose to be the right way.
(03-14-2010 10:12 AM)ZiNgA BuRgA Wrote: [ -> ]The functions available, with the shortcut, are:
htmlspecialchars, htmlspecialchars_uni, intval, file_get_contents, floatval, urlencode, rawurlencode, addslashes, stripslashes, trim, crc32, ltrim, rtrim, chop, md5, nl2br, strrev, strtoupper, strtolower, my_strtoupper, my_strtolower, alt_trow, get_friendly_size, filesize, strlen, my_strlen, my_wordwrap, random_str, unicode_chr, bin2hex, str_rot13, str_shuffle, strip_tags, ucfirst, ucwords, basename, dirname, unhtmlentities
Note that these all have a single argument.
Use <?= ... ?> syntax for other functions.
(10-20-2011 06:40 AM)Patrick_ Wrote: [ -> ]I don't really understand these conditionals
I want to do this:
if ({VALUE$1} == {VALUE$2})
return {VALUE$1};
else
return {VALUE$1} / {VALUE$2}; //that's a slash, not a math op.
Can you translate this to ZiNgA Conditionals?
What I am actually doing wrong there?
Code:
<if {$forum['fid']} != '16' then>
{$lastpost_subject}
</if>
|
I am trying to exclude something for a given forum on index page.
Your plugin obviously works. But I cannot make sence of this conditional. Please help!
Thank you
NZ
Code:
<if $forum['fid'] != '16' then>
{$lastpost_subject}
</if>
|
Assuming that $forum is even the correct variable.
(04-26-2012 09:01 AM)ZiNgA BuRgA Wrote: [ -> ]
Code:
<if $forum['fid'] != '16' then>
{$lastpost_subject}
</if>
|
Assuming that $forum is even the correct variable.
Does not work. Sorry. Simply shows nothing.
I can printout
$forum['fid'] anywhere, and it shows correct values for forum. One of forum is #16.
I have clean install of mybb latest version. All your examples from the main post of the thread work ok.
Add. I am trying to edit
forumbit_depth2_forum_lastpost is that matters
Thanks
NZ
Using the exact code above for that template, it seems to work perfect for me...