PDA

View Full Version : Miscellaneous Hacks - Conditional Advertisement Marquee (text ads only )


cmedic101
25 Aug 2008, 18:26
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&nbsp;&nbsp;&nbsp;<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>
&nbsp;
&nbsp;
<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>
&nbsp;
<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>
&nbsp;
&nbsp;
<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>
&nbsp;
&nbsp;
<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

SEOvB
26 Aug 2008, 00:58
This is probably the worst and most complicated (lets not forget time consuming) way i've ever seen anyone insert simple HTML into a template...ever.

cmedic101
26 Aug 2008, 01:08
This is probably the worst and most complicated (lets not forget time consuming) way i've ever seen anyone insert simple HTML into a template...ever.

Thanks FRDS,
Guess what! it works:)

SwollenCranium
26 Aug 2008, 02:06
This is probably the worst and most complicated (lets not forget time consuming) way i've ever seen anyone insert simple HTML into a template...ever.



hahaha ... !

Doomday
26 Aug 2008, 03:37
Well the way i see it he is only trying to contribute with something to the comunity, so if you have nothing nice to say or you cant help him in anything why you enter here? :s

ehsanix
26 Aug 2008, 04:01
thanks , worths trying

cmedic101
26 Aug 2008, 12:28
Well the way i see it he is only trying to contribute with something to the comunity, so if you have nothing nice to say or you cant help him in anything why you enter here? :s

thanks , worths trying

Thanks for your support! If we could get the mod bashers to contribute as well the true power of Vbulletin would be unleashed completely


cmedic101

redraider
27 Aug 2008, 00:08
Well the way i see it he is only trying to contribute with something to the comunity, so if you have nothing nice to say or you cant help him in anything why you enter here? :s
Agree!

I like what mod does.

SEOvB
27 Aug 2008, 04:55
Thanks for your support! If we could get the mod bashers to contribute as well the true power of Vbulletin would be unleashed completely


cmedic101

Okay here is my contribution then.

Open header template and place


<if condition="in_array($forumid, array(xx,xx))">
<marquee style=" font-size:125%">
<strong>
For the largest selection, Best Prices, and Fastest Shipping of Mustang Parts! Visit&nbsp;&nbsp;&nbsp;<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>
&nbsp;
&nbsp;
<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>
&nbsp;
<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>
&nbsp;
&nbsp;
<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>
&nbsp;
&nbsp;
<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></strong></marquee>
</if>


Where you want it to appear.

Any questions?


PS. I also fixed your closing tag order, moving the </strong> before the </marquee> for proper coding.