Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
831 florian 1
Phorum 5 Coding Standards
2
=========================
3
 
4
For the most part, Phorum 5 uses the standards set forth in the PEAR Coding
5
Standards located at http://pear.php.net/manual/en/standards.php. We do
6
however differ slightly in a few of ways.
7
 
8
1. Header Comment - please use the header comment found in the other Phorum
9
   files.
10
 
11
2. Function Naming - PEAR uses the "studly caps" naming. We like to name
12
   functions in all lower case with _. So for example:  phorum_get_users().
13
   Don't worry about long names. It is better to have a function named
14
   well.
15
 
16
3. Variable Names - PEAR really does not address this as the code you are
17
   writing belongs to your package. However, in Phorum, the code you write
18
   belongs to us all. Please make variable names useful and clear. Avoid
19
   single character variables and things like $temp.
20
 
21
Now, in looking at the code, you will see that this is not being followed to
22
the letter. Sometimes, editors don't cooperate and you get tabs, other
23
times you just forget and don't do it right. Just don't be upset if you see
24
an SVN commit that just says "formatting" on your code. Some editors have
25
auto-format features and will be used to clean up formatting.
26
 
27
Even if you are not going to write a module, you may want to read the
28
creating_mods.txt file. It covers some general concepts that exist in
29
Phorum that may help you understand more of the Phorum code.
30
 
31
Additionally, if you will be using SVN please read the SVN-RULES file.