Example #1
0
 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;
 }
    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();
        ?>
"
                    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 {
                        ?>
Example #4
0
    ?>
        </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);
            ?>
"
Example #5
0
        ?>
            <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();
        ?>
Example #6
0
* 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 
Example #7
0
        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);
                    ?>
">
                        <span><?php 
                    echo JText::_('COM_COMMUNITY_FRIENDS_VIEW_ALL');
                    ?>
</span>
                        <span <?php 
                    echo $is_rtl;
                    ?>
 > (<?php 
                    echo $total;
                    ?>
)</span>
                    </a>
                        <?php 
                }
                ?>

                    <?php 
                $html = ob_get_contents();
                ob_end_clean();
            }
            return $html;
        }
Example #8
0
            $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 . '"' : '';
            ?>
                         />
Example #9
0
    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;
Example #10
0
$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 
Example #11
0
        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];
            ?>
Example #12
0
        ?>
" 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;
        ?>