Extension talk:Google AdSense/LQT Archive 1

Different placement for ads
Is it possible to add the option to show the ads like this? (above & below page content).--Alnokta 18:37, 14 October 2008 (UTC)
 * I think other Google AdSense extensions allow that type of behaviour. This extension however, was specifically designed to add AdSense but do it as unobtrusive as possible. Siebrand 00:26, 17 November 2008 (UTC)
 * Can it be placed on the top of the sidebar (under the logo)? Thank you! Coulomb 02:44, 13 March 2009 (UTC)

Usergroups
Can this extension be restricted to only show ads to guests? --Resplendent 17:22, 29 October 2008 (UTC)
 * Not without a change in the code. I'd be happy to apply a patch if you make it configurable with a global like $wgGoogleAdSenseAnonOnly, default set to false. Siebrand 00:24, 17 November 2008 (UTC)
 * hi, im another user and I would really love that sort of feature. 203.122.240.118 10:17, 24 November 2008 (UTC)
 * Can now  to only show it to anonymous users. Siebrand 01:19, 27 November 2008 (UTC)

Sample Data Request
I am new to Google Adsense. Sorry if this is a dumb question. For the client name, is that my name? For the AdSense Slot, I am assume that is the number associated with the ad and the AdSenseID starts with pub-?

Thanks.
 * See example config below as we use it on translatewiki.net. siebrand 22:17, 5 January 2009 (UTC)

require_once( "$IP/extensions/GoogleAdSense/GoogleAdSense.php" ); $wgGoogleAdSenseClient = 'pub-8440046403419693'; $wgGoogleAdSenseSlot = '9240280893'; $wgGoogleAdSenseID = 'translatewiki-2';

AdSense Client and AdSense ID
This extension currently isn't working for me. I logged out, cleared my cache and refreshed but the ads don't show up. I'm not entirely sure if I have the AdSense Client and AdSense id correct. Your AdSense client should be pub-XXXXXXXXXXXXXXXX, but what should your id be? The same format? Or where can I find this number?
 * In your adsense account you can find the HTML/JS to add to your page. You can extract the required text from there. See above for a working config example. siebrand 19:01, 3 February 2009 (UTC)

Stumped
I've looked though my HTML/JS bit on AdSense but still unsure what it means by the ID...I've got the client and slot sorted no problem...Just the ID doesn't make sense to me (Sorry for being dumb)--Satire3rd 08:55, 9 February 2009 (UTC)
 * The ID is somewhere in your AdSense account. This is the ID of profile for your AdSense format (in which you configured colours, and other stuff). siebrand 17:53, 9 February 2009 (UTC)

Doesn't work on my website
I download "GoogleAdSense.class.php", "GoogleAdSense.i18n.php", and "GoogleAdSense.php" and I put them under the "extensions\GoogleAdSense" folder. But it doesn't work. Is it because of the ID? I think ID is something you create when acquiring the AdSense code from google, right? Any idea? Thank you! Coulomb 10:15, 16 February 2009 (UTC)
 * See topic immediately above this one. siebrand 10:47, 16 February 2009 (UTC)
 * See https://www.google.com/adsense/adslots . The name is in the first colomn. siebrand 10:49, 16 February 2009 (UTC)
 * I think I got the right ID. I put $wgGoogleAdSenseClient, $wgGoogleAdSenseSlot, and, $wgGoogleAdSenseID on both my LocalSetting.php and GoogleAdSense.php. However, it still doesn't appear on my web page. Is the $wgGoogleAdSenseSrc the same for everyone? Or should I change it? Thank you. Coulomb 23:07, 17 February 2009 (UTC)
 * What MediaWiki version are you using? siebrand 08:00, 19 February 2009 (UTC)
 * My version is 1.13.2. After modifing the skin.php file, this extension works! Thank you so much!Coulomb 20:35, 11 March 2009 (UTC)

Perhaps newer versions don't work?
I'm on version 1.13.4. Is this perhaps the reason it does not work? Thanks
 * See the extension description. 1.14alpha or newer :) . Use 1.14.0rc1 for example--DaSch 07:47, 20 February 2009 (UTC)


 * Sorry don't know what that means. Is there a link. I've only just installed wikimedia


 * Waht about this http://download.wikimedia.org/mediawiki/1.14/mediawiki-1.14.0rc1.tar.gz --DaSch 11:56, 20 February 2009 (UTC)
 * Download link for MediaWiki 1.14 RC1. siebrand 11:57, 20 February 2009 (UTC)


 * Do you have to put the ID in both Localsettings.php and the GoogleAdSense.php extension file?--76.71.113.134 01:13, 26 February 2009 (UTC)


 * No: you should only make changes in LocalSetteings.php. —Emufarmers(T 09:47, 26 February 2009 (UTC)

A fix for older versions e.g. Media Wiki 1.13.2
Check your version by checking Special:Version page If you have an older version, update last few lines of the includes\Skin.php file to be:

}

+		wfRunHooks('SkinBuildSidebar', array($this, &$bar));

if ( $wgEnableSidebarCache ) $parserMemc->set( $key, $bar, $wgSidebarCacheExpiry );

wfProfileOut( __METHOD__ );

return $bar;

}

}
 * awesome this makes it work!

Not working with version 1.13.3, how to configure ?
I have uploaded following files in 'extensions/GoogleAdSense'


 * GoogleAdSense.class.php
 * GoogleAdSense.css
 * GoogleAdSense.i18n.php
 * GoogleAdSense.php

Then have inserted following text in localsettings.php(my wiki is in 'w' surdirectory'

Contents of MediaWiki:Common.css are: Skin.php has also been edited as mentioned above.

Still it is not working. please help.