本文整理汇总了PHP中CKunenaLink::GetUserlistURL方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaLink::GetUserlistURL方法的具体用法?PHP CKunenaLink::GetUserlistURL怎么用?PHP CKunenaLink::GetUserlistURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKunenaLink
的用法示例。
在下文中一共展示了CKunenaLink::GetUserlistURL方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showlist
function showlist($ulrows, $total_results, $pageNav, $limitstart, $query_ext, $search = "")
{
$app =& JFactory::getApplication();
$fbConfig =& CKunenaConfig::getInstance();
$kunena_db =& JFactory::getDBO();
if ($search == "") {
$search = _KUNENA_USRL_SEARCH;
}
?>
<script type = "text/javascript">
<!--
function validate()
{
if ((document.usrlform.search == "") || (document.usrlform.search.value == ""))
{
alert('<?php
echo _KUNENA_USRL_SEARCH_ALERT;
?>
');
return false;
}
else
{
return true;
}
}
//-->
</script>
<?php
if ($fbConfig->joomlastyle < 1) {
$boardclass = "fb_";
}
?>
<div class="<?php
echo $boardclass;
?>
_bt_cvr1">
<div class="<?php
echo $boardclass;
?>
_bt_cvr2">
<div class="<?php
echo $boardclass;
?>
_bt_cvr3">
<div class="<?php
echo $boardclass;
?>
_bt_cvr4">
<div class="<?php
echo $boardclass;
?>
_bt_cvr5">
<table class = "fb_blocktable" id ="fb_userlist" border = "0" cellspacing = "0" cellpadding = "0" width="100%">
<thead>
<tr>
<th>
<table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
<tr>
<td align = "left">
<div class = "fb_title_cover fbm">
<span class="fb_title fbl"> <?php
echo _KUNENA_USRL_USERLIST;
?>
</span>
<?php
printf(_KUNENA_USRL_REGISTERED_USERS, $app->getCfg('sitename'), $total_results);
?>
</div>
</td>
<td align = "right">
<form name = "usrlform" method = "post" action = "<?php
echo CKunenaLink::GetUserlistURL();
?>
" onsubmit = "return validate()">
<input type = "text"
name = "search"
class = "inputbox"
style = "width:150px"
maxlength = "100" value = "<?php
echo $search;
?>
" onblur = "if(this.value=='') this.value='<?php
echo $search;
?>
';" onfocus = "if(this.value=='<?php
echo $search;
?>
') this.value='';" />
<input type = "image" src = "<?php
echo KUNENA_TMPLTMAINIMGURL . '/images/usl_search_icon.gif';
?>
" alt = "<?php
echo _KUNENA_USRL_SEARCH;
?>
//.........这里部分代码省略.........
示例2: displayWhosonline
function displayWhosonline($tpl = null) {
$moderator = intval($this->me->isModerator());
$cache = JFactory::getCache('com_kunena', 'output');
if ($cache->start("{$this->template->name}.common.whosonline.{$moderator}", "com_kunena.template")) return;
$this->my = JFactory::getUser();
$users = KunenaUserHelper::getOnlineUsers();
KunenaUserHelper::loadUsers(array_keys($users));
$onlineusers = KunenaUserHelper::getOnlineCount();
$who = '<strong>'.$onlineusers['user'].' </strong>';
if($onlineusers['user']==1) {
$who .= JText::_('COM_KUNENA_WHO_ONLINE_MEMBER').' ';
} else {
$who .= JText::_('COM_KUNENA_WHO_ONLINE_MEMBERS').' ';
}
$who .= JText::_('COM_KUNENA_WHO_AND');
$who .= '<strong> '. $onlineusers['guest'].' </strong>';
if($onlineusers['guest']==1) {
$who .= JText::_('COM_KUNENA_WHO_ONLINE_GUEST').' ';
} else {
$who .= JText::_('COM_KUNENA_WHO_ONLINE_GUESTS').' ';
}
$who .= JText::_('COM_KUNENA_WHO_ONLINE_NOW');
$this->membersOnline = $who;
$this->onlineList = array();
$this->hiddenList = array();
foreach ($users as $userid=>$usertime) {
$user = KunenaUserHelper::get($userid);
if ( !$user->showOnline ) {
if ($this->me->isModerator()) $this->hiddenList[$user->getName()] = $user;
} else {
$this->onlineList[$user->getName()] = $user;
}
}
ksort($this->onlineList);
ksort($this->hiddenList);
$this->usersURL = CKunenaLink::GetUserlistURL('');
$result = $this->loadTemplate($tpl);
if (JError::isError($result)) {
return $result;
}
echo $result;
$cache->end();
}
示例3:
" onsubmit="return false;">
<table class="kblocktable" id="kuserlist-bottom">
<tr>
<td>
<div>
<?php
// TODO: fxstein - Need to perform SEO cleanup
echo $this->pageNav->getPagesLinks(CKunenaLink::GetUserlistURL($this->searchuri));
?>
<span style="float:right">
<?php
echo $this->pageNav->getPagesCounter();
?>
| <?php
echo JText::_('COM_KUNENA_USRL_DISPLAY_NR');
?>
<?php
echo $this->pageNav->getLimitBox(CKunenaLink::GetUserlistURL($this->searchuri));
?>
</span>
</div>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<?php
$this->displayWhoIsOnline();
示例4: __construct
function __construct()
{
$this->app = JFactory::getApplication();
$this->config = KunenaFactory::getConfig();
$this->db = JFactory::getDBO();
$this->my = JFactory::getUser();
$this->me = KunenaFactory::getUser();
$this->search = JRequest::getVar('search', '');
$this->limitstart = JRequest::getInt('limitstart', 0);
$this->limit = $querylimit = JRequest::getInt('limit', (int) $this->config->userlist_rows);
jimport('joomla.html.pagination');
if (!$this->isAllowed()) {
return false;
}
$filter_order = $this->app->getUserStateFromRequest('kunena.userlist.filter_order', 'filter_order', 'registerDate', 'cmd');
$filter_order_dir = $this->app->getUserStateFromRequest('kunena.userlist.filter_order_dir', 'filter_order_Dir', 'asc', 'word');
$direction = $filter_order_dir == 'asc' ? 'ASC' : 'DESC';
$orderby = " ORDER BY {$this->db->nameQuote($filter_order)} {$direction}";
if (empty($this->search)) {
if ($this->config->userlist_count_users == '0') {
$where = '1';
} elseif ($this->config->userlist_count_users == '1') {
$where = '(block=0 OR activation="")';
} elseif ($this->config->userlist_count_users == '2') {
$where = '(block=0 AND activation="")';
} elseif ($this->config->userlist_count_users == '3') {
$where = 'block=0';
}
} else {
$where = '1';
}
// Total
$this->db->setQuery("SELECT COUNT(*) FROM #__users WHERE {$where}");
$this->total = $this->db->loadResult();
KunenaError::checkDatabaseError();
// Search total
$query = "SELECT COUNT(*) FROM #__users AS u INNER JOIN #__kunena_users AS fu ON u.id=fu.userid WHERE {$where}";
if ($this->search != "") {
if (!JRequest::checkToken()) {
$this->app->enqueueMessage(JText::_('COM_KUNENA_ERROR_TOKEN'), 'error');
while (@ob_end_clean()) {
}
$this->app->redirect(CKunenaLink::GetUserlistURL());
return false;
}
$query .= " AND (u.name LIKE '%{$this->db->getEscaped($this->search)}%' OR u.username LIKE '%{$this->db->getEscaped($this->search)}%')";
}
$this->db->setQuery($query);
$total = $this->db->loadResult();
KunenaError::checkDatabaseError();
if ($this->limit > $total) {
$this->limitstart = 0;
}
// this is need to show something when the user choose all, but we need to limit even the 'all' with a number
if ($this->limit == 0) {
$querylimit = '150';
}
$useridAdmin = KUNENA_JOOMLA_COMPAT == '1.5' ? '62' : '42';
// Select query
$moderator = intval($this->me->isModerator());
$query = "SELECT u.id, u.name, u.username, u.usertype, IF(fu.hideEmail=0 OR {$moderator},u.email,'') AS email, u.registerDate, u.lastvisitDate, fu.userid, fu.showOnline, fu.group_id, fu.posts, fu.karma, fu.uhits " . " FROM #__users AS u INNER JOIN #__kunena_users AS fu ON fu.userid = u.id WHERE {$where}";
$this->searchuri = "";
if ($this->search != "") {
$query .= " AND (name LIKE '%{$this->db->getEscaped($this->search)}%' OR username LIKE '%{$this->db->getEscaped($this->search)}%') AND u.id NOT IN ({$useridAdmin})";
$this->searchuri .= "&search=" . $this->search;
} else {
$query .= " AND u.id NOT IN ({$useridAdmin})";
}
$query .= $orderby;
$query .= " LIMIT {$this->limitstart}, {$querylimit}";
$this->db->setQuery($query);
$this->users = $this->db->loadObjectList();
KunenaError::checkDatabaseError();
$userlist = array();
foreach ($this->users as $user) {
$userlist[intval($user->userid)] = intval($user->userid);
}
// Prefetch all users/avatars to avoid user by user queries during template iterations
KunenaUser::loadUsers($userlist);
// table ordering
$this->order_dir = $filter_order_dir;
$this->order = $filter_order;
if ($this->search == "") {
$this->search = JText::_('COM_KUNENA_USRL_SEARCH');
}
$this->pageNav = new JPagination($total, $this->limitstart, $this->limit);
$this->allow = true;
$template = KunenaFactory::getTemplate();
$this->params = $template->params;
}