News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Adsense ads never changing?

Started by jdougher, September 15, 2005, 11:47:22 AM

Previous topic - Next topic

jdougher

Got adsense working on my site:

http://www.photocamel.com/

However, I've noticed that the ads on the main page never change. It's always "d2x" ads, and the same ones. Ads on other pages do seem to change.

Note to other developers of forums: If you close a forum to the public, adsense won't get into that and hence you'll end up with generic ads on thos pages. Not so cool.

[Unknown]

I reloaded it and it seemed to change.  Probably just cached or something.

Quote from: jdougher on September 15, 2005, 11:47:22 AM
Note to other developers of forums: If you close a forum to the public, adsense won't get into that and hence you'll end up with generic ads on thos pages. Not so cool.

That's as expected.  The Adsense bot is a guest.  Block guests, you block it.  If you don't block it, guests can just pretend to be it - some people even do that already.  That ain't cool either.

-[Unknown]

trashy

Quote from: jdougher on September 15, 2005, 11:47:22 AMNote to other developers of forums: If you close a forum to the public, adsense won't get into that and hence you'll end up with generic ads on thos pages. Not so cool.

Is this true for v. 1.1 RC1?

Oldiesmann

Michael Eshom
Christian Metal Fans

worm5252

I added my google adsense to the index.template.php and I have had no problems what so ever. The ads change regularly (every load) and they are on every board, even private ones. I have do this to 3 themes now and they all work perfectly.

motumbo

Couldn't you write a script to give the Google bot access to restriced areas?  I know I've seen this discussed about websites before.

worm5252

You don't need to do that if you ad the google adsense code to the index.template.php file. I did not have to do that at all and I have zero problems with my google ads.

worm5252

Here this is how you do it using the classic theme.

Open index.template.php using a text editor such as notepad. I prefer Getdiz as it handles special characters differently.

First off find the following code:

</head>
<body>';

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


Right before the /head tag you want to add the google code minus the
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
code (your code may be different).


<script type="text/javascript">
<!-- google_ad_client = "Your Account Info will Be here";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
google_ad_channel ="";
google_page_url = document.location;
google_color_border = "6699CC";
google_color_bg = "003366";
google_color_link = "FFFFFF";
google_color_url = "AECCEB";
google_color_text = "AECCEB";
//--></script>
</head>
<body>';

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


Then you have to add the code that tell google ads where to show up (thats the code we left out). For example I like to have it show at the top right below the user's ac****** info. It shows there on every board. to do this I need to find the end of the user account code and add the Google script link like so:


<tr class="windowbg2">
<td colspan="2" valign="middle" align="center" class="tborder" style="border-width: 1px 0 0 0; font-size: smaller;">';

// Show the menu here, according to the menu sub template.
template_menu();<br>

<center>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center><br>
echo '
</td>
</tr>';


That's it, it is that simple!

worm5252

Our site has been dead as hell all day. It is 5pm where the server is located and we already have 815 page impression on google ads. We have that cus the method I post above works on the 3 different themes we have installed.

trashy

Quote from: worm5252 on December 05, 2005, 04:07:12 PM
You don't need to do that if you ad the google adsense code to the index.template.php file. I did not have to do that at all and I have zero problems with my google ads.

I get absolutely nothing but one PSA ad that hasn't changed since Day 1.  My site is locked down so that not even guests can read content.....

Advertisement: