Previous Thread
Next Thread
Print Thread
Hop To
#234479 02/06/2010 8:08 PM
Joined: Jan 2008
Posts: 13
B
stranger
stranger
B Offline
Joined: Jan 2008
Posts: 13
Hey Folks,

I'm trying to figure out a way to stick a content island in-between the last 2 posts of a thread---effectively taking the existing "put an ad between the first two posts" and move to the bottom.

I've discovered that in the "between the first two posts" the ads don't get much play and, as topics get longer, the ads get less and less attention.

This isn't as easy as plucking the code and dropping it in a new place, but I can't quite figure out where to start here---can someone give me a nudge?

brad

Last edited by Brad A.; 02/06/2010 8:15 PM.
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
templates post_side.tpl and post_top.tpl

Code
{if $smarty.section.post.iteration == 1}

now checks for if it's the 1st one.. and places an ad there..

change it to

Code
{if $smarty.section.post.iteration == $smarty.section.post.total-1}
should work...

(off top of head here) ymmv.. but i think that works wink


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Upgraded to ver8 - now can't login
by phoenix011235 - 10/24/2024 8:50 AM
Who's Online Now
0 members (), 270 guests, and 100 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)