MyBB Hacks

Full Version: Template Conditionals
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11
(04-26-2012 12:04 PM)ZiNgA BuRgA Wrote: [ -> ]Using the exact code above for that template, it seems to work perfect for me...

Thank you for your time! Works for me as well now too. Don't know what was wrong actually.

NZ
Update to v1.6:
- <setvar> will now work as expected inside conditionals
Now the <setvar> is more dynamic. It is very very similar to php now.
Thank you very much for the update, Yumi.

If it is possible, will XThreads uses this <setvar> "version", Yumi?
Next version should have it.
Thanks, Yumi.
I think you should remove this part from the first post, Yumi?
(09-15-2010 02:29 PM)ZiNgA BuRgA Wrote: [ -> ]Note that <setvar> won't "work" conditionally inside <if>s, that is, <setvar> will always set a value regardless of it being placed anywhere within an <if>, even if the condition of the <if> evaluates to false.  Example

HTML Code
<if false then>
<setvar test>'a test'</setvar>
</if>
{$tplvars['test']}

- the above will always display "a test".

I thought I had changed that :/
Thanks for pointing out though.
Regarding performance, would it be better to use, for example, some code in the showthread template instead of the postbit/postbit_classic template?
Possibly, because it's only evaluated once there.
Too vague otherwise.
<func str_replace>"\n", ', ', $post[fid6]</func>

Why it isn't working? Frown
Pages: 1 2 3 4 5 6 7 8 9 10 11
Reference URL's