PDA

View Full Version : 如何在vbulletin中加入adsense代码


sunshine
2006-01-12, 12:50 AM
You need to modify the following templates:

Forumhome
Forumdisplay
Showthread

Place your code after $navbar in each of these templates.

Example:

$navbar
<br />
<!-- Google Ads Begin -->
<center>
<script type="text/javascript"><!--
google_ad_client = "your code here";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "FF4400";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
<!-- Google Ads End -->

sunshine
2006-01-12, 12:56 AM
You can enclose the banner code within a template conditional to exclude the registration page, like this:

<if condition="(THIS_SCRIPT == 'forumdisplay' OR THIS_SCRIPT == 'showthread') AND ($forumid != X AND $forumid != Y AND $forumid != Z)">

ADSENSE CODE

</if>