ComputerVitals
Wed 25th Apr '07, 10:44am
Lets say I wanted to make a google adsense code template so I wouldn't have to put in the adsence code everywhere.
Here's how.
Step 1
Styles and Templates --> Style Manager -->
Select your style --> Add new Template
Title: google
Template:
<script type="text/javascript"><!--
google_ad_client = "your adsence id here";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
google_ad_channel ="";
google_color_border = "3E5C92";
google_color_bg = "BBC7CE";
google_color_link = "000066";
google_color_url = "22229C";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
Save and exit
Step 2
Plugin Manager --> Add New Plugin
Product: vBulletin
Hook: vbulletin:General -- parse_templates
Title: google adsence
Excution: 5
Plugin php code:
eval('$google = "' . fetch_template('google') . '";');
Step 3
Add: $google
to the templates where you would like the code to be displayed.
Here's how.
Step 1
Styles and Templates --> Style Manager -->
Select your style --> Add new Template
Title: google
Template:
<script type="text/javascript"><!--
google_ad_client = "your adsence id here";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
google_ad_channel ="";
google_color_border = "3E5C92";
google_color_bg = "BBC7CE";
google_color_link = "000066";
google_color_url = "22229C";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
Save and exit
Step 2
Plugin Manager --> Add New Plugin
Product: vBulletin
Hook: vbulletin:General -- parse_templates
Title: google adsence
Excution: 5
Plugin php code:
eval('$google = "' . fetch_template('google') . '";');
Step 3
Add: $google
to the templates where you would like the code to be displayed.