本文整理汇总了PHP中Legacy_Utils::formatPagetitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Legacy_Utils::formatPagetitle方法的具体用法?PHP Legacy_Utils::formatPagetitle怎么用?PHP Legacy_Utils::formatPagetitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Legacy_Utils
的用法示例。
在下文中一共展示了Legacy_Utils::formatPagetitle方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPagetitle
/**
* get page title.
*
* @return string
*/
public function getPagetitle()
{
$modulename = $this->mRoot->mContext->mModule->mXoopsModule->get('name');
$pagetitle = $this->_getPagetitle();
$action = $this->_getActionName();
if (method_exists('Legacy_Utils', 'formatPagetitle')) {
return Legacy_Utils::formatPagetitle($modulename, $pagetitle, $action);
}
$handler = xoops_gethandler('config');
$configArr = $handler->getConfigsByDirname('legacyRender');
$replace = array($modulename, $pagetitle, $action);
$search = array('{modulename}', '{pagetitle}', '{action}');
$ret = str_replace($search, $replace, '{modulename} {action} {pagetitle}');
return $ret;
}
示例2: getPageTitle
public function getPageTitle()
{
return Legacy_Utils::formatPagetitle(XCube_Root::getSingleton()->mContext->mModule->mXoopsModule->get('name'), $this->_getPagetitle(), $this->_getPageAction());
}
示例3: getPagetitle
/**
* getPageTitle
*
* @param void
*
* @return string
**/
public function getPagetitle()
{
///XCL2.2 only
return Legacy_Utils::formatPagetitle($this->mRoot->mContext->mModule->mXoopsModule->get('name'), null, $this->_getActionName());
}
示例4: unset
unset($results);
unset($module);
}
if ($no_matches) {
$xoopsTpl->assign('no_matches', $no_matches);
$xoopsTpl->assign('no_match', _MD_NOMATCH);
}
include "include/searchform.php";
$search_form = $search_form->render();
//Do not remove follows
$search_form .= '<p><a href="http://suin.asia" target="_blank">search</a>(<a href="http://xoopscube.jp/" target="_blank">original</a>)</p>';
$xoopsTpl->assign('search_form', $search_form);
if (defined('LEGACY_MODULE_VERSION') && version_compare(LEGACY_MODULE_VERSION, '2.2', '>=')) {
// For XCL >= 2.2
$xclRoot =& XCube_Root::getSingleton();
$xclRoot->mContext->setAttribute('legacy_pagetitle', Legacy_Utils::formatPagetitle($xoopsModule->getVar('name'), htmlspecialchars(join(' ', $queries)), $andor));
}
break;
case "showall":
case "showallbyuser":
include XOOPS_ROOT_PATH . "/header.php";
$xoopsTpl->assign("xoops_module_header", '<link rel="stylesheet" type="text/css" media="screen" href="' . XOOPS_URL . '/modules/' . $mydirname . '/include/search.css" />');
$db =& Database::getInstance();
$result = $db->query("SELECT mid FROM " . $db->prefix("search") . " WHERE notshow!=0");
$undisplayable = array();
while (list($badmid) = $db->fetchRow($result)) {
$undisplayable[] = $badmid;
}
if (in_array($mid, $undisplayable) || !in_array($mid, $available_modules)) {
redirect_header("index.php", 1, _NOPERM);
exit;
示例5: array
// xoops header
include XOOPS_ROOT_PATH . '/header.php';
$_xoops_header = $xoopsTpl->get_template_vars('xoops_module_header');
$xpwiki_head = array();
foreach (explode("\n", $_xoops_header) as $_head) {
$_head = trim($_head);
if ($_head && (strpos($xpwiki->root->html_header, $_head) === FALSE || !preg_match('#^(?:<script[^>]*?>.*?</script>|<link[^>]+?/>)$#i', $_head))) {
$xpwiki_head[] = $_head;
}
}
$xpwiki->root->html_header .= join("\n", $xpwiki_head);
$xoopsTpl->assign(array('xoops_pagetitle' => $xpwiki->root->pagetitle, 'xoops_module_header' => $xpwiki->root->html_header, 'xoops_breadcrumbs' => $xpwiki->get_var('breadcrumbs_array'), 'xoops_meta_description' => $xpwiki->root->meta_description, 'xpwiki_pagename' => $xpwiki->get_var('page'), 'xpwiki_pginfo' => $xpwiki->get_pginfo()));
if (defined('LEGACY_MODULE_VERSION') && version_compare(LEGACY_MODULE_VERSION, '2.2', '>=')) {
// For XCL >= 2.2
$xclRoot =& XCube_Root::getSingleton();
$xclRoot->mContext->setAttribute('legacy_pagetitle', Legacy_Utils::formatPagetitle($xpwiki->root->module_title, $xpwiki->root->pagetitle, $xpwiki->root->pagetitle_action));
$headerScript = $xclRoot->mContext->getAttribute('headerScript');
$headerScript->addMeta('description', $xpwiki->root->meta_description);
} elseif (isset($xoTheme) && is_object($xoTheme)) {
// For XOOPS 2.3 or higher & Impress CMS.
$xoTheme->addMeta('meta', 'description', $xpwiki->root->meta_description);
}
echo $xpwiki->html;
// xoops footer
include XOOPS_ROOT_PATH . '/footer.php';
} else {
if ($xpwiki->runmode === 'xoops_admin') {
// Check referer
if (!$xpwiki->func->refcheck()) {
exit('Invalid REFERER.');
}
示例6: getPagetitle
/**
* getPageTitle
*
* @param void
*
* @return string
**/
public function getPagetitle()
{
return Legacy_Utils::formatPagetitle($this->mRoot->mContext->mModule->mXoopsModule->get('name'), $this->_getPagetitle(), $this->_getActionTitle());
}
示例7: getPagetitle
/**
* getPageTitle
*
* @param void
*
* @return string
**/
public function getPagetitle()
{
$title = null;
$object = isset($this->mObject) ? $this->mObject : null;
XCube_DelegateUtils::call('Module.' . $this->mAsset->mDirname . '.SetPagetitle', new XCube_Ref($title), $this->mAsset->mDirname, $this->_getPagetitle(), $this->_getActionName(), $object);
return isset($title) ? $title : Legacy_Utils::formatPagetitle($this->mRoot->mContext->mModule->mXoopsModule->get('name'), $this->_getPagetitle(), $this->_getActionName());
}