Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: mechanic - marraskuu 02, 2011, 01:08:47 IP

Otsikko: Where to add Google Adsense Code To Top Of Post Page
Kirjoitti: mechanic - marraskuu 02, 2011, 01:08:47 IP
Can some one tell me where and how to add advertising like Adsense to the top of the post page, like the "advertisement"  at the top of this post?

is the file Post.template.php?  if so where can I add the code in the source?

Or is there an advertisement option within the admin panel that will place it??

Thanks in advance
Otsikko: Re: Where to add Google Adsense Code To Top Of Post Page
Kirjoitti: Ricky. - marraskuu 02, 2011, 03:51:36 IP
In short, under index.template.php of your forum.. find function

theme_linktree();

Put something like following just above it..
echo '<div align="center"><<<<YOUR AD CODE HERE >>>></div>';


Good Luck !

PS:There are two occurrence of theme_linktree(); in that file, you have to put that code before first occurrence.
Otsikko: Re: Where to add Google Adsense Code To Top Of Post Page
Kirjoitti: Biology Forums - marraskuu 02, 2011, 07:25:58 IP
Look in the index.template.php
Otsikko: Re: Where to add Google Adsense Code To Top Of Post Page
Kirjoitti: Deaks - marraskuu 26, 2011, 09:55:29 AP
mechanic I have marked this as solved as you havent gotten back to us, if this is incorrect please let us know also include what you have tried.  Also what SMF version.