Default Action
- Set default action. When user access module top, default action page is called.
- {xoops_trust_path}/modules/{modulename}/class/Module.class.php
Before:After:private function _getDefaultActionName() { // TODO insert your default action name return 'index'; }private function _getDefaultActionName() { return 'NewsList'; }
SQL File
- Generated sql file is very rough one. Set proper field type, length, etc. Also it has no index definition.
- {xoops_trust_path}/modules/{modulename}/sql/mysql.sql
Before:After:`length` int(4) unsigned NOT NULL,
`length` smallint(4) unsigned NOT NULL,
Edit Form File
- Validation in Edit Form checks all fields as "required". Remove required setting if the field is aribitrary input field.
- {xoops_trust_path}/modules/{modulename}/forms/XxxEditForm.class.php
Before:After:$this->mFieldProperties['length'] = new XCube_FieldProperty($this); $this->mFieldProperties['length']->setDependsByArray(array('required')); $this->mFieldProperties['length']->addMessage('required', _MD_TUBSONP_ERROR_REQUIRED, _MD_TUBSONP_LANG_FIELD_TYPE);$this->mFieldProperties['length'] = new XCube_FieldProperty($this);
Language Files
- Generated code has minimum language definitions
- {xoops_trust_path}/modules/{modulename}/language/english/main.php
- {xoops_trust_path}/modules/{modulename}/language/english/modinfo.php
Before:After:define('_MD_TNEWS_LANG_TITLE', 'TITLE');define('_MD_TNEWS_LANG_TITLE', 'News Title');
Template Files
- {xoops_trust_path}/modules/{modulename}/templates/{modulename}_xxx_delete.html
- {xoops_trust_path}/modules/{modulename}/templates/{modulename}_xxx_edit.html
- {xoops_trust_path}/modules/{modulename}/templates/{modulename}_xxx_list.html
- {xoops_trust_path}/modules/{modulename}/templates/{modulename}_xxx_view.html
Before:After:<dl class="viewDetail"> <dt><{$smarty.const._MD_TNEWS_LANG_NEWS_ID}></dt> <dd><{$object->getShow('news_id')}></dd> <dt><{$smarty.const._MD_TNEWS_LANG_TITLE}></dt> <dd><{$object->getShow('title')}></dd> <dt><{$smarty.const._MD_TNEWS_LANG_DESCRIPTION}></dt> <dd><{$object->getShow('description')}></dd> </dl><h1><{$smarty.const._MD_TNEWS_LANG_TITLE}> : <{$object->getShow('title')}></h1> <dl class="viewDetail"> <dt><{$smarty.const._MD_TNEWS_LANG_DESCRIPTION}></dt> <dd><{$object->getShow('description')}></dd> </dl>
| Page Info | |
|---|---|
| Page Name : | guide/module/tubsonp/customize |
| Page aliases : | None |
| Page owner : | admin |
| Can Read | |
| Groups : | All visitors |
| Users : | All visitors |
| Can Edit | |
| Groups : | All visitors |
| Users : | All visitors |
Counter: 812,
today: 2,
yesterday: 3
Last-modified: 2010-02-16 (Tue) 14:24:44 (JST) (202d) by kusuchin