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

Thanks. I had no idea what to do before. I'll try this.

EDIT

I just used this, but it didn't work. If I didn't give enough information before, it's being used with Vector and I'd like it to display like the banner here.

$wgHooks['BeforePageDisplay'][] = 'addGoogleAdSense';

function addGoogleAdSense( OutputPage &$out, Skin &$skin ) { $adSenseCode = '   ';

$out->addInlineScript( $adSenseCode );

return TRUE; }

EDIT

I saw that I put in too much. I'm not supposed to include the tag.