:::

15-1 上課範例:xoops_version.php

<?php
$modversion = array();

//---模組基本資訊---//
$modversion['name'] = _MI_TADNOTES_MOD_NAME;
$modversion['version'] = 1.0;
$modversion['description'] = _MI_TADNOTES_MOD_DESCRIPTION;
$modversion['author'] = 'Tad ([email protected])';
//$modversion['credits'] = '相關有功人員';
$modversion['help'] = 'page=help';
$modversion['license'] = 'GNU GPL 2.0';
$modversion['license_url'] = 'www.gnu.org/licenses/gpl-2.0.html/';
$modversion['image'] = 'images/logo.png';
$modversion['dirname'] = basename(dirname(__FILE__));


//---模組狀態資訊---//
$modversion['status_version'] = 'RC';
$modversion['release_date'] = '2012/3/15';
$modversion['module_website_url'] = 'http://tad0616.net/';
$modversion['module_website_name'] = 'Tad教材網';
$modversion['module_status'] = 'RC';
$modversion['author_website_url'] = 'http://tad0616.net/';
$modversion['author_website_name'] = 'Tad';
$modversion['min_php']=5.2;
$modversion['min_xoops']='2.5';


//---後台使用系統選單---//
$modversion['system_menu'] = 1;


//---模組資料表架構---//
$modversion['sqlfile']['mysql'] = 'sql/tad0616.sql';
$modversion['tables'][0] = 'tad_notes';
$modversion['tables'][1] = 'tad_note_cate';

//---後台管理介面設定---//
$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = 'admin/index.php';
$modversion['adminmenu'] = 'admin/menu.php';


//---前台主選單設定---//
$modversion['hasMain'] = 1;
$modversion['sub'][1]['name'] = '新增記事';
$modversion['sub'][1]['url'] = 'index.php?op=add_form';


//---模組自動功能---//
//$modversion['onInstall'] = "include/install.php";
//$modversion['onUpdate'] = "include/update.php";
//$modversion['onUninstall'] = "include/onUninstall.php";


//---偏好設定---//
$modversion['config'] = array();
$modversion['config'][0]['name']	= 'show_num';
$modversion['config'][0]['title']	= '_MI_TADNOTE_CONFIG_TITLE1';
$modversion['config'][0]['description']	= '_MI_TADNOTE_CONFIG_DESC1';
$modversion['config'][0]['formtype']	= 'select';
$modversion['config'][0]['valuetype']	= 'int';
$modversion['config'][0]['default']	= 10;
$modversion['config'][0]['options'] = array('每 5 筆'=>5,'每 10 筆'=>10,'每 15 筆'=>15);


//---搜尋---//
$modversion['hasSearch'] = 1;
$modversion['search']['file'] = "include/search.php";
$modversion['search']['func'] = "tad_note_search";


//---區塊設定---//
$modversion['blocks'] = array();
$modversion['blocks'][1]['file'] = "new_notes.php";
$modversion['blocks'][1]['name'] = '最新記事';
$modversion['blocks'][1]['description'] = '列出最近幾則最新記事';
$modversion['blocks'][1]['show_func'] = "new_notes";
$modversion['blocks'][1]['template'] = "new_notes.html";
$modversion['blocks'][1]['edit_func'] = "new_notes_edit";
$modversion['blocks'][1]['options'] = "5|170px";

//---樣板設定---//
$modversion['templates'] = array();
$modversion['templates'][1]['file'] = 'tad_note_index.html';
$modversion['templates'][1]['description'] = "首頁的樣板檔";
$modversion['templates'][2]['file'] = 'tad_note_view.html';
$modversion['templates'][2]['description'] = "單一頁面的樣板檔";


//---評論---//
$modversion['hasComments'] = 1;
$modversion['comments']['pageName'] = 'view.php';
$modversion['comments']['itemName'] = 'note_sn';

//---通知---//
//$modinfo['hasNotification'] = 1;



?>

 


:::

搜尋

QR Code 區塊

https%3A%2F%2Fwww.tad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbsn%3D22%26tbdsn%3D648

書籍目錄

展開 | 闔起

線上使用者

30人線上 (9人在瀏覽線上書籍)

會員: 0

訪客: 30

更多…