Astahost.com   Mar 21, 2010
Open Discussion & Free Web Hosting > Computers & Tech > Software > Bulletin Board Systems > Simple Machines Forum

How To Add Adsense Code In SMF

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Software > Bulletin Board Systems > Simple Machines Forum

How To Add Adsense Code In SMF

sid.calcutta
Hi everybody,

The thread "How to add Adsense Code in SMF" may not be helpful for experienced web-publishers who have already nurtured Simple Machines Forum a lot, but I think, it will be helpful for anyone who has installed Simple Machines Forum recently and who is considering to install Adsense Code in Simple Machines Forum ( SMF).

Here are the steps to show Ads just below the header section.

First of all, locate the file index.template.php.

Now goto the following section:

QUOTE
<body>';

// The logo, user information, news, and menu.
echo '
......

Note the HTML just below that:

QUOTE
<table cellspacing="0" cellpadding="0" border="0" align="center" width="95%" class="tborder">


It is a table to show logo, user information and menu.
Now find following line:
QUOTE
<br />', $context['current_time'], '
</td>
</tr>


Finally, insert a new table row and paste Adsense Code there.
CODE
<tr>
            <td colspan="2" valign="middle" align="center" class="tborder" style="border-width: 1px 0 0 0; font-size: smaller;">
                <script type="text/javascript"><!--
                google_ad_client = "YOUR PUBLISHER ACCOUNT ID";
                google_ad_width = 728;
                google_ad_height = 90;
                google_ad_format = "728x90_as";
                google_ad_type = "text_image";
                google_ad_channel ="3949701292";
                google_color_border = "336699";
                google_color_bg = "FFFFFF";
                google_color_link = "0066CC";
                google_color_url = "006699";
                google_color_text = "000000";
                //--></script>
                <script type="text/javascript"
                  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                </script>
            </td>
       </tr>


This will show Adsense Ads just below the header section.

To show Adsense Ads at the bottom of the webpages (above the footer section):
Locate the following lines in the same file i.e. index.template.php

QUOTE
</table>';
// Don't show a login box, just a break.
else
echo '
<br />';


Below that line Type the following code:

CODE

echo '
   <table cellspacing="0" cellpadding="3" border="0" align="center" width="95%" class="tborder">
    <tr>
            <td align="center">
                <script type="text/javascript"><!--
                google_ad_client = "YOUR PUBLISHER ACCOUNT ID";
                google_ad_width = 728;
                google_ad_height = 90;
                google_ad_format = "728x90_as";
                google_ad_type = "text_image";
                google_ad_channel ="3949701292";
                google_color_border = "336699";
                google_color_bg = "FFFFFF";
                google_color_link = "0066CC";
                google_color_url = "006699";
                google_color_text = "000000";
                //--></script>
                <script type="text/javascript"
                  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                </script>
          </td>
      </tr>
      </table>';

Now the Ads will be displayed both below the header and above the footer section of the webpages.

Regards,
Sid

 

 

 


Comment/Reply (w/o sign-up)

WeaponX
Nice short "guide" sid.calcutta. I actually do something similar in my forum already and it's right around the area where you mentioned in the first code sample.

There is an easier way to do this now though. Get the Ad Management Mode from SimpleMachines here. It will insert the ad in up to 3 sections in the forum.
QUOTE
This mod will install ads on the top of your page right under the toolbar. You can either choose to have it display on all the pages on your forum, or on three sections of you board. On the board index, thread index, and the thread itself. This mod allows you to turn on and off your ads as you wish. It also allows you to input your ad code in the features and settings section.
New features have been added so that you can install ads on the bottom of your forum and also after the first post. You are also able to disable ads on a per membergroup basis.

 

 

 


Comment/Reply (w/o sign-up)

techocian
Nice link WeaponX. I'll be sure to try it out sometime. I especially like the point about disabling ads for certain membergroups. That certainly caught my eye.

I agree that Sid's explanation of how to put Adsense ads on SMF forums is simple and brief. I like it and it could be used to substitute other stuff in there too, such as an "Affliate bar" maybe.

Comment/Reply (w/o sign-up)

FeedBacker
How to add codes in my smf posts?
How To Add Adsense Code In SMF

Hello there,

I am looking to know how to add my codes into the posts. Fore the moment I use simply banners and stuff like that, but I want to know the code for adding the codes into the posts!!

Thanks

-MAtt

Comment/Reply (w/o sign-up)

FeedBacker
Help Adsense
How To Add Adsense Code In SMF

Just a question, how can you put that block of adsense inside a post?, like the first one in this page...

Sorry for my english, but I�m searching on internet about the way to put adsense inside a post.

Thank you very much

-reply by Pablo

Comment/Reply (w/o sign-up)

(G)Harry Okoyibo
I Need help...
How To Add Adsense Code In SMF

Hello,

I have 2 questions

1)  I have always encounter a problem (Error) when I want to upgrading from SMF 1.1.7 to SMF 1.1.8

2) I can't found the Administration panel under the heading “Configuration”. Called “Ad Management” The Ad Management Mod. In here you will see 4 tabs, Edit ads, Add ads, Reports And Credits.

Please can anyone be of help to me.

Thanks


Comment/Reply (w/o sign-up)

(G)Floro

thanks for this... 1question..  how do I add this on my adsense account, like included it on my"manage ad" page ( for monitoring purpose )?

 

thanks again,

 Floro

-reply by Floro


Comment/Reply (w/o sign-up)

(G)Taiwo
The Mode of Answer
How To Add Adsense Code In SMF

Thank you for a nice and helpfull tutorial up there.However, it is only for SMF Classic Theme.How about that for the defaut theme and the Babylon theme?

Cheers.

-reply by Taiwo


Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : Adsense Code Smf


    Looking for add, adsense, code, smf



See Also,

*SIMILAR VIDEOS*
Searching Video's for add, adsense, code, smf
advertisement




How To Add Adsense Code In SMF

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com



Creative Commons License