Jump to content
xisto Community
Sign in to follow this  
iGuest

How To Add Adsense Code In SMF

Recommended Posts

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:

 

<body>';

 

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

echo '

......

Note the HTML just below that:

 

<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:

<br />', $context['current_time'], '

</td>

</tr>


Finally, insert a new table row and paste Adsense Code there.

<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

 

</table>';

// Don't show a login box, just a break.

else

echo '

<br />';

 

 

Below that line Type the following 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

Share this post


Link to post
Share on other sites

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.

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.


Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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 AdManagement Mod. In here you will see 4 tabs, Edit ads, Add ads, ReportsAnd Credits.

Please can anyone be of help to me.

Thanks

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
The Mode of AnswerHow 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

Share this post


Link to post
Share on other sites
Good workHow To Add Adsense Code In SMF

Hi, I have had to custom embed code many times on many platforms - Wordpress, Joomla, SMF, phpBB, etc. Etc. Etc.

Just dropping a note to let you know what a helpful post this was - normally I would trial and error the embed over a few hours, and now you provided all of that!

Folks...This is what it looks like when someone creates value on their blog.

TZ - Zulit

 

Share this post


Link to post
Share on other sites
Placing ads on SMF ( I know this has been asked a lot but this is different)How To Add Adsense Code In SMF

Okay so I understand html and I know where to find the index.Template.Php but there is no html on that page. Its all javascript. No tags or anything and I am very confused. When I know where to find the code I know how to insert the ads but I cannot find it anywhere. Please help.

-reply by Marc

Share this post


Link to post
Share on other sites
Smf 1.1.14 not showing ad spaceHow To Add Adsense Code In SMF

Hi,I installed ad management 3.0.1 in SMF1.1.14 forum and Ad management is also showing in Admin but After adding the code in Add Ad tab..Nothing is showing on my page.

-reply by Nitin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.