![]() |
|
Thread Tools |
#1
|
||||||||
|
||||||||
Register Option Variables
How to register vbulletin option variables ?
Is there a better way without making a reference to $myvar ? Maybe Global Product Option Variable Registration ? Or
No members have liked this post.
Last edited by muratmunich; 17 Dec 2009 at 09:49. |
#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. No members have liked this post.
|
#3
|
||||
|
||||
I don't know that you have to register options. Did you try it without registering it?
__________________
Former vBulletin.org Staff Member
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before. W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
#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} No members have liked this post.
|
#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:
The Reason i am asking is, i don't want to reference to another Variable if it's possible. Thought somebody has the same issue and already know a Solution.. This is what i want if possible:
No members have liked this post.
|
#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. No members have liked this post.
|
#7
|
||||
|
||||
Code is working without a Reference and no Registration.
Fine - Thanks... No members have liked this post.
|
#8
|
|||
|
|||
Originally Posted by consolegaming
I thought bbuserinfo could be used as a :var rather than a :raw?
![]()
No members have liked this post.
|
#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.
No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 21:01.