VirtueMart - 1.1 Developer's Guide

Page of 44
Accessibility
26
All SQL queries must be compatible with at least MySQL version 4.0.
5.1.2.3. Mambo version compatibility
Future versions of VirtueMart will support Mambo versions from 4.5.1a until 4.5.3. It's allowed to copy
functionality from a later Mambo version into VirtueMart's ps_main file to maintain compatibility.
Compatibility to Mambo 4.5. 1.0.x is not supported.
On  the  other  hand,  it  is  necessary  to  stay  up-to-date  with  Joomla!.  Mambo  and  Joomla  will  be
developed in two different directions. This process will someday lead to the effect that components
written for Joomla, won't work on a Mambo 4.5.3 (or higher).
Note
VirtueMart will keep track with the Joomla development
5.1.3. Accessibility
5.1.3.1. XHTML Compliance
All HTML code used in files must be XHTML compliant. This means syntax like "
<br />
" instead
of "
<br>
" and using quotes for attribute values: <div id="myid"> instead of <div id=myid> and
using lower-case tag- and attribute names: <div>..</div> instead of <DIV>...</DIV>.
5.1.3.2. Javascript
Javascript can be used in the frontend (is NO problem at all in the backend and for all administration
pages).
But  in  the  frontend  all  functionality  that  is  used  by  a  customer  must  also  work  with  Javascript
disabled!  This  includes  Javascript-based  category  trees  (always  also  include  a  <noscript>Non  JS
code</noscript> section for people who have disabled Javascript).
5.2. Coding Guidelines
Register Globals is Off
All code must work with PHP register_globals = Off.
PHP Code Tags
Always use 
<?php  ?>
 to delimit PHP code, not the 
<?  ?>
 shorthand. This is required for PEAR
compliance and is also the most portable way to include PHP code on differing operating systems
and setups.
Single Quotes vs. Double Quotes
• Use  single  quotes  to  refer  to  an  index  between  brackets  of  an  array  (ex:  $foo['name']  and  not
$foo[name] or $foo["name"])
• Use single quotes instead of double quotes as much as possible because it's faster to parse.
Line Spacing
Indent using 4 spaces or a tab.