本文整理汇总了PHP中xoops_loadLanguage函数的典型用法代码示例。如果您正苦于以下问题:PHP xoops_loadLanguage函数的具体用法?PHP xoops_loadLanguage怎么用?PHP xoops_loadLanguage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xoops_loadLanguage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @param string $caption
* @param string $name
* @param mixed $value Pre-selected value (or array of them).
* For an item with massive members, such as "Registered Users", "$value" should be used to store selected temporary users only instead of all members of that item
* @param bool $include_anon Include user "anonymous"?
* @param int $size Number or rows. "1" makes a drop-down-list.
* @param bool $multiple Allow multiple selections?
*/
function __construct($caption, $name, $include_anon = false, $value = null, $size = 1, $multiple = false)
{
$limit = 200;
$select_element = new Xmf_Form_Element_Select("", $name, $value, $size, $multiple);
if ($include_anon) {
$select_element->addOption(0, $GLOBALS["xoopsConfig"]['anonymous']);
}
$member_handler =& xoops_gethandler('member');
$user_count = $member_handler->getUserCount();
$value = is_array($value) ? $value : (empty($value) ? array() : array($value));
if ($user_count > $limit && count($value) > 0) {
$criteria = new CriteriaCompo(new Criteria("uid", "(" . implode(",", $value) . ")", "IN"));
} else {
$criteria = new CriteriaCompo();
$criteria->setLimit($limit);
}
$criteria->setSort('uname');
$criteria->setOrder('ASC');
$users = $member_handler->getUserList($criteria);
$select_element->addOptionArray($users);
if ($user_count <= $limit) {
parent::__construct($caption, "", $name);
$this->addElement($select_element);
return;
}
xoops_loadLanguage("findusers");
$js_addusers = "<script type=\"text/javascript\">\r\n function addusers(opts){\r\n var num = opts.substring(0, opts.indexOf(\":\"));\r\n opts = opts.substring(opts.indexOf(\":\")+1, opts.length);\r\n var sel = xoopsGetElementById(\"" . $name . ($multiple ? "[]" : "") . "\");\r\n var arr = new Array(num);\r\n for (var n=0; n < num; n++) {\r\n var nm = opts.substring(0, opts.indexOf(\":\"));\r\n opts = opts.substring(opts.indexOf(\":\")+1, opts.length);\r\n var val = opts.substring(0, opts.indexOf(\":\"));\r\n opts = opts.substring(opts.indexOf(\":\")+1, opts.length);\r\n var txt = opts.substring(0, nm - val.length);\r\n opts = opts.substring(nm - val.length, opts.length);\r\n var added = false;\r\n for (var k = 0; k < sel.options.length; k++) {\r\n if(sel.options[k].value == val){\r\n added = true;\r\n break;\r\n }\r\n }\r\n if (added == false) {\r\n sel.options[k] = new Option(txt, val);\r\n sel.options[k].selected = true;\r\n }\r\n }\r\n return true;\r\n }\r\n </script>";
$token = $GLOBALS['xoopsSecurity']->createToken();
$action_tray = new Xmf_Form_Element_Tray("", " | ");
$action_tray->addElement(new Xmf_Form_Element_Label('', "<a href='#' onclick='var sel = xoopsGetElementById(\"" . $name . ($multiple ? "[]" : "") . "\");for (var i = sel.options.length-1; i >= 0; i--) {if (!sel.options[i].selected) {sel.options[i] = null;}}; return false;'>" . _MA_USER_REMOVE . "</a>"));
$action_tray->addElement(new Xmf_Form_Element_Label('', "<a href='#' onclick='openWithSelfMain(\"" . XOOPS_URL . "/include/findusers.php?target={$name}&multiple={$multiple}&token={$token}\", \"userselect\", 800, 600, null); return false;' >" . _MA_USER_MORE . "</a>" . $js_addusers));
parent::__construct($caption, "<br /><br />", $name);
$this->addElement($select_element);
$this->addElement($action_tray);
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:46,代码来源:User.php
示例2: render
/**
* Prepare HTML for output
*
* @return string HTML
*/
function render()
{
static $js_loaded;
xoops_loadLanguage("formdhtmltextarea");
$ret = "";
// actions
$ret .= $this->codeIcon() . "<br />\n";
// fonts
$ret .= $this->fontArray();
// length checker
$ret .= "<input type='button' onclick=\"XoopsCheckLength('" . $this->getName() . "', '" . @$this->configs['maxlength'] . "', '" . _XOOPS_FORM_ALT_LENGTH . "', '" . _XOOPS_FORM_ALT_LENGTH_MAX . "');\" value=' ? ' title='" . _XOOPS_FORM_ALT_CHECKLENGTH . "' />";
$ret .= "<br />\n";
// the textarea box
$ret .= "<textarea id='" . $this->getName() . "' name='" . $this->getName() . "' onselect=\"xoopsSavePosition('" . $this->getName() . "');\" onclick=\"xoopsSavePosition('" . $this->getName() . "');\" onkeyup=\"xoopsSavePosition('" . $this->getName() . "');\" cols='" . $this->getCols() . "' rows='" . $this->getRows() . "'" . $this->getExtra() . ">" . $this->getValue() . "</textarea><br />\n";
if (empty($this->skipPreview)) {
if (empty($GLOBALS['xoTheme'])) {
$this->js .= implode("", file(XOOPS_ROOT_PATH . "/class/textsanitizer/image/image.js"));
} else {
$GLOBALS['xoTheme']->addScript('/class/textsanitizer/image/image.js', array('type' => 'text/javascript'));
}
$button = "<input " . " id='" . $this->getName() . "_preview_button'" . " type='button' " . " value='" . _PREVIEW . "' " . " onclick=\"form_instantPreview('" . XOOPS_URL . "', '" . $this->getName() . "','" . XOOPS_URL . "/images', " . intval($this->doHtml) . ")\"" . " />";
$ret .= "<br />" . "<div id='" . $this->getName() . "_hidden' style='display: block;'> " . " <fieldset>" . " <legend>" . $button . "</legend>" . " <div id='" . $this->getName() . "_hidden_data'>" . _XOOPS_FORM_PREVIEW_CONTENT . "</div>" . " </fieldset>" . "</div>";
}
// Load javascript
if (empty($js_loaded)) {
$javascript = ($this->js ? '<script language="JavaScript" type="text/javascript">' . $this->js . '</script>' : '') . '<script language="JavaScript" type="text/javascript" src="' . XOOPS_URL . '/include/formdhtmltextarea.js"></script>';
$ret = $javascript . $ret;
$js_loaded = true;
}
return $ret;
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:36,代码来源:Dhtml.php
示例3: xoops_legacy_cp_header
/**
* Xoops legacy cp_functions
*
* @copyright (c) 2000-2016 XOOPS Project (www.xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @package system
* @subpackage class
* @since 2.3.0
* @author Taiwen Jiang <[email protected]>
* @param $tpl
*/
function xoops_legacy_cp_header($tpl)
{
global $xoopsConfig, $xoopsUser, $xoTheme;
xoops_loadLanguage('cpanel', 'system');
$xoTheme->addStylesheet(XOOPS_URL . '/xoops.css');
$xoTheme->addStylesheet(XOOPS_URL . '/modules/system/themes/legacy/css/style.css');
include XOOPS_CACHE_PATH . '/adminmenu.php';
$moduleperm_handler = xoops_getHandler('groupperm');
$admin_mids = $moduleperm_handler->getItemIds('module_admin', $xoopsUser->getGroups());
$xoTheme->addScript(XOOPS_URL . '/include/layersmenu.js');
$xoTheme->addScript('', '', '
var thresholdY = 15; // in pixels; threshold for vertical repositioning of a layer
var ordinata_margin = 20; // to start the layer a bit above the mouse vertical coordinate');
$xoTheme->addScript('', '', $xoops_admin_menu_js . '
function moveLayers() { ' . $xoops_admin_menu_ml . ' }
function shutdown() { ' . $xoops_admin_menu_sd . ' }
if (NS4) {
document.onmousedown = function() { shutdown(); }
} else {
document.onclick = function() { shutdown(); }
}');
foreach (array_keys($xoops_admin_menu_ft) as $adm) {
if (in_array($adm, $admin_mids)) {
$admin_menu['content'] = $xoops_admin_menu_ft[$adm];
$tpl->append_by_ref('admin_menu', $admin_menu);
unset($admin_menu);
}
}
}
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:40,代码来源:cp_functions.php
示例4: XoopsFormSelectUser
/**
* Constructor
*
* @param string $caption
* @param string $name
* @param mixed $value Pre-selected value (or array of them).
* For an item with massive members, such as "Registered Users", "$value" should be used to store selected temporary users only instead of all members of that item
* @param bool $include_anon Include user "anonymous"?
* @param int $size Number or rows. "1" makes a drop-down-list.
* @param bool $multiple Allow multiple selections?
*/
function XoopsFormSelectUser($caption, $name, $include_anon = false, $value = null, $size = 1, $multiple = false)
{
$limit = 200;
$select_element = new XoopsFormSelect('', $name, $value, $size, $multiple);
if ($include_anon) {
$select_element->addOption(0, $GLOBALS['xoopsConfig']['anonymous']);
}
$member_handler =& xoops_gethandler('member');
$user_count = $member_handler->getUserCount();
$value = is_array($value) ? $value : (empty($value) ? array() : array($value));
if ($user_count > $limit && count($value) > 0) {
$criteria = new CriteriaCompo(new Criteria('uid', '(' . implode(',', $value) . ')', 'IN'));
} else {
$criteria = new CriteriaCompo();
$criteria->setLimit($limit);
}
$criteria->setSort('uname');
$criteria->setOrder('ASC');
$users = $member_handler->getUserList($criteria);
$select_element->addOptionArray($users);
if ($user_count <= $limit) {
$this->XoopsFormElementTray($caption, "", $name);
$this->addElement($select_element);
return;
}
xoops_loadLanguage('findusers');
$js_addusers = "<script type='text/javascript'>\r\n function addusers(opts){\r\n var num = opts.substring(0, opts.indexOf(':'));\r\n opts = opts.substring(opts.indexOf(':')+1, opts.length);\r\n var sel = xoopsGetElementById('" . $name . "');\r\n var arr = new Array(num);\r\n for (var n=0; n < num; n++) {\r\n var nm = opts.substring(0, opts.indexOf(':'));\r\n opts = opts.substring(opts.indexOf(':')+1, opts.length);\r\n var val = opts.substring(0, opts.indexOf(':'));\r\n opts = opts.substring(opts.indexOf(':')+1, opts.length);\r\n var txt = opts.substring(0, nm - val.length);\r\n opts = opts.substring(nm - val.length, opts.length);\r\n var added = false;\r\n for (var k = 0; k < sel.options.length; k++) {\r\n if(sel.options[k].value == val){\r\n added = true;\r\n break;\r\n }\r\n }\r\n if (added == false) {\r\n sel.options[k] = new Option(txt, val);\r\n sel.options[k].selected = true;\r\n }\r\n }\r\n return true;\r\n }\r\n </script>";
$token = $GLOBALS['xoopsSecurity']->createToken();
$action_tray = new XoopsFormElementTray("", " | ");
$action_tray->addElement(new XoopsFormLabel('', '<a href="#" onclick="var sel = xoopsGetElementById(\'' . $name . '\');for (var i = sel.options.length-1; i >= 0; i--) {if (!sel.options[i].selected) {sel.options[i] = null;}}; return false;">' . _MA_USER_REMOVE . "</a>"));
$action_tray->addElement(new XoopsFormLabel('', '<a href="#" onclick="openWithSelfMain(\'' . XOOPS_URL . '/include/findusers.php?target=' . $name . '&multiple=' . $multiple . '&token=' . $token . '\', \'userselect\', 800, 600, null); return false;" >' . _MA_USER_MORE . "</a>" . $js_addusers));
$this->XoopsFormElementTray($caption, '<br /><br />', $name);
$this->addElement($select_element);
$this->addElement($action_tray);
}
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:46,代码来源:formselectuser.php
示例5: header
function header()
{
global $xoops, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsUser, $xoopsOption, $xoTheme, $xoopsTpl;
ob_start();
xoops_loadLanguage('admin', 'system');
xoops_loadLanguage('cpanel', 'system');
xoops_loadLanguage('modinfo', 'system');
$xoopsLogger =& XoopsLogger::getInstance();
$xoopsLogger->stopTime('Module init');
$xoopsLogger->startTime('XOOPS output init');
if (!headers_sent()) {
header('Content-Type:text/html; charset=' . _CHARSET);
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header('Cache-Control: no-store, no-cache, must-revalidate');
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
}
require_once XOOPS_ROOT_PATH . '/class/template.php';
require_once XOOPS_ROOT_PATH . '/class/theme.php';
$adminThemeFactory = new xos_opal_AdminThemeFactory();
$this->xoTheme =& $adminThemeFactory->createInstance(array('folderName' => $this->foldername, 'themesPath' => 'modules/system/class/gui'));
$this->xoTheme->loadLocalization('admin');
$this->template =& $this->xoTheme->template;
$GLOBALS['xoTheme'] =& $this->xoTheme;
$GLOBALS['adminTpl'] =& $this->xoTheme->template;
$xoopsLogger->stopTime('XOOPS output init');
$xoopsLogger->startTime('Module display');
$xoopsPreload =& XoopsPreload::getInstance();
$xoopsPreload->triggerEvent('system.class.gui.header');
}
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:31,代码来源:gui.php
示例6: art_load_lang_file
function art_load_lang_file($filename, $module = '', $default = 'english')
{
if (empty($module) && is_object($GLOBALS["xoopsModule"])) {
$module = $GLOBALS["xoopsModule"]->getVar("dirname");
}
return xoops_loadLanguage($filename, $module);
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:7,代码来源:functions.php
示例7: about_block_page_edit
/**
* @param $options
* @return string
*/
function about_block_page_edit($options)
{
xoops_loadLanguage('blocks', 'about');
$page_handler = xoops_getModuleHandler('page', 'about');
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('page_status', 1), 'AND');
$criteria->add(new Criteria('page_type', 1));
$criteria->setSort('page_order');
$criteria->setOrder('ASC');
$fields = array('page_id', 'page_title', 'page_image');
$pages = $page_handler->getAll($criteria, $fields, false);
$page_title = '';
foreach ($pages as $k => $v) {
$page_title = '<a href="' . XOOPS_URL . '/modules/' . basename(dirname(__DIR__)) . '/index.php?page_id=' . $k . '" target="_blank">' . $v['page_title'] . '</a>';
$options_page[$k] = empty($v['page_image']) ? $page_title : $page_title . '<img src="' . XOOPS_URL . '/modules/' . basename(dirname(__DIR__)) . '/assets/images/picture.png' . '" />';
}
include_once dirname(__DIR__) . '/include/xoopsformloader.php';
$form = new XoopsBlockForm();
$page_select = new XoopsFormRadio(_MB_ABOUT_BLOCKPAGE, 'options[0]', $options[0], '<br>');
$page_select->addOptionArray($options_page);
$form->addElement($page_select);
$form->addElement(new XoopsFormText(_MB_ABOUT_TEXT_LENGTH, 'options[1]', 5, 5, $options[1]));
$form->addElement(new XoopsFormText(_MB_ABOUT_VIEW_MORELINKTEXT, 'options[2]', 30, 50, $options[2]));
$form->addElement(new XoopsFormRadioYN(_MB_ABOUT_DOTITLEIMAGE, 'options[3]', $options[3]));
return $form->render();
}
开发者ID:XoopsModules25x,项目名称:about,代码行数:30,代码来源:blocks.php
示例8: xoops_legacy_cp_header
/**
* Xoops legacy cp_functions
*
* @copyright The XOOPS Project http://sf.net/projects/xoops/
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package system
* @subpackage class
* @since 2.3.0
* @author Taiwen Jiang <[email protected]>
* @version $Id: cp_functions.php 3542 2009-09-01 01:24:00Z trabis $
*/
function xoops_legacy_cp_header()
{
global $xoopsConfig, $xoopsUser, $xoTheme;
xoops_loadLanguage("cpanel", "system");
$xoTheme->addStylesheet(XOOPS_URL . '/xoops.css');
$xoTheme->addStylesheet(XOOPS_URL . '/modules/system/class/gui/default/css/style.css');
include_once XOOPS_CACHE_PATH . '/adminmenu.php';
$moduleperm_handler =& xoops_gethandler('groupperm');
$admin_mids = $moduleperm_handler->getItemIds('module_admin', $xoopsUser->getGroups());
$xoTheme->addScript(XOOPS_URL . '/include/layersmenu.js');
$xoTheme->addScript('', '', '
var thresholdY = 15; // in pixels; threshold for vertical repositioning of a layer
var ordinata_margin = 20; // to start the layer a bit above the mouse vertical coordinate');
$xoTheme->addScript('', '', $xoops_admin_menu_js . '
function moveLayers() { ' . $xoops_admin_menu_ml . ' }
function shutdown() { ' . $xoops_admin_menu_sd . ' }
if (NS4) {
document.onmousedown = function() { shutdown(); }
} else {
document.onclick = function() { shutdown(); }
}');
$logo = file_exists(XOOPS_THEME_PATH . "/" . $GLOBALS['xoopsConfig']['theme_set'] . "/images/logo.gif") ? XOOPS_THEME_URL . "/" . $GLOBALS['xoopsConfig']['theme_set'] . "/images/logo.gif" : XOOPS_URL . "/images/logo.gif";
echo "\n <body>\n <table border='0' width='100%' cellspacing='0' cellpadding='0'>\n <tr>\n <td bgcolor='#2F5376'><a href='http://xoops.sourceforge.net/' rel='external'><img src='" . XOOPS_URL . "/modules/system/images/logo.gif' alt='" . htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES) . "' /></a></td>\n <td align='right' bgcolor='#2F5376' colspan='2'><img src='" . XOOPS_URL . "/modules/system/images/xoops2.gif' alt='' /></td>\n </tr>\n <tr>\n <td align='left' colspan='3' class='bg5'>\n <table border='0' width='100%' cellspacing='0' cellpadding='0'>\n <tr>\n <td width='1%'><img src='" . XOOPS_URL . "/modules/system/images/hbar_left.gif' width='10' height='23' /></td>\n <td class='hbar_middle'> <a href='" . XOOPS_URL . "/admin.php'>" . _CPHOME . "</a> | <a href='" . XOOPS_URL . "/admin.php?xoopsorgnews=1'>XOOPS News</a></td>\n <td class='hbar_middle' align='right'><a href='" . XOOPS_URL . "/user.php?op=logout'>" . _LOGOUT . "</a> | <a href='" . XOOPS_URL . "/'>" . _YOURHOME . "</a> </td>\n <td width='1%'><img src='" . XOOPS_URL . "/modules/system/images/hbar_right.gif' width='10' height='23' /></td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n <table border='0' cellpadding='0' cellspacing='0' width='100%'>\n <tr>\n <td width='2%' valign='top' class='bg5 bg_menu' align='center'></td>\n <td width='15%' valign='top' class='bg5' align='center'><img src='" . XOOPS_URL . "/modules/system/images/menu.gif' /><br />\n <table border='0' cellpadding='4' cellspacing='0' width='100%'>";
foreach (array_keys($xoops_admin_menu_ft) as $adm) {
if (in_array($adm, $admin_mids)) {
echo "<tr><td align='center'>" . $xoops_admin_menu_ft[$adm] . "</td></tr>";
}
}
echo "\n </table>\n <br />\n </td>\n <td align='left' valign='top' width='82%'>\n <div class='content'><br />\n";
}
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:41,代码来源:cp_functions.php
示例9: xoops_module_install_publisher
/**
* @param $xoopsModule
*
* @return bool|string
*/
function xoops_module_install_publisher(XoopsModule $xoopsModule)
{
include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
xoops_loadLanguage('admin', $xoopsModule->getVar('dirname'));
xoops_loadLanguage('modinfo', $xoopsModule->getVar('dirname'));
$moduleDirName = $xoopsModule->getVar('dirname');
include_once $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/include/config.php');
foreach (array_keys($uploadFolders) as $i) {
PublisherUtilities::createFolder($uploadFolders[$i]);
}
$file = PUBLISHER_ROOT_PATH . '/assets/images/blank.png';
foreach (array_keys($copyFiles) as $i) {
$dest = $copyFiles[$i] . '/blank.png';
PublisherUtilities::copyFile($file, $dest);
}
return true;
/*
include_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/functions.php');
$ret = true;
$msg = '';
// Create content directory
$dir = $GLOBALS['xoops']->path('uploads/' . $xoopsModule->getVar('dirname') . '/content');
if (!publisherMkdir($dir)) {
$msg .= sprintf(_AM_PUBLISHER_DIRNOTCREATED, $dir);
}
if (empty($msg)) {
return $ret;
} else {
return $msg;
}
*/
}
开发者ID:trabisdementia,项目名称:publisher,代码行数:38,代码来源:oninstall.php
示例10: __construct
function __construct()
{
xoops_loadLanguage("calendar");
// Load static configurations
$this->path = XOOPS_ROOT_PATH . "/class/calendar/";
$this->url = XOOPS_URL . "/class/calendar/";
$this->config = $this->loadConfig();
}
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:8,代码来源:xoopscalendar.php
示例11: load
function load($language = null)
{
if (class_exists('Xoopslocal')) {
return true;
}
require $GLOBALS['xoops']->path('class/xoopslocal.php');
xoops_loadLanguage('locale');
return true;
}
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:9,代码来源:xoopslocal.php
示例12: __construct
/**
* construct
*/
function __construct()
{
xoops_loadLanguage('captcha');
// Load static configurations
$this->path_basic = XOOPS_ROOT_PATH . '/class/captcha';
$this->path_plugin = XOOPS_ROOT_PATH . '/Frameworks/captcha';
$this->config = $this->loadConfig();
$this->name = $this->config['name'];
}
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:12,代码来源:xoopscaptcha.php
示例13: mymenus_adminMenu
function mymenus_adminMenu($currentoption = 0, $breadcrumb = '')
{
include_once $GLOBALS['xoops']->path('class/template.php');
include $GLOBALS['xoops']->path('modules/mymenus/admin/menu.php');
xoops_loadLanguage('admin', 'mymenus');
xoops_loadLanguage('modinfo', 'mymenus');
$tpl = new XoopsTpl();
$tpl->assign(array('modurl' => $GLOBALS['xoops']->url('modules/mymenus'), 'headermenu' => $mymenus_headermenu, 'adminmenu' => $mymenus_adminmenu, 'current' => $currentoption, 'breadcrumb' => $breadcrumb, 'headermenucount' => count($mymenus_headermenu)));
$tpl->display($GLOBALS['xoops']->path('modules/mymenus/templates/static/mymenus_admin_adminmenu.html'));
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:10,代码来源:functions.php
示例14: subscribers_adminMenu
function subscribers_adminMenu($currentoption = 0, $breadcrumb = '')
{
include_once XOOPS_ROOT_PATH . '/class/template.php';
include XOOPS_ROOT_PATH . '/modules/subscribers/admin/menu.php';
xoops_loadLanguage('admin', 'subscribers');
xoops_loadLanguage('modinfo', 'subscribers');
$tpl = new XoopsTpl();
$tpl->assign(array('modurl' => XOOPS_URL . '/modules/subscribers', 'headermenu' => $subscribers_headermenu, 'adminmenu' => $subscribers_adminmenu, 'current' => $currentoption, 'breadcrumb' => $breadcrumb, 'headermenucount' => count($subscribers_headermenu)));
$tpl->display(XOOPS_ROOT_PATH . '/modules/subscribers/templates/static/subscribers_admin_menu.html');
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:10,代码来源:functions.php
示例15: __construct
/**
* Constructor
*/
function __construct(XoopsModule $module)
{
parent::__construct($this);
//$this->setTemplate(XMF_ROOT_PATH . '/templates/xmf_admin.html');
$this->_obj =& $module;
xoops_loadLanguage('main', 'xmf');
if (is_object($GLOBALS['xoTheme'])) {
$GLOBALS['xoTheme']->addStylesheet(XMF_CSS_URL . '/admin.css');
}
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:13,代码来源:Adminindex.php
示例16: load
/**
* @param null $language
*
* @return bool
*/
static function load($language = null)
{
if (class_exists('Xoopslocal')) {
return true;
}
require_once $GLOBALS['xoops']->path('class/xoopslocal.php');
//XoopsLocal is inside language file, let us load it
xoops_loadLanguage('locale');
return true;
}
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:15,代码来源:xoopslocal.php
示例17: tag_get_delimiter
function tag_get_delimiter()
{
xoops_loadLanguage("config", "tag");
if (!empty($GLOBALS["tag_delimiter"])) {
return $GLOBALS["tag_delimiter"];
}
$moduleConfig = tag_load_config();
if (!empty($moduleConfig["tag_delimiter"])) {
return $moduleConfig["tag_delimiter"];
}
return array(",", " ", "|", ";");
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:12,代码来源:functions.ini.php
示例18: _getModuleMenus
function _getModuleMenus($module, $pid)
{
global $xoopsDB, $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig;
static $id = -1;
$ret = array();
//Sanitizing $module
if (preg_match('/[^a-z0-9\\/\\\\_.:-]/i', $module)) {
return $ret;
}
$path = "modules/{$module}";
$file = $GLOBALS['xoops']->path("{$path}/xoops_version.php");
if (!file_exists($file)) {
return $ret;
}
xoops_loadLanguage('modinfo', $module);
$force = true;
$overwrite = false;
if ($force && (!is_object($xoopsModule) || $xoopsModule->getVar('dirname') != $module)) {
$_xoopsModule = is_object($xoopsModule) ? $xoopsModule : $xoopsModule;
$_xoopsModuleConfig = is_object($xoopsModuleConfig) ? $xoopsModuleConfig : $xoopsModuleConfig;
$module_handler =& xoops_gethandler('module');
$xoopsModule =& $module_handler->getByDirname($module);
$GLOBALS['xoopsModule'] =& $xoopsModule;
if (is_object($xoopsModule)) {
$config_handler =& xoops_gethandler('config');
$xoopsModuleConfig =& $config_handler->getConfigsByCat(0, $xoopsModule->getVar('mid'));
$GLOBALS['xoopsModuleConfig'] =& $xoopsModuleConfig;
}
$overwrite = true;
}
$modversion['sub'] = array();
include $file;
$handler = xoops_getModuleHandler('menu', 'mymenus');
foreach ($modversion['sub'] as $menu) {
$obj = $handler->create();
$obj->setVar('title', $menu['name']);
$obj->setVar('alt_title', $menu['name']);
$obj->setVar('link', $GLOBALS['xoops']->url("{$path}/{$menu['url']}"));
$obj->setVar('id', $id);
$obj->setVar('pid', $pid);
$ret[] = $obj->getValues();
$id--;
}
if ($overwrite) {
$xoopsModule =& $_xoopsModule;
$GLOBALS['xoopsModule'] =& $xoopsModule;
$xoopsModuleConfig =& $_xoopsModuleConfig;
$GLOBALS['xoopsModuleConfig'] =& $xoopsModuleConfig;
}
return $ret;
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:51,代码来源:dynamic.php
示例19: do_transfer
function do_transfer(&$data)
{
eval(parent::do_transfer());
include XOOPS_ROOT_PATH . "/header.php";
xoops_loadLanguage('admin', 'spotlight');
$page_handler =& xoops_getmodulehandler('page', 'spotlight');
$page_obj =& $page_handler->create();
$var_arr = array('page_title' => $data["title"], 'page_desc' => $data["summary"], 'page_link' => $data["url"], 'id' => $data["id"]);
$page_obj->assignVars($var_arr);
$form = $page_obj->getForm($this->config["url"]);
$form->display();
include XOOPS_ROOT_PATH . "/footer.php";
exit;
}
开发者ID:yunsite,项目名称:xoopsdc,代码行数:14,代码来源:index.php
示例20: xoops_module_install_profile
/**
* Extended User Profile
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package profile
* @since 2.3.0
* @author Jan Pedersen
* @author Taiwen Jiang <[email protected]>
* @version $Id: install.php 3749 2009-10-17 14:23:04Z trabis $
*/
function xoops_module_install_profile($module)
{
global $module_id;
$module_id = $module->getVar('mid');
xoops_loadLanguage('user');
// Create registration steps
profile_install_addStep(_PROFILE_MI_STEP_BASIC, '', 1, 1);
profile_install_addStep(_PROFILE_MI_STEP_COMPLEMENTARY, '', 2, 1);
// Create categories
profile_install_addCategory(_PROFILE_MI_CATEGORY_PERSONAL, 1);
profile_install_addCategory(_PROFILE_MI_CATEGORY_MESSAGING, 2);
profile_install_addCategory(_PROFILE_MI_CATEGORY_SETTINGS, 3);
profile_install_addCategory(_PROFILE_MI_CATEGORY_COMMUNITY, 4);
// Add user fields
xoops_loadLanguage('notification');
xoops_loadLanguage('main', $module->getVar('dirname', 'n'));
include_once $GLOBALS['xoops']->path('include/notification_constants.php');
$umode_options = array('nest' => _NESTED, 'flat' => _FLAT, 'thread' => _THREADED);
$uorder_options = array(0 => _OLDESTFIRST, 1 => _NEWESTFIRST);
$notify_mode_options = array(XOOPS_NOTIFICATION_MODE_SENDALWAYS => _NOT_MODE_SENDALWAYS, XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE => _NOT_MODE_SENDONCE, XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT => _NOT_MODE_SENDONCEPERLOGIN);
$notify_method_options = array(XOOPS_NOTIFICATION_METHOD_DISABLE => _NOT_METHOD_DISABLE, XOOPS_NOTIFICATION_METHOD_PM => _NOT_METHOD_PM, XOOPS_NOTIFICATION_METHOD_EMAIL => _NOT_METHOD_EMAIL);
profile_install_addField('name', _US_REALNAME, '', 1, 'textbox', 1, 1, 1, array(), 2, 255);
profile_install_addField('user_from', _US_LOCATION, '', 1, 'textbox', 1, 2, 1, array(), 2, 255);
profile_install_addField('timezone_offset', _US_TIMEZONE, '', 1, 'timezone', 1, 3, 1, array(), 2, 0);
profile_install_addField('user_occ', _US_OCCUPATION, '', 1, 'textbox', 1, 4, 1, array(), 2, 255);
profile_install_addField('user_intrest', _US_INTEREST, '', 1, 'textbox', 1, 5, 1, array(), 2, 255);
profile_install_addField('bio', _US_EXTRAINFO, '', 1, 'textarea', 2, 6, 1, array(), 2, 0);
profile_install_addField('user_regdate', _US_MEMBERSINCE, '', 1, 'datetime', 3, 7, 0, array(), 0, 10);
profile_install_addField('user_icq', _US_ICQ, '', 2, 'textbox', 1, 1, 1, array(), 2, 255);
profile_install_addField('user_aim', _US_AIM, '', 2, 'textbox', 1, 2, 1, array(), 2, 255);
profile_install_addField('user_yim', _US_YIM, '', 2, 'textbox', 1, 3, 1, array(), 2, 255);
profile_install_addField('user_msnm', _US_MSNM, '', 2, 'textbox', 1, 4, 1, array(), 2, 255);
profile_install_addField('user_viewemail', _US_ALLOWVIEWEMAIL, '', 3, 'yesno', 3, 1, 1, array(), 2, 1, false);
profile_install_addField('attachsig', _US_SHOWSIG, '', 3, 'yesno', 3, 2, 1, array(), 0, 1, false);
profile_install_addField('user_mailok', _US_MAILOK, '', 3, 'yesno', 3, 3, 1, array(), 2, 1, false);
profile_install_addField('theme', _PROFILE_MA_THEME, '', 3, 'theme', 1, 4, 1, array(), 0, 0, false);
profile_install_addField('umode', _US_CDISPLAYMODE, '', 3, 'select', 3, 5, 1, $umode_options, 0, 0, false);
profile_install_addField('uorder', _US_CSORTORDER, '', 3, 'select', 3, 6, 1, $uorder_options, 0, 0, false);
profile_install_addField('notify_mode', _NOT_NOTIFYMODE, '', 3, 'select', 3, 7, 1, $notify_mode_options, 0, 0, false);
profile_install_addField('notify_method', _NOT_NOTIFYMETHOD, '', 3, 'select', 3, 8, 1, $notify_method_options, 0, 0, false);
profile_install_addField('url', _PROFILE_MI_URL_TITLE, '', 4, 'textbox', 1, 1, 1, array(), 2, 255);
profile_install_addField('posts', _US_POSTS, '', 4, 'textbox', 3, 2, 0, array(), 0, 255);
profile_install_addField('rank', _US_RANK, '', 4, 'rank', 3, 3, 2, array(), 0, 0);
profile_install_addField('last_login', _US_LASTLOGIN, '', 4, 'datetime', 3, 4, 0, array(), 0, 10);
profile_install_addField('user_sig', _US_SIGNATURE, '', 4, 'textarea', 1, 5, 1, array(), 0, 0);
profile_install_initializeProfiles();
return true;
}
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:66,代码来源:install.php
注:本文中的xoops_loadLanguage函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论