0byt3m1n1
Path:
/
data
/
applications
/
aps.bak
/
coppermine
/
1.5.12-0
/
standard
/
htdocs
/
docs
/
en
/
[
Home
]
File: dev_coding.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> <title>Coding guidelines - Developer documentation - Coppermine Photo Gallery - Documentation & Manual</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="language" content="en" /> <meta name="copyright" content="Coppermine dev team" /> <meta name="description" content="This part of the documentation is not meant for end users of Coppermine, but only for developers. There is no support for this section, it comes as-is." /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="MSSmartTagsPreventParsing" content="true" /> <meta http-equiv="imagetoolbar" content="no" /> <!-- SVN version info: Coppermine version: 1.5.12 $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.5.x/docs/en/dev_coding.htm $ $Revision: 8154 $ --> <link rel="stylesheet" type="text/css" href="../style/style.css" media="all" /> <link rel="stylesheet" type="text/css" href="../style/screen.css" media="screen" /> <link rel="stylesheet" type="text/css" href="../style/print.css" media="print" /> <link rel="shortcut icon" href="../favicon.ico" /> <script src="../js/jquery.js" type="text/javascript"></script> <script src="../js/jquery.treeview.js" type="text/javascript"></script> <script src="script.js" type="text/javascript"></script> </head> <body> <h1 id="docheader">Coppermine Photo Gallery v1.5.x: Documentation and Manual</h1> <div id="toc"> <a href="toc.htm">Table of Contents</a> </div> <a name="dev_coding"></a><h1>Coding guidelines<a href="#dev_coding" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h1> <a name="dev_coding_target_audience"></a><h2>Target audience<a href="#dev_coding_target_audience" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h2> <p>This part of the documentation is not meant for end users of Coppermine, but only for developers. There is no support for this section, it comes as-is.</p> <p>End users who wish to modify their copy of coppermine are encouraged to stick to these guidelines as well.</p> <a name="dev_coding_scope"></a><h2>Scope<a href="#dev_coding_scope" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h2> <p>As Coppermine is a team effort, the team members who contribute code need to make sure that the code remains easy to read, understand and maintain. That's why there is a set of rules defined on this page that should be taken into account when working with the coppermine core code. Although this part of the documentation is aimed at dev team members, users who plan to contribute their code in any form are requested to respect the rules as well if possible (i.e. if you understand them fully).</p> <p>The coding guidelines on this page are not set in stone - if you (as a dev team member) find during development that one of the guidelines needs review or change, start a thread on the dev board for discussion.</p> <hr /> <a name="dev_coding_indentation"></a><h2>Indentation<a href="#dev_coding_indentation" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h2> <ul> <li>Use an indent of 4 spaces, with no tabs. Most editors can be configured to do this.</li> <li>Don't be afraid to use blank lines between logical "sections" of code, but don't use too many because it makes it too spaced out</li> </ul> <hr /> <a name="dev_coding_encoding"></a><h2>Encoding<a href="#dev_coding_encoding" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h2> Encoding standard in Coppermine is UTF-8 without <abbr title="Byte Order Mark">BOM</abbr>. All non-binary files should be encoded in UTF-8 (Unicode). <hr /> <a name="dev_coding_general"></a><h2>General guidelines<a href="#dev_coding_general" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h2> <ul> <li>In queries or code, always have spaces before and after operators</li> </ul> <hr /> <a name="dev_coding_php"></a><h2>PHP code<a href="#dev_coding_php" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h2> <a name="dev_coding_formatting"></a><h3>Formatting<a href="#dev_coding_formatting" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <ul> <li>Equals sign should be aligned with surrounding elements<br /> <div class="cpg_example"> Bad example: <pre class="cpg_code code">$pic_title = 'My picture'; $album = 'lastup'; $update_time = true;</pre> Good Example: <pre class="cpg_code code">$pic_title = 'My picture'; $album = 'lastup'; $update_time = true;</pre> </div> </li> <li>Array with multiple values cannot be declared on a single line. However if there is only one value then it can be declared in same line</li> <li>Always put comma after last value in array declaration</li> <li>Always allign array double arrow in a single line and there should be a single space after the arrow (before value)</li> <li>Each line in an array declaration must end in a comma<br /> <div class="cpg_example"> Bad examples: <pre class="cpg_code code"> $foo = array('one', 'two', 'three'); $bar = array( 'one' => 1, 'two' => 3, 'three' => 3 ); $multi = array('first' => 'one', 'second' => array('2'), 'third' => array('foo' => 'bar', 'hello' => 'world')); </pre> Good Examples: <pre class="cpg_code code"> $foo = array( 'one', 'two', 'three', ); $bar = array( 'one' => 1, 'two' => 2, 'three' => 3, ); $multi = array( 'first' => 'one', 'second' => array('2'), // Since it is just one value in array, it can be declared in same line 'third' => array( 'foo' => 'bar', 'hello' => 'world', ), ); </pre> </div> </li> <li>Use <tt class="code">echo</tt> instead of <tt class="code">print</tt></li> <li>Use single quotes instead of double quotes <div class="cpg_example"> Bad: <pre class="cpg_code code">$foo_array["bla"] = "whatever";</pre> Good: <pre class="cpg_code code">$foo_array['bla'] = 'whatever';</pre> </div> </li> <li>Don't use spaces or capitalization in associative array definitions <div class="cpg_example"> Bad: <pre class="cpg_code code">$bla_array['foo Bar'] = 'some string';</pre> Good: <pre class="cpg_code code">$bla_array['foo_bar'] = 'some string';</pre> </div> </li> </ul> <a name="dev_coding_control_structures"></a><h3>Control Structures<a href="#dev_coding_control_structures" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <p>These include <tt class="code">if</tt>, <tt class="code">for</tt>, <tt class="code">while</tt>, <tt class="code">switch</tt>.</p> <ul> <li>Control statements should have one space between the control keyword and opening parenthesis, to distinguish them from function calls</li> <li>Always use curly braces, even in situations where they are technically optional - having them increases readability and decreases the likelihood of logic errors being introduced when new lines are added</li> <li>Always have a newline before an opening or closing brace<br /> <div class="cpg_example">Bad example:<pre class="cpg_code code">if ($foo = 'bar') { echo 'Hello world'; }</pre>Bad example:<pre class="cpg_code code">if ($foo = 'bar') { echo 'Hello world'; }</pre>Good example:<pre class="cpg_code code">if ($foo = 'bar') { echo 'Hello world'; }</pre>Good example:<pre class="cpg_code code">if ($foo = 'bar') { echo 'Hello world'; }</pre></div></li> </ul> <a name="dev_coding_function_calls"></a><h3>Function Calls<a href="#dev_coding_function_calls" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <ul> <li>Functions should be called with no spaces between the function name, the opening parenthesis, and the first parameter, spaces between commas and each parameter, and no space between the last parameter, the closing parenthesis, and the semicolon.</li> <li>There should be one space on either side of an equals sign used to assign the return value of a function to a variable. In the case of a block of related assignments, more space may be inserted to promote readability.</li> </ul> <a name="dev_coding_function_definitions"></a><h3>Function Definitions<a href="#dev_coding_function_definitions" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <ul> <li>Function definitions follow the "one true brace" convention:<pre class="cpg_code code"><?php function fooFunction($arg1, $arg2 = '') { if (condition) { statement; } return $val; } ?></pre></li> <li>Arguments with default values must be at the end of the argument list</li> <li>There should be two blank lines above and below the function declration</li> <li>Do not use functions that do not exist in PHP4.3 or lower (and don't use functions that have been removed later either!) unless you define them for those versions.</li> </ul> <a name="dev_coding_php_tags"></a><h3>PHP Code Tags<a href="#dev_coding_php_tags" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <ul> <li>Always use <tt class="code"><?php ?></tt> to delimit PHP code, not the <tt class="code"><? ?></tt> shorthand, as the long version will work on all server setups, but the short version might not work everywhere.</li> </ul> <a name="dev_coding_html_nesting"></a><h3>Nesting of HTML in PHP<a href="#dev_coding_html_nesting" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <p>When more than one line of HTML needs to be printed, the <a href="http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc" rel="external" class="phpnet">heredoc syntax</a> should be used instead of ending the PHP processing and starting it later.</p> <div class="cpg_example"> <p>Good:</p> <pre class="cpg_code code">// PHP content here if ($foo == $bar) { print <<< EOT <h1>Hello {$bla}</h1> EOT; }</pre> <p>Bad:</p> <pre class="cpg_code code">// PHP content here if ($foo == $bar) { ?> <h1>Hello <?php echo $bla; ?></h1> <?php }</pre> </div> <hr /> <a name="dev_coding_linebreaks"></a><h3>Line breaks<a href="#dev_coding_linebreaks" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <p>To echo line breaks to the HTML output, use the <a href="http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc" rel="external" class="phpnet">heredoc syntax</a> or use the variable <tt class="code">$LINEBREAK</tt> instead of hardcoding line breaks into the code.</p> <p>Remember to make the variable <tt class="code">$LINEBREAK</tt> global inside functions.</p> <div class="cpg_example"> <p>Good:</p> <pre class="cpg_code code">echo '<h1>Hello world</h1>' . $LINEBREAK; echo '<p>foo bar</p>'; }</pre> <p>Bad:</p> <pre class="cpg_code code">echo "<h1>Hello world</h1>\n"; echo '<p>foo bar</p>'; }</pre> </div> <hr /> <a name="dev_coding_naming_conventions"></a><h3>Naming Conventions<a href="#dev_coding_naming_conventions" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <ul> <li><strong>Functions</strong> should always be named in lowercase and using the underscore notation eg: <tt class="code">function_name()</tt></li> <li><strong>Variables</strong> also follow the same conventions (lowercase and using the underscore notation), however globally accessed variables should be UPPERCASE (eg: <tt class="code">$CONFIG</tt>)</li> <li>Superglobals (e.g. $_GET or $_POST) need to be sanitized using Inspekt - refer to the section "<a href="dev_superglobals.htm#superglobals_sanitization">Sanitization of Superglobals using Inspekt</a>"</li> <li><strong>Constants</strong> should be defined in UPPERCASE with underscore separation of words</li> <li><strong>Filenames</strong> should also follow the same underscore convention and be all lowercase</li> <li>As always, descriptive names (for folders/files/functions/variables/constants) are much better than "$egYtesIopnfer" type ones. (except when using counters, $i, etc.)</li> </ul> <div class="cpg_message_success">For plugin authors there is a more detailed <a href="dev_plugins.htm#plugin_writing_naming_conventions">naming conventions</a> section available that describes package names as well.</div> <hr /> <a name="dev_coding_database"></a><h2>Database queries<a href="#dev_coding_database" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h2> <ul> <li>Always free MySQL result resources. (as well as other resources!)</li> <li>In queries, always capitalize commands: <tt class="code">SELECT</tt>, <tt class="code">INSERT</tt>, <tt class="code">REPLACE</tt>, <tt class="code">UPDATE</tt>, <tt class="code">DELETE</tt>, etc. should be all uppercase</li> <li>In queries, always capitalize <tt class="code">WHERE</tt>, <tt class="code">AND</tt>, <tt class="code">OR</tt>, <tt class="code">LIMIT</tt>, <tt class="code">FROM</tt>, <tt class="code">JOIN</tt>, <tt class="code">AS</tt>, <tt class="code">ON</tt>, etc.</li> <li>Avoid field names that are also keywords in MySQL</li> <li>Do not use any features of MySQL not available in MySQL 3.23.4 and lower</li> <li>Optimize all queries for MySQL 4, although they as above should work in lower</li> <li>Use <tt class="code">LIMIT</tt> for queries whenever possible</li> <li><tt class="code">LEFT JOIN</tt>s are slower than regular <tt class="code">JOIN</tt>s (or commas) so they should be avoided if possible</li> <li>It's not <tt class="code">messages as m</tt>, but <tt class="code">messages AS m</tt>, because <tt class="code">AS</tt> is a MySQL keyword</li> <li>When doing a <tt class="code">JOIN</tt>, the joined table's column(s) come first in the <tt class="code">ON</tt> clause</li> </ul> <hr /> <a name="dev_coding_documentation"></a><h2>Documentation<a href="#dev_coding_documentation" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h2> <ul> <li>Keep correct inline documentation at the tops of files</li> <li>Keep the documentation/comments at the tops of files limited to a width of 80 characters</li> <li>Start each comment line with a capital letter, and use proper grammar. (periods at the end and all!)</li> <li>There is a sub-section of the developer documentation that deals with <a href="dev_documentation.htm">editing the documentation</a> - please pay attention to it</li> <li>There are special steps required when <a href="dev_config.htm">adding a config option</a> - please pay attention to the corresponding section of the docs.</li> </ul> <hr /> <a name="dev_coding_html_output"></a><h2>HTML output<a href="#dev_coding_html_output" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h2> <ul> <li>Always close input, img, hr, and other elements that can't contain anything. (<tt class="code"><tagname <strong>/</strong>></tt>)</li> <li>Coppermine is aimed to be web standards compliant, so you should always try to come up with output that qualifies as valid HTML and CSS. Especially the output that the gallery visitor (and the search engine spiders) see should clearly be valid; output that only the admin will see can be less strict (although you should <em>try</em> to come up with valid output for the admin as well). There is one exception to this standards-compliance rule: if standards-compliant code breaks core functionality for major browsers like the current implementation of object embedding that is not standards compliant because of IE5.x " misbehaving" in standards-compliant mode, it is acceptable to create output that doesn't validate. If this is the case, make sure to at least make others aware of this (<a href="known_issues.htm">known issues</a> section of the docs is the best place, but at least add some comment to the code).</li> <li>Make sure that there are no unescaped <tt class="code">&</tt>-signs (ampersands) in the HTML output. Ampersands must always be escaped as <tt class="code">&amp;</tt>.</li> <li><tt class="code"><</tt> and <tt class="code">></tt>-signs that are meant to be actually displayed in the output (that do not compose tags) must be encoded as <tt class="code">&lt;</tt> and <tt class="code">&gt;</tt></li> <li>Keep all id attributes unique, and try to keep id and name the same if both are specified</li> </ul> <a name="dev_coding_html_output_images"></a><h3>Image-tags in HTML output<a href="#dev_coding_html_output_images" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <ul> <li>Always put an alt attribute on all image elements, even if the alt is empty</li> <li>The border attribute is mandatory - if ommitted, older browsers will display a border by default</li> <li>If possible (i.e. if the dimension of an image is known already), use the width and height attributes</li> <li>do not use title for the purpose of alt, only use it when a title is needed (like for icons)</li> <li>If you need a blind gif, use the one that already comes with coppermine (<tt class="code">./images/spacer.gif</tt>) instead of coming up with a new one for your custom theme, plugin or whatever</li> </ul> <a name="dev_coding_html_output_links"></a><h3>Links in HTML output<a href="#dev_coding_html_output_dev_coding_html_output_links" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <ul> <li>Never use the target attribute at all, it's invalid. Use <tt class="code"><a href="http://example.com/" rel="external" class="external"></tt> instead. The end user can then easily use JavaScript to make external links open in a new window if he wishes to do so.</li> </ul> <a name="dev_coding_html_output_form"></a><h3>Form elements in HTML output<a href="#dev_coding_html_output_form" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <ul> <li> It is mandatory to use particular CSS classes for certain form elements: <ul> <li><tt class="code"><input type="text" class="textinput" /></tt></li> <li><tt class="code"><input type="submit" class="button" /></tt></li> <li><tt class="code"><input type="radio" class="radio" /></tt></li> <li><tt class="code"><input type="checkbox" class="checkbox" /></tt></li> <li><tt class="code"><select class="listbox" /></tt></li> </ul> </li> </ul> <a name="dev_coding_html_output_deprecated"></a><h3>Deprecated tags<a href="#dev_coding_html_output_deprecated" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <p>Deprecated HTML tags like <tt class="code"><font></tt> mustn't be introduced into Coppermine unless there is a valid, documented reason to do so.</p> <a name="dev_coding_html_prefered_tags"></a><h3>Prefered tags<a href="#dev_coding_html_prefered_tags" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <p>The popular tags <tt class="code"><b></tt> and <tt class="code"><i></tt> are considered to be deprecated tags as well. Because of their popularity, browsers will probably support them for a long time. However, there are better alternatives. For <tt class="code"><b></tt>, the replacement tag is <tt class="code"><strong></tt>. For <tt class="code"><i></tt>, the replacement tag is <tt class="code"><em></tt>. If possible, the replacement tags should be used both in HTML output generated by Coppermine as well as the documentation.</p> <hr /> <a name="dev_coding_credits"></a><h2>Credits for coding guidelines<a href="#dev_coding_credits" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h2> <p>The core rules on this page have been sketched by Dr. Tarique Sani as a subset of the PEAR coding guidelines. HTML output and database sections are based on a thread created by Unknown W. Brackets from <a href="http://www.simplemachines.org/" rel="external" class="external">Simplemachines</a>.</p> <hr /> <a name="dev_coding_usability"></a><h2>Usability<a href="#dev_coding_usability" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h2> Good coding skills are important, but it's as well important to code efficiently in terms of usability. <a name="dev_coding_usability_forms"></a><h3>Forms<a href="#dev_coding_usability_forms" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h3> <a name="dev_coding_usability_forms_less_clicks"></a><h4>Less clicks are better<a href="#dev_coding_usability_forms_less_clicks" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h4> Dropdown lists are great if there are a lot of options to choose from, but they are bad if there are only two or three options: the user needs to click on the dropdown list to find out what options exist. <div class="cpg_example"> Instead of coming up with a select box like <div class="border1"> <select name="some_name" size="1" class="listbox"> <option value="0" selected="selected">Go to first</option> <option value="1">Remain where you are</option> <option value="2">Jump to last</option> </select> </div> it's more intuitive for the user to display all possible options using radio buttons: <div class="border1"> <input type="radio" name="option" id="option0" value="0" class="radio" checked="checked" /><label for="option0" class="clickable_option">Go to first</label> <input type="radio" name="option" id="option1" value="1" class="radio" /><label for="option1" class="clickable_option">Remain where you are</label> <input type="radio" name="option" id="option2" value="2" class="radio" /><label for="option2" class="clickable_option">Jump to last</label> </div> </div> <div class="cpg_example"> If you just want a toggle to switch an option on or off, use the checkbox like <div class="border1"> <input type="checkbox" name="display_graph" id="display_graph" value="1" class="checkbox" /><label for="display_graph" class="clickable_option">Display graph</label> </div> instead of <div class="border1"> Display graph: <input type="radio" name="option_display_graph" id="option_display_graph0" value="0" class="radio" checked="checked" /><label for="option_display_graph0" class="clickable_option">Yes</label> <input type="radio" name="option_display_graph" id="option_display_graph1" value="1" class="radio" /><label for="option_display_graph1" class="clickable_option">No</label> </div> or even <div class="border1"> <select name="bad_usage_of_select" size="1" class="listbox"> <option value="0" selected="selected">Display graph</option> <option value="1">Do not display graph</option> </select> </div> </div> <a name="dev_coding_usability_forms_label"></a><h4>Bigger target areas for clicks<a href="#dev_coding_usability_forms_label" title="Link to this section"><img src="images/anchor.gif" width="15" height="9" border="0" alt="" /></a></h4> It can be comparatively hard to hit a single checkbox or radio button - that's why the HTML tag <tt class="code"><label></tt> was invented: if you use it wisely, the text that corresponds to a particular option represented by a checkbox or radio button can be clicked on to toggle the checkbox / radio button. <table cellspacing="0" cellpadding="0" border="0" width="100%" class="maintable"> <tr> <th class="tableh1" width="50%"> Bad example </th> <th class="tableh1" width="50%"> Good example </th> </tr> <tr> <td class="cpg_message_error"> <fieldset class="cpg_example"> <legend>Output</legend> <input type="radio" name="option_nolabel" value="0" class="radio" checked="checked" />Go to first<br /> <input type="radio" name="option_nolabel" value="1" class="radio" />Remain where you are<br /> <input type="radio" name="option_nolabel" value="2" class="radio" />Jump to last </fieldset> <fieldset class="cpg_code"> <legend>Code</legend> <div class="smallcode"><input type="radio" name="option_nolabel" value="0" class="radio" checked="checked" />Go to first<br /><br /> <input type="radio" name="option_nolabel" value="1" class="radio" />Remain where you are<br /><br /> <input type="radio" name="option_nolabel" value="2" class="radio" />Jump to last</div> </fieldset> </td> <td class="cpg_message_success"> <fieldset class="cpg_example"> <legend>Output</legend> <input type="radio" name="option_label" id="option_label0" value="0" class="radio" checked="checked" /><label for="option_label0" class="clickable_option">Go to first</label><br /> <input type="radio" name="option_label" id="option_label1" value="1" class="radio" /><label for="option_label1" class="clickable_option">Remain where you are</label><br /> <input type="radio" name="option_label" id="option_label2" value="2" class="radio" /><label for="option_label2" class="clickable_option">Jump to last</label> </fieldset> <fieldset class="cpg_code"> <legend>Code</legend> <div class="smallcode"><input type="radio" name="option_label" id="option_label0" value="0" class="radio" checked="checked" /><br /> <label for="option_label0" class="clickable_option">Go to first</label><br /><br /> <input type="radio" name="option_label" id="option_label1" value="1" class="radio" /><br /> <label for="option_label1" class="clickable_option">Remain where you are</label><br /><br /> <input type="radio" name="option_label" id="option_label2" value="2" class="radio" /><br /> <label for="option_label2" class="clickable_option">Jump to last</label></div> </fieldset> </td> </tr> <tr> <td class="cpg_message_error"> <fieldset class="cpg_example"> <legend>Output</legend> <input type="checkbox" name="display_graph_nolabel" value="1" class="checkbox" />Display graph </fieldset> <fieldset class="cpg_code"> <legend>Code</legend> <div class="smallcode"><input type="checkbox" name="display_graph_nolabel" value="1" class="checkbox" />Display graph</div> </fieldset> </td> <td class="cpg_message_success"> <fieldset class="cpg_example"> <legend>Output</legend> <input type="checkbox" name="display_graph_label" id="display_graph_label" value="1" class="checkbox" /><label for="display_graph_label" class="clickable_option">Display graph</label> </fieldset> <fieldset class="cpg_code"> <legend>Code</legend> <div class="smallcode"><input type="checkbox" name="display_graph_label" id="display_graph_label" value="1" class="checkbox" /><label for="display_graph_label" class="clickable_option">Display graph</label></div> </fieldset> </td> </tr> <tr> <td class="tablef" colspan="2" align="center">Click on the words next to the radio buttons to see the difference!</td> </tr> </table> <div id="doc_footer"> <div class="doc_info_wrapper"> <span id="doc_last_changed">$LastChangedDate: 2011-01-02 20:44:22 +0100 (So, 02 Jan 2011) $</span> <span id="doc_revision">$Revision: 8154 $</span> </div> </div> </body> </html>