vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   vB3 - Coding and changes help :) (https://vborg.vbsupport.ru/showthread.php?t=59744)

MindTrix 01-05-2004 05:40 PM

vB3 - Coding and changes help :)
 
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:

PHP Code:

<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:

PHP Code:

<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!!


All times are GMT. The time now is 07:08 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.00935 seconds
  • Memory Usage 1,716KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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