Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

google Ads

Aloittaja Tvblivers, syyskuu 13, 2006, 07:59:48 IP

« edellinen - seuraava »

Tvblivers

Ok I really wanna put the google ads on my forum. But I'm not so good with the "html". I wanna put the ads right under the news in the Classic YaBB SE Theme. where do I put my code?

Ravyn

Ive never used google ads, but you'll want to open up your index.template.php file within the Themes/classic/ folder.

Find:

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<tr class="windowbg2">
<td colspan="2" height="24" class="tborder" style="border-width: 1px 0 0 0; padding-left: 1ex;">
<b>', $txt[102], ':</b> ', $context['random_news_line'], '
</td>
</tr>';


And add your google ad code after it, like so:

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<tr class="windowbg2">
<td colspan="2" height="24" class="tborder" style="border-width: 1px 0 0 0; padding-left: 1ex;">
<b>', $txt[102], ':</b> ', $context['random_news_line'], '
</td>
</tr>
                <tr>
                        <td>
                               googlead code here
                        </td>
                </tr>';



As stated above, Ive never worked with googleads, and so I don't know what kind of code structure they give you, but that is where you want to place it if you want it to show up underneath the News window.
Ravyn
-SMF Newbie in Training

Tvblivers

ok well this is how the code looks like <script type="text/javascript"><!--
google_ad_client = "pub-6849800934006973";
google_alternate_ad_url = "hxxp:www.cinemashops.com/vcd.php3?"; [nonactive]
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CAF99B";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
  src="hxxp:pagead2.googlesyndication.com/pagead/show_ads.js [nonactive]">
</script>

do you have an idea or so now?   

Advertisement: