Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-05-2008, 04:09 AM
NashChristian's Avatar
NashChristian NashChristian is offline
 
Join Date: Jul 2007
Location: Nashville, TN
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Code Questions: Is [hpurl] a good syntax for Home Page URL?

Hello,

Does [hpurl] = [homeurl]?

If not, what is the difference?

It seems to work in some applications that I'm using it in, but not in others. Should I avoid it and just use [homeurl]?

Also, what is the difference between '$vboptions' and '{$vbulletin->options}' ?

Thanks.
Jeff
Reply With Quote
  #2  
Old 06-05-2008, 07:31 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's your choice - it's your BB code.

You should use $vboptions in templates as using the brackets looks messy and is probably slower.
Reply With Quote
  #3  
Old 06-05-2008, 08:10 AM
NashChristian's Avatar
NashChristian NashChristian is offline
 
Join Date: Jul 2007
Location: Nashville, TN
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Dismounted,

Thanks for the reply.

I'm still a little confused.

First, is [hpurl] a pre-defined BB code by vB, which stands for home page url? I just guessed at the code, based on the bburl, and it seems to work in some applications, but I want to make sure that it is good code.

Is there a diffinitive list of BB codes somewhere, which vB uses, so that I can learn more about this?

Second, can I use the $vboptions in ALL applications if I prefer, or are there situations where I must use the brackets? I don't understand if it's just a preference, or serves a function.

Thanks.
Jeff
Reply With Quote
  #4  
Old 06-05-2008, 09:18 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should always use variables instead of a class in curly braces if available. Curly braces are used when you need to access class methods, class variables, multi-dimensional arrays, or when the boundries of a variable name can not be determined.

[hpurl] is not a default BB code.
Reply With Quote
  #5  
Old 06-05-2008, 09:43 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[bburl] is not a BBCode. The bburl bit is the key which is associated with the value for that setting. $vboptions is an array of options, you can read about arrays on the PHP site (See here).

I think if you hover over the input box for a setting (in the AdminCP) it will tell you the key name. Otherwise you can run a plugin with [minicode]var_dump()[/minicode] on [minicode]$vbulletin->options[/minicode] to see a full list of it's contents.
Reply With Quote
  #6  
Old 06-05-2008, 04:26 PM
NashChristian's Avatar
NashChristian NashChristian is offline
 
Join Date: Jul 2007
Location: Nashville, TN
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Opserty View Post
[bburl] is not a BBCode. The bburl bit is the key which is associated with the value for that setting.
Thanks for the clarrification. So is [hpurl] a key associated with home page url? Or did I make that up somehow?

Thanks.
Jeff
Reply With Quote
  #7  
Old 06-05-2008, 05:29 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know if hpurl exists... you'll have to try it and see. Check the link in my first paragraph it explains about arrays and what they are.
Reply With Quote
  #8  
Old 06-05-2008, 07:17 PM
NashChristian's Avatar
NashChristian NashChristian is offline
 
Join Date: Jul 2007
Location: Nashville, TN
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello.

I tried the URL, but it looks to be a little over my head.

Thanks for the feedback.
Jeff
Reply With Quote
  #9  
Old 06-05-2008, 08:51 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think $vbulletin->options[homeurl] is what you want. [hpurl] doesn't exist, unless you have modifications installed or something.
Reply With Quote
  #10  
Old 06-05-2008, 09:09 PM
NashChristian's Avatar
NashChristian NashChristian is offline
 
Join Date: Jul 2007
Location: Nashville, TN
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Opserty View Post
I think $vbulletin->options[homeurl] is what you want. [hpurl] doesn't exist, unless you have modifications installed or something.
Or $vboptions[homeurl] right? It's the exact same thing isn't it?
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 08:03 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05420 seconds
  • Memory Usage 2,252KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete