/**
  * 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;
 }
Example #2
0
	public function getPageTitle()
	{
		return Legacy_Utils::formatPagetitle(XCube_Root::getSingleton()->mContext->mModule->mXoopsModule->get('name'), $this->_getPagetitle(), $this->_getPageAction());
	}
 /**
  * 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());
 }
Example #4
0
         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;
Example #5
0
    // 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.');
        }
Example #6
0
 /**
  * getPageTitle
  * 
  * @param   void
  * 
  * @return  string
  **/
 public function getPagetitle()
 {
     return Legacy_Utils::formatPagetitle($this->mRoot->mContext->mModule->mXoopsModule->get('name'), $this->_getPagetitle(), $this->_getActionTitle());
 }
Example #7
0
 /**
  * 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());
 }