本文整理汇总了PHP中SEFTools::GetExtParams方法的典型用法代码示例。如果您正苦于以下问题:PHP SEFTools::GetExtParams方法的具体用法?PHP SEFTools::GetExtParams怎么用?PHP SEFTools::GetExtParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SEFTools
的用法示例。
在下文中一共展示了SEFTools::GetExtParams方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
function create(&$uri)
{
$sefConfig =& SEFConfig::getConfig();
$params = SEFTools::GetExtParams('com_content');
$vars = $uri->getQuery(true);
extract($vars);
// Set title.
$title = array();
$title[] = JoomSEF::_getMenuTitle(@$option, @$task, @$Itemid);
if (!empty($tmpl)) {
$title[] = $tmpl;
}
$newUri = $uri;
if (count($title) > 0) {
$this->_createNonSefVars($uri);
$newUri = JoomSEF::_sefGetLocation($uri, $title, null, null, null, @$lang, null, $this->ignoreVars);
}
return $newUri;
}
示例2: _createNonSefVars
protected function _createNonSefVars(&$uri)
{
if (!isset($this->nonSefVars) && !isset($this->ignoreVars)) {
$this->nonSefVars = array();
$this->ignoreVars = array();
}
$this->params =& SEFTools::GetExtParams('com_content');
$sefConfig =& SEFConfig::getConfig();
if ($sefConfig->appendNonSef && $this->params->get('pagination', '0') != '0') {
if (!is_null($uri->getVar('limit'))) {
$this->nonSefVars['limit'] = $uri->getVar('limit');
}
if (!is_null($uri->getVar('limitstart'))) {
$this->nonSefVars['limitstart'] = $uri->getVar('limitstart');
}
}
if (!is_null($uri->getVar('filter'))) {
$this->nonSefVars['filter'] = $uri->getVar('filter');
}
if (!is_null($uri->getVar('return'))) {
$this->nonSefVars['return'] = $uri->getVar('return');
}
}
示例3: create
//.........这里部分代码省略.........
$tmp = '';
if (empty($title) && isset($vars['Itemid']) && !empty($vars['Itemid'])) {
$menu =& shRouter::shGetMenu();
$item = $menu->getItem($vars['Itemid']);
if (is_object($item) && $vars['option'] == $item->component) {
$title[] = $item->route;
}
}
if (empty($title)) {
//$title[] = 'comp';
$title[] = substr($vars['option'], 4);
}
// add user defined prefix
$prefix = shGetComponentPrefix($option);
if (!empty($prefix)) {
array_unshift($title, $prefix);
}
// now process the resulting title string
$string = shFinalizePlugin($string, $title, $shAppendString, '', isset($limit) ? @$limit : null, isset($limitstart) ? @$limitstart : null, isset($shLangName) ? @$shLangName : null, isset($showall) ? @$showall : null);
break;
// use sh404sef plugins, either in ext. dir or in sh404sef dir
// use sh404sef plugins, either in ext. dir or in sh404sef dir
case Sh404sefClassBaseextplugin::TYPE_SH404SEF_ROUTER:
_log('Loading sh404SEF plugin in ' . $extPluginPath);
include $extPluginPath;
break;
case Sh404sefClassBaseextplugin::TYPE_JOOMSEF_ROUTER:
Sh404sefHelperExtplugins::loadJoomsefCompatLibs();
include_once $extPluginPath;
$className = 'SefExt_' . $option;
$plugin = new $className();
if (!shIsHomepage($string)) {
// make sure the plugin does not try to calculate pagination
$params =& SEFTools::GetExtParams('com_content');
$params->set('pagination', '1');
// ask plugin to build url
$plugin->beforeCreate($originalUri);
$result = $plugin->create($originalUri);
$title = empty($result['title']) ? array() : $result['title'];
$plugin->afterCreate($originalUri);
// make sure we have a url
if (empty($title) && isset($vars['Itemid']) && !empty($vars['Itemid'])) {
$menu =& shRouter::shGetMenu();
$item = $menu->getItem($vars['Itemid']);
if (is_object($item) && $vars['option'] == $item->component) {
$title[] = $item->route;
}
}
$prefix = shGetComponentPrefix($option);
if (!empty($prefix)) {
array_unshift($title, $prefix);
}
if (empty($title) && !shIsHomepage($string)) {
$title[] = substr($vars['option'], 4);
}
list($usedVars, $ignore) = $plugin->getNonSefVars($result);
if (!empty($ignore)) {
$usedVars = array_merge($usedVars, $ignore);
}
} else {
$string = '';
$title[] = '/';
$usedVars = array();
}
// post process result to adjust to our workflow
if (!empty($vars)) {
示例4: create
function create(&$uri)
{
$sefConfig =& SEFConfig::getConfig();
$mainframe =& JFactory::getApplication();
$this->params =& SEFTools::GetExtParams('com_content');
$vars = $uri->getQuery(true);
extract($vars);
// Do not SEF URLs with exturl variable
//if( !empty($exturl) ) return $string;
// Do not SEF edit urls
if (isset($task) && $task == 'edit') {
return $uri;
}
// Set title.
$title = array();
switch (@$view) {
case 'new':
case 'edit':
/*
$title[] = getMenuTitle($option, $task, $Itemid, $string);
$title[] = 'new' . $sefConfig->suffix;
*/
break;
case 'archive':
$title[] = JText::_($view);
if (!empty($year)) {
$title[] = $year;
}
if (!empty($month)) {
$title[] = $month;
}
break;
/*
case 'archivecategory':
case 'archivesection': {
if (eregi($task.".*id=".$id, $_SERVER['REQUEST_URI'])) break;
}
*/
/*
case 'archivecategory':
case 'archivesection': {
if (eregi($task.".*id=".$id, $_SERVER['REQUEST_URI'])) break;
}
*/
default:
if (isset($format)) {
if ($format == 'pdf') {
// wrong ID
if (intval($id) == 0) {
return $uri;
}
// create PDF
$title = $this->_getContentTitles(!empty($view) ? $view : 'article', $id);
if (count($title) === 0) {
$title[] = JoomSEF::_getMenuTitle(@$option, @$task, @$Itemid);
}
// Add Google News number if set to
if (@$view == 'article' && $this->params->get('googlenewsnum', '0') != '0') {
$i = count($title) - 1;
$title[$i] = $this->GoogleNews($title[$i], $id);
}
$title[] = JText::_('PDF');
} elseif ($format == 'feed') {
// Create feed
if (@$view != 'frontpage') {
// wrong ID
if (intval($id) == 0) {
return $uri;
}
$title = $this->_getContentTitles(!empty($view) ? $view : 'article', $id);
// Add Google News number if set to
if (@$view == 'article' && $this->params->get('googlenewsnum', '0') != '0') {
$i = count($title) - 1;
$title[$i] = $this->GoogleNews($title[$i], $id);
}
}
if (count($title) === 0 && empty($type)) {
$title[] = JoomSEF::_getMenuTitle(@$option, @$task, @$Itemid);
}
if (!empty($type)) {
$title[] = $type;
}
}
} else {
if (isset($id)) {
// wrong ID
if (intval($id) == 0) {
return $uri;
}
$title = $this->_getContentTitles(@$view, @$id);
if (count($title) === 0) {
$title[] = JoomSEF::_getMenuTitle(@$option, @$task, @$Itemid);
}
// Add Google News number if set to
if (@$view == 'article' && $this->params->get('googlenewsnum', '0') != '0') {
$i = count($title) - 1;
$title[$i] = $this->GoogleNews($title[$i], $id);
}
} else {
$title[] = JoomSEF::_getMenuTitle(@$option, @$task, @$Itemid);
//.........这里部分代码省略.........