ImpressCMS proudly uses SourceForge
ImpressCMS on Ohloh.net
[NewIndex :: Development :: This page]  
Tags: Development   Documentation   Docblock   Header  

File Header

Files should start with a header section that describes some characteristics of the file, such as what the contents of the file are, the copyright and other similar information. The information in this header is available to the documentation generation program.

New files

For each new file that is created for ImpressCMS or its modules, here is the header structure that should be used:

 /**
 * Short summary of the purpose of this file
 *
 * Longer description about this page
 *
 * @copyright    http://www.impresscms.org/ The ImpressCMS Project
 * @license      LICENSE.txt
 * @package	(use an appropriate package name)
 * @since        1.0
 * @author	name of the author 
 * @version	$Id$
 *

Existing files

Re-using module or core files

Sometimes you re-use files from other modules in yours. When you just re-use the file without changes, the block should remain intact. When you make changes to the file, these are the guidelines to follow:

  • since: this should contain the version in which the file was added to the module
  • date: No need, this is included in the 'version' field
  • version: Add an SVN property svn:keywords to the file with a text value of Id. Once you commit the file, it will expand to something like
$Id: functions.php 8806 2009-05-31 22:28:54Z pesianstranger $

{filename} (revision} (date and time of commit} {committer}

and update on every commit.

Re-using or integrating external files

see copyright attribution.

Open source is based on disclosure of your sourcecode, so parts of it are available to be used in other projects, be it directly, or re-used functionality as part of other files. 

Xoops Files

 When editing a file which was originally created by the XOOPS Project, we will use the following comment block:

 /**
 * Short summary of the purpose of this file
 *
 * Longer description about this page
 *
 * @copyright	http://www.xoops.org/ The XOOPS Project
 * @copyright	XOOPS_copyrights.txt
 * @copyright	http://www.impresscms.org/ The ImpressCMS Project
 * @license	LICENSE.txt
 * @package	(use an appropriate package name)
 * @since	XOOPS
 * @author	http://www.xoops.org The XOOPS Project
 * @author	modified by author 
 * @version	$Id$
 */

XOOPS_copyrights.txt is a file which will be included in the ImpressCMS package, explaining that we are coming from XOOPS and what was the original copyrights. LICENSE.txt is a file located in the root of ImpressCMS package (where mainfile.php resides), and also the root of each module folder (where xoops_version.php or icms_version.php resides)

Reference: Forum post, 19 April 2008

Last modified on 2013/9/8 by skenow
This page was created on 2010/11/11 by skenow
This page has been viewed 96260 time(s)

Comments
The comments are owned by the poster. We aren't responsible for their content.
ImpressCMS proudly uses SourceForge
ImpressCMS on Ohloh.net