andhrawatch Posted October 7, 2011 Report Share Posted October 7, 2011 I am using hooks to show ads on my forum but hooks are only for Board Index. I just want to display vertical ads 160X600 on all pages except board index (as i am using hooks for board index)...please let me know if anybody come across it... also please let me know if you have come across any mods.... thanks in advance Quote Link to comment Share on other sites More sharing options...
Management Michael Posted October 7, 2011 Management Report Share Posted October 7, 2011 I'm not aware of a mod but you can do this with a template edit. Open Admin CP > Look & Feel Tab > select skin > Global Templates > globalTemplate Find: {$items['adHeaderCode']} <if test="mainpageContent:|:$html">{$html}</if> {$items['adFooterCode']} Replace With: <div class='ipsLayout ipsLayout_withright ipsLayout_largeright clearfix'> <div class='ipsLayout_content clearfix'> {$items['adHeaderCode']} <if test="mainpageContent:|:$html">{$html}</if> {$items['adFooterCode']} </div> <div class='ipsLayout_right'> {ad code here} </div> </div> Save. Will add a sidebar to all pages similar to the sidebar for an ad. ntclick 1 Quote Link to comment Share on other sites More sharing options...
andhrawatch Posted October 8, 2011 Author Report Share Posted October 8, 2011 thanks a lot .... its working... can you let me know how to display it only on the pages i need.... because on the board index i am using hooks...and i want to display it only on message view page and topics list page... and also how to resize the width of the side bar... thanks a lot for your help... :) Quote Link to comment Share on other sites More sharing options...
Management Michael Posted October 9, 2011 Management Report Share Posted October 9, 2011 Try this instead. Uses a different style that should be smaller in width. <if test="showOnTopic:|:ipsRegistry::$current_application == 'forums' AND ipsRegistry::$current_module == 'forums' AND ipsRegistry::$current_section == 'topics'"> <div class='ipsLayout ipsLayout_withright ipsLayout_smallright clearfix'> <div class='ipsLayout_content clearfix'> {$items['adHeaderCode']} <if test="mainpageContent:|:$html">{$html}</if> {$items['adFooterCode']} </div> <div class='ipsLayout_right'> {ad code here} </div> </div> <else /> {$items['adHeaderCode']} <if test="mainpageContent:|:$html">{$html}</if> {$items['adFooterCode']} </if> Quote Link to comment Share on other sites More sharing options...
andhrawatch Posted October 9, 2011 Author Report Share Posted October 9, 2011 its working exactly how i want. but ads are only showing on Topic page... can i display on both topic list and topic view pages? thanks for your time in helping me out..... Quote Link to comment Share on other sites More sharing options...
Management Michael Posted October 11, 2011 Management Report Share Posted October 11, 2011 Sure, replace the top line with this instead. <if test="showOnTopic:|:( ipsRegistry::$current_application == 'forums' AND ipsRegistry::$current_module == 'forums' AND ipsRegistry::$current_section == 'topics' ) OR ( ipsRegistry::$current_application == 'members' AND ipsRegistry::$current_module == 'messaging' AND ipsRegistry::$current_section == 'view' )"> Quote Link to comment Share on other sites More sharing options...
andhrawatch Posted October 11, 2011 Author Report Share Posted October 11, 2011 (edited) Thanks.....got it.. :) Your video system is amazing... thanks for your support once again... Edited October 12, 2011 by andhrawatch Quote Link to comment Share on other sites More sharing options...
andhrawatch Posted October 26, 2011 Author Report Share Posted October 26, 2011 hi again..... can you let me know how to add ads on reply page? Quote Link to comment Share on other sites More sharing options...
Management Michael Posted October 27, 2011 Management Report Share Posted October 27, 2011 <if test="showOnTopic:|:( ipsRegistry::$current_application == 'forums' AND ipsRegistry::$current_module == 'forums' AND ipsRegistry::$current_section == 'topics' ) OR ( ipsRegistry::$current_application == 'members' AND ipsRegistry::$current_module == 'messaging' AND ipsRegistry::$current_section == 'view' ) OR ( ipsRegistry::$current_application == 'forums' AND ipsRegistry::$current_module == 'post' AND ipsRegistry::$current_section == 'post' AND $this->request['do'] == 'reply_post' )"> Try this code, replacing the top line as before. Quote Link to comment Share on other sites More sharing options...
andhrawatch Posted November 22, 2011 Author Report Share Posted November 22, 2011 Hi, Hi can i display ads to be displayed only on one forum ? please let me know if you have any information...thanks for your support; Quote Link to comment Share on other sites More sharing options...
Management Michael Posted November 22, 2011 Management Report Share Posted November 22, 2011 Yes what's the forum id you want to show to? And your checking the forum id for both the topic view and reply topic page? Quote Link to comment Share on other sites More sharing options...
andhrawatch Posted November 23, 2011 Author Report Share Posted November 23, 2011 forum ID will be 15.... i need to display only on topics list page. thankyou. Quote Link to comment Share on other sites More sharing options...
Management Michael Posted November 24, 2011 Management Report Share Posted November 24, 2011 <if test="showOnTopic:|:( ipsRegistry::$current_application == 'forums' AND ipsRegistry::$current_module == 'forums' AND ipsRegistry::$current_section == 'topics' AND $this->request['f'] == '15' ) OR ( ipsRegistry::$current_application == 'members' AND ipsRegistry::$current_module == 'messaging' AND ipsRegistry::$current_section == 'view' ) OR ( ipsRegistry::$current_application == 'forums' AND ipsRegistry::$current_module == 'post' AND ipsRegistry::$current_section == 'post' AND $this->request['do'] == 'reply_post' )"> Quote Link to comment Share on other sites More sharing options...
andhrawatch Posted December 5, 2011 Author Report Share Posted December 5, 2011 it is not working... it is displaying ads on topic view page.... i need to display ads only on topic's list page of a perticular forum .... i tried changing code with the help of your previous replies but no luck..... Quote Link to comment Share on other sites More sharing options...
Management Michael Posted December 7, 2011 Management Report Share Posted December 7, 2011 Try this. <if test="showOnTopic:|:( ipsRegistry::$current_application == 'forums' AND ipsRegistry::$current_module == 'forums' AND ipsRegistry::$current_section == 'forums' AND $this->request['f'] == '15' ) OR ( ipsRegistry::$current_application == 'forums' AND ipsRegistry::$current_module == 'forums' AND ipsRegistry::$current_section == 'topics' ) OR ( ipsRegistry::$current_application == 'members' AND ipsRegistry::$current_module == 'messaging' AND ipsRegistry::$current_section == 'view' ) OR ( ipsRegistry::$current_application == 'forums' AND ipsRegistry::$current_module == 'post' AND ipsRegistry::$current_section == 'post' AND $this->request['do'] == 'reply_post' )"> Quote Link to comment Share on other sites More sharing options...
andhrawatch Posted December 15, 2011 Author Report Share Posted December 15, 2011 working....thanks a lot.... Quote Link to comment Share on other sites More sharing options...
andhrawatch Posted December 23, 2011 Author Report Share Posted December 23, 2011 hi, can i show ads after first x topics in forum view? for example first five topics in a forum are PINNED and i want to place ad after these topics ... can i do that? Quote Link to comment Share on other sites More sharing options...
andhrawatch Posted June 29, 2012 Author Report Share Posted June 29, 2012 Hi, Can you please let me know how to place adsense code in Mobile theme (IP Mobile theme) I am using 3.2.2 version. Quote Link to comment Share on other sites More sharing options...
Management Michael Posted June 29, 2012 Management Report Share Posted June 29, 2012 Mobile theme is a little different, any particular place where you wanted to add? Template logic will still work in there but it's needs to be applied in the ip.board mobile skin. Quote Link to comment Share on other sites More sharing options...
Aravind Posted July 14, 2013 Report Share Posted July 14, 2013 Hai, I am using IPB Version 3.4.5. After replacing with the Following code, I am getting an Error that the PHP code you are Inserted is not coded properly. Code it correctly and then save..---Something like this,, I am getting an error. <if test="showOnTopic:|<img src='http://www.devfuse.com/forums/public/style_emoticons/<#EMO_DIR#>/sad.gif' class='bbc_emoticon' alt=':(' /> ipsRegistry::$current_application == 'forums' AND ipsRegistry::$current_module == 'forums' AND ipsRegistry::$current_section == 'topics' ) OR ( ipsRegistry::$current_application == 'members' AND ipsRegistry::$current_module == 'messaging' AND ipsRegistry::$current_section == 'view' ) OR ( ipsRegistry::$current_application == 'forums' AND ipsRegistry::$current_module == 'post' AND ipsRegistry::$current_section == 'post' AND $this->request['do'] == 'reply_post' )"> Please tell me , How to solve this problem. Thank you.. & Waiting for your reply :) Quote Link to comment Share on other sites More sharing options...
ntclick Posted August 26, 2015 Report Share Posted August 26, 2015 I'm not aware of a mod but you can do this with a template edit. Open Admin CP > Look & Feel Tab > select skin > Global Templates > globalTemplate Find: {$items['adHeaderCode']} <if test="mainpageContent:|:$html">{$html}</if> {$items['adFooterCode']}Replace With: <div class='ipsLayout ipsLayout_withright ipsLayout_largeright clearfix'> <div class='ipsLayout_content clearfix'> {$items['adHeaderCode']} <if test="mainpageContent:|:$html">{$html}</if> {$items['adFooterCode']} </div> <div class='ipsLayout_right'> {ad code here} </div> </div>Save. Will add a sidebar to all pages similar to the sidebar for an ad. Thanks admin :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.