PDA

View Full Version : Simple PHP Theory Questions


myplacidcasual
09-30-2006, 11:45 PM
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
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.


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


{$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