本文整理汇总了PHP中CKunenaLink::GetCategoryURL方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaLink::GetCategoryURL方法的具体用法?PHP CKunenaLink::GetCategoryURL怎么用?PHP CKunenaLink::GetCategoryURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKunenaLink
的用法示例。
在下文中一共展示了CKunenaLink::GetCategoryURL方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
//.........这里部分代码省略.........
$integration->open();
//time format
include_once JPATH_COMPONENT . '/lib/kunena.timeformat.class.php';
$document =& JFactory::getDocument();
if (file_exists(KUNENA_ABSTMPLTPATH . '/initialize.php')) {
require_once KUNENA_ABSTMPLTPATH . '/initialize.php';
} else {
require_once KPATH_SITE . '/template/default/initialize.php';
}
// Insert WhoIsOnlineDatas
require_once KUNENA_PATH_LIB . '/kunena.who.class.php';
$who =& CKunenaWhoIsOnline::getInstance();
$who->insertOnlineDatas();
// include required libraries
jimport('joomla.template.template');
// Kunena Current Template Icons Pack
if (file_exists(KUNENA_ABSTMPLTPATH . '/icons.php')) {
include KUNENA_ABSTMPLTPATH . '/icons.php';
} else {
include KUNENA_PATH_TEMPLATE_DEFAULT . '/icons.php';
}
if (JDEBUG) {
$__profiler->mark('Session Start');
}
// We only save session for registered users
$kunena_session = KunenaFactory::getSession(true);
if ($kunena_my->id > 0) {
// new indicator handling
if ($markaction == "allread") {
if (!JRequest::checkToken()) {
$kunena_app->enqueueMessage(JText::_('COM_KUNENA_ERROR_TOKEN'), 'error');
while (@ob_end_clean()) {
}
$kunena_app->redirect(CKunenaLink::GetCategoryURL('listcat', $catid, false));
}
$kunena_session->markAllCategoriesRead();
}
if (!$kunena_session->save()) {
$kunena_app->enqueueMessage(JText::_('COM_KUNENA_ERROR_SESSION_SAVE_FAILED'), 'error');
}
if ($markaction == "allread") {
while (@ob_end_clean()) {
}
$kunena_app->redirect(CKunenaLink::GetCategoryURL('listcat', $catid, false), JText::_('COM_KUNENA_GEN_ALL_MARKED'));
}
$userprofile = KunenaFactory::getUser();
if (!$userprofile->exists()) {
$userprofile->save();
}
// Assign previous visit without user offset to variable for templates to decide
$this->prevCheck = $kunena_session->lasttime;
} else {
// For guests we don't show new posts
$this->prevCheck = CKunenaTimeformat::internalTime() + 60;
}
if (JDEBUG) {
$__profiler->mark('Session End');
}
//Get the topics this user has already read this session from #__kunena_sessions
$this->read_topics = explode(',', $kunena_session->readtopics);
/* _\|/_
(o o)
+----oOO-{_}-OOo--------------------------------+
| Until this section we have included the |
| necessary files and gathered the required |
| variables. Now let's start processing |
示例2: deletethread
protected function deletethread()
{
if ($this->tokenProtection('get')) {
return false;
}
if (!$this->load()) {
return false;
}
if ($this->moderatorProtection()) {
return false;
}
if ($this->isUserBanned()) {
return false;
}
if ($this->isIPBanned()) {
return false;
}
require_once KUNENA_PATH_LIB . '/kunena.moderation.class.php';
$kunena_mod = CKunenaModeration::getInstance();
$delete = $kunena_mod->deleteThread($this->id);
if (!$delete) {
$message = $kunena_mod->getErrorMessage();
} else {
$message = JText::_('COM_KUNENA_TOPIC_SUCCESS_DELETE');
}
while (@ob_end_clean()) {
}
$this->_app->redirect(CKunenaLink::GetCategoryURL('showcat', $this->catid, false), $message);
}
示例3: permdelete
public function permdelete() {
$app = JFactory::getApplication ();
if (! JRequest::checkToken ('get')) {
$app->enqueueMessage ( JText::_ ( 'COM_KUNENA_ERROR_TOKEN' ), 'error' );
$this->redirectBack ();
}
if ($this->mesid) {
// Delete message
$target = KunenaForumMessageHelper::get($this->mesid);
$msg = JText::_ ( 'COM_KUNENA_POST_SUCCESS_DELETE' );
$url = CKunenaLink::GetMessageURL ( $this->id, $this->return, 0, false );
} else {
// Delete topic
$target = KunenaForumTopicHelper::get($this->id);
$msg = JText::_ ( 'COM_KUNENA_TOPIC_SUCCESS_DELETE' );
$url = CKunenaLink::GetCategoryURL ( 'showcat', $this->return, false );
}
if ($target->authorise('permdelete') && $target->delete()) {
$app->enqueueMessage ( $msg );
} else {
$app->enqueueMessage ( $target->getError(), 'notice' );
}
$app->redirect ( $url );
}