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

Don't hack core files (Vector.php in this case).

There's many routes to take that don't involve hacking core, here's two that should work fine for you:


 * Use hook ) and access method  on the $out object to add the script.
 * Use hook (like Extension:Google AdSense 2) to add it to the sidebar html.

These hooks would be created in your LocalSettings.php file.