本文整理汇总了PHP中CUserHelper::onlineIndicator方法的典型用法代码示例。如果您正苦于以下问题:PHP CUserHelper::onlineIndicator方法的具体用法?PHP CUserHelper::onlineIndicator怎么用?PHP CUserHelper::onlineIndicator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUserHelper
的用法示例。
在下文中一共展示了CUserHelper::onlineIndicator方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getMutualFriendsHTML
public static function _getMutualFriendsHTML($userid = null)
{
$my = CFactory::getUser();
if ($my->id == $userid) {
return;
}
$friendsModel = CFactory::getModel('Friends');
$friends = $friendsModel->getFriends($userid, 'latest', false, 'mutual');
$html = "<ul class='joms-list--friend single-column'>";
if (sizeof($friends)) {
foreach ($friends as $friend) {
$html .= "<li class='joms-list__item'>";
$html .= "<div class='joms-list__avatar'>";
$html .= '<div class="joms-avatar ' . CUserHelper::onlineIndicator($friend) . '"><a href="' . CRoute::_('index.php?option=com_community&view=profile&userid=' . $friend->id) . '">';
$html .= '<img src="' . $friend->getThumbAvatar() . '" data-author="' . $friend->id . '" />';
$html .= "</a></div></div>";
$html .= "<div class='joms-list__body'>";
$html .= CFriendsHelper::getUserCog($friend->id, null, null, true);
$html .= CFriendsHelper::getUserFriendDropdown($friend->id);
$html .= '<a href="' . CRoute::_('index.php?option=com_community&view=profile&userid=' . $friend->id) . '">';
$html .= '<h4 class="joms-text--username">' . $friend->getDisplayName() . '</h4></a>';
$html .= '<span class="joms-text--title">' . JText::sprintf('COM_COMMUNITY_TOTAL_MUTUAL_FRIENDS', CFriendsHelper::getTotalMutualFriends($friend->id)) . '</span>';
$html .= "</div></li>";
}
$html .= "</ul>";
} else {
$html .= JText::_('COM_COMMUNITY_NO_MUTUAL_FRIENDS');
}
return $html;
}
示例2:
echo JText::_('COM_COMMUNITY_CREATE_GROUP_ANNOUNCEMENT');
?>
</button>
<?php
}
?>
<div>
<?php
if ($bulletins) {
for ($i = 0; $i < count($bulletins); $i++) {
$row =& $bulletins[$i];
?>
<div class="joms-stream__container joms-stream--discussion">
<div class="joms-stream__header <?php
echo CUserHelper::onlineIndicator($row->creator);
?>
">
<div class="joms-avatar--stream">
<a href="<?php
echo CUrlHelper::userLink($row->creator->id);
?>
">
<img data-author="<?php
echo $row->creator->id;
?>
"
src="<?php
echo $row->creator->getThumbAvatar();
?>
"
示例3: array_reverse
if (!is_array($users)) {
$users = array_reverse(explode(',', $users));
}
$user = CFactory::getUser($users[0]);
$date = JFactory::getDate($act->created);
if ($config->get('activitydateformat') == "lapse") {
$createdTime = CTimeHelper::timeLapse($date);
} else {
$createdTime = $date->format($config->get('profileDateFormat'));
}
$isPhotoModal = $config->get('album_mode') == 1;
?>
<div class="joms-stream__header">
<div class= "joms-avatar--stream <?php
echo CUserHelper::onlineIndicator($user);
?>
">
<?php
if (count($users) > 1 && false) {
// added false for now because we have to show the last user avatar
?>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php
echo CRoute::getURI();
?>
#joms-icon-users"></use>
</svg>
<?php
} else {
?>
示例4: foreach
?>
</div>
<!-- Group's Members @ Sidebar -->
<?php
if ($members) {
?>
<div id="joms-group--members" class="joms-tab__content">
<ul class="joms-list--photos clearfix">
<?php
foreach ($members as $member) {
?>
<li class="joms-list__item">
<div class="joms-avatar <?php
echo CUserHelper::onlineIndicator($member);
?>
">
<a href="<?php
echo CUrlHelper::userLink($member->id);
?>
">
<img
src="<?php
echo $member->getThumbAvatar();
?>
"
title="<?php
echo CTooltip::cAvatarTooltip($member);
?>
"
示例5:
?>
<li class="joms-list__item">
<?php
if (in_array($row->user->id, $featuredList)) {
?>
<div class="joms-ribbon__wrapper">
<span class="joms-ribbon"><?php
echo JText::_('COM_COMMUNITY_FEATURED');
?>
</span>
</div>
<?php
}
?>
<div class="joms-list__avatar <?php
echo CUserHelper::onlineIndicator($row->user);
?>
">
<a href="<?php
echo $row->user->profileLink;
?>
" class="joms-avatar">
<img data-author="<?php
echo $row->user->id;
?>
" src="<?php
echo $row->user->getThumbAvatar();
?>
" alt="<?php
echo $row->user->getDisplayName();
?>
示例6: defined
* The PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript *are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0
* More info at https://www.jomsocial.com/license-agreement
*/
defined('_JEXEC') or die;
?>
<div class="joms-js--member-module">
<div class="joms-gap"></div>
<ul class="joms-list--thumbnail clearfix">
<?php
if (count($members) > 0) {
foreach ($members as $member) {
?>
<li class="joms-list__item">
<div class="joms-avatar <?php
echo $filter == 4 ? 'joms-online' : CUserHelper::onlineIndicator($member);
?>
">
<a href="<?php
echo CRoute::_('index.php?option=com_community&view=profile&userid=' . $member->id);
?>
">
<img src="<?php
echo $member->getThumbAvatar();
?>
"
title="<?php
echo CTooltip::cAvatarTooltip($member);
?>
"
alt="<?php
示例7: _getMyFriendsHTML
public function _getMyFriendsHTML($userid = null)
{
$document = JFactory::getDocument();
$this->loadUserParams();
$count = $this->userparams->get('count', $this->params->get('count', 10));
$is_rtl = $document->direction == 'rtl' ? 'dir="rtl"' : '';
$html = '';
$friendsModel = CFactory::getModel('friends');
$my = CFactory::getUser($userid);
$user = CFactory::getRequestUser();
$params = $user->getParams();
// site visitor
$relation = 10;
// site members
if ($my->id != 0) {
$relation = 20;
}
// friends
if (CFriendsHelper::isConnected($my->id, $user->id)) {
$relation = 30;
}
// mine
if (COwnerHelper::isMine($my->id, $user->id)) {
$relation = 40;
}
// @todo: respect privacy settings
if ($relation >= $params->get('privacyFriendsView')) {
$friends = $friendsModel->getFriends($user->id, 'latest', false, '', $count + $count);
// randomize the friend count
if ($friends) {
shuffle($friends);
}
$total = $user->getFriendCount();
if ($this->params->get('hide_empty', 0) && !$total) {
return '';
}
ob_start();
?>
<?php
if ($friends) {
?>
<ul class='joms-list--thumbnail'>
<?php
for ($i = 0; $i < count($friends); $i++) {
if ($i >= $count) {
break;
}
$friend =& $friends[$i];
?>
<li class='joms-list__item'>
<div class="joms-avatar <?php
echo CUserHelper::onlineIndicator($friend);
?>
">
<a href="<?php
echo CRoute::_('index.php?option=com_community&view=profile&userid=' . $friend->id);
?>
" >
<img alt="<?php
echo $friend->getDisplayName();
?>
"
title="<?php
echo $friend->getTooltip();
?>
"
src="<?php
echo $friend->getThumbAvatar();
?>
"
data-author="<?php
echo $friend->id;
?>
"
/>
</a>
</div>
</li>
<?php
}
?>
</ul>
<?php
} else {
?>
<div class="cEmpty"><?php
echo JText::_('COM_COMMUNITY_NO_FRIENDS_YET');
?>
</div>
<?php
}
if ($total > $count) {
?>
<div class="joms-gap"></div>
<a href="<?php
echo CRoute::_('index.php?option=com_community&view=friends&userid=' . $user->id);
?>
//.........这里部分代码省略.........
示例8:
$link = 'javascript:" onclick="joms.api.videoOpen(\'' . $comment->contentid . '\');';
} else {
if ($comment->creator_type == VIDEO_USER_TYPE) {
$link = CRoute::_('index.php?option=com_community&view=videos&task=video&videoid=' . $comment->contentid . '&userid=' . $comment->creator);
} else {
$link = CRoute::_('index.php?option=com_community&view=videos&task=video&videoid=' . $comment->contentid . '&groupid=' . $comment->groupid);
}
}
?>
<div class="joms-stream__header no-gap">
<?php
if ($params->get('show_image', 2)) {
// 1 = avatar, 2 = video thumbnail
?>
<div class="joms-avatar--stream <?php
echo $params->get('show_image', 2) == 1 ? CUserHelper::onlineIndicator(CFactory::getUser($comment->post_by)) : 'square video-thumb';
?>
">
<a href="<?php
echo $link;
?>
" >
<img src="<?php
echo $params->get('show_image', 2) == 1 ? CFactory::getUser($comment->post_by)->getAvatar() : $comment->thumb;
?>
"
alt=""
<?php
echo $params->get('show_image', 2) == 1 ? 'data-author="' . $comment->post_by . '"' : '';
?>
/>
示例9:
echo $stream->actor->getThumbAvatar();
?>
" alt="<?php
echo $stream->actor->getDisplayName();
?>
">
</a>
</div>
<?php
} else {
?>
<div class="joms-stream__header">
<div class="joms-avatar--stream <?php
echo CUserHelper::onlineIndicator($stream->actor);
?>
">
<img src="components/com_community/assets/user-Male-thumb.png" alt="male" data-author="<?php
echo $stream->actor->id;
?>
" />
</div>
<?php
}
?>
<div class="joms-stream__meta">
<?php
echo $stream->headline;
示例10: preg_replace
$wall->originalComment = preg_replace('/<br\\s*\\/>/i', "\n", $wall->originalComment);
?>
<div class="joms-comment__item joms-js--comment joms-js--comment-<?php
echo $wall->id;
?>
" data-id="<?php
echo $wall->id;
?>
" data-parent="<?php
echo $wall->contentid;
?>
">
<div class="joms-comment__header">
<div class="joms-avatar--comment <?php
echo CUserHelper::onlineIndicator(CFactory::getUser($wall->post_by));
?>
">
<?php
echo $avatarHTML;
?>
</div>
<div class="joms-comment__body joms-js--comment-body">
<a class="joms-comment__user" href="<?php
echo $authorLink;
?>
"><?php
echo $author;
?>
</a>
<span class="joms-js--comment-content"><?php
示例11: isset
echo $message->id;
?>
js-mail-item<?php
echo $message->isUnread ? ' unread' : ' read';
?>
" id="message-<?php
echo $message->id;
?>
" >
<div class="joms-list--message__body" onclick="location.href='<?php
echo CRoute::_('index.php?option=com_community&view=inbox&task=read&msgid=' . $message->parent);
?>
';" style="cursor: pointer;">
<div class="joms-comment__header">
<div class="joms-avatar--comment <?php
echo isset($message->to[0]) ? CUserHelper::onlineIndicator(CFactory::getUser($message->to[0])) : '';
?>
">
<a href="<?php
echo $task == 'sent' && !empty($message->smallAvatar[0]) ? CUrlHelper::userLink($message->to[0]) : CUrlHelper::userLink($message->user->id);
?>
">
<?php
if ($task == 'sent' && !empty($message->smallAvatar[0])) {
?>
<img src="<?php
echo $message->smallAvatar[0];
?>
" alt="" data-author="<?php
echo $message->to[0];
?>
示例12:
?>
" class="joms-list__item">
<?php
if (in_array($guest->id, $featuredList)) {
?>
<div class="joms-ribbon__wrapper">
<span class="joms-ribbon"><?php
echo JText::_('COM_COMMUNITY_FEATURED');
?>
</span>
</div>
<?php
}
?>
<div class="joms-list__avatar <?php
echo CUserHelper::onlineIndicator($guest);
?>
">
<a class="joms-avatar" href="<?php
echo CRoute::_('index.php?option=com_community&view=profile&userid=' . $guest->id);
?>
">
<img src="<?php
echo $guest->getThumbAvatar();
?>
" alt="<?php
echo $guest->getDisplayName();
?>
" data-author="<?php
echo $guest->id;
?>