Himadri Goswami Posted June 21, 2016 Share Posted June 21, 2016 Guys please let me know if an ad is possible to insert within the content of article and topic post content? I tried using {advertisement="code"}, but failed to get it displayed. {advertisement="code"} worked in footers and some other locations. Please guide me Link to comment Share on other sites More sharing options...
Himadri Goswami Posted June 21, 2016 Author Share Posted June 21, 2016 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 Link to comment Share on other sites More sharing options...
Himadri Goswami Posted June 21, 2016 Author Share Posted June 21, 2016 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? Link to comment Share on other sites More sharing options...
Himadri Goswami Posted June 22, 2016 Author Share Posted June 22, 2016 Any help? Link to comment Share on other sites More sharing options...
Himadri Goswami Posted June 22, 2016 Author Share Posted June 22, 2016 @opentype please help I am unable to add in articles or pages Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.