Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: Aaron10 - heinäkuu 22, 2014, 11:10:01 AP

Otsikko: Topic Specific Banner below each post
Kirjoitti: Aaron10 - heinäkuu 22, 2014, 11:10:01 AP
I saw this post:
http://www.simplemachines.org/community/index.php?topic=451577.0

Which is kind of what I want but with something like a 728X90 banner below posts (or even within signatures but below what the user has in there if it's easier). But I want to make a specific banner for each post (affiliate banners).

So for example if we have a webmaster board with a topic specifically for hostgator, and I wanted these banners below each post or signature:
http://www.hostgator.com/banners

But ONLY in that topic, would it be possible? Or would it effect every post on the forum?
Otsikko: Re: Topic Specific Banner below each post
Kirjoitti: Hj Ahmad Rasyid Hj Ismail - heinäkuu 22, 2014, 07:04:19 IP
I think you can add something like if $topic['id'] == 1234567 { banner code }. Just a general idea that is untested.
Otsikko: Re: Topic Specific Banner below each post
Kirjoitti: Jade Elizabeth - heinäkuu 23, 2014, 07:33:07 AP
You'd have to check the code on the display template but theoretically you could check the board is the board you want, then if it is to display the banner. I've got no idea how to do that because you might have to use the $message variable and depending on where you want this to show, different info will be there or not there.