cmedic101
08-24-2008, 10:00 PM
Conditional Advertisement Marquee (text ads only )
After playing with some marquee codes and a few vb conditionals. I was able to add a marquee under the logo header in a few selected forums. The process was very easy!(always backup your settings before playing with your template)
Demo Here
http://www.thebrotherhood-forum.com/vb/forumdisplay.php?f=32&styleid=56
1.Create a Phrase
Admin control panel, Languages & Phrases, Phrase manager, Add new Phrase
Phrase Type= Global
Product= Vbulletin
Varname= (what ever you want) Lets call it ad_marquee
Text=(this is where you will put your text ad code) I am using 5 text ads starting with a brief comment. The ( ) are used to space out the links.
<marquee style=" font-size:125%">
<strong>
For the largest selection, Best Prices, and Fastest Shipping of Mustang Parts! Visit <a href="http://www.xxxxxxxxx.com" target="_blank">xxxxxxxxxxxxxxx Parts<img src="http://www.xxxxxxxxxx.com/traffic_record.php?lc=xxxxxxxxxxxxxx" border="0" width="1" height="1"></a>
<a href="http://www.xxxxxxxxx.com" target="_blank">xxxxxxxxxxxxxxx Parts<img src="http://www.xxxxxxxxxx.com/traffic_record.php?lc=xxxxxxxxxxxxxx" border="0" width="1" height="1"></a>
<a href="http://www.xxxxxxxxx.com" target="_blank">xxxxxxxxxxxxxxx Parts<img src="http://www.xxxxxxxxxx.com/traffic_record.php?lc=xxxxxxxxxxxxxx" border="0" width="1" height="1"></a>
<a href="http://www.xxxxxxxxx.com" target="_blank">xxxxxxxxxxxxxxx Parts<img src="http://www.xxxxxxxxxx.com/traffic_record.php?lc=xxxxxxxxxxxxxx" border="0" width="1" height="1"></a>
<a href="http://www.xxxxxxxxx.com" target="_blank">xxxxxxxxxxxxxxx Parts<img src="http://www.xxxxxxxxxx.com/traffic_record.php?lc=xxxxxxxxxxxxxx" border="0" width="1" height="1"></a></marquee></strong>
After you enter your ad information save your new phrase.
2. Template edit....Header.... (if you have more than one style you will need to edit each style)
Admin control panel, Style Manager, Search in template, Find header.
if you want the ad_marquee to show in more than one forum then you will use the following conditional at the bottom of the header template
under the following line.... (find) $ad_location[ad_header_end]
Place below
<if condition="in_array($forumid, array(xx,xx))">$vbphrase[ad_marquee]
</if>
the xx= the forum id that you want to use replace the xx with numbers the forum Id can be found at the address bar in your browser.
If you just want to use the ad_marquee in one forum then you will use this conditional under the following line (find) $ad_location[ad_header_end]
Place Below
<if condition="$foruminfo['forumid'] == xx">$vbphrase[ad_marquee]</if>
Again the XX is the forum id that you want to display the ad_marquee in.
enjoy
Cmedic101
After playing with some marquee codes and a few vb conditionals. I was able to add a marquee under the logo header in a few selected forums. The process was very easy!(always backup your settings before playing with your template)
Demo Here
http://www.thebrotherhood-forum.com/vb/forumdisplay.php?f=32&styleid=56
1.Create a Phrase
Admin control panel, Languages & Phrases, Phrase manager, Add new Phrase
Phrase Type= Global
Product= Vbulletin
Varname= (what ever you want) Lets call it ad_marquee
Text=(this is where you will put your text ad code) I am using 5 text ads starting with a brief comment. The ( ) are used to space out the links.
<marquee style=" font-size:125%">
<strong>
For the largest selection, Best Prices, and Fastest Shipping of Mustang Parts! Visit <a href="http://www.xxxxxxxxx.com" target="_blank">xxxxxxxxxxxxxxx Parts<img src="http://www.xxxxxxxxxx.com/traffic_record.php?lc=xxxxxxxxxxxxxx" border="0" width="1" height="1"></a>
<a href="http://www.xxxxxxxxx.com" target="_blank">xxxxxxxxxxxxxxx Parts<img src="http://www.xxxxxxxxxx.com/traffic_record.php?lc=xxxxxxxxxxxxxx" border="0" width="1" height="1"></a>
<a href="http://www.xxxxxxxxx.com" target="_blank">xxxxxxxxxxxxxxx Parts<img src="http://www.xxxxxxxxxx.com/traffic_record.php?lc=xxxxxxxxxxxxxx" border="0" width="1" height="1"></a>
<a href="http://www.xxxxxxxxx.com" target="_blank">xxxxxxxxxxxxxxx Parts<img src="http://www.xxxxxxxxxx.com/traffic_record.php?lc=xxxxxxxxxxxxxx" border="0" width="1" height="1"></a>
<a href="http://www.xxxxxxxxx.com" target="_blank">xxxxxxxxxxxxxxx Parts<img src="http://www.xxxxxxxxxx.com/traffic_record.php?lc=xxxxxxxxxxxxxx" border="0" width="1" height="1"></a></marquee></strong>
After you enter your ad information save your new phrase.
2. Template edit....Header.... (if you have more than one style you will need to edit each style)
Admin control panel, Style Manager, Search in template, Find header.
if you want the ad_marquee to show in more than one forum then you will use the following conditional at the bottom of the header template
under the following line.... (find) $ad_location[ad_header_end]
Place below
<if condition="in_array($forumid, array(xx,xx))">$vbphrase[ad_marquee]
</if>
the xx= the forum id that you want to use replace the xx with numbers the forum Id can be found at the address bar in your browser.
If you just want to use the ad_marquee in one forum then you will use this conditional under the following line (find) $ad_location[ad_header_end]
Place Below
<if condition="$foruminfo['forumid'] == xx">$vbphrase[ad_marquee]</if>
Again the XX is the forum id that you want to display the ad_marquee in.
enjoy
Cmedic101