Example #1
0
/**
 * Function to get a list of template files of a page, indexed by file name
 * 
 * @var string     $page        page name
 * @var boolen     $refresh    recreate the data
 *
 * @return array
 */
function &about_getTemplateList($page = "index", $refresh = false)
{
    $TplFiles = about_getTplPageList($page, $refresh);
    $template = array();
    foreach (array_keys($TplFiles) as $temp) {
        $template[$temp] = $temp;
    }
    return $template;
}
/**
 * Function to get a list of template files of a page, indexed by file name
 *
 * @var    string      $page page name
 * @param  bool|boolean $refresh recreate the data
 * @return array
 *
 */
function &about_getTemplateList($page = 'index', $refresh = false)
{
    $TplFiles =& about_getTplPageList($page, $refresh);
    $template = array();
    if (is_array($TplFiles) && count($TplFiles) > 0) {
        foreach (array_keys($TplFiles) as $temp) {
            $template[$temp] = $temp;
        }
    }
    return $template;
}
Example #3
0
$modversion['dirname'] = "about";
$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = "admin/admin.page.php";
$modversion['adminmenu'] = "admin/menu.php";
// Is performing module install/update?
$isModuleAction = !empty($_POST["fct"]) && "modulesadmin" == $_POST["fct"] ? true : false;
$modversion["onInstall"] = "include/action.module.php";
$modversion["onUpdate"] = "include/action.module.php";
// Menu
$modversion['hasMain'] = 1;
global $xoopsModuleConfig, $xoopsUser, $xoopsModule;
//sql
$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
$modversion['tables'] = array("about_page");
/**
* Templates
*/
if ($isModuleAction) {
    include_once dirname(__FILE__) . "/include/functions.render.php";
    $modversion["templates"] = about_getTplPageList("", true);
}
// Blocks
$modversion["blocks"] = array();
$modversion["blocks"][1] = array("file" => "blocks.php", "name" => _MI_ABOUT_ABOUTWE, "description" => "", "show_func" => "about_block_menu_show", "options" => "", "edit_func" => "", "template" => "about_block_menu.html");
/*
 * @param int $options[0] page id
 * @param int $options[1] text subStr number
 * @param int $options[2] if show page image
 * @param int $options[3] more link text 
 */
$modversion["blocks"][2] = array("file" => "blocks.php", "name" => _MI_ABOUT_PAGE, "description" => "", "show_func" => "about_block_page_show", "options" => "1|0|[more]|0", "edit_func" => "about_block_page_edit", "template" => "about_block_page.html");
Example #4
0
$isModuleAction = !empty($_POST['fct']) && 'modulesadmin' === $_POST['fct'] ? true : false;
$modversion['onInstall'] = 'include/action.module.php';
$modversion['onUpdate'] = 'include/action.module.php';
// Menu
$modversion['system_menu'] = 1;
$modversion['hasMain'] = 1;
global $xoopsModuleConfig, $xoopsUser, $xoopsModule;
//sql
$modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
$modversion['tables'] = array('about_page');
/**
 * Templates
 */
if ($isModuleAction) {
    include_once __DIR__ . '/include/functions.render.php';
    $modversion['templates'] =& about_getTplPageList('', true);
}
$modversion['templates'] = array(array('file' => 'about_admin_page.tpl', 'description' => ''), array('file' => 'about_list.tpl', 'description' => ''), array('file' => 'about_menu.tpl', 'description' => ''), array('file' => 'about_page.tpl', 'description' => ''));
// Blocks
$modversion['blocks'][] = array('file' => 'blocks.php', 'name' => _MI_ABOUT_ABOUTUS, 'description' => '', 'show_func' => 'about_block_menu_show', 'options' => '', 'edit_func' => '', 'template' => 'about_block_menu.tpl');
/*
 * @param int $options[0] page id
 * @param int $options[1] text subStr number
 * @param int $options[2] if show page image
 * @param int $options[3] more link text
 */
$modversion['blocks'][] = array('file' => 'blocks.php', 'name' => _MI_ABOUT_PAGE, 'description' => '', 'show_func' => 'about_block_page_show', 'options' => '1|0|[more]|0', 'edit_func' => 'about_block_page_edit', 'template' => 'about_block_page.tpl');
//configs
$select = array('y-m-d' => '1', 'y-m-d h:i:s' => '2', '年-月-日' => '3', '年-月-日 小时:分钟:秒' => '4');
$modversion['config'][] = array('name' => 'display', 'title' => '_MI_ABOUT_CONFIG_LIST', 'description' => '', 'formtype' => 'select', 'valuetype' => 'int', 'options' => array('_MI_ABOUT_CONFIG_LIST_PAGE' => 1, '_MI_ABOUT_CONFIG_LIST_CATEGORY' => 2), 'default' => 1);
$modversion['config'][] = array('name' => 'str_ereg', 'title' => '_MI_ABOUT_CONFIG_STR_EREG', 'description' => '', 'formtype' => 'textbox', 'valuetype' => 'int', 'default' => '500');