How to Enable Adsense Banners without vBulletin Account

Now what do we have to do, to work around this nice vbulletin lock to make adsense work on your forums without activating it at vBulletin ?

Just a few steps needed, real simple :

Step 1, first retrieve your client pub id from the adsense control panel,

in ur adsense account, go to “My Account”, then look for “Property Information”

ur id will be something like this ca-pub-xxxxxxxxxxxxxxxxxx

Copy the number, we need it for further modding !

Step 2, open ./includes/init.php

Look for :
PHP:
// Add AdSense if present
$vbulletin->adsense_pub_id = ”;
$vbulletin->adsense_host_id = ”;
replace it with your own pub_id filled in in both fields !!
PHP:
// Add AdSense if present
$vbulletin->adsense_pub_id = ‘ca-pub-xxxxxxxxxxxxxxxxxx’;
$vbulletin->adsense_host_id = ‘ca-pub-xxxxxxxxxxxxxxxxxx’;
Save the file and reupload it.

Step 3, open ./includes/class_bootstrap.php

Look for

PHP:
$template->register(‘adsense_pub_id’, $vbulletin->adsense_pub_id);
$template->register(‘adsense_host_id’, $vbulletin->adsense_host_id);
replace with

PHP:
$template->register(‘adsense_pub_id’, $vbulletin->adsense_pub_id);
//$template->register(‘adsense_host_id’, $vbulletin->adsense_host_id);
Save the file and reupload it.

Step 4, open ./includes/class_postbit.php

Look for

PHP:
$template->register(‘adsense_pub_id’, $vbulletin->adsense_pub_id);
$template->register(‘adsense_host_id’, $vbulletin->adsense_host_id);
replace with

PHP:
$template->register(‘adsense_pub_id’, $vbulletin->adsense_pub_id);
//$template->register(‘adsense_host_id’, $vbulletin->adsense_host_id);
Save the file and reupload it.

Now the ads should show up normally on your website if you use the advertisement module to put banners on your website.

And vBulletin cannot see your adsense stats, because its bull****