本文整理汇总了PHP中KunenaUserBan::getUserHistory方法的典型用法代码示例。如果您正苦于以下问题:PHP KunenaUserBan::getUserHistory方法的具体用法?PHP KunenaUserBan::getUserHistory怎么用?PHP KunenaUserBan::getUserHistory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KunenaUserBan
的用法示例。
在下文中一共展示了KunenaUserBan::getUserHistory方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: before
/**
* Prepare ban history.
*
* @return void
*
* @throws KunenaExceptionAuthorise
*/
protected function before()
{
parent::before();
$userid = $this->input->getInt('userid');
$this->me = KunenaUserHelper::getMyself();
$this->profile = KunenaUserHelper::get($userid);
$this->profile->tryAuthorise('ban');
$this->banHistory = KunenaUserBan::getUserHistory($this->profile->userid);
$this->headerText = JText::sprintf('COM_KUNENA_BAN_BANHISTORYFOR', $this->profile->getName());
}
示例2: before
/**
* Prepare topic moderate display.
*
* @return void
*
* @throws KunenaExceptionAuthorise
*/
protected function before()
{
parent::before();
$catid = $this->input->getInt('catid');
$id = $this->input->getInt('id');
$mesid = $this->input->getInt('mesid');
if (!$mesid) {
$this->topic = KunenaForumTopicHelper::get($id);
$this->topic->tryAuthorise('move');
} else {
$this->message = KunenaForumMessageHelper::get($mesid);
$this->message->tryAuthorise('move');
$this->topic = $this->message->getTopic();
}
$this->category = $this->topic->getCategory();
$this->uri = "index.php?option=com_kunena&view=topic&layout=moderate" . "&catid={$this->category->id}&id={$this->topic->id}" . ($this->message ? "&mesid={$this->message->id}" : '');
$this->title = !$this->message ? JText::_('COM_KUNENA_TITLE_MODERATE_TOPIC') : JText::_('COM_KUNENA_TITLE_MODERATE_MESSAGE');
// Load topic icons if available.
if ($this->config->topicicons) {
$this->template = KunenaTemplate::getInstance();
$this->template->setCategoryIconset();
$this->topicIcons = $this->template->getTopicIcons(false);
}
// Have a link to moderate user as well.
if (isset($this->message)) {
$user = $this->message->getAuthor();
if ($user->exists()) {
$username = $user->getName();
$this->userLink = $this->message->userid ? JHtml::_('kunenaforum.link', 'index.php?option=com_kunena&view=user&layout=moderate&userid=' . $this->message->userid, $username . ' (' . $this->message->userid . ')', $username . ' (' . $this->message->userid . ')') : null;
}
}
if ($this->message) {
$this->banHistory = KunenaUserBan::getUserHistory($this->message->userid);
$this->me = KunenaFactory::getUser();
// Get thread and reply count from current message:
$db = JFactory::getDbo();
$query = "SELECT COUNT(mm.id) AS replies FROM #__kunena_messages AS m\r\n\t\t\t\tINNER JOIN #__kunena_messages AS t ON m.thread=t.id\r\n\t\t\t\tLEFT JOIN #__kunena_messages AS mm ON mm.thread=m.thread AND mm.time > m.time\r\n\t\t\t\tWHERE m.id={$db->Quote($this->message->id)}";
$db->setQuery($query, 0, 1);
$this->replies = $db->loadResult();
if (KunenaError::checkDatabaseError()) {
return;
}
}
$this->banInfo = KunenaUserBan::getInstanceByUserid(JFactory::getUser()->id, true);
}
示例3: displayBanHistory
/**
*
*/
function displayBanHistory()
{
$this->banhistory = KunenaUserBan::getUserHistory($this->profile->userid);
echo $this->loadTemplateFile('history');
}
示例4: getBanHistory
function getBanHistory()
{
kimport('userban');
$user_history = KunenaUserBan::getUserHistory($this->profile->userid);
return $user_history;
}
示例5: displayBanHistory
function displayBanHistory() {
kimport('kunena.user.ban');
$this->banhistory = KunenaUserBan::getUserHistory($this->profile->userid);
echo $this->loadTemplate('history');
}