• Welcome to Simple Machines Community Forum. Please login or sign up.
November 30, 2021, 01:17:02 AM

News:

SMF 2.0.18 has been released! Please update. Read more.


Google AdSense in SMF, various positions...

Started by Moonray, September 25, 2005, 11:46:56 PM

Previous topic - Next topic

bjp

I do no unsdertand
With RC3, if I use this http://www.simplemachines.org/community/index.php?topic=50984.msg553968#msg553968
The adsense is place at the top of the page, not after the firt post ?

Bigguy



Bigguy

Your missing some of that code for google and I have no idea were this came from cause it's not part of the code

if (!$message['member']['is_guest'])
         echo '


You don't need that bit. You set this in permissions.

Mr. Jinx

August 28, 2006, 02:30:37 PM #104 Last Edit: December 03, 2006, 09:06:05 AM by Mr. Jinx
SMF RC3 (default template)
For those who don't want to install a complete mod for this just modify the following:

In display.template.php find:
// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
echo '
<hr width="100%" size="1" class="hrcolor" />
<div class="signature">', $message['member']['signature'], '</div>';

echo '
</td>
</tr>
</table>
</td></tr>
</table>
</td></tr>';


and add AFTER:
if ($message['id'] == $context['first_message'])
echo '
<tr><td style="padding: 1px 1px 0 1px;">
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr><td class="windowbg">
<div align="center">
<script type="text/javascript"><!--
google_ad_client = "YOUR_ADSENSE_ID_GOES_HERE!!!";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "ECEDF3";
google_color_bg = "ECEDF3";
google_color_link = "005199";
google_color_text = "000000";
google_color_url = "005199";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</td></tr></table></td></tr>';


This will add a nice adsense banner after every first post.


bidawinner

Isd it possible to insert adsense code so that only unregistered visitors see the adsense..

The idea of course is so that members dont have to see advertising and that unregistered guest that maybe didnt want to join the forum but was simply looking for a product would see the adverts and click through to the product they were lookinmg for

uyuy

I have problem , my forum become error , though I have vanished the him of but still emerge like this http://webiseng.nurul.org/index.php?topic=3.0 [nofollow] every post.

what I which must conduct to be can return forum/post like initialy ?

thx
klik tes 1 [nofollow] | klik tes 2 [nofollow]

tuxq

This particular thread has gotten extremely cluttered and hard to follow.
I've included a screenshot with arrows pointing where I want my google ads to go.
Could someone be nice enough to post or re-post the respective code?

geezmo

Search for the Ad Management Mod, you can use that to position your ads almost anywhere in the forum.

Vinspire

Quote from: tuxq on October 11, 2006, 06:33:13 PM
This particular thread has gotten extremely cluttered and hard to follow.
I've included a screenshot with arrows pointing where I want my google ads to go.
Could someone be nice enough to post or re-post the respective code?

Check out this mod : http://www.simplemachines.org/community/index.php?topic=68632.0

ivanstech

i'm currenly using smf theme sullen madness , could anyone tell me how to insert adsense into the top of my page? thanks!

Vinspire

Quote from: ivanstech on October 18, 2006, 05:10:54 AM
i'm currenly using smf theme sullen madness , could anyone tell me how to insert adsense into the top of my page? thanks!

Check out this mod : http://www.simplemachines.org/community/index.php?topic=68632.0

kalton

Hi

I installed ad managment tool however I do not see it in the admin section.

I am running rc3

Please advise

Bigguy

October 29, 2006, 12:26:15 PM #114 Last Edit: October 29, 2006, 08:36:31 PM by Bigguy
Did you have any errors on install. ???


Bigguy

Add the edits to the modification.english.php file. You can find them in the .xml file or at:

www.smfads.com

Vinspire

Quote from: kalton on October 28, 2006, 05:05:24 PM
Hi

I installed ad managment tool however I do not see it in the admin section.

I am running rc3

Please advise

Are you using custom theme ?

dyrer

Quote
if ($message['id'] == $context['first_message'])
         echo '
         <div align="center">
        <script type="text/javascript"><!--
        google_ad_client = "pub-youradsenseID";
        google_ad_width = 468;
        google_ad_height = 60;
        google_ad_format = "468x60_as";
        google_ad_type = "text";
        google_ad_channel ="yourCHANNEL";
        google_color_border = "577494";
        google_color_bg = "577494";
        google_color_link = "FFFFFF";
        google_color_url = "999999";
        google_color_text = "EFEFEF";
        //--></script>
        <script type="text/javascript"
          src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
        </div>
         ';
This code in Firefox 2 display ads on the left not on center, can anyone help

Vinspire

changed the code

<div align="center">

to

<div align="left">

and see if that works :)

Advertisement: