Rev 1688 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
Phorum 5 Coding Standards=========================For the most part, Phorum 5 uses the standards set forth in the PEAR CodingStandards located at http://pear.php.net/manual/en/standards.php. We dohowever differ slightly in a few of ways.1. Header Comment - please use the header comment found in the other Phorumfiles.2. Function Naming - PEAR uses the "studly caps" naming. We like to namefunctions in all lower case with _. So for example: phorum_get_users().Don't worry about long names. It is better to have a function namedwell.3. Variable Names - PEAR really does not address this as the code you arewriting belongs to your package. However, in Phorum, the code you writebelongs to us all. Please make variable names useful and clear. Avoidsingle character variables and things like $temp.Now, in looking at the code, you will see that this is not being followed tothe letter. Sometimes, editors don't cooperate and you get tabs, othertimes you just forget and don't do it right. Just don't be upset if you seean SVN commit that just says "formatting" on your code. Some editors haveauto-format features and will be used to clean up formatting.Even if you are not going to write a module, you may want to read thecreating_mods.txt file. It covers some general concepts that exist inPhorum that may help you understand more of the Phorum code.Additionally, if you will be using SVN please read the SVN-RULES file.