MyBB Community Forums

Full Version: google adsense
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Dear sir,

Where's is the correct place to put the Google's Adsense code in the PHP files, and which files can be edited.

thanks
hey

you dont put the code in the php files!!

you have to put it in a template

regards
I'm new to mybb, can you give me more details?

thanks
hey

well go to your Admin CP > Template > Edit /delete > Expand

here you will have to choose between the templates,

each represents a place in the forum

in case you wanna add it to you index page, go to index page templates > index, place the code in the place you want there.

regards

I tried to do so but i only got this error message.... even when i tried to submit the template without submitting any changes.


mySQL error: 1054
Unknown column 'version' in 'field list'
Query: INSERT INTO mybb1_templates (title, template, sid, version, status, dateline) VALUES ('index', ' $headerinclude $header $forums
$lang->boardstats
$whosonline $birthdays $forumstats
new_posts\" /> $lang->new_posts
no_new_posts\" /> $lang->no_new_posts
forum_locked\" /> $lang->forum_locked
$logoutlink$lang->markread | $lang->forumteam | $lang->forumstats
$loginform

$footer ', '2', '100.07', '', '1134331566');
Are you running MyBB 1.0? Did you upgrade or install?
yes i'm running mybb 1 install
if the problem doesnt occur without the ad code, then im suspecting youre placing it inside something you shouldnt.

ill add that 'header' and 'footer' templates are also a great place to stick your adsense advertisements.
gusto5 Wrote:if the problem doesnt occur without the ad code, then im suspecting youre placing it inside something you shouldnt.

ill add that 'header' and 'footer' templates are also a great place to stick your adsense advertisements.
No can do, placing adsense ads in the footer or header is against the TOS. This is because they will be showing up on non-content pages such as login and register.
kodaks Wrote:
gusto5 Wrote:if the problem doesnt occur without the ad code, then im suspecting youre placing it inside something you shouldnt.

ill add that 'header' and 'footer' templates are also a great place to stick your adsense advertisements.
No can do, placing adsense ads in the footer or header is against the TOS. This is because they will be showing up on non-content pages such as login and register.

my appologies. Im not a adsense client, and consequently arent aware of a term in the TOS such as that. index it is Smile
Pages: 1 2