Jump to content

Breaking My head in Advertisements


Himadri Goswami
 Share

Recommended Posts

:thumbsup:   Okay after working for hours tested the following locations as working

 

A)For ad in bottom of every post in a topic

Add {advertisement="code"} to end of template forums>front>topics>post


B) For ad just above the topic title

Add  {advertisement="code"} above <div class='ipsClearfix'> in template forums>front>topics>topic

C) For ad after first and third post of topic


Modify template

forums>front>topics>topic to


{{$postCount++;}}
{template="postContainer" group="topics" app="forums" params="$topic, $comment, $votes"}
{{if $postCount == 1 AND $advertisement = \IPS\core\Advertisement::loadByLocation( 'ad_topic_view' )}}
{$advertisement|raw}
{{endif}}
{{if $postCount == 3 }}
{advertisement="code"}
{{endif}}
{{endforeach}

one can add as many as advertisement of different types after the desired posts in every page of a topic

HOpe this helps people like me :thumbsup:

Link to comment
Share on other sites

D) If you want at top of each post and bottom of 3rd post in every page of a topic

here is the code in template   forums>front>topics>topic

{{$postCount++;}}
{{if $postCount == 1 }}
{advertisement="code"}
{{endif}}
{template="postContainer" group="topics" app="forums" params="$topic, $comment, $votes"}
{{if $postCount == 3 AND $advertisement = \IPS\core\Advertisement::loadByLocation( 'ad_topic_view' )}}
{$advertisement|raw}
{{endif}}
{{endforeach}}

 

That completes all my need for forum topics

 

Can anyone help with Articles/ IP contents/Pages?

Edited by Himadri Goswami
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...