Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> How To Add Adsense Code In SMF
sid.calcutta
post Apr 23 2006, 06:49 PM
Post #1


Advanced Member
******

Group: Validating
Posts: 111
Joined: 28-January 06
Member No.: 10,917



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
Go to the top of the page
 
+Quote Post
WeaponX
post Apr 26 2006, 01:46 AM
Post #2


Way Out Of Control - You need a life :)
Group Icon

Group: Members
Posts: 1,086
Joined: 21-June 05
From: New York
Member No.: 6,440



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.
Go to the top of the page
 
+Quote Post
techocian
post Apr 27 2006, 12:45 AM
Post #3


'Prentice de-Zighner
Group Icon

Group: Members
Posts: 368
Joined: 23-January 05
From: USA
Member No.: 2,290



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.
Go to the top of the page
 
+Quote Post
iGuest
post Jan 16 2008, 03:08 PM
Post #4


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



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
Go to the top of the page
 
+Quote Post
iGuest
post May 12 2008, 03:15 PM
Post #5


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Basic css code(2)
  2. Rapid HTML code generation using simple PHP(8)
  3. Google Adsense(22)
  4. Google Adsense Alternative(41)
  5. Google Adsense Tips(1)
  6. Do You Program/code Your Own Games(11)
  7. VB.NET: Howto Add And Delete Files(8)
  8. Does Anyone Code Using Turing(2)
  9. Myspace Code Changing(10)
  10. Free Shoutbox? HTML, Flash or PHP Code(24)
  11. Uploading Image File Through JSP Code To Server(9)
  12. How Do I Put A Site On Adsense Registration ?(6)
  13. Dynamically Change The Background Image On Mouse Effects!(3)
  14. The Basics Of Google Adsense(2)
  15. Disable Task Manager 1 Line Code![vb6](32)
  1. Tips For Modifying Wordpress Code(1)
  2. Decompile An Exe To Source Code(10)
  3. Whats The Ascii Code Of Your Name?(4)
  4. Tips To Earn In Google Adsense(7)
  5. Strange Ascii Code 22 Character Detected In Connection String(9)
  6. Domain.com Coupon Code(1)
  7. How Bad Are Is $0.03 For 2 Clicks On Adsense?(2)
  8. Dynamic Php Image And Better Php Code Question(10)
  9. Need Help With Code For Battle Calculator For An Mmorpg I Am Planning(0)
  10. Code To Text Ratio Tool(0)
  11. Php Random Selector(2)
  12. Activation Code(7)
  13. Instant Replay Code?(0)


 



- Lo-Fi Version Time is now: 22nd August 2008 - 12:04 AM