PDA

View Full Version : $vbulletin->options[someoption] usage within the templates...


Cloudrunner
07-02-2005, 04:46 PM
I seem to be having difficulty with this, I can only get the options to show in the templates when I use $vboptions[someoption].

So what's the deal, do I use $vbulletin->options in the templates, or $vboptions? What the standard for this?

I'm wanting to get everything in line with the new system, and not use some legacy thing from previous versions, so if we are to be using $vbulletin->options in the templates, then I want to use that and not the legacy way...

P.s. I use$vbulletin->options['someoption']within conditionals and $vbulletin->options[someoption]outside of conditionals.

For example:

I eval the template and everything is parsed correctly for $vbulletin-options, UNLESS the $vbulletin->options[bbtitle] is in the header area of the template...See following:<html dir="ltr" lang="en">
<head>
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-cache" />
<!-- end no cache headers -->
<title>Array[bbtitle] - Donations</title>
.....<SNIP>.....
<img src="Array[bburl]/includes/pp_image.php?fill=Array[bar_fill_color]&border=Array[bar_border_color]&background=Array[bar_background_color]&percentage=0&width=200&height=9">All those Array[something]s are supposed to be pulled from the $vbulletin->options array...So what's my issue here?

anyone?

merk
07-03-2005, 01:31 AM
Try

{$vbulletin->options[blah]} (and $vboptions still works too :))

Cloudrunner
07-03-2005, 01:34 AM
Try

{$vbulletin->options[blah]} (and $vboptions still works too :))
What's the curly-braces do?

Marco van Herwaarden
07-03-2005, 05:53 AM
The curly braces mark the begin and end of a variable. You can use this in situations where php might not be able to find it automatic (or you can always use it).

Cloudrunner
07-03-2005, 12:24 PM
The curly braces mark the begin and end of a variable. You can use this in situations where php might not be able to find it automatic (or you can always use it).
Beautiful!

Thank you guys!