Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: glascor on March 22, 2011, 09:16:58 AM

Title: How to I put adsense in my forums
Post by: glascor on March 22, 2011, 09:16:58 AM
Hi How would I put adsense in my forums?

Thanks,

Rob
Title: Re: How to I put adsense in my forums
Post by: technicalworks on March 22, 2011, 09:23:38 AM
ned help for the same topic i use  1.1.13 version
can any1 suggest a suitable mod or manual procedure to do the same!
Title: Re: How to I put adsense in my forums
Post by: kat on March 22, 2011, 09:55:43 AM
Search the mod site for "Ad Management". :)
Title: Re: How to I put adsense in my forums
Post by: glascor on March 23, 2011, 07:49:01 PM
Hi I did most of the updates for the Ad Management tool.  The items below are in the ./Themes/default/index.template.php and I was not sure where they go.  How do I run the install.php file.  I tried to get into www.smfads.com but for some reason it will not let me register.  Any help would be greatly appreciated.

Thanks


Find: [Select]

<body>';

Add After: [Select]

   
   //Display ads on the top of the page
   if (function_exists("show_topofpageAds"))
   {
      $ads = show_topofpageAds();   
      if(!empty($ads))
         if($ads['type']==0)
            echo $ads['content'];
         else
            eval($ads['content']);   
      unset($ads);
   }


Find: [Select]

                     </td>

Add After: [Select]

';
                     //Welcome Ads
                     if (function_exists("show_welcomeAds"))
                     {
                        $ads = show_welcomeAds();
                        if(!empty($ads))
                        {
                           echo '<td class="windowbg2">';
                           if($ads['type']==0)
                              echo $ads['content'];
                           else
                              eval($ads['content']);
                           echo '</td>';
                        }
                        unset($ads);
                     }
                  echo '
Title: Re: How to I put adsense in my forums
Post by: Bigguy on March 23, 2011, 08:00:25 PM
You should:

1.) use package manager to try to install the mod
2.) make note of errors it finds before it installs (do not install it though)
3.) Make manual edits to the failed files
4.) use package manager to install, ignoring the errors
5.) Replace failed files with the manually edited ones.

Some edits like the one for the body might be a bit different in other themes. It could be:

<body>
<body onload>
body

Or some other variation.

For the <td> You really have to install it on the default theme and compare where the ad mod puts the code and then search for the code around that area in your custom theme. Hope that made sense.
Title: Re: How to I put adsense in my forums
Post by: glascor on March 24, 2011, 07:35:33 AM
thanks, how do I run the package manager?
Title: Re: How to I put adsense in my forums
Post by: Illori on March 24, 2011, 07:36:06 AM
take a look at Package Manager (http://docs.simplemachines.org/index.php?board=49.0;sort=subject)
Title: Re: How to I put adsense in my forums
Post by: glascor on March 24, 2011, 12:05:05 PM
Thanks so much for the help, all is good now. Sure I will have other questions while getting my forum and website up.

Title: Re: How to I put adsense in my forums
Post by: Bigguy on March 24, 2011, 12:09:28 PM
Glad you got it. :)