本文整理汇总了PHP中EasyBlogRouter::getTeamBlogPermalink方法的典型用法代码示例。如果您正苦于以下问题:PHP EasyBlogRouter::getTeamBlogPermalink方法的具体用法?PHP EasyBlogRouter::getTeamBlogPermalink怎么用?PHP EasyBlogRouter::getTeamBlogPermalink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EasyBlogRouter
的用法示例。
在下文中一共展示了EasyBlogRouter::getTeamBlogPermalink方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
/**
* Creates the SEF Advance URL out of the request
* Input: $string, string, The request URL (index.php?option=com_example&Itemid=$Itemid)
* Output: $sefstring, string, SEF Advance URL ($var1/$var2/)
**/
function create($string)
{
global $database;
if (empty($database)) {
// Joomla! 1.5 native
$database = EasyBlogHelper::db();
}
// $string == "index.php?option=com_mydir&Itemid=$Itemid
// &catid=$catid&id=$id"
$sefstring = '';
// $itemid = '';
// if (preg_match('/&Itemid=/i',$string))
// {
// $temp = explode('&Itemid=', $string);
// $temp = explode('&', $temp[1]);
// $itemid = $temp[0];
// }
$config = EasyBlogHelper::getConfig();
if (preg_match('/&view=/i', $string)) {
$temp = explode('&view=', $string);
$temp = explode('&', $temp[1]);
$view = $temp[0];
if ($view != 'entry' || $config->get('main_sef') != 'simple') {
$sefstring .= sefencode($view) . '/';
}
}
if (preg_match('/&id=/i', $string)) {
$id = sef_easyblog::getVarValue('id', $string);
JTable::addIncludePath(JPATH_ROOT . DIRECTORY_SEPARATOR . 'administrator' . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_easyblog' . DIRECTORY_SEPARATOR . 'tables');
$idname = '';
if (!empty($id) && isset($view)) {
switch ($view) {
case 'entry':
$idname = EasyBlogRouter::getBlogSefPermalink($id);
break;
case 'blogger':
$idname = EasyBlogRouter::getBloggerPermalink($id);
break;
case 'categories':
$idname = EasyBlogRouter::getCategoryPermalink($id);
break;
case 'tags':
$idname = EasyBlogRouter::getTagPermalink($id);
break;
case 'teamblog':
$idname = EasyBlogRouter::getTeamBlogPermalink($id);
break;
default:
$idname = '';
}
}
$idname = empty($idname) ? $id : $idname;
}
if (preg_match('/&controller=/i', $string)) {
$temp = explode('&controller=', $string);
$temp = explode('&', $temp[1]);
$controller = $temp[0];
$sefstring .= '?controller=' . $controller;
if (preg_match('/&task=/i', $string)) {
$temp = explode('&task=', $string);
$temp = explode('&', $temp[1]);
$task = $temp[0];
$sefstring .= '&task=' . $task;
}
if (preg_match('/&tmpl=/i', $string)) {
$temp = explode('&tmpl=', $string);
$temp = explode('&', $temp[1]);
$tmpl = $temp[0];
$sefstring .= '&tmpl=' . $tmpl;
}
if (preg_match('/&browse=/i', $string)) {
$temp = explode('&browse=', $string);
$temp = explode('&', $temp[1]);
$browse = $temp[0];
$sefstring .= '&browse=' . $browse;
}
if (preg_match('/&from=/i', $string)) {
$temp = explode('&from=', $string);
$temp = explode('&', $temp[1]);
$from = $temp[0];
$sefstring .= '&from=' . $from;
}
if (preg_match('/&status=/i', $string)) {
$temp = explode('&status=', $string);
$temp = explode('&', $temp[1]);
$from = $temp[0];
$sefstring .= '&status=' . $from;
}
if (preg_match('/&blogId=/i', $string)) {
$temp = explode('&blogId=', $string);
$temp = explode('&', $temp[1]);
$from = $temp[0];
$sefstring .= '&blogId=' . $from;
}
}
//.........这里部分代码省略.........
示例2: switch
JTable::addIncludePath(JPATH_ROOT . DIRECTORY_SEPARATOR . 'administrator' . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_easyblog' . DIRECTORY_SEPARATOR . 'tables');
switch ($view) {
case 'entry':
$idname = EasyBlogRouter::getBlogSefPermalink($id);
break;
case 'blogger':
$idname = EasyBlogRouter::getBloggerPermalink($id);
break;
case 'categories':
$idname = EasyBlogRouter::getCategoryPermalink($id);
break;
case 'tags':
$idname = EasyBlogRouter::getTagPermalink($id);
break;
case 'teamblog':
$idname = EasyBlogRouter::getTeamBlogPermalink($id);
break;
default:
$idname = '';
}
}
if (empty($Itemid)) {
$Itemid = EasyBlogRouter::getItemId($view);
shAddToGETVarsList('Itemid', $Itemid);
}
}
$easyblogName = shGetComponentPrefix($option);
$easyblogName = empty($easyblogName) ? getMenuTitle($option, $task, $Itemid, null, $shLangName) : $easyblogName;
$easyblogName = empty($easyblogName) || $easyblogName == '/' ? 'EasyBlog' : $easyblogName;
$title[] = $easyblogName;
$validViews = array('archive', 'blogger', 'categories', 'dashboard', 'entry', 'featured', 'images', 'latest', 'login', 'myblog', 'ratings', 'search', 'subscription', 'tags', 'teamblog', 'trackback');
示例3: EasyBlogBuildRoute
function EasyBlogBuildRoute(&$query)
{
JFactory::getLanguage()->load('com_easyblog', JPATH_ROOT);
$segments = array();
$config = EasyBlogHelper::getConfig();
if (isset($query['view']) && $query['view'] == 'entry' && isset($query['id'])) {
if ($config->get('main_sef') != 'simple') {
$segments[] = EasyBlogSEFTranslation::_($query['view']);
}
$segments[] = EasyBlogRouter::getBlogSefPermalink($query['id']);
unset($query['id']);
unset($query['view']);
}
if (isset($query['view']) && $query['view'] == 'categories' && isset($query['id'])) {
$segments[] = EasyBlogSEFTranslation::_($query['view']);
if ($config->get('main_sef') != 'simple') {
if (isset($query['layout'])) {
$segments[] = EasyBlogSEFTranslation::_($query['layout']);
}
}
$segments[] = EasyBlogRouter::getCategoryPermalink($query['id']);
unset($query['id']);
unset($query['view']);
unset($query['layout']);
}
if (isset($query['view']) && $query['view'] == 'tags' && isset($query['id']) && isset($query['layout'])) {
$segments[] = EasyBlogSEFTranslation::_($query['view']);
$segments[] = EasyBlogSEFTranslation::_($query['layout']);
$segments[] = EasyBlogRouter::getTagPermalink($query['id']);
unset($query['id']);
unset($query['view']);
unset($query['layout']);
}
if (isset($query['view']) && $query['view'] == 'teamblog' && isset($query['id'])) {
$segments[] = EasyBlogSEFTranslation::_($query['view']);
if (isset($query['layout'])) {
if ($query['layout'] == "statistic") {
$segments[] = EasyBlogRouter::getTeamBlogPermalink($query['id']);
$segments[] = EasyBlogSEFTranslation::_($query['layout']);
$segments[] = EasyBlogSEFTranslation::_($query['stat']);
if ($query['stat'] == 'category') {
$segments[] = EasyBlogRouter::getCategoryPermalink($query['catid']);
unset($query['catid']);
}
if ($query['stat'] == 'tag') {
$segments[] = EasyBlogRouter::getTagPermalink($query['tagid']);
unset($query['tagid']);
}
} else {
$segments[] = EasyBlogSEFTranslation::_($query['layout']);
$segments[] = EasyBlogRouter::getTeamBlogPermalink($query['id']);
}
} else {
$segments[] = EasyBlogRouter::getTeamBlogPermalink($query['id']);
}
unset($query['id']);
unset($query['stat']);
unset($query['layout']);
unset($query['view']);
}
if (isset($query['view']) && $query['view'] == 'blogger' && isset($query['id'])) {
$segments[] = EasyBlogSEFTranslation::_($query['view']);
if (isset($query['layout'])) {
if ($query['layout'] == "statistic") {
$segments[] = EasyBlogRouter::getBloggerPermalink($query['id']);
$segments[] = EasyBlogSEFTranslation::_($query['layout']);
$segments[] = $query['stat'];
if ($query['stat'] == 'category') {
$segments[] = EasyBlogRouter::getCategoryPermalink($query['catid']);
unset($query['catid']);
}
if ($query['stat'] == 'tag') {
$segments[] = EasyBlogRouter::getTagPermalink($query['tagid']);
unset($query['tagid']);
}
} else {
$segments[] = EasyBlogSEFTranslation::_($query['layout']);
$segments[] = EasyBlogRouter::getBloggerPermalink($query['id']);
}
} else {
$segments[] = EasyBlogRouter::getBloggerPermalink($query['id']);
}
unset($query['id']);
unset($query['stat']);
unset($query['view']);
unset($query['layout']);
}
if (isset($query['view']) && $query['view'] == 'dashboard' && isset($query['layout'])) {
$segments[] = EasyBlogSEFTranslation::_($query['view']);
$segments[] = EasyBlogSEFTranslation::_($query['layout']);
if (isset($query['filter'])) {
$segments[] = $query['filter'];
unset($query['filter']);
}
if (isset($query['postType'])) {
$segments[] = $query['postType'];
unset($query['postType']);
}
unset($query['view']);
unset($query['layout']);
//.........这里部分代码省略.........