本文整理汇总了PHP中KunenaRoute::getItemid方法的典型用法代码示例。如果您正苦于以下问题:PHP KunenaRoute::getItemid方法的具体用法?PHP KunenaRoute::getItemid怎么用?PHP KunenaRoute::getItemid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KunenaRoute
的用法示例。
在下文中一共展示了KunenaRoute::getItemid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onSystemStart
function onSystemStart()
{
if (!self::kunenaInstalled()) {
return;
}
//initialize the toolbar object
$toolbar = CFactory::getToolbar();
$user = JFactory::getUser();
// Kunena online check
if (!KunenaForum::enabled()) {
$toolbar->addGroup('KUNENAMENU', JText::_('PLG_COMMUNITY_KUNENAMENU_KUNENA_OFFLINE'), KunenaRoute::_('index.php?option=com_kunena'));
return;
}
//adding new 'tab' 'Forum Settings' to JomSocial toolbar
$toolbar->addGroup('KUNENAMENU', JText::_('PLG_COMMUNITY_KUNENANENU_FORUM'), 'index.php?option=com_kunena&view=user&layout=default&Itemid=' . KunenaRoute::getItemid('index.php?option=com_kunena&view=user&layout=default'));
if ($this->params->get('sh_editprofile', 1)) {
$toolbar->addItem('KUNENAMENU', 'KUNENAMENU_EDITPROFILE', JText::_('PLG_COMMUNITY_KUNENAMENU_EDITPROFILE'), 'index.php?option=com_kunena&view=user&layout=edit&Itemid=' . KunenaRoute::getItemid('index.php?option=com_kunena&view=user&layout=edit'));
}
if ($this->params->get('sh_myprofile', 1)) {
$toolbar->addItem('KUNENAMENU', 'KUNENAMENU_PROFILE', JText::_('PLG_COMMUNITY_KUNENAMENU_PROFILE'), 'index.php?option=com_kunena&view=user&layout=default&Itemid=' . KunenaRoute::getItemid('index.php?option=com_kunena&view=user&layout=default'));
}
if ($this->params->get('sh_myposts', 1)) {
$toolbar->addItem('KUNENAMENU', 'KUNENAMENU_POSTS', JText::_('PLG_COMMUNITY_KUNENAMENU_POSTS'), 'index.php?option=com_kunena&view=topics&layout=posts&mode=recent&userid=' . $user->id . '&sel=-1&Itemid=' . KunenaRoute::getItemid('index.php?option=com_kunena&view=topics&layout=posts&mode=recent&userid=' . $user->id . '&sel=-1'));
}
if ($this->params->get('sh_mysubscriptions', 1)) {
$toolbar->addItem('KUNENAMENU', 'KUNENAMENU_SUBSCRIBES', JText::_('PLG_COMMUNITY_KUNENAMENU_SUBSCRIBTIONS'), 'index.php?option=com_kunena&view=topics&layout=user&mode=subscriptions&sel=-1&Itemid=' . KunenaRoute::getItemid('index.php?option=com_kunena&view=topics&layout=user&mode=subscriptions&sel=-1'));
}
if ($this->params->get('sh_myfavorites', 1)) {
$toolbar->addItem('KUNENAMENU', 'KUNENAMENU_FAVORITES', JText::_('PLG_COMMUNITY_KUNENAMENU_FAVORITES'), 'index.php?option=com_kunena&view=topics&layout=user&mode=favorites&sel=-1&Itemid=' . KunenaRoute::getItemid('index.php?option=com_kunena&view=topics&layout=user&mode=favorite&sel=-1s'));
}
}
示例2: __construct
//.........这里部分代码省略.........
if (empty($newitem2->component) || $newitem2->component != 'com_kunena') {
$defaultitem = $newitem->id;
}
if ($defaultitem) {
$menu->setActive($defaultitem);
$active = $menu->getActive();
}
}
} else {
$oldlocation = KunenaRoute::getCurrentMenu();
$menu->setActive($defaultitem);
$active = $menu->getActive();
$newlocation = KunenaRoute::getCurrentMenu();
if (!$oldlocation || $oldlocation->id != $newlocation->id) {
// Follow Default Menu Item if it's not in the same menu
$this->redirect(KunenaRoute::_($defaultitem, false));
}
}
if (is_object($active)) {
foreach ($active->query as $var => $value) {
if ($var == 'view') {
$var = 'func';
}
if ($var == 'func' && $value == 'entrypage') {
$value = $func;
}
JRequest::setVar($var, $value);
}
$func = JRequest::getCmd('func');
}
}
}
}
$newItemid = KunenaRoute::getItemid();
if ($active && $newItemid && !KunenaRoute::getCurrentMenu() && $active->id != $newItemid) {
$newroute = KunenaRoute::_($newItemid, false);
if (strpos('/' . $active->route, $newroute) === 0) {
$menu->setActive($newItemid);
$active = $menu->getActive();
} else {
$this->redirect(KunenaRoute::_(null, false));
}
}
}
global $message;
global $kunena_this_cat;
// Get all the variables we need and strip them in case
$action = JRequest::getCmd('action', '');
$catid = JRequest::getInt('catid', 0);
$contentURL = JRequest::getVar('contentURL', '');
$email = JRequest::getVar('email', '');
$favoriteMe = JRequest::getVar('favoriteMe', '');
$fb_authorname = JRequest::getVar('fb_authorname', '');
$fb_thread = JRequest::getInt('fb_thread', 0);
$id = JRequest::getInt('id', 0);
$mesid = JRequest::getInt('mesid', 0);
$limit = JRequest::getInt('limit', 0);
$limitstart = JRequest::getInt('limitstart', 0);
$markaction = JRequest::getVar('markaction', '');
$message = JRequest::getVar('message', '');
$page = JRequest::getInt('page', 0);
$parentid = JRequest::getInt('parentid', 0);
$pid = JRequest::getInt('pid', 0);
$replyto = JRequest::getInt('replyto', 0);
$resubject = JRequest::getVar('resubject', '');
$rowid = JRequest::getInt('rowid', 0);