本文整理汇总了PHP中CKunenaLink类的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaLink类的具体用法?PHP CKunenaLink怎么用?PHP CKunenaLink使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CKunenaLink类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: KunenaLatestxPagination
function KunenaLatestxPagination($func, $sel, $page, $totalpages, $maxpages)
{
$startpage = $page - floor($maxpages / 2) < 1 ? 1 : $page - floor($maxpages / 2);
$endpage = $startpage + $maxpages;
if ($endpage > $totalpages) {
$startpage = $totalpages - $maxpages < 1 ? 1 : $totalpages - $maxpages;
$endpage = $totalpages;
}
$output = '<span class="fb_pagination">' . _PAGE;
if ($startpage > 1) {
if ($endpage < $totalpages) {
$endpage--;
}
$output .= CKunenaLink::GetLatestPageLink($func, 1, 'follow', '', $sel);
if ($startpage > 2) {
$output .= "...";
}
}
for ($i = $startpage; $i <= $endpage && $i <= $totalpages; $i++) {
if ($page == $i) {
$output .= "<strong>{$i}</strong>";
} else {
$output .= CKunenaLink::GetLatestPageLink($func, $i, 'follow', '', $sel);
}
}
if ($endpage < $totalpages) {
if ($endpage < $totalpages - 1) {
$output .= "...";
}
$output .= CKunenaLink::GetLatestPageLink($func, $totalpages, 'follow', '', $sel);
}
$output .= '</span>';
return $output;
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:34,代码来源:latestx.php
示例2: KunenaShowcatPagination
function KunenaShowcatPagination($catid, $page, $totalpages, $maxpages)
{
$startpage = $page - floor($maxpages / 2) < 1 ? 1 : $page - floor($maxpages / 2);
$endpage = $startpage + $maxpages;
if ($endpage > $totalpages) {
$startpage = $totalpages - $maxpages < 1 ? 1 : $totalpages - $maxpages;
$endpage = $totalpages;
}
$output = '<span class="fb_pagination">' . _PAGE;
if ($startpage > 1) {
if ($endpage < $totalpages) {
$endpage--;
}
$output .= CKunenaLink::GetCategoryPageLink('showcat', $catid, 1, 1, $rel = 'follow');
if ($startpage > 2) {
$output .= "...";
}
}
for ($i = $startpage; $i <= $endpage && $i <= $totalpages; $i++) {
if ($page == $i) {
$output .= "<strong>{$i}</strong>";
} else {
$output .= CKunenaLink::GetCategoryPageLink('showcat', $catid, $i, $i, $rel = 'follow');
}
}
if ($endpage < $totalpages) {
if ($endpage < $totalpages - 1) {
$output .= "...";
}
$output .= CKunenaLink::GetCategoryPageLink('showcat', $catid, $totalpages, $totalpages, $rel = 'follow');
}
$output .= '</span>';
return $output;
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:34,代码来源:showcat.php
示例3: results
public function results() {
require_once KPATH_SITE . '/lib/kunena.link.class.php';
$model = $this->getModel('Search');
$this->app->redirect ( CKunenaLink::GetSearchURL('advsearch', $model->getState('searchwords'),
$model->getState('list.start'), $model->getState('list.limit'), $model->getUrlParams(), false) );
}
开发者ID:rich20,项目名称:Kunena,代码行数:7,代码来源:search.php
示例4: KunenaViewPagination
function KunenaViewPagination($catid, $threadid, $page, $totalpages, $maxpages)
{
$fbConfig =& CKunenaConfig::getInstance();
$startpage = $page - floor($maxpages / 2) < 1 ? 1 : $page - floor($maxpages / 2);
$endpage = $startpage + $maxpages;
if ($endpage > $totalpages) {
$startpage = $totalpages - $maxpages < 1 ? 1 : $totalpages - $maxpages;
$endpage = $totalpages;
}
$output = '<span class="fb_pagination">' . _PAGE;
if ($startpage > 1) {
if ($endpage < $totalpages) {
$endpage--;
}
$output .= CKunenaLink::GetThreadPageLink($fbConfig, 'view', $catid, $threadid, 1, $fbConfig->messages_per_page, 1, '', $rel = 'follow');
if ($startpage > 2) {
$output .= "...";
}
}
for ($i = $startpage; $i <= $endpage && $i <= $totalpages; $i++) {
if ($page == $i) {
$output .= "<strong>{$i}</strong>";
} else {
$output .= CKunenaLink::GetThreadPageLink($fbConfig, 'view', $catid, $threadid, $i, $fbConfig->messages_per_page, $i, '', $rel = 'follow');
}
}
if ($endpage < $totalpages) {
if ($endpage < $totalpages - 1) {
$output .= "...";
}
$output .= CKunenaLink::GetThreadPageLink($fbConfig, 'view', $catid, $threadid, $totalpages, $fbConfig->messages_per_page, $totalpages, '', $rel = 'follow');
}
$output .= '</span>';
return $output;
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:35,代码来源:view.php
示例5: getInboxLink
public function getInboxLink($text)
{
if (!$text) {
$text = JText::_('COM_KUNENA_PMS_INBOX');
}
return CKunenaLink::GetHrefLink(CRoute::_('index.php?option=com_community&view=inbox'), $text, '', 'follow');
}
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:7,代码来源:private.php
示例6: getUsersOnlineList
public function getUsersOnlineList($sfunc)
{
$users = $this->_getOnlineUsers($sfunc);
$onlineUsersList = array();
$totalguests = $totalhidden = 0;
foreach ($users as $user) {
if ($user->userid) {
if ($user->showOnline) {
$onlineUsersList[] = CKunenaLink::GetProfileLink($user->userid, $user->username);
} else {
$totalhidden++;
}
} else {
$totalguests++;
}
}
// Show hidden users as quests:
$totalguests += $totalhidden;
if ($totalguests > 0) {
if ($totalguests == 1) {
$onlineUsersList[] = '(' . $totalguests . ') ' . JText::_('COM_KUNENA_WHO_ONLINE_GUEST');
} else {
$onlineUsersList[] = '(' . $totalguests . ') ' . JText::_('COM_KUNENA_WHO_ONLINE_GUESTS');
}
}
return implode(', ', $onlineUsersList);
}
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:27,代码来源:kunena.pathway.class.php
示例7: getInboxLink
public function getInboxLink($text)
{
if (!$text) {
$text = JText::_('COM_KUNENA_PMS_INBOX');
}
return CKunenaLink::GetSefHrefLink($this->uddeim->getLinkToBox('inbox', false), $text, '', 'follow');
}
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:7,代码来源:private.php
示例8: kunenaAvatar
function kunenaAvatar($userid)
{
$kunena_user = KunenaFactory::getUser((int) $userid);
$username = $kunena_user->getName();
// Takes care of realname vs username setting
$avatarlink = $kunena_user->getAvatarLink('', $this->params->get('avatar_w'), $this->params->get('avatar_h'));
return CKunenaLink::GetProfileLink($userid, $avatarlink, $username);
}
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:8,代码来源:class.php
示例9: getUserLink
/**
* adds the link for the connect param
* @since 1.7.3
* @param $user pass-by-reference
* @return void
*/
private function getUserLink(&$user)
{
$username = KunenaFactory::getUser($user['userid'])->getName();
if ($user['leapcorrection'] == $this->timeo->format('z', true) + 1) {
$subject = getSubject($username);
$db = JFactory::getDBO();
$query = "SELECT id,catid,subject,time as year FROM #__kunena_messages WHERE subject='{$subject}'";
$db->setQuery($query, 0, 1);
$post = $db->loadAssoc();
if ($db->getErrorMsg()) {
KunenaError::checkDatabaseError();
}
$catid = $this->params->get('bcatid');
$postyear = new JDate($post['year'], $this->soffset);
if (empty($post) && !empty($catid) || !empty($post) && !empty($catid) && $postyear->format('Y', true) < $this->timeo->format('Y', true)) {
$botname = $this->params->get('swkbbotname', JText::_('SW_KBIRTHDAY_FORUMPOST_BOTNAME_DEF'));
$botid = $this->params->get('swkbotid');
$time = CKunenaTimeformat::internalTime();
//Insert the birthday thread into DB
$query = "INSERT INTO #__kunena_messages (catid,name,userid,email,subject,time, ip)\n\t\t \t\tVALUES({$catid},'{$botname}',{$botid}, '','{$subject}', {$time}, '')";
$db->setQuery($query);
$db->query();
if ($db->getErrorMsg()) {
KunenaError::checkDatabaseError();
}
//What ID get our thread?
$messid = (int) $db->insertID();
//Insert the thread message into DB
$message = getMessage($username);
$query = "INSERT INTO #__kunena_messages_text (mesid,message)\n VALUES({$messid},'{$message}')";
$db->setQuery($query);
$db->query();
if ($db->getErrorMsg()) {
KunenaError::checkDatabaseError();
}
//We know the thread ID so we can update the parent thread id with it's own ID because we know it's
//the first post
$query = "UPDATE #__kunena_messages SET thread={$messid} WHERE id={$messid}";
$db->setQuery($query);
$db->query();
if ($db->getErrorMsg()) {
KunenaError::checkDatabaseError();
}
// now increase the #s in categories
CKunenaTools::modifyCategoryStats($messid, 0, $time, $catid);
$user['link'] = CKunenaLink::GetViewLink('view', $messid, $catid, '', $username);
$uri = JFactory::getURI();
if ($uri->getVar('option') == 'com_kunena') {
$app =& JFactory::getApplication();
$app->redirect($uri->toString());
}
} elseif (!empty($post)) {
$user['link'] = CKunenaLink::GetViewLink('view', $post['id'], $post['catid'], '', $username);
}
} else {
$user['link'] = CKunenaLink::GetProfileLink($user['userid']);
}
}
开发者ID:rich20,项目名称:mod_sw_kbirthday_J16,代码行数:64,代码来源:forum.php
示例10: fbSetTimeout
function fbSetTimeout($url, $time, $script = 1)
{
$url = JRoute::_($url);
if ($script) {
echo CKunenaLink::GetAutoRedirectHTML($url, $time);
} else {
echo 'setTimeout("location=\'' . $url . '\'",$time)';
}
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:9,代码来源:kunena.helpers.php
示例11: displayDefault
function displayDefault($tpl = null)
{
require_once KPATH_SITE . '/lib/kunena.link.class.php';
$kunena_stats = KunenaForumStatistics::getInstance();
$kunena_stats->loadAll();
$this->assign($kunena_stats);
$this->latestMemberLink = KunenaFactory::getUser(intval($this->lastUserId))->getLink();
$this->userlist = CKunenaLink::GetUserlistLink('', intval($this->get('memberCount')));
$this->_prepareDocument();
parent::display();
}
开发者ID:laiello,项目名称:senluonirvana,代码行数:11,代码来源:view.html.php
示例12: displayDefault
function displayDefault($tpl = null) {
$this->config = KunenaFactory::getConfig ();
$document = JFactory::getDocument();
$document->setTitle(JText::_('COM_KUNENA_STAT_FORUMSTATS') . ' - ' . $this->config->board_title);
require_once(KPATH_SITE.'/lib/kunena.link.class.php');
$kunena_stats = KunenaForumStatistics::getInstance ( );
$kunena_stats->loadAll();
$this->assign($kunena_stats);
$this->latestMemberLink = CKunenaLink::GetProfileLink($this->lastUserId);
$this->userlist = CKunenaLink::GetUserlistLink('', intval($this->get('memberCount')));
$this->statisticsURL = KunenaRoute::_('index.php?option=com_kunena&view=statistics');
parent::display ();
}
开发者ID:rich20,项目名称:Kunena,代码行数:16,代码来源:view.html.php
示例13: getInboxLink
public function getInboxLink ($text) {
if (!$text) $text = JText::_('COM_KUNENA_PMS_INBOX');
global $_CB_framework;
$cbpath = JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php';
if (file_exists($cbpath)) require_once($cbpath);
else return;
$userid = $_CB_framework->myId();
$cbUser =& CBuser::getInstance( (int) $userid );
if($cbUser === null) return;
$itemid = getCBprofileItemid();
return CKunenaLink::GetHrefLink ( cbSef ('index.php?option=com_comprofiler&task=userProfile&user=' .$userid. $itemid), $text, '', 'follow');
}
开发者ID:rich20,项目名称:Kunena,代码行数:17,代码来源:private.php
示例14: onAfterReply
public function onAfterReply($message) {
// Check for permisions of the current category - activity only if public or registered
$category = $message->getCategory();
if ($category->pub_access == 0 || $category->pub_access == - 1) {
require_once KPATH_SITE.'/lib/kunena.link.class.php';
$datareference = '<a href="' . CKunenaLink::GetMessageURL ( $message->id, $message->catid ) . '">' . $message->subject . '</a>';
if ($this->_config->alphauserpointsnumchars > 0) {
// use if limit chars for a response
if (JString::strlen ( $message->message ) > $this->_config->alphauserpointsnumchars) {
if ( $this->_getAUPversion() < '1.5.12' ) {
$ruleEnabled = AlphaUserPointsHelper::checkRuleEnabled( 'plgaup_reply_kunena' );
if ($ruleEnabled) {
AlphaUserPointsHelper::newpoints ( 'plgaup_reply_kunena', '', $message->id, $datareference );
} else {
return;
}
} elseif ( $this->_getAUPversion() >= '1.5.12' ) {
$ruleEnabled = AlphaUserPointsHelper::checkRuleEnabled( 'plgaup_kunena_topic_reply' );
if ($ruleEnabled) {
AlphaUserPointsHelper::newpoints ( 'plgaup_kunena_topic_reply', '', $message->id, $datareference );
} else {
return;
}
}
}
} else {
if ( $this->_getAUPversion() < '1.5.12' ) {
$ruleEnabled = AlphaUserPointsHelper::checkRuleEnabled( 'plgaup_reply_kunena' );
if ($ruleEnabled) {
AlphaUserPointsHelper::newpoints ( 'plgaup_reply_kunena', '', $message->id, $datareference );
} else {
return;
}
} elseif ( $this->_getAUPversion() >= '1.5.12' ) {
$ruleEnabled = AlphaUserPointsHelper::checkRuleEnabled( 'plgaup_kunena_topic_reply' );
if ($ruleEnabled) {
AlphaUserPointsHelper::newpoints ( 'plgaup_kunena_topic_reply', '', $message->id, $datareference );
} else {
return;
}
}
}
}
}
开发者ID:rich20,项目名称:Kunena,代码行数:44,代码来源:activity.php
示例15: displayDefault
function displayDefault($tpl = null) {
$this->config = KunenaFactory::getConfig();
if (!$this->config->enablerss) {
JError::raiseError ( 404, JText::_ ( 'COM_KUNENA_RSS_DISABLED' ) );
}
$this->assignRef ( 'category', $this->get ( 'Category' ) );
if (! $this->category->authorise('read')) {
JError::raiseError ( 404, $this->category->getError() );
}
$this->template = KunenaTemplate::getInstance();
$this->assignRef ( 'topics', $this->get ( 'Topics' ) );
$title = JText::_('COM_KUNENA_THREADS_IN_FORUM').': '. $this->category->name;
$this->setTitle ( $title );
$metaDesc = $this->document->get ( 'description' ) . '. ' . $this->escape ( "{$this->category->name} - {$this->config->board_title}" );
$this->document->setDescription ( $metaDesc );
// Create image for feed
$image = new JFeedImage();
$image->title = $this->document->getTitle();
$image->url = $this->template->getImagePath('icons/rss.png');
$image->description = $this->document->getDescription();
$this->document->image = $image;
foreach ( $this->topics as $topic ) {
$id = $topic->last_post_id;
$page = ceil ( $topic->posts / $this->config->messages_per_page );
$description = $topic->last_post_message;
$date = new JDate($topic->last_post_time);
$userid = $topic->last_post_userid;
$username = KunenaFactory::getUser($userid)->getName($topic->last_post_guest_name);
$title = $topic->subject;
$url = CKunenaLink::GetThreadPageURL('view', $topic->category_id, $topic->id, $page, $this->config->messages_per_page, $id, true );
$category = $topic->getCategory()->name;
$this->createItem($title, $url, $description, $category, $date, $userid, $username);
}
}
开发者ID:rich20,项目名称:Kunena,代码行数:42,代码来源:view.feed.php
示例16: edit
function edit() {
require_once KPATH_SITE . '/lib/kunena.link.class.php';
$app = JFactory::getApplication ();
if (! JRequest::checkToken ()) {
$app->enqueueMessage ( JText::_ ( 'COM_KUNENA_ERROR_TOKEN' ), 'error' );
$this->redirectBack ();
}
$model = $this->getModel('announcement');
$this->canEdit = $model->getCanEdit();
if (! $this->canEdit) {
$app->enqueueMessage ( JText::_ ( 'COM_KUNENA_POST_NOT_MODERATOR' ), 'error' );
$this->redirectBack ();
}
$model->edit();
if (1) {
$id = JRequest::getInt ( 'id', 0 );
$app->enqueueMessage ( JText::_ ( $id ? 'COM_KUNENA_ANN_SUCCESS_EDIT' : 'COM_KUNENA_ANN_SUCCESS_ADD' ) );
}
$this->setRedirect (CKunenaLink::GetAnnouncementURL ( 'show', false, false ));
}
开发者ID:GoremanX,项目名称:Kunena-2.0,代码行数:22,代码来源:announcement.php
示例17: while
$kunena_db->query();
if (KunenaError::checkDatabaseError()) {
return;
}
if ($pid) {
$kunena_app->enqueueMessage(JText::_('COM_KUNENA_KARMA_SELF_DECREASE'));
while (@ob_end_clean()) {
}
$kunena_app->redirect(CKunenaLink::GetMessageURL($pid, $catid, 0, false));
} else {
$kunena_app->enqueueMessage(JText::_('COM_KUNENA_KARMA_SELF_DECREASE'));
while (@ob_end_clean()) {
}
$kunena_app->redirect(CKunenaLink::GetMyProfileURL($userid));
}
}
}
}
} else {
//get outa here, you fraud!
$kunena_app->enqueueMessage(JText::_('COM_KUNENA_USER_ERROR_KARMA'));
while (@ob_end_clean()) {
}
$kunena_app->redirect(CKunenaLink::GetLatestPageAutoRedirectURL($pid, $kunena_config->messages_per_page));
}
?>
</center>
</td>
</tr>
</table>
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:30,代码来源:kunena.karma.php
示例18:
</td>
</tr>
<?php
}
}
?>
<?php
if ($this->embedded) {
?>
<!-- Bulk Actions -->
<tr class="krow1">
<td colspan="7" class="kcol-first krowmoderation">
<?php
$user = $this->userid ? '&userid=' . $this->userid : '';
echo CKunenaLink::GetShowLatestLink(JText::_('COM_KUNENA_MORE'), $this->func . $user, 'follow');
?>
</td>
</tr>
<!-- /Bulk Actions -->
<?php
}
?>
</table>
</div>
</div>
</div>
<input type="hidden" name="option" value="com_kunena" />
<input type="hidden" name="func" value="bulkactions" />
<?php
echo JHTML::_('form.token');
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:31,代码来源:posts.php
示例19: echo
<th class="kbanned-expire" width="32%"><?php echo JText::_('COM_KUNENA_BAN_EXPIRETIME'); ?></th>
</tr>
</thead>
<tbody>
<?php
if ( $this->bannedusers ) :
foreach ($this->bannedusers as $userban) :
$bantext = $userban->blocked ? JText::_('COM_KUNENA_BAN_UNBLOCK_USER') : JText::_('COM_KUNENA_BAN_UNBAN_USER');
$j++;
?>
<tr class="krow<?php echo ($i^=1)+1;?>">
<td class="kcol-first kid">
<?php echo $j; ?>
</td>
<td class="kcol-mid kbanned-user">
<a href="#"><?php echo CKunenaLink::GetProfileLink ( intval($userban->userid) ); ?> </a>
</td>
<td class="kcol-mid kbanned-from">
<span><?php echo $userban->blocked ? JText::_('COM_KUNENA_BAN_BANLEVEL_JOOMLA') : JText::_('COM_KUNENA_BAN_BANLEVEL_KUNENA'); ?></span>
</td>
<td class="kcol-mid kbanned-start">
<span><?php echo KunenaDate::getInstance($userban->created_time)->toKunena('datetime'); ?></span>
</td>
<td class="kcol-mid kbanned-expire">
<span><?php echo $userban->isLifetime() ? JText::_('COM_KUNENA_BAN_LIFETIME') : KunenaDate::getInstance($userban->expiration)->toKunena('datetime'); ?></span>
</td>
</tr>
<?php endforeach; ?>
<?php else : ?>
<tr class="krow2">
<td colspan="5" class="kcol-first">
开发者ID:GoremanX,项目名称:Kunena-2.0,代码行数:31,代码来源:default_banmanager.php
示例20: stripslashes
<!-- /Avatar -->
<!-- Latest Post -->
<span class="topic_latest_post">
<?php
if ($fbConfig->default_sort == 'asc') {
if ($leaf->moved == 0) {
echo CKunenaLink::GetThreadPageLink($fbConfig, 'view', $leaf->catid, $leaf->thread, $threadPages, $fbConfig->messages_per_page, _GEN_LAST_POST, $last_reply[$leaf->id]->id);
} else {
echo _KUNENA_MOVED . ' ';
}
} else {
echo CKunenaLink::GetThreadPageLink($fbConfig, 'view', $leaf->catid, $leaf->thread, 1, $fbConfig->messages_per_page, _GEN_LAST_POST, $last_reply[$leaf->id]->id);
}
if ($leaf->name) {
echo ' ' . _GEN_BY . ' ' . CKunenaLink::GetProfileLink($fbConfig, $last_reply[$leaf->id]->userid, stripslashes($last_reply[$leaf->id]->name), 'nofollow', 'topic_latest_post_user');
}
?>
</span>
<!-- /Latest Post -->
<br />
<!-- Latest Post Date -->
<span class="topic_date">
<?php
echo time_since($last_reply[$leaf->id]->time, time() + $fbConfig->board_ofset * 3600);
?>
<?php
echo _KUNENA_AGO;
?>
</span>
<!-- /Latest Post Date -->
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:flat.php
注:本文中的CKunenaLink类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论