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


PHP CKunenaLink::GetTopicPostReplyLink方法代码示例

本文整理汇总了PHP中CKunenaLink::GetTopicPostReplyLink方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaLink::GetTopicPostReplyLink方法的具体用法?PHP CKunenaLink::GetTopicPostReplyLink怎么用?PHP CKunenaLink::GetTopicPostReplyLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CKunenaLink的用法示例。


在下文中一共展示了CKunenaLink::GetTopicPostReplyLink方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: stripslashes

 $fb_message_txt = smile::htmlwrap($fb_message_txt, $fbConfig->wrap);
 $msg_text = CKunenaTools::prepareContent($fb_message_txt);
 $signature = $userinfo->signature;
 if ($signature) {
     $signature = stripslashes(smile::smileReplace($signature, 0, $fbConfig->disemoticons, $smileyList));
     $signature = nl2br($signature);
     //wordwrap:
     $signature = smile::htmlwrap($signature, $fbConfig->wrap);
     //restore the \n (were replaced with _CTRL_) occurences inside code tags, but only after we have striplslashes; otherwise they will be stripped again
     //$signature = str_replace("_CRLF_", "\\n", stripslashes($signature));
     $msg_signature = $signature;
 }
 if ($is_Moderator || $forumLocked == 0 && $topicLocked == 0 && ($kunena_my->id > 0 || $fbConfig->pubwrite)) {
     //user is allowed to reply/quote
     $msg_reply = CKunenaLink::GetTopicPostReplyLink('reply', $catid, $fmessage->id, isset($fbIcons['reply']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['reply'] . '" alt="Reply" border="0" title="' . _VIEW_REPLY . '" />' : _GEN_REPLY);
     $msg_quote = CKunenaLink::GetTopicPostReplyLink('quote', $catid, $fmessage->id, isset($fbIcons['quote']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['quote'] . '" alt="Quote" border="0" title="' . _VIEW_QUOTE . '" />' : _GEN_QUOTE);
 } else {
     //user is not allowed to write a post
     if ($topicLocked == 1 || $forumLocked) {
         $msg_closed = _POST_LOCK_SET;
     } else {
         $msg_closed = _VIEW_DISABLED;
     }
 }
 $showedEdit = 0;
 //reset this value
 //Offer an moderator the delete link
 if ($is_Moderator) {
     $msg_delete = CKunenaLink::GetTopicPostLink('delete', $catid, $fmessage->id, isset($fbIcons['delete']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['delete'] . '" alt="Delete" border="0" title="' . _VIEW_DELETE . '" />' : _GEN_DELETE);
     $msg_merge = CKunenaLink::GetTopicPostLink('merge', $catid, $fmessage->id, isset($fbIcons['merge']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['merge'] . '" alt="' . _GEN_MERGE . '" border="0" title="' . _GEN_MERGE . '" />' : _GEN_MERGE);
     // TODO: Enable split when it's fixed
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:view.php

示例2: isset

            <!-- bottom nav -->
            <table border = "0" cellspacing = "0" class = "jr-topnav" cellpadding = "0" width="100%">
                <tr>
                    <td class = "jr-topnav-left">
                        <?php 
        //go to bottom
        echo '<a name="forumbottom" /> ';
        echo CKunenaLink::GetSamePageAnkerLink('forumtop', isset($fbIcons['toparrow']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['toparrow'] . '" border="0" alt="' . _GEN_GOTOTOP . '" title="' . _GEN_GOTOTOP . '"/>' : _GEN_GOTOTOP);
        if ($is_Moderator || $forumLocked == 0 && ($kunena_my->id > 0 || $fbConfig->pubwrite)) {
            //this user is allowed to post a new topic:
            echo CKunenaLink::GetPostNewTopicLink($catid, isset($fbIcons['new_topic']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['new_topic'] . '" alt="' . _GEN_POST_NEW_TOPIC . '" title="' . _GEN_POST_NEW_TOPIC . '" border="0" />' : _GEN_POST_NEW_TOPIC);
        }
        if ($is_Moderator || $forumLocked == 0 && $topicLocked == 0 && ($kunena_my->id > 0 || $fbConfig->pubwrite)) {
            //this user is allowed to reply to this topic:
            echo CKunenaLink::GetTopicPostReplyLink('reply', $catid, $thread, isset($fbIcons['topicreply']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['topicreply'] . '" alt="' . _GEN_POST_REPLY . '" title="' . _GEN_POST_REPLY . '" border="0" />' : _GEN_POST_REPLY);
        }
        if ($fb_cansubscribe == 1) {
            // this user is allowed to subscribe - check performed further up to eliminate duplicate checks
            // for top and bottom navigation
            echo CKunenaLink::GetTopicPostLink('subscribe', $catid, $id, isset($fbIcons['subscribe']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['subscribe'] . '" alt="' . _VIEW_SUBSCRIBETXT . '" title="' . _VIEW_SUBSCRIBETXT . '" border="0" />' : _VIEW_SUBSCRIBETXT);
        }
        if ($kunena_my->id != 0 && $fbConfig->allowsubscriptions && $fb_cansubscribe == 0) {
            // this user is allowed to unsubscribe
            echo CKunenaLink::GetTopicPostLink('unsubscribe', $catid, $id, isset($fbIcons['unsubscribe']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['unsubscribe'] . '" alt="' . _VIEW_UNSUBSCRIBETXT . '" title="' . _VIEW_UNSUBSCRIBETXT . '" border="0" />' : _VIEW_UNSUBSCRIBETXT);
        }
        if ($fb_canfavorite == 1) {
            // this user is allowed to add a favorite - check performed further up to eliminate duplicate checks
            // for top and bottom navigation
            echo CKunenaLink::GetTopicPostLink('favorite', $catid, $id, isset($fbIcons['favorite']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['favorite'] . '" alt="' . _VIEW_FAVORITETXT . '" title="' . _VIEW_FAVORITETXT . '" border="0" />' : _VIEW_FAVORITETXT);
        }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:30,代码来源:view.php

示例3: getView


//.........这里部分代码省略.........
         }
         if ($this->layout != 'indented') {
             $this->layout_buttons[] = CKunenaLink::GetThreadLayoutLink('indented', $this->catid, $this->thread, $this->mesid, CKunenaTools::showButton('layout-indented', JText::_('COM_KUNENA_BUTTON_LAYOUT_INDENTED')), $this->limitstart, $this->limit, JText::_('COM_KUNENA_BUTTON_LAYOUT_INDENTED_LONG'), 'nofollow', 'kicon-button kbuttonuser btn-left');
         }
     }
     //Perform subscriptions check only once
     $this->cansubscribe = 0;
     if ($this->config->allowsubscriptions && $this->config->topic_subscriptions != 'disabled' && $this->my->id) {
         $this->db->setQuery("SELECT thread, future1 FROM #__kunena_subscriptions WHERE userid={$this->db->Quote($this->my->id)} AND thread={$this->db->Quote($this->thread)}");
         $fb_subscribed = $this->db->loadObject();
         KunenaError::checkDatabaseError();
         if (!$fb_subscribed) {
             $this->cansubscribe = 1;
         } elseif ($fb_subscribed->future1 == 1) {
             $query_thread = "UPDATE #__kunena_subscriptions\n\t\t\t\t\tSET future1=0 WHERE thread={$this->db->Quote($this->thread)} AND userid={$this->db->Quote($this->my->id)}";
             $this->db->setQuery($query_thread);
             $this->db->query();
         }
     }
     //Perform favorites check only once
     $fb_canfavorite = 0;
     $this->db->setQuery("SELECT MAX(userid={$this->db->Quote($this->my->id)}) AS favorited, COUNT(*) AS totalfavorited FROM #__kunena_favorites WHERE thread={$this->db->Quote($this->thread)}");
     list($this->favorited, $this->totalfavorited) = $this->db->loadRow();
     KunenaError::checkDatabaseError();
     if ($this->config->allowfavorites && $this->my->id) {
         if (!$this->favorited) {
             $fb_canfavorite = 1;
         }
     }
     //get the Moderator list for display
     $this->db->setQuery("SELECT m.*, u.* FROM #__kunena_moderation AS m INNER JOIN #__users AS u ON u.id=m.userid WHERE m.catid={$this->db->Quote($this->catid)} AND u.block=0");
     $this->modslist = $this->db->loadObjectList();
     KunenaError::checkDatabaseError();
     $this->catModerators = array();
     foreach ($this->modslist as $mod) {
         $this->catModerators[] = $mod->userid;
         $userlist[intval($mod->userid)] = intval($mod->userid);
     }
     // Prefetch all users/avatars to avoid user by user queries during template iterations
     KunenaUser::loadUsers($userlist);
     //data ready display now
     if (CKunenaTools::isModerator($this->my->id, $this->catid) || $this->topicLocked == 0) {
         //this user is allowed to reply to this topic
         $this->thread_reply = CKunenaLink::GetTopicPostReplyLink('reply', $this->catid, $this->thread, CKunenaTools::showButton('reply', JText::_('COM_KUNENA_BUTTON_REPLY_TOPIC')), 'nofollow', 'kicon-button kbuttoncomm btn-left', JText::_('COM_KUNENA_BUTTON_REPLY_TOPIC_LONG'));
     }
     // Thread Subscription
     if ($this->cansubscribe == 1) {
         // this user is allowed to subscribe - check performed further up to eliminate duplicate checks
         // for top and bottom navigation
         $this->thread_subscribe = CKunenaLink::GetTopicPostLink('subscribe', $this->catid, $this->id, CKunenaTools::showButton('subscribe', JText::_('COM_KUNENA_BUTTON_SUBSCRIBE_TOPIC')), 'nofollow', 'kicon-button kbuttonuser btn-left', JText::_('COM_KUNENA_BUTTON_SUBSCRIBE_TOPIC_LONG'));
     }
     if ($this->my->id != 0 && $this->config->allowsubscriptions && $this->config->topic_subscriptions != 'disabled' && $this->cansubscribe == 0) {
         // this user is allowed to unsubscribe
         $this->thread_subscribe = CKunenaLink::GetTopicPostLink('unsubscribe', $this->catid, $this->id, CKunenaTools::showButton('subscribe', JText::_('COM_KUNENA_BUTTON_UNSUBSCRIBE_TOPIC')), 'nofollow', 'kicon-button kbuttonuser btn-left', JText::_('COM_KUNENA_BUTTON_UNSUBSCRIBE_TOPIC_LONG'));
     }
     //START: FAVORITES
     if ($fb_canfavorite == 1) {
         // this user is allowed to add a favorite - check performed further up to eliminate duplicate checks
         // for top and bottom navigation
         $this->thread_favorite = CKunenaLink::GetTopicPostLink('favorite', $this->catid, $this->id, CKunenaTools::showButton('favorite', JText::_('COM_KUNENA_BUTTON_FAVORITE_TOPIC')), 'nofollow', 'kicon-button kbuttonuser btn-left', JText::_('COM_KUNENA_BUTTON_FAVORITE_TOPIC_LONG'));
     }
     if ($this->my->id != 0 && $this->config->allowfavorites && $fb_canfavorite == 0) {
         // this user is allowed to unfavorite
         $this->thread_favorite = CKunenaLink::GetTopicPostLink('unfavorite', $this->catid, $this->id, CKunenaTools::showButton('favorite', JText::_('COM_KUNENA_BUTTON_UNFAVORITE_TOPIC')), 'nofollow', 'kicon-button kbuttonuser btn-left', JText::_('COM_KUNENA_BUTTON_UNFAVORITE_TOPIC_LONG'));
     }
     // FINISH: FAVORITES
     if (CKunenaTools::isModerator($this->my->id, $this->catid) || !$this->kunena_forum_locked) {
         //this user is allowed to post a new topic
         $this->thread_new = CKunenaLink::GetPostNewTopicLink($this->catid, CKunenaTools::showButton('newtopic', JText::_('COM_KUNENA_BUTTON_NEW_TOPIC')), 'nofollow', 'kicon-button kbuttoncomm btn-left', JText::_('COM_KUNENA_BUTTON_NEW_TOPIC_LONG'));
     }
     if (CKunenaTools::isModerator($this->my->id, $this->catid)) {
         // offer the moderator always the move link to relocate a topic to another forum
         // and the (un)sticky bit links
         // and the (un)lock links
         if ($this->topicSticky == 0) {
             $this->thread_sticky = CKunenaLink::GetTopicPostLink('sticky', $this->catid, $this->id, CKunenaTools::showButton('sticky', JText::_('COM_KUNENA_BUTTON_STICKY_TOPIC')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_STICKY_TOPIC_LONG'));
         } else {
             $this->thread_sticky = CKunenaLink::GetTopicPostLink('unsticky', $this->catid, $this->id, CKunenaTools::showButton('sticky', JText::_('COM_KUNENA_BUTTON_UNSTICKY_TOPIC')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_UNSTICKY_TOPIC_LONG'));
         }
         if ($this->topicLocked == 0) {
             $this->thread_lock = CKunenaLink::GetTopicPostLink('lock', $this->catid, $this->id, CKunenaTools::showButton('lock', JText::_('COM_KUNENA_BUTTON_LOCK_TOPIC')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_LOCK_TOPIC_LONG'));
         } else {
             $this->thread_lock = CKunenaLink::GetTopicPostLink('unlock', $this->catid, $this->id, CKunenaTools::showButton('lock', JText::_('COM_KUNENA_BUTTON_UNLOCK_TOPIC')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_UNLOCK_TOPIC_LONG'));
         }
         $this->thread_delete = CKunenaLink::GetTopicPostLink('deletethread', $this->catid, $this->id, CKunenaTools::showButton('delete', JText::_('COM_KUNENA_BUTTON_DELETE_TOPIC')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_DELETE_TOPIC_LONG'));
         $this->thread_moderate = CKunenaLink::GetTopicPostReplyLink('moderatethread', $this->catid, $this->id, CKunenaTools::showButton('moderate', JText::_('COM_KUNENA_BUTTON_MODERATE_TOPIC')), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_MODERATE'));
     }
     $this->headerdesc = nl2br(smile::smileReplace($this->catinfo->headerdesc, 0, $this->config->disemoticons, $this->emoticons));
     $tabclass = array("row1", "row2");
     $this->mmm = 0;
     $this->replydir = $this->ordering == 'DESC' ? -1 : 1;
     if ($this->replydir < 0) {
         $this->replynum = $this->total_messages - $this->limitstart + 1;
     } else {
         $this->replynum = $this->limitstart;
     }
     $this->myname = $this->config->username ? $this->my->username : $this->my->name;
     $this->allow_anonymous = !empty($this->catinfo->allow_anonymous) && $this->my->id;
     $this->anonymous = $this->allow_anonymous && !empty($this->catinfo->post_anonymous);
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:101,代码来源:view.php

示例4: getMessageActions

	function getMessageActions() {
		$me = KunenaUserHelper::getMyself();
		$catid = $this->state->get('item.catid');

		//Thankyou info and buttons
		$this->message_thankyou = '';
		$this->message_thankyou_delete = '';
		if ($this->config->showthankyou && $this->profile->userid) {
			$thankyou = $this->message->getThankyou();
			$this->thankyou = array();
			//TODO: for normal users, show only limited number of thankyou (config->thankyou_max)
			foreach( $thankyou->getList() as $userid=>$time){
				if ( $me->userid  && $me->isModerator()  ) {
					$this->message_thankyou_delete = '<a title="'.JText::_('COM_KUNENA_BUTTON_THANKYOU_REMOVE_LONG').'" href="'.KunenaRoute::_("index.php?option=com_kunena&view=topic&catid={$this->topic->category_id}&mesid={$this->message->id}&task=unthankyou&userid={$userid}&".JUtility::getToken() .'=1').'"><img src="'.$this->template->getImagePath('icons/publish_x.png').'" title="" alt="" /></a>';
				}
				$this->thankyou[] = CKunenaLink::GetProfileLink($userid).' '.$this->message_thankyou_delete;
			}
			if($me->userid && !$thankyou->exists($me->userid) && $me->userid != $this->profile->userid) {
				$this->message_thankyou = CKunenaLink::GetThankyouLink ( 'thankyou', $catid, $this->message->id, $this->profile->userid , $this->getButton ( 'thankyou', JText::_('COM_KUNENA_BUTTON_THANKYOU') ), JText::_('COM_KUNENA_BUTTON_THANKYOU_LONG'), 'kicon-button kbuttonuser btn-left');
			}

		}
		if ($this->config->reportmsg && KunenaUserHelper::getMyself()->exists()) {
			$this->message_report = CKunenaLink::GetReportMessageLink ( $catid, $this->message->id, $this->getButton ( 'report', JText::_('COM_KUNENA_BUTTON_REPORT') ), 'nofollow', 'kicon-button kbuttonuser btn-left', JText::_('COM_KUNENA_BUTTON_REPORT') );
		}

		$this->message_quickreply = $this->message_reply = $this->message_quote = '';
		if ($this->topic->authorise('reply')) {
			//user is allowed to reply/quote
			if ($this->quickreply) {
				$this->message_quickreply = CKunenaLink::GetTopicPostReplyLink ( 'reply', $catid, $this->message->id, $this->getButton ( 'reply', JText::_('COM_KUNENA_BUTTON_QUICKREPLY') ), 'nofollow', 'kicon-button kbuttoncomm btn-left kqreply', JText::_('COM_KUNENA_BUTTON_QUICKREPLY_LONG'), ' id="kreply'.$this->message->id.'"' );
			}
			$this->message_reply = CKunenaLink::GetTopicPostReplyLink ( 'reply', $catid, $this->message->id, $this->getButton ( 'reply', JText::_('COM_KUNENA_BUTTON_REPLY') ), 'nofollow', 'kicon-button kbuttoncomm btn-left', JText::_('COM_KUNENA_BUTTON_REPLY_LONG') );
			$this->message_quote = CKunenaLink::GetTopicPostReplyLink ( 'quote', $catid, $this->message->id, $this->getButton ( 'quote', JText::_('COM_KUNENA_BUTTON_QUOTE') ), 'nofollow', 'kicon-button kbuttoncomm btn-left', JText::_('COM_KUNENA_BUTTON_QUOTE_LONG') );
		} else {
			//user is not allowed to write a post
			if ($this->topic->locked) {
				$this->message_closed = JText::_('COM_KUNENA_POST_LOCK_SET');
			} else {
				$this->message_closed = JText::_('COM_KUNENA_VIEW_DISABLED');
			}
		}

		//Offer an moderator a few tools
		$this->message_edit = $this->message_moderate = '';
		$this->message_delete = $this->message_undelete = $this->message_permdelete = $this->message_publish = '';
		if ($me->isModerator ( $this->topic->category_id )) {
			unset($this->message_closed);
			$this->message_edit = CKunenaLink::GetTopicPostReplyLink ( 'edit', $catid, $this->message->id, $this->getButton ( 'edit', JText::_('COM_KUNENA_BUTTON_EDIT') ), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_EDIT_LONG') );
			$this->message_moderate = CKunenaLink::GetTopicPostReplyLink ( 'moderate', $catid, $this->message->id, $this->getButton ( 'moderate', JText::_('COM_KUNENA_BUTTON_MODERATE') ), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_MODERATE_LONG') );
			if ($this->message->hold == 1) {
				$this->message_publish = CKunenaLink::GetTopicPostLink ( 'approve', $catid, $this->message->id, $this->getButton ( 'approve', JText::_('COM_KUNENA_BUTTON_APPROVE') ), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_APPROVE_LONG') );
			}
			if ($this->message->hold == 2 || $this->message->hold == 3) {
				$this->message_undelete = CKunenaLink::GetTopicPostLink ( 'undelete', $catid, $this->message->id, $this->getButton ( 'undelete', JText::_('COM_KUNENA_BUTTON_UNDELETE') ), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_UNDELETE_LONG') );
				$this->message_permdelete = CKunenaLink::GetTopicPostLink ( 'permdelete', $catid, $this->message->id, $this->getButton ( 'permdelete', JText::_('COM_KUNENA_BUTTON_PERMDELETE') ), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_PERMDELETE_LONG') );
			} else {
				$this->message_delete = CKunenaLink::GetTopicPostLink ( 'delete', $catid, $this->message->id, $this->getButton ( 'delete', JText::_('COM_KUNENA_BUTTON_DELETE') ), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_DELETE_LONG') );
			}
		}
		else if ($this->message->authorise('edit')) {
			$this->message_edit = CKunenaLink::GetTopicPostReplyLink ( 'edit', $catid, $this->message->id, $this->getButton ( 'edit', JText::_('COM_KUNENA_BUTTON_EDIT') ), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_EDIT_LONG') );
			if ( $this->config->userdeletetmessage == '1' ) {
				if ($this->message->id == $this->topic->last_post_id) $this->message_delete = CKunenaLink::GetTopicPostLink ( 'delete', $catid, $this->message->id, $this->getButton ( 'delete', JText::_('COM_KUNENA_BUTTON_DELETE') ), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_DELETE_LONG') );
			} else if ( $this->config->userdeletetmessage == '2' ) {
				$this->message_delete = CKunenaLink::GetTopicPostLink ( 'delete', $catid, $this->message->id, $this->getButton ( 'delete', JText::_('COM_KUNENA_BUTTON_DELETE') ), 'nofollow', 'kicon-button kbuttonmod btn-left', JText::_('COM_KUNENA_BUTTON_DELETE_LONG') );
			}
		}
		return $this->loadTemplate("message_actions");
	}
开发者ID:GoremanX,项目名称:Kunena-2.0,代码行数:70,代码来源:view.html.php


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