Looking for Something? Search Afriwap now!!!
Add to Flipboard Magazine. | |

HOW TO DISPLAY ADSENSE AFTER FIRST POST IN SMF

Author Topic: HOW TO DISPLAY ADSENSE AFTER FIRST POST IN SMF  (Read 4060 times)

0 Members and 1 Guest are viewing this topic.

Online Timi Dapsin

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,501
  • Today is that tomorrow you worried about yesterday
    • View Profile
HOW TO DISPLAY ADSENSE AFTER FIRST POST IN SMF
« on: May 02, 2014, 05:41:34 PM »


Its now possible to display Adsense adverts after the first post in your forum especially in the Core theme
You can try this:
Find in Display.template.php:

Code: [Select]
<div class="inner" id="msg_', $message['id'], '"', '>', $message['body'], '</div>
Then replace the above code with
Code: [Select]
<div class="inner" id="msg_', $message['id'], '"', '>';
                 if ($message['id'] == $context['first_message'])
      echo '
                        <div style="float:right; width:270px;">
                        <script type="text/javascript"><!--
                        google_ad_client = "pub-xxxxxxxxxxxxxxx";
                        /* 250x250, created 9/07/11 bforum text */
                        google_ad_slot = "xxxxxxxxxxxx";
                        google_ad_width = 250;
                        google_ad_height = 250;
                        //-->
                        </script>
                        <script type="text/javascript"
                        src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                        </script></div>';
      echo '   
               ', $message['body'], '</div>

change xxxxxxx to your Google Adsense Publisher ID





Offline vitsland

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: HOW TO DISPLAY ADSENSE AFTER FIRST POST IN SMF
« Reply #1 on: May 04, 2016, 06:28:20 PM »
please admin how can i add chitika adcode on smf after first post

Online Timi Dapsin

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,501
  • Today is that tomorrow you worried about yesterday
    • View Profile
Re: HOW TO DISPLAY ADSENSE AFTER FIRST POST IN SMF
« Reply #2 on: May 04, 2016, 10:36:12 PM »
please admin how can i add chitika adcode on smf after first post
Just replace the adcode above with Chikita's

Offline vitsland

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: HOW TO DISPLAY ADSENSE AFTER FIRST POST IN SMF
« Reply #3 on: May 05, 2016, 08:06:57 PM »
Have tried it but it shows Error

Online Timi Dapsin

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,501
  • Today is that tomorrow you worried about yesterday
    • View Profile
Re: HOW TO DISPLAY ADSENSE AFTER FIRST POST IN SMF
« Reply #4 on: May 06, 2016, 12:00:11 AM »
Have tried it but it shows Error
Can you attach your display.template.php here? when am less busy i will add it for you..

Offline vitsland

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: HOW TO DISPLAY ADSENSE AFTER FIRST POST IN SMF
« Reply #5 on: May 06, 2016, 06:21:17 PM »
I wanted to copy and paste the code but your reply box says am not allowed to post external

Online Timi Dapsin

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,501
  • Today is that tomorrow you worried about yesterday
    • View Profile
Re: HOW TO DISPLAY ADSENSE AFTER FIRST POST IN SMF
« Reply #6 on: May 06, 2016, 08:14:20 PM »
I wanted to copy and paste the code but your reply box says am not allowed to post external
dont post the code , save the display. template.php  code in a zip file and upload to datafilehost send me the download link

 


Other Topics To Read

Powered by EzPortal