Thread:Project:Support desk/Where do I put Google AdSense code in Vector.php for a banner ad at the top?/reply (11)

I just tried this but it's still not working.

EDIT

Should I do each part of the code separately? $wgHooks['BeforePageDisplay'][] = 'addGoogleAdSense';

function addGoogleAdSense( OutputPage &$out, Skin &$skin ) { $adSenseCode = ' google_ad_client = "ca-pub-xxxxxxxxxxxxx"; /* Banner Ad */ google_ad_slot = "xxxxxxxxxx"; google_ad_width = 728; google_ad_height = 90;

src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> ';

$out->addInlineScript( $adSenseCode );

return TRUE; }