Log in

View Full Version : Modifying specific post number in thread


SirGeo
01-18-2011, 07:52 AM
Hey all,

Trying to figure out how to insert code (an ad) in the 4th post signature.

Similar to First post sig ad location, but 4th post of each page.... Um, don't know what else to say..

Anyway i'm stuck.. I get that it will have to be inserted in the postbit, but how do I specify 4th posts of each page? postcount?

Is there a 'isforthpost' code? any other ideas I can try?

Thanks in advance.

Lynne
01-18-2011, 07:13 PM
You would use the remainder operator. Look at post number divided by 4 and if remainder is 0 then do.....

http://php.net/manual/en/language.operators.arithmetic.php

SirGeo
01-19-2011, 02:39 AM
Done!

Just incase someone stumbles upon this asking a similar question...



<if condition="($post[postcount] -4) %25== 0">
</if>



shows up on the forth post of every page. (i'm set to 25 posts per page).