/** * Translates URL to SEF friendly * * External true SEF true * http://solo.dev/joomla321/dashboard/registration/oauthDialog/facebook * External true SEF false * http://solo.dev/joomla321/index.php?option=com_easysocial&view=registration&layout=oauthDialog&client=facebook&Itemid=135 * External false SEF true * /joomla321/dashboard/registration/oauthDialog/facebook * External false SEF false * index.php?option=com_easysocial&view=registration&layout=oauthDialog&client=facebook&Itemid=135 * * @since 1.0 * @access public * @param string * @return */ public static function _($url, $xhtml = false, $view = array(), $ssl = null, $tokenize = false, $external = false, $tmpl = '', $controller = '', $sef = true) { if ($tokenize) { $url .= '&' . FD::token() . '=1'; } if (!empty($controller)) { $url = $url . '&controller=' . $controller; } // If this is an external URL, we want to fetch the full URL. if ($external) { return FRoute::external($url, $xhtml, $ssl, $tmpl, $sef); } if (!empty($controller) && $sef) { $url = JRoute::_($url, $xhtml); return $url; } // We don't want to do any sef routing here. // Only external = false and sef = false will come here // IMPORTANT: handler needs to FRoute::_() the link if ($tmpl == 'component' || $sef === false) { return $url; } return JRoute::_($url, $xhtml, $ssl); }
"><?php echo $user->getName(); ?> </a> </div> <div class="es-comment-actions " data-comments-item-actions> <div class="es-comment-actions-flyout"> <a class="es-comment-actions-toggle" href="javascript:void(0);" data-bs-toggle="dropdown"><i class="icon-es-comment-action"></i></a> <ul class="fd-nav fd-nav-stacked pull-right es-comment-actions-nav dropdown-menu"> <?php if ($this->access->allowed('comments.report')) { ?> <li> <?php echo FD::reports()->getForm('com_easysocial', 'comments', $comment->id, JText::sprintf('COM_EASYSOCIAL_COMMENTS_REPORT_ITEM_TITLE', $user->getName()), JText::_('COM_EASYSOCIAL_COMMENTS_REPORT_ITEM'), '', JText::_('COM_EASYSOCIAL_COMMENTS_REPORT_TEXT'), FRoute::external($comment->getPermalink())); ?> </li> <?php } ?> <?php if ($this->access->allowed('comments.edit') || $isAuthor && $this->access->allowed('comments.editown')) { ?> <li class="btn-comment-edit" data-comments-item-actions-edit> <a href="javascript:void(0);"><?php echo JText::_('COM_EASYSOCIAL_COMMENTS_ACTION_EDIT'); ?> </a> </li>
public function onAfterCommentSave(&$comment) { // article.user.create // article.user.update // article.user.read $allowed = array('article.user.create', 'article.user.update', 'article.user.read'); if (!in_array($comment->element, $allowed)) { return; } $segments = $comment->element; list($element, $group, $verb) = explode('.', $segments); $streamItem = FD::table('streamitem'); $state = $streamItem->load(array('context_type' => $element, 'actor_type' => $group, 'verb' => $verb, 'context_id' => $comment->uid)); if (!$state) { return; } $owner = $streamItem->actor_id; $permalink = $comment->getPermalink(); $emailOptions = array('title' => 'APP_USER_ARTICLE_EMAILS_COMMENT_ITEM_TITLE', 'template' => 'apps/user/apps/comment.item', 'permalink' => FRoute::external($permalink)); $systemOptions = array('title' => '', 'content' => $comment->comment, 'context_type' => $comment->element, 'url' => $permalink, 'actor_id' => $comment->created_by, 'uid' => $comment->uid, 'aggregate' => true); if ($comment->created_by != $owner) { FD::notify('comments.item', array($owner), $emailOptions, $systemOptions); } $recipients = $this->getStreamNotificationTargets($comment->uid, $element, $group, $verb, array(), array($owner, $comment->created_by)); $emailOptions['title'] = 'APP_USER_ARTICLE_EMAILS_COMMENT_INVOLVED_TITLE'; $emailOptions['template'] = 'apps/user/apps/comment.involved'; FD::notify('comments.involved', $recipients, $emailOptions, $systemOptions); }