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


PHP CKunenaLink::GetCategoryURL方法代码示例

本文整理汇总了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     |
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:67,代码来源:kunena.php

示例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);
 }
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:29,代码来源:post.php

示例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 );
	}
开发者ID:rich20,项目名称:Kunena,代码行数:25,代码来源:topic.php


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