The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Need help on a basic Script
I would like to set up a script that changes, when Users change the style. This could be used for Advertising, changing the colour, when the Skin changes.
I am using 3 different styles so it should have an if, else, elseif function. But I am really not sure how to set it up. Style IDs: 16, 15 and 31 Code 16: Code:
<script type="text/javascript"><!-- google_ad_client = "pub-5644726162652543"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; google_ad_channel = ""; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> Code:
<script type="text/javascript"><!-- google_ad_client = "pub-5644726162652543"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; google_ad_channel = ""; google_color_border = "336699"; google_color_bg = "FFFFFF"; google_color_link = "0000FF"; google_color_text = "000000"; google_color_url = "008000"; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> Code:
<script type="text/javascript"><!-- google_ad_client = "pub-5644726162652543"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; //2007-07-14: Welcome Area AD google_ad_channel = "5574964608"; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "0000FF"; google_color_text = "000000"; google_color_url = "008000"; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> So to put it into a nutshell: If Style ID = 16 then Code 16 else if Style ID = 15 then Code 15 else if Style ID = 31 then code 31 Thank you, Hendricius |
#2
|
||||
|
||||
Code:
<if condition="$styleid == 15"> <!-- code if style id is 15 //--> </if> |
#3
|
|||
|
|||
you do not need a condition, you just have to edit the proper style...
example, if you put your code in header, the template "header" of the style #15 would contain the code #15... why is it so complicated? |
#4
|
||||
|
||||
nexialys has the idea. Everyone's thinking too advanced.
|
#5
|
||||
|
||||
Yea. But I would like to use it together with my VBadmanagement. Some Usergroups are not seeing ADs, that's why I need it in those IF-else conditions.
Code:
<if condition="$styleid == 15"> <!-- code if style id is 15 //--> </if> |
#6
|
|||
|
|||
if you want to manage it from a script released here, just as in the related topic... this will be easier.
|
#7
|
|||
|
|||
Not really.
There is no reason to have changes in all the sub-styles if a simple condition is used in a master template/style. That asumes all styles are very similar of course. |
#8
|
||||
|
||||
|
#9
|
||||
|
||||
Yep, I tried it, however, it doesn't work :/
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|