The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Code Questions: Is [hpurl] a good syntax for Home Page URL?
Hello,
Does [hpurl] = [homeurl]? If not, what is the difference? It seems to work in some applications that I'm using it in, but not in others. Should I avoid it and just use [homeurl]? Also, what is the difference between '$vboptions' and '{$vbulletin->options}' ? Thanks. Jeff |
#2
|
||||
|
||||
It's your choice - it's your BB code.
You should use $vboptions in templates as using the brackets looks messy and is probably slower. |
#3
|
||||
|
||||
Hello Dismounted,
Thanks for the reply. I'm still a little confused. First, is [hpurl] a pre-defined BB code by vB, which stands for home page url? I just guessed at the code, based on the bburl, and it seems to work in some applications, but I want to make sure that it is good code. Is there a diffinitive list of BB codes somewhere, which vB uses, so that I can learn more about this? Second, can I use the $vboptions in ALL applications if I prefer, or are there situations where I must use the brackets? I don't understand if it's just a preference, or serves a function. Thanks. Jeff |
#4
|
||||
|
||||
You should always use variables instead of a class in curly braces if available. Curly braces are used when you need to access class methods, class variables, multi-dimensional arrays, or when the boundries of a variable name can not be determined.
[hpurl] is not a default BB code. |
#5
|
|||
|
|||
[bburl] is not a BBCode. The bburl bit is the key which is associated with the value for that setting. $vboptions is an array of options, you can read about arrays on the PHP site (See here).
I think if you hover over the input box for a setting (in the AdminCP) it will tell you the key name. Otherwise you can run a plugin with [minicode]var_dump()[/minicode] on [minicode]$vbulletin->options[/minicode] to see a full list of it's contents. |
#6
|
||||
|
||||
Quote:
Thanks. Jeff |
#7
|
|||
|
|||
I don't know if hpurl exists... you'll have to try it and see. Check the link in my first paragraph it explains about arrays and what they are.
|
#8
|
||||
|
||||
Hello.
I tried the URL, but it looks to be a little over my head. Thanks for the feedback. Jeff |
#9
|
|||
|
|||
I think $vbulletin->options[homeurl] is what you want. [hpurl] doesn't exist, unless you have modifications installed or something.
|
#10
|
||||
|
||||
Or $vboptions[homeurl] right? It's the exact same thing isn't it?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|