vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   $vbulletin->options[someoption] usage within the templates... (https://vborg.vbsupport.ru/showthread.php?t=91524)

Cloudrunner 07-02-2005 04:46 PM

$vbulletin->options[someoption] usage within the templates...
 
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
PHP Code:

$vbulletin->options['someoption'

within conditionals and
PHP Code:

$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 Code:

<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

Quote:

Originally Posted by merk
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

Quote:

Originally Posted by MarcoH64
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!


All times are GMT. The time now is 09:49 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01004 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete