線上書籍

Home

[1071]XOOPS模組開發

<?php $modversion = array(); //---模組基本資訊---// $modversion['name'] = '巷談集'; $modversion['version'] = 1.0; $modversion['description'] = _MI_SNEWS_DESCRIPTION; $modversion['author'] = 'tad'; $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['release_date'] = '2018/03/10'; $modversion['module_website_url'] = 'https://www.tad0616.net'; $modversion['module_website_name'] = _MI_SNEWS_WEB_NAME; $modversion['module_status'] = 'release'; $modversion['author_website_url'] = 'https://www.tad0616.net'; $modversion['author_website_name'] = _MI_SNEWS_WEB_NAME; $modversion['min_php'] = 5.4; $modversion['min_xoops'] = '2.5'; //---paypal資訊---// $modversion['paypal'] = array(); $modversion['paypal']['business'] = '[email protected]'; $modversion['paypal']['item_name'] = 'Donation : ' . 'tad0616'; $modversion['paypal']['amount'] = 10; $modversion['paypal']['currency_code'] = 'USD'; //---後台使用系統選單---// $modversion['system_menu'] = 1; //---模組資料表架構---// $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; $modversion['tables'][] = 'snews'; $modversion['tables'][] = 'snews_topic'; $modversion['tables'][] = 'snews_files_center'; //---後台管理介面設定---// $modversion['hasAdmin'] = 1; $modversion['adminindex'] = 'admin/index.php'; $modversion['adminmenu'] = 'admin/menu.php'; //---前台主選單設定---// $modversion['hasMain'] = 1; //$i=1; //$modversion['sub'][$i]['name'] = ''; //$modversion['sub'][$i]['url'] = ''; //$i++; //---模組自動功能---// $modversion['onInstall'] = "include/onInstall.php"; $modversion['onUpdate'] = "include/onUpdate.php"; $modversion['onUninstall'] = "include/onUninstall.php"; //---樣板設定---// $modversion['templates'] = array(); $i = 1; $modversion['templates'][$i]['file'] = 'snews_adm_main.tpl'; $modversion['templates'][$i]['description'] = 'snews_adm_main.tpl'; $i++; $modversion['templates'][$i]['file'] = 'snews_adm_topic.tpl'; $modversion['templates'][$i]['description'] = 'snews_adm_topic.tpl'; $i++; $modversion['templates'][$i]['file'] = 'snews_index.tpl'; $modversion['templates'][$i]['description'] = 'snews_index.tpl'; //---偏好設定---// $modversion['config'] = array(); $i = 0; $modversion['config'][$i]['name'] = 'show_num'; $modversion['config'][$i]['title'] = '_MI_SNEWS_SHOW_NUM'; $modversion['config'][$i]['description'] = '_MI_SNEWS_SHOW_NUM_DESC'; $modversion['config'][$i]['formtype'] = 'textbox'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 6; $i++; //---搜尋---// $modversion['hasSearch'] = 1; $modversion['search']['file'] = "include/search.php"; $modversion['search']['func'] = "snews_search"; //---區塊設定---// $modversion['blocks'] = array(); $i = 1; $modversion['blocks'][$i]['file'] = "snews_block_focus.php"; $modversion['blocks'][$i]['name'] = _MI_SNEWS_BLOCK_FOCUS; $modversion['blocks'][$i]['description'] = _MI_SNEWS_BLOCK_FOCUS_DESC; $modversion['blocks'][$i]['show_func'] = "snews_block_focus"; $modversion['blocks'][$i]['template'] = "snews_block_focus.tpl"; $modversion['blocks'][$i]['edit_func'] = "snews_block_focus_edit"; $modversion['blocks'][$i]['options'] = "2|240"; $i++; //---評論---// //$modversion['hasComments'] = 1; //$modversion['comments']['pageName'] = '單一頁面.php'; //$modversion['comments']['itemName'] = '主編號'; //---通知---// //$modversion['hasNotification'] = 1;