Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
[TIP] Use Clean vB Compliant Code //__\\ Use Proper Grammar, Spelling etc.
N9ne
Join Date: Feb 2002
Posts: 1,495

 

Show Printable Version Email this Page Subscription
N9ne N9ne is offline 09-15-2002, 10:00 PM

Just some tips! Thought i'd give my two pence [hey, i'm in UK, we don't have cents! ]

1. Using clean vB complaint code
Well, I'm just posting this from experience not only here, but at vb.org too. When someone posts a hack, the templates have terrible code, some with hardcoded colours, some with all the wrong attributes, tags all wrong, with the wrong signs in the wrong place! It's hellacious to go through all the templates correcting mistakes that can easily be avoided! So remember, make sure you use vB specific code for your template mods for vB! Don't go using something that is completely new to vB. Chances are, if you use whatever type of HTML vB uses, it should work with no problems, as the end user has already got vB running perfectly! Try not to use your own "style" of tags etc. The only thing I recommend is using <br /> instead of <br> and so on...as it's more up-to-date that way. However make sure you don't start using "baby style" coding and put anything down that may achieve the same effect as some tags do, but not in all browsers!

Another tip for vB template modifications is cellpadding, and style consistency! I've seen this done in many places, by many people in the past and still happens to this day. Please, for everyone's sake use replacement variables *EVERYWHERE POSSIBLE*, should you need not to use that, it may be in placed for percentage widths etc. However, don't use pixel widths!

A tip for the creators out there, let's say you're confused as to what i'm getting at above, here's how it goes. Let's say we're changing the forumhome template. Maybe we want to create a compact footer [just using this as an example as i've already done it], now there's a certain consistency in table widths all the way from the top to bottom of forumhome. Make sure you keep this going and don't just create a table with your own width. Use the variable contenttablewidth or something like that, so it looks better when it's used by someone. Also, make sure you use the right colours, like firstaltcolor, secondaltcolor and so on! And then there's cellpadding, make sure you don't just get rid of cellpadding, make sure it's 4, which it is in most places in vB! Make sure you think it looks like it fits in.

I could say a lot more but my mind has gone blank after saying all that, so i'll move onto my second tip.

2. Proper Grammar, Punctuation and Spelling
I've also had a bad experience with people using incorrect grammar, punctuation and spelling in their template modifications, however this is mostly at vb.org when templates are created and there's a whole new page with different and new text. However it applies to all anyway, as at some point you might put down some new text! Now, make sure that you have all of the above correct, the last thing someone wants, especially if they run a professional board is to have to go through all their templates changing text that's incorrect, which gives a bad impression. I can understand there are people from other countries and with different mother tongues here and at vb.org, however you can simply give your templates to someone who knows English to a certain extent who can check it over. That way it makes it even easier for people who know nothing about HTML or the vB template system, but want to change the way it looks; so they then come here, grab some instructions, apply them as they're easy to understand, and end up looking really neat and tidy and useful because the code is clean, language is good and it's a fantastic modification!



*stretches* ahhhhh long post eh? Well there's my tips, please leave comments
Reply With Quote
  #2  
Old 09-25-2006, 09:48 AM
bairy bairy is offline
 
Join Date: Oct 2005
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vB documentation has a list of standards that should be followed: http://www.vbulletin.com/docs/html/codestandards
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:34 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.09524 seconds
  • Memory Usage 2,189KB
  • Queries Executed 17 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete