Revision [611]
Last edited on 2006-07-17 16:34:14 by HernoLAdditions:
[[PhplistDevelopment phplist Development]]
=====phplist Coding Style Guidelines=====
Please use the following guidelines when developing code for phplist.
=====phplist Coding Style Guidelines=====
Please use the following guidelines when developing code for phplist.
Deletions:
=====PHPlist Coding Style Guidelines=====
Please use the following guidelines when developing code for PHPList.
Additions:
-Use long-format code escaping: %%(php)%% (manual page: [[http://www.php.net/manual/en/language.basic-syntax.php]])
-Use ##echo## to output all data, and don't forget the semi-colon:%%(php)%%
-Add newlines ##""(\n)""## after output lines, to help debug the output.
-When embedding variables in
-Make sure you properly quote array keys, i.e. %%(php)$array['key']%% and **NOT** %%(php)$array[key]%%
-Aim for XHTML Strict output.
-All tags and attributes in lower-case.
-Put all attribute values in double-quotes.
-Close all tags, including stand-along tags like %%(html4strict)
%%
-Use CSS positioning except for tabular data.
-Web browser compatibility:
-Verify all output using the W3 validator: [[http://validator.w3.org/]]
-Start testing with a Gecko-based browser (Mozilla, Firefox, ""K-Meleon"", etc) then verify with IE, Opera, Safari, etc.
-Forms:
-Include both the 'name' and 'id' attributes on all form fields.
-Include accessibility features:
-tabindex.
-label.
-Use ##echo## to output all data, and don't forget the semi-colon:%%(php)%%
-Add newlines ##""(\n)""## after output lines, to help debug the output.
-When embedding variables in
-Make sure you properly quote array keys, i.e. %%(php)$array['key']%% and **NOT** %%(php)$array[key]%%
-Aim for XHTML Strict output.
-All tags and attributes in lower-case.
-Put all attribute values in double-quotes.
-Close all tags, including stand-along tags like %%(html4strict)
%%
-Use CSS positioning except for tabular data.
-Web browser compatibility:
-Verify all output using the W3 validator: [[http://validator.w3.org/]]
-Start testing with a Gecko-based browser (Mozilla, Firefox, ""K-Meleon"", etc) then verify with IE, Opera, Safari, etc.
-Forms:
-Include both the 'name' and 'id' attributes on all form fields.
-Include accessibility features:
-tabindex.
-label.
Deletions:
~-Use ##echo## to output all data, and don't forget the semi-colon:%%(php)%%
~-Add newlines ##""(\n)""## after output lines, to help debug the output.
~-When embedding variables in
~-Make sure you properly quote array keys, i.e. %%(php)$array['key']%% and **NOT** %%(php)$array[key]%%
~-Aim for XHTML Strict output.
~~-All tags and attributes in lower-case.
~~-Put all attribute values in double-quotes.
~~-Close all tags, including stand-along tags like %%(html4strict)
%%
~-Use CSS positioning except for tabular data.
~-Web browser compatibility:
~~-Verify all output using the W3 validator: [[http://validator.w3.org/]]
~~-Start testing with a Gecko-based browser (Mozilla, Firefox, ""K-Meleon"", etc) then verify with IE, Opera, Safari, etc.
~-Forms:
~~-Include both the 'name' and 'id' attributes on all form fields.
~~-Include accessibility features:
~~~-tabindex.
~~~-label.
Additions:
~-Use long-format code escaping: %%(php)%% (manual page: [[http://www.php.net/manual/en/language.basic-syntax.php]])
~-Use ##echo## to output all data, and don't forget the semi-colon:%%(php)%%
~-Make sure you properly quote array keys, i.e. %%(php)$array['key']%% and **NOT** %%(php)$array[key]%%
This latter syntax is [[http://www.php.net/manual/en/language.types.array.php improper code according to the manual]] (see "Array Do's and Don'ts") //and// has been broken with at least one PHP release (during 2003).
~~-Close all tags, including stand-along tags like %%(html4strict)
%%
~-Use ##echo## to output all data, and don't forget the semi-colon:%%(php)%%
~-Make sure you properly quote array keys, i.e. %%(php)$array['key']%% and **NOT** %%(php)$array[key]%%
This latter syntax is [[http://www.php.net/manual/en/language.types.array.php improper code according to the manual]] (see "Array Do's and Don'ts") //and// has been broken with at least one PHP release (during 2003).
~~-Close all tags, including stand-along tags like %%(html4strict)
%%
Deletions:
~-Use ##echo## to output all data, and don't forget the semi-colon: ##""""##
~-Make sure you properly quote array keys, i.e. ##""$array['key']""##, and **NOT** ##""$array[key]""##. This latter syntax is [[http://www.php.net/manual/en/language.types.array.php improper code according to the manual]] (see "Array Do's and Don'ts") //and// has been broken with at least one PHP release (during 2003).
~~-Close all tags, including stand-along tags like %%(html4strict)
%%.
Additions:
=====PHPlist Coding Style Guidelines=====
Please use the following guidelines when developing code for PHPList.
===PHP Code===
~-Use long-format code escaping: ##""""## (manual page: [[http://www.php.net/manual/en/language.basic-syntax.php]])
~-Use ##echo## to output all data, and don't forget the semi-colon: ##""""##
~-Add newlines ##""(\n)""## after output lines, to help debug the output.
~-When embedding variables in
~-Make sure you properly quote array keys, i.e. ##""$array['key']""##, and **NOT** ##""$array[key]""##. This latter syntax is [[http://www.php.net/manual/en/language.types.array.php improper code according to the manual]] (see "Array Do's and Don'ts") //and// has been broken with at least one PHP release (during 2003).
===HTML Code===
~-Aim for XHTML Strict output.
~~-All tags and attributes in lower-case.
~~-Put all attribute values in double-quotes.
~~-Close all tags, including stand-along tags like %%(html4strict)
%%.
~-Use CSS positioning except for tabular data.
~-Web browser compatibility:
~~-Verify all output using the W3 validator: [[http://validator.w3.org/]]
~~-Start testing with a Gecko-based browser (Mozilla, Firefox, ""K-Meleon"", etc) then verify with IE, Opera, Safari, etc.
~-Forms:
~~-Include both the 'name' and 'id' attributes on all form fields.
~~-Include accessibility features:
~~~-tabindex.
~~~-label.
Please use the following guidelines when developing code for PHPList.
===PHP Code===
~-Use long-format code escaping: ##""""## (manual page: [[http://www.php.net/manual/en/language.basic-syntax.php]])
~-Use ##echo## to output all data, and don't forget the semi-colon: ##""""##
~-Add newlines ##""(\n)""## after output lines, to help debug the output.
~-When embedding variables in
~-Make sure you properly quote array keys, i.e. ##""$array['key']""##, and **NOT** ##""$array[key]""##. This latter syntax is [[http://www.php.net/manual/en/language.types.array.php improper code according to the manual]] (see "Array Do's and Don'ts") //and// has been broken with at least one PHP release (during 2003).
===HTML Code===
~-Aim for XHTML Strict output.
~~-All tags and attributes in lower-case.
~~-Put all attribute values in double-quotes.
~~-Close all tags, including stand-along tags like %%(html4strict)
%%.
~-Use CSS positioning except for tabular data.
~-Web browser compatibility:
~~-Verify all output using the W3 validator: [[http://validator.w3.org/]]
~~-Start testing with a Gecko-based browser (Mozilla, Firefox, ""K-Meleon"", etc) then verify with IE, Opera, Safari, etc.
~-Forms:
~~-Include both the 'name' and 'id' attributes on all form fields.
~~-Include accessibility features:
~~~-tabindex.
~~~-label.
Deletions:
//This page is a **template** intended for documentation of **phplist development pages**. This page belongs to CategoryTemplate (which contains more handy templates). To create a phplist **development** page, [[http://wikka.phplist.com/DevelopmentTemplate/clone clone this page]], replace the title with a meaningful one and replace this paragraph with the actual page content.//



