Actions

Mahara日本語ドキュメント/基本PHPファイルテンプレート

From Mahara Wiki

< Mahara日本語ドキュメント
Revision as of 04:26, 1 December 2011 by Mits (talk | contribs)

作成中です - mits

以下、すべての新しいPHPファイル用のテンプレートです。あなたのファイルに外部からアクセスできるか否かにより、異なるテンプレートがあります。

This project uses PHPDoc for API documentation. This project is also licensed under the GPL, which causes some header bloat (it is a requirement of licensing your program under the GPL, see http://www.gnu.org/copyleft/gpl.html ).

Template for files you expect to be hit by visitors

.
/**
  * Mahara: Electronic portfolio, weblog, resume builder and social networking
  * Copyright (C) 2011 Copyright Holder
  *
  * (rest of the GPL statement)
  *
  * @package    mahara
  * @subpackage core or plugintype/pluginname
  * @author     Firstname Lastname
  */

 define('INTERNAL', 1);
 require('init.php');

 // Your code here :)

Template for files you do NOT want to be hit by visitors

.
/**
  * Mahara: Electronic portfolio, weblog, resume builder and social networking
  * Copyright (C) 2011 Copyright Holder
  *
  * (rest of the GPL statement)
  *
  * @package    mahara
  * @subpackage core or plugintype/pluginname
  * @author     Firstname Lastname
  */

 defined('INTERNAL') || die();

 // Your code here :)

Notes:

  • Omit the closing php tag "?>"
  • Catalyst employees should assign copyright to "Catalyst IT Ltd", if they are working on the project in company time.
  • The author field should always be a person (or more than one), not a company