Support Forum

How to add ads on forum?

JM Jonathan Munoz
Jonathan Munoz
Member

I want to add ads on my forum how would I do that with out losing it after an update of the theme. My theme is currently translated as well to Spanish.

9 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. See – http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/

MP Mr Papa
Mr Papa
Member

more here:  http://codex.simple-press.com/codex/faq/problem-with-post-edit-buttonow-to/faq-how-to-display-ads-in-the-forum/

JM Jonathan Munoz
Jonathan Munoz
Member

One thing how do change this code if($spTopicView->currentPost==1)  to be able to have the ads apear on the first post of each page and then the code for last post of each page.

I tired this but no luck if($spTopicView->currentPost==first)

MP Mr Papa
Mr Papa
Member

have you seen forum – toolbox – data inspector?  you can dump a lot of useful information for these kind of things to the screen for various options…

you can tell the last post on the page by $spThisTopic->last_post_on_page… when true,  you are there…

for the first, use $spThisTopic->first_post_on_page

JM Jonathan Munoz
Jonathan Munoz
Member

I tired this and it didnt work? Am I doing something wrong?

if($spThisTopic->first_post_on_page==true)

MP Mr Papa
Mr Papa
Member

didnt try the data insepctor, did we? ;)

would have been obvious that I goofed and gave you the wrong variables.. embarassed sorry…

you want $spThisPost->first_post_on_page and $spThisPost->last_post_on_page