The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How can I define global var vb:raw?
Hi,
I want to know how to register a global variable {vb:raw my_var} as a link. I'm trying to do that to avoid time wasting when I have to change a url to my images, smilies, avatars, js scripts and etc... for example: in css templates, we use it like this --- Code:
{vb:raw vboptions.bburl}/images/sidebar.png Code:
{vb:raw vboptions.bburl}/clientscript/vbulletin_css/style1.css Code:
{vb:raw vboptions.bburl}/clientscript/jquery.js like this: Code:
{vb:raw new_url}/clientscript/jquery.js Thanks, |
#2
|
|||
|
|||
Well, if you created a new setting with new_url as the varname, then you could use {vb:raw vboptions.new_url}. To create an option you can temporarily turn on debug mode for your site, then go to the settings in the admincp, go to the group you want to add to, then click on the "Add Setting" link that will appear at the top of each group. You can also create a new setting group if you want (there's a link on the main option page).
Here's an article about turning on debug mode, if you aren't familiar with it: https://vborg.vbsupport.ru/showthread.php?t=265999 |
#3
|
|||
|
|||
Hi kh99, Thanks for the comments.
maybe I wasn't clear enough. I meant independent or custom url where I can use anywhere in all templates. I don't mean to change the main vb url, but rather to change url images, scripts and so on since I use a subdomain for all these stuff. does what I say make sense? |
#4
|
|||
|
|||
OK, maybe I don't understand. But if you create a setting, then you can enter any value you want and use it in any template. Maybe you're thinking that it's changing some other url because it has vboptions in the name? That's just the name of the array that holds all the settings. You can create a setting with any varname you want and use it for anything you want, and it won't affect anything else (as long as you choose a varname that it's already used, but I don't think it will let you create a duplicate). ETA: no, you can't create a duplicate, so you don't have to worry about that.
|
Благодарность от: | ||
fxdigi-cash |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|