vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Code Questions: Is [hpurl] a good syntax for Home Page URL? (https://vborg.vbsupport.ru/showthread.php?t=181572)

NashChristian 06-05-2008 04:09 AM

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

Dismounted 06-05-2008 07:31 AM

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.

NashChristian 06-05-2008 08:10 AM

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

Dismounted 06-05-2008 09:18 AM

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.

Opserty 06-05-2008 09:43 AM

[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.

NashChristian 06-05-2008 04:26 PM

Quote:

Originally Posted by Opserty (Post 1541376)
[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

Opserty 06-05-2008 05:29 PM

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.

NashChristian 06-05-2008 07:17 PM

Hello.

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

Thanks for the feedback.
Jeff

Opserty 06-05-2008 08:51 PM

I think $vbulletin->options[homeurl] is what you want. [hpurl] doesn't exist, unless you have modifications installed or something.

NashChristian 06-05-2008 09:09 PM

Quote:

Originally Posted by Opserty (Post 1541826)
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?

Boofo 06-05-2008 09:19 PM

There is no [hurl] and never has been.

Opserty 06-05-2008 09:21 PM

Quote:

Originally Posted by NashChristian (Post 1541838)
Or $vboptions[homeurl] right? It's the exact same thing isn't it?

Yes, in templates you use $vboptions.

NashChristian 06-05-2008 09:21 PM

Quote:

Originally Posted by Boofo (Post 1541850)
There is no [hurl] and never has been.

Boofo,

I was talking about [hpurl]. Does that exist?

--------------- Added [DATE]1212704565[/DATE] at [TIME]1212704565[/TIME] ---------------

Quote:

Originally Posted by Opserty (Post 1541851)
Yes, in templates you use $vboptions.

Thanks for the help!
:)

Boofo 06-05-2008 09:22 PM

Not that either. Unless they snuck it in when I wasn't looking. ;)

NashChristian 06-05-2008 09:36 PM

Quote:

Originally Posted by Boofo (Post 1541854)
Not that either. Unless they snuck it in when I wasn't looking. ;)

That's wierd. I wonder why it is working on my vBa navigation module! I've had problems with the code in other places, which is why I ask, but it seems to work fine on my navigation module.

Wierd!

Thanks for the help.
:) Jeff

King Kovifor 06-05-2008 09:38 PM

Quote:

Originally Posted by NashChristian (Post 1541861)
That's wierd. I wonder why it is working on my vBa navigation module! I've had problems with the code in other places, which is why I ask, but it seems to work fine on my navigation module.

Wierd!

Thanks for the help.
:) Jeff

I would assume that vBAdvanced CMPS adds that syntax on their home page specifically. As it does not come with vBulletin.

NashChristian 06-05-2008 09:44 PM

Quote:

Originally Posted by King Kovifor (Post 1541867)
I would assume that vBAdvanced CMPS adds that syntax on their home page specifically. As it does not come with vBulletin.

Maybe it's a spoof. I just guessed at the code, based on the bburl code, but for some reason it seems to be working on my CMPS navigation module.

Thanks.

Dismounted 06-06-2008 07:10 AM

As said, vBA probably adds that variable, hence it does not work anywhere else.

Marco van Herwaarden 06-06-2008 10:26 AM

And if the issue you have is with vBAdvanced, then the best place to ask i their website.

NashChristian 06-06-2008 12:10 PM

Quote:

Originally Posted by Marco van Herwaarden (Post 1542212)
And if the issue you have is with vBAdvanced, then the best place to ask i their website.

I was just wanting to find out for sure whether the code was stock vB or not. Otherwise I would have posted it at vBa. I understand now, that it's not.

I'm all set. Thanks!
Jeff


All times are GMT. The time now is 01:03 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.01117 seconds
  • Memory Usage 1,757KB
  • 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
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)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