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


PHP EasyBlogRouter::isSefEnabled方法代码示例

本文整理汇总了PHP中EasyBlogRouter::isSefEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP EasyBlogRouter::isSefEnabled方法的具体用法?PHP EasyBlogRouter::isSefEnabled怎么用?PHP EasyBlogRouter::isSefEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EasyBlogRouter的用法示例。


在下文中一共展示了EasyBlogRouter::isSefEnabled方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getFeedURL

 /**
  * Appends the necessary rss fragments on existing url
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function getFeedURL($url, $atom = false, $type = 'site')
 {
     if ($this->config->get('main_feedburner') && $type == 'site' && $this->config->get('main_feedburner_url') != '') {
         return $this->config->get('main_feedburner_url');
     }
     $join = EasyBlogRouter::isSefEnabled() ? '?' : '&';
     // Append the necessary queries
     $url = EBR::_($url) . $join . 'format=feed';
     $url .= $atom ? '&type=atom' : '&type=rss';
     return $url;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:19,代码来源:feeds.php

示例2: getFeedURL

 function getFeedURL($url, $atom = false, $type = 'site')
 {
     $config = EasyBlogHelper::getConfig();
     $enabled = $config->get('main_feedburner');
     if ($enabled && $type == 'site' && $config->get('main_feedburner_url') != '') {
         $url = $config->get('main_feedburner_url');
         if (!empty($url)) {
             return EasyBlogHelper::getHelper('String')->escape($url);
         }
     }
     require_once EBLOG_HELPERS . DIRECTORY_SEPARATOR . 'router.php';
     $sef = EasyBlogRouter::isSefEnabled();
     $join = $sef ? '?' : '&';
     $url = EasyBlogRouter::_($url) . $join . 'format=feed';
     $url .= $atom ? '&type=atom' : '&type=rss';
     return $url;
 }
开发者ID:Tommar,项目名称:vino2,代码行数:17,代码来源:feeds.php

示例3: getRoutedURL

 public static function getRoutedURL($url, $xhtml = false, $external = false, $isCanonical = false)
 {
     if (!$external) {
         return EasyBlogRouter::_($url, $xhtml, null, false, $isCanonical);
     }
     $mainframe = JFactory::getApplication();
     $uri = JURI::getInstance();
     $isDashboard = false;
     if (!$mainframe->isAdmin()) {
         $menu = JFactory::getApplication()->getMenu();
         $item = $menu->getActive();
         if (isset($item->link)) {
             $pos = strpos($item->link, 'view=dashboard');
             if ($pos !== false) {
                 $isDashboard = true;
             }
         }
     }
     //To fix 1.6 Jroute issue as it will include the administrator into the url path.
     $oriURL = $url;
     if ($mainframe->isAdmin() && EasyBlogRouter::isSefEnabled()) {
         if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
             JFactory::$application = JApplication::getInstance('site');
         }
         if (EasyBlogHelper::getJoomlaVersion() >= '3.0') {
             jimport('joomla.libraries.cms.router');
         } else {
             require_once JPATH_ROOT . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'router.php';
             require_once JPATH_ROOT . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'application.php';
         }
         $router = new JRouterSite(array('mode' => JROUTER_MODE_SEF));
         $urls = str_replace('/administrator/', '/', EasyBlogRouter::_($oriURL, $xhtml, null, $isDashboard, $isCanonical));
         $urls = rtrim(JURI::root(), '/') . '/' . ltrim(str_replace('/administrator/', '/', $urls), '/');
         $container = explode('/', $urls);
         $container = array_unique($container);
         $urls = implode('/', $container);
         if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
             JFactory::$application = JApplication::getInstance('administrator');
         }
         return $urls;
     } else {
         $url = str_replace('/administrator/', '/', EasyBlogRouter::_($url, $xhtml, null, $isDashboard, $isCanonical));
     }
     // We need to use $uri->toString() because JURI::root() may contain a subfolder which will be duplicated
     // since $url already has the subfolder.
     if ($mainframe->isAdmin()) {
         return $uri->toString(array('scheme', 'host', 'port')) . '/' . ltrim($url, '/');
     }
     return $uri->toString(array('scheme', 'host', 'port')) . '/' . ltrim($url, '/');
 }
开发者ID:alexinteam,项目名称:joomla3,代码行数:50,代码来源:router.php

示例4: getWeeverURL

 public function getWeeverURL($url)
 {
     require_once EBLOG_HELPERS . DIRECTORY_SEPARATOR . 'router.php';
     $sef = EasyBlogRouter::isSefEnabled();
     $join = $sef ? '?' : '&';
     $url = EasyBlogRouter::getRoutedUrl($url, false, true) . $join . 'format=weever';
     return $url;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:8,代码来源:weever.php


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