public static function sendGroupJoinFollow() { $funcArgs = func_get_args(); // Get notification type from caller $notificationType = $funcArgs[0]; // Get the group table object from passed in parameter $groupTable = $funcArgs[1]; // Get actor (current login user) $actor = $funcArgs[2]; $action = isset($funcArgs[3]) && JString::strtoupper($funcArgs[3]) == 'JOIN' ? 'JOIN' : 'FOLLOW'; if ($groupTable instanceof JTable) { // exclude actor from notification list if ($actor->id == $groupTable->creator) { return false; } if (self::sentNotificationCheck($notificationType, $actor->id, $groupTable->id) === false) { $groupMembers = $groupTable->get('members'); $groupFollowers = $groupTable->get('followers'); $processUserList = explode(',', JXUtility::csvMerge($groupMembers, $groupFollowers)); $userList = self::groupUserByLanguage($processUserList, $actor->id, $notificationType); $jConfig = new JConfig(); $messageUrl = StreamMessage::getGroupUri($groupTable->id); $arrParam = array('actor' => $actor, 'contentName' => JText::sprintf('COM_STREAM_NOTIFICATION_GROUP_' . $action . '_CONTENT', $groupTable->name), 'date' => date('Y-m-d h:i:s')); foreach ($userList as $lang => $bccEmail) { self::loadLanguage($lang); $bodyContent = self::getHeaderContent(JText::_('COM_STREAM_NOTIFICATION_GROUP_' . $action . '_TITLE'), $messageUrl); $bodyContent .= self::getBodyContent('notification.group.join', $arrParam); $bodyContent .= self::getFooterContent(); $subject = JText::sprintf('COM_STREAM_NOTIFICATION_GROUP_' . $action . '_SUBJECT', $actor->name, $groupTable->name); self::sendMail($jConfig->mailfrom, $jConfig->fromname, $jConfig->mailfrom, $subject, $bodyContent, $bccEmail); } } } }
<a href="<?php echo $user->getURL(); ?> " class="actor-link"><?php echo $this->escape($user->name); ?> </a> </strong> <?php if (!empty($stream->group_id)) { $group = $stream->getGroup(); echo ' <span class="message-in-groups">'; if ($group->access) { echo '<i class="icon-lock"></i> '; } echo '<a href="' . StreamMessage::getGroupUri($group->id) . '">' . $this->escape($group->name) . '</a></span>'; } ?> </div> <div class="message-content-text"> <?php echo StreamMessage::format($stream->message); ?> </div> <?php echo StreamMessage::getAttachmentHTML($stream); ?> <?php
<div class="message-meta-top"> <div class="message-content-actor"> <strong><a href="<?php echo $user->getURL(); ?> " class="actor-link"><?php echo $this->escape($user->name); ?> </a></strong> <?php if (!empty($stream->group_id)) { $group = $stream->getGroup(); $group->load($stream->group_id); echo ' <span class="message-in-groups"><a href="' . StreamMessage::getGroupUri($group->id) . '">' . $this->escape($group->name) . '</a></span>'; } ?> </div> <div class="message-content-text"> <div class="message-milestone-item"> <div class="vanity-col1"> <div class="vanity-title"> <?php echo StreamMessage::format($stream->message); ?> </div> <div class="progress progress-info progress-striped" milestone="<?php echo $stream->id;