スライド 1

Cubsonコマンド
Cubsonモジュール作成のながれ
コード編集
makeproject の後で一旦Cubson
を終了した後、再度Cubson を起動
したら modulename testmod で
対象モジュールを指定する
例:モジュール testmod、テーブル testtbl
モジュール生成
その他
makeproject testmod
テーブルの作成(phpMyAdminなど)
テーブルに対する
コードの生成
wizard testtbl
モジュールトップの
アクションを指定
class/Module.class.php
function execute(&$controller)
{
if ($this->mActionName == null) {
$this->mActionName =
xoops_getrequest('action');
if ($this->mActionName == null) {
$this->mActionName = "BmList";
}
}
Smarty の “|theme” modifier を削除する
templates/testmod_testtbl_list.html
form の validation などを指定している設定ファイル
.xml/testtbl_edit.xml
バリデーション
(入力値検査)
.xml の設定ファイルを元に form ファイルを再作成するコマ
ンド
makeform –l –u testtbl_edit
forms/TesttblEditForm.class.php
addlang lang xxx
言語定数
language/{japanese}/main.php
モジュール設定
xoops_version.php
インストール時
テーブル作成sql
sql/mysql.sql
モジュール作者やバージョン情報を修正。
sql ファイルを指定
2007.11.23
氷川 霧霞
http://d.hatena.ne.jp/kilica