vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Simple PHP Theory Questions (https://vborg.vbsupport.ru/showthread.php?t=127942)

myplacidcasual 09-30-2006 11:45 PM

Simple PHP Theory Questions
 
Excuse me for my ignorance.

Why exactly does vbulletin use all these variables (i.e. $vbphrase[ blah] to give you can example)?

Despite my ignorance I can imagine two reasons:

1. So this variable can be changed one time, in one place, and the whole site is updated.

2. To protect information.

My questions are related to those two reasons respectively:

1. Where do I go to find where these variables are defined so that I can redefine them (is it in the actual php file on the server, or in one of the templates)

2. Is there any danger to not using these values. For example I've been using normal html links to image files because its easier for me (a non programmer)

Thank you

P.S. if there are other reasons, or anyone can suggest good resources for understanding (for non-programmers)

Guest190829 10-02-2006 08:54 AM

Quote:

1. Where do I go to find where these variables are defined so that I can redefine them (is it in the actual php file on the server, or in one of the templates)
These variables are defined in the PHP files. They can be tested and accessed in the templates to allow for some logic testing in the templates.

Quote:

2. Is there any danger to not using these values. For example I've been using normal html links to image files because its easier for me (a non programmer)
Yes. These variables are here to help make your life easier. If you update the domain to your community and you are hardcoding the url to images instead of using the dynamic variable

HTML Code:

{$vbulletin->options['bburl']}
You will have a huge headache trying to update every hardcoded template. I can't stress it enough that you should get to know the structure of vBulletin and its variables if you are looking at modifying it. :)


There are some great tutorials and articles here. The following link is a nice organize list of them:

https://vborg.vbsupport.ru/showthread.php?t=99570


All times are GMT. The time now is 09:12 PM.

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.00930 seconds
  • Memory Usage 1,713KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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