vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Don't take vB's code as a model for perfect coding! (https://vborg.vbsupport.ru/showthread.php?t=50148)

Cyburbia 04-18-2003 04:13 PM

I'm a bit anal about consistency with grammar and capitalization. For instance, I'll see a menu item that reads:

Modify This part of Your profile

followed by

Modify another aspect of Your Profile

Even if you look at the borrom of this page, you'll see

Show a Printable Version (headline case)

and

Receive updates to this thread (sentence case)

I did a LOT of template searching and replacing to make things consistent.

TECK 04-22-2003 10:48 PM

Quote:

03-15-03 at 04:06 PM Scott MacVicar said this in Post #6
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

I still like to space out even the brackets:
Code:

$event = 'false';
if ( $string == 'value' )
{
        $event = 'true';
}

The TAB usage is vital also, instead of spaces. It will help you shrink the file size by a lot if it's a big one...


All times are GMT. The time now is 10:55 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
  • Page Generation 0.01237 seconds
  • Memory Usage 1,713KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete