PDA

View Full Version : vB3 - Coding and changes help :)


MindTrix
01-05-2004, 05:40 PM
Ok well i am in the process of learning PHP myself, now i been told vB3 is coded differently and better with new code used kind of thing.

Basically would someone care to explain some new features (coding wise) that are in vB3 that makes things easier and why? For instance i noticed in Templates they now use <if> tags. Am i right in thinking these are the same as the IF statement in php files? If so why have them in templates etc?

Basically just need things pointed out and explained so i can understand them, and hopefully other people :) PLeaaaaaaaaaaaaseeeee :)


Cheers guys!

NTLDR
01-05-2004, 05:50 PM
The <if> tags work in the same way as an if PHP tag (because thats what it really is ;)) however you are limited to what you can do with them, for example the following wouldn't work:

<if condition="construct_forum_jump()">$forumjump</if>

This is due to the fact you are limited to the functions that are called via the <if> tag, vB does however warn you of this and make you change it.

Why use them? They significantly reduce the number of templates needed for starters. For example with vB2, if you wanted a certain message to appear to guests then you would need a seperate template for it and code in the file to eval it, with vB3 this requires one simple conditional.

MindTrix
01-05-2004, 05:53 PM
Ahh i see Thank you NTLDR!!! What are these condition things aswell?

Basically theres alot of things i see in vB3 i have yet too understand :(
I appreciate your response though you explained exactly how i wanted someone too :)

NTLDR
01-05-2004, 06:00 PM
Condition is just a word, which happens to sound right and needs to be there ;)

if condition X is true then Y else Z

would be:

<if condition="X">Y<else />Z</if>

MindTrix
01-05-2004, 06:01 PM
Ahh i see now, kind of pointless in a sense then :)

Cheers!!