Page Top

Basic Customize anchor.png Edit

Page Top

Default Action anchor.png Edit

  • Set default action. When user access module top, default action page is called.
  • {xoops_trust_path}/modules/{modulename}/class/Module.class.php
    Before:
    private function _getDefaultActionName()
    {
        // TODO insert your default action name
        return 'index';
    }
    After:
    private function _getDefaultActionName()
    {
        return 'NewsList';
    }
Page Top

SQL File anchor.png Edit

  • 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:
    `length` int(4) unsigned NOT NULL,
    After:
    `length` smallint(4) unsigned NOT NULL,
Page Top

Edit Form File anchor.png Edit

  • 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:
    $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);
    After:
    $this->mFieldProperties['length'] = new XCube_FieldProperty($this);

wh0cd406487 <a href=http://viagraprice2017.com/>viagra price comparison</a>

Page Top

Template Files anchor.png Edit

  • {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:
    <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>
    After:
    <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>

Front page   Edit Freeze Diff Backup Upload Copy Rename ReloadPrint View   New Page Page list Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom) Powered by xpWiki
Counter: 10684, today: 3, yesterday: 7
Princeps date: 2010-02-16 (Tue) 14:24:44
Last-modified: 2017-04-26 (Wed) 16:59:55 (JST) (207d) by Phyllisencug(Phyllisencug)