![]() |
Code Help - How to place statement after each 1st post
I want to put some code after the first post on every page.
I've found code that will put a statement after the first post; <if condition="$post[postcount] == 1"> However, this only does it once. When the user clicks Page 2 I want the ad to show again after 1st post on that page. Has to be dynamic though since users can choose how many posts per page they see. Anyone know? |
well, you would need to get a variable with the number of posts a user has set to display per page, then it should be easy to calculate which posts are on the first page with some simple php I guess..
|
Code:
<if condition="$post[postcount] % $vboptions[maxposts] == 1"> |
Well that's even easier, great idea Gray Matter!
|
I can't really take the credit. I found it a while ago while searching vB.org. ;)
|
All times are GMT. The time now is 04:04 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|