Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 17 Dec 2009, 08:06
muratmunich muratmunich is offline
 
Join Date: Oct 2005
Register Option Variables

How to register vbulletin option variables ?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Is there a better way without making a reference to $myvar ?

Maybe Global Product Option Variable Registration ?

Or
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________

Last edited by muratmunich; 17 Dec 2009 at 08:49.
Reply With Quote
  #2  
Old 17 Dec 2009, 15:08
James Birkett James Birkett is offline
 
Join Date: Jun 2009
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.
Reply With Quote
  #3  
Old 17 Dec 2009, 16:11
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.)
Reply With Quote
  #4  
Old 17 Dec 2009, 18:54
consolegaming consolegaming is offline
 
Join Date: Jan 2007
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}
Reply With Quote
  #5  
Old 17 Dec 2009, 19:01
muratmunich muratmunich is offline
 
Join Date: Oct 2005
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Reply With Quote
  #6  
Old 17 Dec 2009, 19:13
consolegaming consolegaming is offline
 
Join Date: Jan 2007
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.
Reply With Quote
  #7  
Old 17 Dec 2009, 19:19
muratmunich muratmunich is offline
 
Join Date: Oct 2005
Code is working without a Reference and no Registration.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Fine - Thanks...
__________________
Reply With Quote
  #8  
Old 17 Dec 2009, 20:02
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Originally Posted by consolegaming View Post
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}
I thought bbuserinfo could be used as a :var rather than a :raw?
Reply With Quote
  #9  
Old 17 Dec 2009, 20:05
consolegaming consolegaming is offline
 
Join Date: Jan 2007
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.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 12:49.

Layout Options | Width: Wide Color: