cotonti.com : IF statement in forum posts.tpl https://www.cotonti.com Laatste forum onderwerpen Cotonti en Thu, 09 Oct 2025 07:24:49 -0000 foxhound
I dont think using one php variable in a tpl (like in my above example) has much impact on performance right?
Or does that, like most times just depend on how many requests there are for that tpl?
I had planned to use the same kind of "if statement" for my list.tpl as well.]]>
Di, 07 Dec 2010 19:02:45 -0000
GHengeveld Ma, 06 Dec 2010 21:13:08 -0000 foxhound You could even use variables which are introduced with plugins.
So, if you need something open the php files and have a look at it. I guess even a noob like me can do that ;)]]>
Ma, 06 Dec 2010 20:55:42 -0000
Kingsley # foxhound : Thanks a lot again for the additional info, very usefull. I wasn't aware I could call any variable like that (when defined).
Lots of opportunities with this :)

only if you know all the variables, yes..]]>
Zo, 05 Dec 2010 23:09:49 -0000
foxhound Lots of opportunities with this :)]]> Zo, 05 Dec 2010 20:11:50 -0000 GHengeveld
You can access array values by using {PHP.arrayname.key}, for example {PHP.usr.id} (currently logged in user ID, or 0 for guests). Multidimensional arrays are supported too.

This is why the list of possible tags is virtually endless.]]>
Vr, 03 Dec 2010 06:47:44 -0000
foxhound
I noticed it was not in the Global Tag List I went through this one and the tags list line by line trying to find something like it.

Thanks for the help :)]]>
Vr, 03 Dec 2010 04:16:28 -0000
GHengeveld Thu, 02 Dec 2010 04:30:50 -0000 foxhound I will fix my post.

[edit]
Also, I just realisized the "{FORUMS_POSTS_ROW_POSTCOUNT}" refers to a posters postcount, not the count of posts in a single topic page. And again, checking the tags lists there does not seem to be anything counting the posts per page?]]>
Wo, 01 Dec 2010 17:38:45 -0000
Kort Wo, 01 Dec 2010 17:35:19 -0000 foxhound <!-- IF {FORUMS_POSTS_ROW_NUM} == 2 --> bla bla bla <!-- ENDIF -->
But, it looks pretty bad cause right now there could be 2 adds and a signature on top of eachoter (I also have an add placed at the bottom of forums.post.tpl).
So, I was hoping its possible to change the IF statement so it adds a block to the second post, but only when the total post count in the page is greater than 2.

I tried many different setups of this but I cant figure out how to do it.
I thought this would work but it doesnt:
<!-- IF {FORUMS_POSTS_ROW_NUM} == 2 AND {FORUMS_POSTS_ROW_POSTCOUNT} > 2  -->
bla bla bla
<!-- ENDIF -->

I searched both the Global Tag List as well as the TPL Tags Repository but have no idea what other statements I should use. The only one which works is the "{FORUMS_POSTS_ROW_NUM} == xx" as I use that multiple times.

Anyone here who can help me with this?]]>
Wo, 01 Dec 2010 17:22:47 -0000