当前位置: 首页>>代码示例>>PHP>>正文


PHP SEFTools::GetExtParams方法代码示例

本文整理汇总了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;
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:19,代码来源:com_mailto.php

示例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');
     }
 }
开发者ID:01J,项目名称:bealtine,代码行数:23,代码来源:com_content.php

示例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)) {
开发者ID:sangkasi,项目名称:joomla,代码行数:67,代码来源:sef_ext.php

示例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);
//.........这里部分代码省略.........
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:101,代码来源:com_content.php


注:本文中的SEFTools::GetExtParams方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。