Don't take vB's code as a model for perfect coding!
Unlike rumors of vB3, vB2 has astetically horribly written code. Here are some things that you should do (and that vB doesn't always do):
1. When referencing a key in an array, always put the key in quotes. See http://www.php.net/manual/en/language.types.array.php for an explanation. For example, do this: PHP Code:
PHP Code:
PHP Code:
PHP Code:
3. Indent or be smacked. Bad: PHP Code:
PHP Code:
I'm sure many more examples are out there. Reply if you have any. |
Good advice from the turtle. :) Makes a difference especially when trying to debug errors.
|
Yup...
Thanks for that:) *Sues vB;)* On a side note: I really wish I could change Erwin's spoiler message...:p Satan |
Indeed. Good tips there burt :)!
- miSt |
I'm really hoping vB3 has followed the true professional PHP guidelines [like filbert has shown us]. If not, I don't know what I'd do. Lol.
|
having a look at the vb_test.php script on vB.com shows how the code is layed out in vB3.
http://www.vbulletin.com/forum/attac...achmentid=4326 I also posted a thread on vB3 syntax last year https://vborg.vbsupport.ru/showthrea...threadid=42946 |
Quote:
Quote:
|
Quote:
|
Just looked at it again and it does look way better than vB2. Only problem is it's still using deprecated variables like $HTTP_POST_VARS (instead of $_POST or $_GET). Also I don't know why vB doesn't use the true and false keywords but instead uses 1 and 0 everywhere...
|
I don't see how you could have looked since you don't have the vB3 code but we only refer to $HTTP_POST_VARS when the server is running php < 4.1. You shouldn't base your assumptions on a test script that has to work on php 4.0.6 and greater.
PHP Code:
|
All times are GMT. The time now is 06:17 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|