本文整理匯總了PHP中cmsFramework::_getUri方法的典型用法代碼示例。如果您正苦於以下問題:PHP cmsFramework::_getUri方法的具體用法?PHP cmsFramework::_getUri怎麽用?PHP cmsFramework::_getUri使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cmsFramework
的用法示例。
在下文中一共展示了cmsFramework::_getUri方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: JreviewsParseRoute
function JreviewsParseRoute($segments)
{
$vars = array();
# Load own uri to overcome Joomla encoding issues with Greek params
$uri = cmsFramework::_getUri();
// Fix for Joomfish. Remove the language segment from the url
if (class_exists('JoomFishManager')) {
$lang = JFactory::getLanguage();
$language = $lang->getTag();
$jfm = JoomFishManager::getInstance();
$lang_shortcode = $jfm->getLanguageCode($language);
if (strstr($uri, '/' . $lang_shortcode . '/')) {
$uri = str_replace('/' . $lang_shortcode . '/', '/', $uri);
}
}
$new_segments = cmsFramework::_parseSefRoute($uri);
if (end($new_segments) == 'index.php') {
$new_segments = $segments;
}
// Remove Joomla language segment from url
if (isset($_GET['language']) && $_GET['language'] != '' && strlen($new_segments[0]) == 2) {
$new_segments[0] = 'index.php';
}
# Fix for sef without mod rewrite. Without it the sort urls don't work.
// Remove the Itemid related segments when mod rewrite is disabled and Itemid exists
if ($new_segments[0] == 'index.php' && $new_segments[1] != 'component') {
foreach ($new_segments as $key => $segment) {
if (!in_array(str_replace(' ', '+', $segment), $segments) && !in_array(JreviewsStrReplaceOnce('-', ':', urlencode($segment)), $segments)) {
unset($new_segments[$key]);
}
}
}
if (count($new_segments) >= 3 && isset($new_segments[0]) && $new_segments[0] == 'index.php' && isset($new_segments[1]) && $new_segments[1] == 'component' && isset($new_segments[2]) && $new_segments[2] == 'jreviews') {
array_shift($new_segments);
array_shift($new_segments);
array_shift($new_segments);
}
$vars['url'] = implode('/', $new_segments);
return $vars;
}