function showMiniHeader($userId) { CMiniHeader::load(); CFactory::load('helpers', 'friends'); CFactory::load('helpers', 'owner'); $option = JRequest::getVar('option', '', 'REQUEST'); $lang =& JFactory::getLanguage(); $lang->load('com_community'); $my = CFactory::getUser(); $config = CFactory::getConfig(); if (!empty($userId)) { $user = CFactory::getUser($userId); CFactory::load('libraries', 'messaging'); $sendMsg = CMessaging::getPopup($user->id); $tmpl = new CTemplate(); $tmpl->set('my', $my); $tmpl->set('user', $user); $tmpl->set('isMine', COwnerHelper::isMine($my->id, $user->id)); $tmpl->set('sendMsg', $sendMsg); $tmpl->set('config', $config); $tmpl->set('isFriend', CFriendsHelper::isConnected($user->id, $my->id) && $user->id != $my->id); $showMiniHeader = $option == 'com_community' ? $tmpl->fetch('profile.miniheader') : '<div id="community-wrap" style="min-height:50px;">' . $tmpl->fetch('profile.miniheader') . '</div>'; return $showMiniHeader; } }
public function messaging() { include_once JPATH_ROOT . '/components/com_community/libraries/core.php'; include_once JPATH_ROOT . '/components/com_community/libraries/messaging.php'; $onclick = CMessaging::getPopup(549); echo '<a onclick="' . $onclick . '" href="#">Send message</a>'; }
/** * Shares a story through 3rd party oauth clients * * @param TableBlog $blog A blog table object * @param string $type The type of oauth client * * @return boolean True on success and false otherwise. **/ public function getHTML($bloggerid = "") { $html = ''; $my = JFactory::getUser(); $config = EasyBlogHelper::getConfig(); if ($config->get('main_jomsocial_messaging') && $my->id != $bloggerid) { $file_core = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_community' . DIRECTORY_SEPARATOR . 'libraries' . DIRECTORY_SEPARATOR . 'core.php'; $file_messaging = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_community' . DIRECTORY_SEPARATOR . 'libraries' . DIRECTORY_SEPARATOR . 'messaging.php'; if (file_exists($file_core) && file_exists($file_messaging)) { require_once $file_core; require_once $file_messaging; CMessaging::load(); $html = '<a href="javascript:void(0);" onclick="' . CMessaging::getPopup($bloggerid) . '" class="author-message" title="' . JText::_('COM_EASYBLOG_MESSAGE_AUTHOR') . '"><span>' . JText::_('COM_EASYBLOG_MESSAGE_AUTHOR') . '</span></a>'; } } $easysocial = EasyBlogHelper::getHelper('EasySocial'); if ($config->get('integrations_easysocial_conversations') && $easysocial->exists() && $my->id != $bloggerid) { $easysocial->init(); $user = Foundry::user($bloggerid); $theme = new CodeThemes(); $theme->set('user', $user); $html = $theme->fetch('easysocial.conversation.php'); } return $html; }
public static function showMiniHeader($userId) { CMiniHeader::load(); $mainframe = JFactory::getApplication(); $jinput = $mainframe->input; JFactory::getLanguage()->load('com_community'); $option = $jinput->get('option', '', 'STRING'); //JRequest::getVar('option', '' , 'REQUEST'); $my = CFactory::getUser(); $config = CFactory::getConfig(); if (!empty($userId)) { $user = CFactory::getUser($userId); $params = $user->getParams(); //links information $photoEnabled = $config->get('enablephotos') ? true : false; $eventEnabled = $config->get('enableevents') ? true : false; $groupEnabled = $config->get('enablegroups') ? true : false; $videoEnabled = $config->get('enablevideos') ? true : false; //likes CFactory::load('libraries', 'like'); $like = new Clike(); $isLikeEnabled = $like->enabled('profile') && $params->get('profileLikes', 1) ? 1 : 0; $isUserLiked = $like->userLiked('profile', $user->id, $my->id); /* likes count */ $likes = $like->getLikeCount('profile', $user->id); //profile $profileModel = CFactory::getModel('profile'); $profile = $profileModel->getViewableProfile($user->id, $user->getProfileType()); $profile = JArrayHelper::toObject($profile); $profile->largeAvatar = $user->getAvatar(); $profile->defaultAvatar = $user->isDefaultAvatar(); $profile->status = $user->getStatus(); $profile->defaultCover = $user->isDefaultCover(); $profile->cover = $user->getCover(); $profile->coverPostion = $params->get('coverPosition', ''); if (strpos($profile->coverPostion, '%') === false) { $profile->coverPostion = 0; } $groupmodel = CFactory::getModel('groups'); $profile->_groups = $groupmodel->getGroupsCount($profile->id); $eventmodel = CFactory::getModel('events'); $profile->_events = $eventmodel->getEventsCount($profile->id); $profile->_friends = $user->_friendcount; $videoModel = CFactory::getModel('Videos'); $profile->_videos = $videoModel->getVideosCount($profile->id); $photosModel = CFactory::getModel('photos'); $profile->_photos = $photosModel->getPhotosCount($profile->id); /* is featured */ $modelFeatured = CFactory::getModel('Featured'); $profile->featured = $modelFeatured->isExists(FEATURED_USERS, $profile->id); $sendMsg = CMessaging::getPopup($user->id); $tmpl = new CTemplate(); $tmpl->set('my', $my)->set('user', $user)->set('isBlocked', $user->isBlocked())->set('isMine', COwnerHelper::isMine($my->id, $user->id))->set('sendMsg', $sendMsg)->set('config', $config)->set('isWaitingApproval', CFriendsHelper::isWaitingApproval($my->id, $user->id))->set('isLikeEnabled', $isLikeEnabled)->set('photoEnabled', $photoEnabled)->set('eventEnabled', $eventEnabled)->set('groupEnabled', $groupEnabled)->set('videoEnabled', $videoEnabled)->set('profile', $profile)->set('isUserLiked', $isUserLiked)->set('likes', $likes)->set('isFriend', CFriendsHelper::isConnected($user->id, $my->id) && $user->id != $my->id); $showMiniHeader = $option == 'com_community' ? $tmpl->fetch('profile.miniheader') : '<div id="community-wrap" style="min-height:50px;">' . $tmpl->fetch('profile.miniheader') . '</div>'; return $showMiniHeader; } }
protected function getOnClick($userid) { if (!$this->loaded) { // PM popup requires JomSocial css to be loaded from selected template $cconfig = CFactory::getConfig(); $document = JFactory::getDocument(); $document->addStyleSheet('components/com_community/assets/window.css'); $document->addStyleSheet('components/com_community/templates/' . $cconfig->get('template') . '/css/style.css'); $this->loaded = true; } return ' onclick="' . CMessaging::getPopup($userid) . '"'; }
/** * Renders the messaging link * * @since 5.0 * @access public * @param string * @return */ public function getMessagingHtml($authorId) { if (!$this->exists()) { return; } $file = JPATH_ROOT . '/components/com_community/libraries/messaging.php'; CMessaging::load(); $template = EB::template(); $template->set('authorId', $authorId); $output = $template->output('site/jomsocial/messaging'); return $output; }
static function getPMSLink($content,$pmsText=null) { if ($pmsText == null) { $conf = TConf::getConfig(); if ($conf->display_fullname == 1) $pmsText= sprintf(JText::_('ADSMANAGER_PMS_FORM'),$content->fullname); else $pmsText= sprintf(JText::_('ADSMANAGER_PMS_FORM'),$content->user); } if (is_dir(JPATH_ROOT.'/components/com_uddeim')) { $pmsLink = JRoute::_("index.php?option=com_uddeim&task=new&recip=".$content->userid); return '<a href="'.$pmsLink.'">'.$pmsText.'</a><br />'; } else if (is_dir(JPATH_ROOT.'/components/com_community')) { include_once JPATH_ROOT.'/components/com_community/libraries/core.php'; include_once JPATH_ROOT.'/components/com_community/libraries/messaging.php'; $pmsLink = CMessaging::getPopup($content->userid); return '<a onclick="'.$pmsLink.';return false;" href="#">'.$pmsText.'</a><br />'; } else { return JText::_('ADSMANAGER_PMS_ERROR'); } }
/** * Show profile miniheader */ function _getMiniHeader() { CFactory::load('helpers', 'friends'); $my = CFactory::getUser(); $config = CFactory::getConfig(); if (!empty($this->_showMiniHeaderUser)) { $user = CFactory::getUser($this->_showMiniHeaderUser); CFactory::load('libraries', 'messaging'); $sendMsg = CMessaging::getPopup($user->id); $tmpl = new CTemplate(); $tmpl->set('my', $my); $tmpl->set('user', $user); $tmpl->set('isMine', COwnerHelper::isMine($my->id, $user->id)); $tmpl->set('sendMsg', $sendMsg); $tmpl->set('config', $config); $tmpl->set('isFriend', CFriendsHelper::isConnected($user->id, $my->id) && $user->id != $my->id); return $tmpl->fetch('profile.miniheader'); } }
echo $userId; ?> " class="butt butt-default butt-pm"> <?php // echo JText::_( 'COM_EASYDISCUSS_CONVERSATIONS_WRITE' ); ?> <i class="i i-envelope"></i> </a> <?php } else { if ($system->config->get('integration_jomsocial_messaging') && JFile::exists(JPATH_ROOT . '/components/com_community/libraries/core.php')) { ?> <?php require_once JPATH_ROOT . '/components/com_community/libraries/core.php'; require_once JPATH_ROOT . '/components/com_community/libraries/messaging.php'; CMessaging::load(); ?> <a href="javascript:void(0);" onclick="joms.messaging.loadComposeWindow('<?php echo $userId; ?> ' );" class="butt butt-default butt-pm"> <?php // echo JText::_( 'COM_EASYDISCUSS_CONVERSATIONS_WRITE' ); ?> <i class="i i-envelope"></i> </a> <?php } else { ?> <?php if ($system->config->get('main_conversations')) {
/** * Get link to popup window */ public function getPopup($id) { CMessaging::load(); return "joms.messaging.loadComposeWindow('{$id}')"; }
static $onlinecache = array(); if (!isset($onlinecache[$userinfo->userid])) { $sql = "SELECT COUNT(userid) FROM #__session WHERE userid='{$userinfo->userid}'"; $kunena_db->setQuery($sql); $onlinecache[$userinfo->userid] = $kunena_db->loadResult(); } $isonline = $onlinecache[$userinfo->userid]; if ($isonline && $userinfo->showOnline == 1) { $msg_online = isset($fbIcons['onlineicon']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['onlineicon'] . '" border="0" alt="' . _MODLIST_ONLINE . '" />' : ' <img src="' . KUNENA_URLEMOTIONSPATH . 'onlineicon.gif" border="0" alt="' . _MODLIST_ONLINE . '" />'; } else { $msg_online = isset($fbIcons['offlineicon']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['offlineicon'] . '" border="0" alt="' . _MODLIST_OFFLINE . '" />' : ' <img src="' . KUNENA_URLEMOTIONSPATH . 'offlineicon.gif" border="0" alt="' . _MODLIST_OFFLINE . '" />'; } } /* PM integration */ if ($fbConfig->pm_component == "jomsocial" && $userinfo->userid && $kunena_my->id) { $onclick = CMessaging::getPopup($userinfo->userid); $msg_pms = '<a href="javascript:void(0)" onclick="' . $onclick . "\">"; if ($fbIcons['pms']) { $msg_pms .= "<img src=\"" . KUNENA_URLICONSPATH . $fbIcons['pms'] . "\" alt=\"" . _VIEW_PMS . "\" border=\"0\" title=\"" . _VIEW_PMS . "\" />"; } else { $msg_pms .= _VIEW_PMS; } $msg_pms .= "</a>"; //$msg_pms = '<a href="javascript:void(0)" onclick="'. $onclick .'">Send message</a>'; } else { if ($fbConfig->pm_component == "clexuspm" && $userinfo->userid && $kunena_my->id) { //we should offer the user a PMS link //first get the username of the user to contact $PMSName = $userinfo->aid; $msg_pms = "<a href=\"" . JRoute::_('index.php?option=com_mypms&task=new&to=' . $userinfo->userid . '&title=' . $fmessage->subject) . "\"><img src=\""; if ($fbIcons['pms']) {
/** * Show the main profile header */ public function _showHeader(&$data) { jimport('joomla.utilities.arrayhelper'); $my =& JFactory::getUser(); $userid = JRequest::getVar('userid', $my->id); $user = CFactory::getUser($userid); $params = $user->getParams(); $userModel = CFactory::getModel('user'); CFactory::load('libraries', 'messaging'); CFactory::load('helpers', 'owner'); $isMine = COwnerHelper::isMine($my->id, $user->id); // Get the admin controls HTML data $adminControlHTML = ''; $tmpl = new CTemplate(); // get how many unread message $filter = array(); $inboxModel = CFactory::getModel('inbox'); $filter['user_id'] = $my->id; $unread = $inboxModel->countUnRead($filter); // get how many pending connection $friendModel = CFactory::getModel('friends'); $pending = $friendModel->countPending($my->id); $profile = JArrayHelper::toObject($data->profile); $profile->largeAvatar = $user->getAvatar(); CFactory::load('libraries', 'activities'); $profile->status = $user->getStatus(); if ($profile->status !== '') { CFactory::load('libraries', 'activities'); $postedOn = new JDate($user->_posted_on); $postedOn = CActivityStream::_createdLapse($postedOn); $profile->posted_on = $user->_posted_on == '0000-00-00 00:00:00' ? '' : $postedOn; } else { $profile->posted_on = ''; } // Assign videoId $profile->profilevideo = $data->videoid; $video = JTable::getInstance('Video', 'CTable'); $video->load($profile->profilevideo); $profile->profilevideoTitle = $video->getTitle(); $addbuddy = "joms.friends.connect('{$profile->id}')"; $sendMsg = CMessaging::getPopup($profile->id); $config = CFactory::getConfig(); $lastLogin = JText::_('COM_COMMUNITY_PROFILE_NEVER_LOGGED_IN'); if ($user->lastvisitDate != '0000-00-00 00:00:00') { //$now =& JFactory::getDate(); $userLastLogin = new JDate($user->lastvisitDate); CFactory::load('libraries', 'activities'); $lastLogin = CActivityStream::_createdLapse($userLastLogin); } // @todo : beside checking the owner, maybe we want to check for a cookie, // say every few hours only the hit get increment by 1. if (!$isMine) { $user->viewHit(); } // @rule: myblog integrations $showBlogLink = false; CFactory::load('libraries', 'myblog'); $myblog =& CMyBlog::getInstance(); if ($config->get('enablemyblogicon') && $myblog) { if ($myblog->userCanPost($user->id)) { $showBlogLink = true; } $tmpl->set('blogItemId', $myblog->getItemId()); } $multiprofile =& JTable::getInstance('MultiProfile', 'CTable'); $multiprofile->load($user->getProfileType()); // Get like $likesHTML = ''; if ($user->getParams()->get('profileLikes', true)) { CFactory::load('libraries', 'like'); $likes = new CLike(); $likesHTML = $my->id == 0 ? $likes->getHtmlPublic('profile', $user->id) : $likes->getHTML('profile', $user->id, $my->id); } /* User status */ CFactory::load('libraries', 'userstatus'); $status = new CUserStatus($user->id, 'profile'); //respect wall setting CFactory::load('helpers', 'friends'); CFactory::load('helper', 'owner'); if ($my->id && (!$config->get('lockprofilewalls') || $config->get('lockprofilewalls') && CFriendsHelper::isConnected($my->id, $profile->id)) || COwnerHelper::isCommunityAdmin()) { // Add default status box CFactory::load('helpers', 'user'); CUserHelper::addDefaultStatusCreator($status); } $isblocked = $user->isBlocked(); return $tmpl->set('karmaImgUrl', CUserPoints::getPointsImage($user))->set('isMine', $isMine)->set('lastLogin', $lastLogin)->setRef('user', $user)->set('addBuddy', $addbuddy)->set('sendMsg', $sendMsg)->set('config', $config)->set('multiprofile', $multiprofile)->set('showBlogLink', $showBlogLink)->set('isFriend', CFriendsHelper::isConnected($user->id, $my->id) && $user->id != $my->id)->set('isBlocked', $isblocked)->set('profile', $profile)->set('unread', $unread)->set('pending', $pending)->set('registerDate', $user->registerDate)->set('adminControlHTML', $adminControlHTML)->set('likesHTML', $likesHTML)->set('userstatus', $status)->fetch('profile.header'); }
/** * Show the main profile header */ function _showHeader(&$data) { jimport('joomla.utilities.arrayhelper'); $my =& JFactory::getUser(); $userid = JRequest::getVar('userid', $my->id); $user = CFactory::getUser($userid); $userModel = CFactory::getModel('user'); CFactory::load('libraries', 'messaging'); CFactory::load('helpers', 'owner'); // Get the admin controls HTML data $adminControlHTML = ''; $tmpl = new CTemplate(); $editStatus = ''; $editLink = ''; if (COwnerHelper::isMine($my->id, $user->id)) { $editStatus = '<input id="new-status" style="border:1px solid #cccccc;" type="text" value="" size="38" onkeyup="if(event.keyCode == 13) {cStatusAct()}"/>'; $editLink = '<span id="profile-status-edit" onclick="cStatusAct()">[' . JText::_('CC EDIT') . ']</span>'; } // get how many unread message $filter = array(); $inboxModel = CFactory::getModel('inbox'); $filter['user_id'] = $my->id; $unread = $inboxModel->countUnRead($filter); // get how many pending connection $friendModel = CFactory::getModel('friends'); $pending = $friendModel->countPending($my->id); $tmpl->set('karmaImgUrl', CUserPoints::getPointsImage($user)); $tmpl->set('editStatus', $editStatus); $tmpl->set('editLink', $editLink); $tmpl->set('isMine', COwnerHelper::isMine($my->id, $user->id)); $profile = JArrayHelper::toObject($data->profile); $profile->largeAvatar = $user->getAvatar(); $profile->status = $user->getStatus(); CFactory::load('libraries', 'activities'); $postedOn = new JDate($user->_posted_on); $postedOn = CActivityStream::_createdLapse($postedOn); $profile->posted_on = $user->_posted_on == '0000-00-00 00:00:00' ? '' : $postedOn; // Assign videoId $profile->profilevideo = $data->videoid; $addbuddy = "joms.friends.connect('{$profile->id}')"; $sendMsg = CMessaging::getPopup($profile->id); $config = CFactory::getConfig(); $lastLogin = JText::_('CC NEVER LOGGED IN'); if ($user->lastvisitDate != '0000-00-00 00:00:00') { //$now =& JFactory::getDate(); $userLastLogin = new JDate($user->lastvisitDate); CFactory::load('libraries', 'activities'); $lastLogin = CActivityStream::_createdLapse($userLastLogin); } // @todo : beside checking the owner, maybe we want to check for a cookie, // say every few hours only the hit get increment by 1. if (!COwnerHelper::isMine($my->id, $user->id)) { $user->viewHit(); } $tmpl->set('lastLogin', $lastLogin); $tmpl->setRef('user', $user); $tmpl->set('addBuddy', $addbuddy); $tmpl->set('sendMsg', $sendMsg); $tmpl->set('config', $config); // @rule: myblog integrations $showBlogLink = false; CFactory::load('libraries', 'myblog'); $myblog =& CMyBlog::getInstance(); if ($config->get('enablemyblogicon') && $myblog) { if ($myblog->userCanPost($user->id)) { $showBlogLink = true; } $tmpl->set('blogItemId', $myblog->getItemId()); } $multiprofile =& JTable::getInstance('MultiProfile', 'CTable'); $multiprofile->load($user->getProfileType()); // Get like $likesHTML = ''; if ($user->getParams()->get('profileLikes', true)) { CFactory::load('libraries', 'like'); $likes = new CLike(); $likesHTML = $my->id == 0 ? $likes->getHtmlPublic('profile', $user->id) : $likes->getHTML('profile', $user->id, $my->id); } $tmpl->set('multiprofile', $multiprofile); $tmpl->set('showBlogLink', $showBlogLink); $tmpl->set('isFriend', CFriendsHelper::isConnected($user->id, $my->id) && $user->id != $my->id); $tmpl->set('profile', $profile); $tmpl->set('unread', $unread); $tmpl->set('pending', $pending); $tmpl->set('registerDate', $user->registerDate); $tmpl->set('adminControlHTML', $adminControlHTML); $tmpl->set('likesHTML', $likesHTML); $html = $tmpl->fetch('profile.header'); return $html; }
/** * Get link to popup window */ public static function getPopup($id) { CMessaging::load(); return "joms.api.pmSend('{$id}')"; }
?> </div> <div class="mini-profile-details-action"> <div class="jsLft"> <span class="jsIcon1 icon-group"> <?php echo JText::sprintf(CStringHelper::isPlural($row->friendsCount) ? 'COM_COMMUNITY_FRIENDS_COUNT_MANY' : 'COM_COMMUNITY_FRIENDS_COUNT', $row->friendsCount); ?> </span> <?php if ($config->get('enablepm') && $my->id != $row->user->id) { ?> <span class="jsIcon1 icon-write"> <a onclick="<?php echo CMessaging::getPopup($row->user->id); ?> " href="javascript:void(0);"> <?php echo JText::_('COM_COMMUNITY_INBOX_SEND_MESSAGE'); ?> </a> </span> <?php } ?> <?php if ($row->addFriend) { ?> <span class="jsIcon1 icon-add-friend">
} ?> <?php if ($this->params->get('additional_data_source') == 'jomsocial') { ?> <div class="joomdle_user_actions"> <?php echo '<br>'; echo '<img src="' . JURI::root() . '/components/com_community/templates/default/images/action/icon-email-go.png"> '; // Send message button $jspath = JPATH_ROOT . '/components/com_community'; include_once $jspath . '/libraries/core.php'; include_once $jspath . '/libraries/messaging.php'; $user_id = JUserHelper::getUserId($this->username); $user = JFactory::getUser($user_id); $onclick = CMessaging::getPopup($user->id); echo '<a href="javascript:void(0)" onclick="' . $onclick . '">' . JText::_('COM_JOOMDLE_WRITE_MESSAGE') . '</a>'; ?> </div> <?php } ?> </div> </div> <table width="100%" cellpadding="4" cellspacing="0" border="0" align="center" class="contentpane<?php echo $this->params->get('pageclass_sfx'); ?> "> <tr> <td width="90%" height="20" class="sectiontableheader<?php
public function modProfileUserinfo() { jimport('joomla.utilities.arrayhelper'); $mainframe = JFactory::getApplication(); $jinput = $mainframe->input; $my = CFactory::getUser(); $userid = $jinput->get('userid', $my->id, 'INT'); $user = CFactory::getUser($userid); $params = $user->getParams(); $userModel = CFactory::getModel('user'); $profileModel = CFactory::getModel('profile'); //Reassign needed variable $data = new stdClass(); $data->user = $user; $data->profile = $profileModel->getViewableProfile($userid, $user->getProfileType()); $data->videoid = $params->get('profileVideo', 0); CFactory::load('libraries', 'messaging'); $isMine = COwnerHelper::isMine($my->id, $user->id); // Get the admin controls HTML data $adminControlHTML = ''; $tmpl = new CTemplate(); // get how many unread message $filter = array(); $inboxModel = CFactory::getModel('inbox'); $filter['user_id'] = $my->id; $unread = $inboxModel->countUnRead($filter); // get how many pending connection $friendModel = CFactory::getModel('friends'); $pending = $friendModel->countPending($my->id); $profile = JArrayHelper::toObject($data->profile); $profile->largeAvatar = $user->getAvatar(); $profile->defaultAvatar = $user->isDefaultAvatar(); $profile->status = $user->getStatus(); $profile->defaultCover = $user->isDefaultCover(); $profile->cover = $user->getCover(); $profile->coverPostion = $params->get('coverPosition', ''); if (strpos($profile->coverPostion, '%') === false) { $profile->coverPostion = 0; } $groupmodel = CFactory::getModel('groups'); $profile->_groups = $groupmodel->getGroupsCount($profile->id); $eventmodel = CFactory::getModel('events'); $profile->_events = $eventmodel->getEventsCount($profile->id); $profile->_friends = $user->_friendcount; $videoModel = CFactory::getModel('Videos'); $profile->_videos = $videoModel->getVideosCount($profile->id); $photosModel = CFactory::getModel('photos'); $profile->_photos = $photosModel->getPhotosCount($profile->id); if ($profile->status !== '') { $postedOn = new JDate($user->_posted_on); $postedOn = CActivityStream::_createdLapse($postedOn); $profile->posted_on = $user->_posted_on == '0000-00-00 00:00:00' ? '' : $postedOn; } else { $profile->posted_on = ''; } /* is featured */ $modelFeatured = CFactory::getModel('Featured'); $profile->featured = $modelFeatured->isExists(FEATURED_USERS, $profile->id); // Assign videoId $profile->profilevideo = $data->videoid; $video = JTable::getInstance('Video', 'CTable'); $video->load($profile->profilevideo); $profile->profilevideoTitle = $video->getTitle(); $addbuddy = "joms.api.friendAdd('{$profile->id}')"; $sendMsg = CMessaging::getPopup($profile->id); $config = CFactory::getConfig(); $jConfig = JFactory::getConfig(); $lastLogin = JText::_('COM_COMMUNITY_PROFILE_NEVER_LOGGED_IN'); if ($user->lastvisitDate != '0000-00-00 00:00:00') { $userLastLogin = new JDate($user->lastvisitDate); $lastLogin = CActivityStream::_createdLapse($userLastLogin); } // @todo : beside checking the owner, maybe we want to check for a cookie, // say every few hours only the hit get increment by 1. if (!$isMine) { $user->viewHit(); } // @rule: myblog integrations $showBlogLink = false; $myblog = CMyBlog::getInstance(); if ($config->get('enablemyblogicon') && $myblog) { if ($myblog->userCanPost($user->id)) { $showBlogLink = true; } $tmpl->set('blogItemId', $myblog->getItemId()); } $photoEnabled = $config->get('enablephotos') ? true : false; $eventEnabled = $config->get('enableevents') ? true : false; $groupEnabled = $config->get('enablegroups') ? true : false; $videoEnabled = $config->get('enablevideos') ? true : false; $isSEFEnabled = $jConfig->get('sef') ? true : false; $multiprofile = JTable::getInstance('MultiProfile', 'CTable'); $multiprofile->load($user->getProfileType()); CFactory::load('libraries', 'like'); $like = new Clike(); $isLikeEnabled = $like->enabled('profile') && $params->get('profileLikes', 1) ? 1 : 0; $isUserLiked = $like->userLiked('profile', $user->id, $my->id); /* likes count */ $likes = $like->getLikeCount('profile', $user->id); /* User status */ $status = new CUserStatus($user->id, 'profile'); //respect wall setting if ($my->id && (!$config->get('lockprofilewalls') || $config->get('lockprofilewalls') && CFriendsHelper::isConnected($my->id, $profile->id)) || COwnerHelper::isCommunityAdmin()) { // Add default status box CUserHelper::addDefaultStatusCreator($status); } //$isblocked = $user->isBlocked(); $isMine = COwnerHelper::isMine($my->id, $user->id); $isCommunityAdmin = COwnerHelper::isCommunityAdmin($user->id); // Check if user is blocked $getBlockStatus = new blockUser(); $isblocked = $getBlockStatus->isUserBlocked($user->id, 'profile'); // Get block user html //$blockUserHTML = $isMine || $isCommunityAdmin ? '' : CUserHelper::getBlockUserHTML($user->id, $isBlocked); $isMine = COwnerHelper::isMine($my->id, $user->id); $isCommunityAdmin = COwnerHelper::isCommunityAdmin($user->id); // Get reporting html $report = new CReportingLibrary(); $reportsHTML = $isMine ? '' : $report->getReportingHTML(JText::_('COM_COMMUNITY_REPORT_USER'), 'profile,reportProfile', array($user->id)); $tmpl = new CTemplate(); echo $tmpl->set('karmaImgUrl', CUserPoints::getPointsImage($user))->set('reportsHTML', $reportsHTML)->set('isMine', $isMine)->set('lastLogin', $lastLogin)->set('addBuddy', $addbuddy)->set('sendMsg', $sendMsg)->set('config', $config)->set('multiprofile', $multiprofile)->set('showBlogLink', $showBlogLink)->set('isFriend', CFriendsHelper::isConnected($user->id, $my->id) && $user->id != $my->id)->set('isWaitingApproval', CFriendsHelper::isWaitingApproval($my->id, $user->id))->set('isWaitingResponse', CFriendsHelper::isWaitingApproval($user->id, $my->id))->set('isBlocked', $isblocked)->set('profile', $profile)->set('unread', $unread)->set('pending', $pending)->set('registerDate', $user->registerDate)->set('adminControlHTML', $adminControlHTML)->set('userstatus', $status)->set('user', $user)->set('isUserLiked', $isUserLiked)->set('likes', $likes)->set('isLikeEnabled', $isLikeEnabled)->set('photoEnabled', $photoEnabled)->set('eventEnabled', $eventEnabled)->set('groupEnabled', $groupEnabled)->set('videoEnabled', $videoEnabled)->set('about', $this->_getProfileHTML($data->profile))->set('isSEFEnabled', $isSEFEnabled)->set('blocked', $user->isBlocked())->fetch('profile/focus'); }
} // online - ofline status if ($fmessage->userid > 0) { $sql = "SELECT COUNT(userid) FROM #__session WHERE userid='{$fmessage->userid}'"; $kunena_db->setQuery($sql); $isonline = $kunena_db->loadResult(); $msg_online = ''; if ($isonline && $userinfo->showOnline == 1) { $msg_online .= isset($fbIcons['onlineicon']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['onlineicon'] . '" border="0" alt="' . _MODLIST_ONLINE . '" />' : ' <img src="' . KUNENA_URLEMOTIONSPATH . 'onlineicon.gif" border="0" alt="' . _MODLIST_ONLINE . '" />'; } else { $msg_online .= isset($fbIcons['offlineicon']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['offlineicon'] . '" border="0" alt="' . _MODLIST_OFFLINE . '" />' : ' <img src="' . KUNENA_URLEMOTIONSPATH . 'offlineicon.gif" border="0" alt="' . _MODLIST_OFFLINE . '" />'; } } /* PM integration */ if ($fbConfig->pm_component == "jomsocial" && $fmessage->userid && $kunena_my->id) { $onclick = CMessaging::getPopup($fmessage->userid); $msg_pms = '<a href="javascript:void(0)" onclick="' . $onclick . "\">"; if ($fbIcons['pms']) { $msg_pms .= "<img src=\"" . KUNENA_URLICONSPATH . $fbIcons['pms'] . "\" alt=\"" . _VIEW_PMS . "\" border=\"0\" title=\"" . _VIEW_PMS . "\" />"; } else { $msg_pms .= _VIEW_PMS; } $msg_pms .= "</a>"; //$msg_pms = '<a href="javascript:void(0)" onclick="'. $onclick .'">Send message</a>'; } else { if ($fbConfig->pm_component == "clexuspm" && $fmessage->userid && $kunena_my->id) { //we should offer the user a PMS link //first get the username of the user to contact $PMSName = $userinfo->aid; $msg_pms = "<a href=\"" . JRoute::_('index.php?option=com_mypms&task=new&to=' . $fmessage->userid . '&title=' . $fmessage->subject) . "\"><img src=\""; if ($fbIcons['pms']) {
<?php /** * @package EasyBlog * @copyright Copyright (C) 2010 - 2015 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasyBlog is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ defined('_JEXEC') or die('Unauthorized Access'); ?> <a href="javascript:void(0);" onclick="<?php echo CMessaging::getPopup($authorId); ?> " class="author-message" title="<?php echo JText::_('COM_EASYBLOG_MESSAGE_AUTHOR'); ?> "> <span><?php echo JText::_('COM_EASYBLOG_MESSAGE_AUTHOR'); ?> </span> </a>