The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
It seems like a lot of people don't know about these two gems. The first is inline if. vB for some reason has it's own iif function which works like:
PHP Code:
PHP Code:
The other one is unnecessary ifs. Check this out: PHP Code:
PHP Code:
![]() |
#2
|
|||
|
|||
![]()
I was searching similar instructions to develop that sequencer you were helping me with. Php.net is sometimes really hard to understand, because for many functions and stuff like the above do not have sufficient examples which will allow a new user like myself to understand completly the full capabilities of a function or other.
|
#3
|
|||
|
|||
![]()
php.net is designed more as a reference, not a tutorial (although IMO it has the best docs I have ever used for any language). You should use a book instead to learn PHP. This book should rock, judging by I've used a book by the same title except it was for Javascript: http://www.sams.com/catalog/product....-CDF148BBB9A0}
|
#4
|
|||
|
|||
![]()
I go to php.net to 'refer' to the large library of functions in their functions list, I find it that since they made php, they would have everything, of which they do, stuff like boolean and whatnot cannot be found on online resources easily and books, well many people most of the time do not wish to invest in books that won't come in use later.
I for one have an amazing part-time job, and will be checking up on the book you had suggested, and on any others, but til they come, I am stuck with php.net, vB.org and Good ol' filburt ![]() |
#5
|
||||
|
||||
![]()
I've known about those two techniques, but have had little use for them considering how rarely I use "echo" (since everything is done by templates), and that if I ever make functions, I usually never think about using the comparison operator when returning.
![]() |
#6
|
||||
|
||||
![]()
well, i also know both, the last one is a really good thing i think.
the ?: structure is surely fast, but it makes the code a bit harder to read, so i don't think you should use it in hacks you provied ![]() |
#7
|
|||
|
|||
![]()
Personally I don't think it's too hard to read but each to his own.
![]() |
#8
|
||||
|
||||
![]()
well, good proggers can read it without problems, but we learn in university not to use that kind of shourtcuts...
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|