The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
How to register vbulletin option variables ?
PHP Code:
Maybe Global Product Option Variable Registration ? Or PHP Code:
|
#2
|
|||
|
|||
![]()
You'd think there would be. I'd expect global template variables for $vbulletin->options, vboptions and stylevar at least. I would also expect {vb:user } too.
Do you have to register $vbulletin->options? I would've thought you'd only need to register $vbulletin then any property under it is automatically registered, like with arrays. |
#3
|
||||
|
||||
![]()
I don't know that you have to register options. Did you try it without registering it?
|
#4
|
|||
|
|||
![]()
Nah you don't need to register options, stylevar or user variables. I've used them fine in my custom template without any issues. I'm not sure which others are registered globally but I've used those arrays already in my custom templates. So I know for sure they're already globally registered.
Examples of userinfo, options and stylevar variables: {vb:raw bbuserinfo.username} {vb:raw vboptions.bburl} {vb:stylevar imgdir_misc} |
#5
|
|||
|
|||
![]()
I am now at work and can't test, but i'll do when i am back at home and tell you then Results.
But what i mean is option variables from other Products and not vbulletin. Example: PHP Code:
Thought somebody has the same issue and already know a Solution.. This is what i want if possible: PHP Code:
|
#6
|
|||
|
|||
![]()
That should be possible I'd have thought. As what it'll do is select all the same (presumably) options and just load them that way instead so yeah if that was how it was referred to before hand even if it's a custom product I'd say that it should work.
A custom field I added to the user table for example was still stored in the bbuserinfo array. Hope it works for ya, though it should do. |
#7
|
|||
|
|||
![]()
Code is working without a Reference and no Registration.
PHP Code:
|
#8
|
|||
|
|||
![]() Quote:
|
#9
|
|||
|
|||
![]()
Not sure. I just know using it like that worked for me lol. I wasn't even aware of a :var I just copied how they did it in their own templates i.e. in the header template.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|