public function display($tpl = null) { // //Load pane behavior // jimport('joomla.html.pane'); // $slider = JPane::getInstance( 'sliders' ); //initialise variables $model = Komento::getModel('comments'); $comments = ''; $options = array('threaded' => 0, 'sort' => 'latest', 'limit' => 10); $comments = $model->getComments('all', 'all', $options); // Set Options $optionsPending['published'] = 2; $optionsPending['no_tree'] = 1; $optionsPending['no_child'] = 1; $pendings = $model->getData($optionsPending); foreach ($pendings as $pending) { $pending = Komento::getHelper('comment')->process($pending, 1); } foreach ($comments as $comment) { $comment = Komento::getHelper('comment')->process($comment, 1); } $document = JFactory::getDocument(); $user = JFactory::getUser(); $this->assignRef('slider', $slider); $this->assignRef('user', $user); $this->assignRef('document', $document); $this->assignRef('comments', $comments); $this->assignRef('pendings', $pendings); parent::display($tpl); }
public function init() { $obj = new stdClass(); $obj->config = Komento::getConfig(); $obj->konfig = Komento::getKonfig(); $obj->my = Komento::getProfile(); $obj->acl = Komento::getHelper('acl'); $obj->session = JFactory::getSession(); $this->_system = $obj; }
public function getAvatar() { // Settings that requires EasySocial scripts // easysocial_profile_popbox if (Komento::getConfig()->get('easysocial_profile_popbox')) { Komento::getHelper('easysocial')->init(); } $user = Foundry::user($this->profile->id); $avatar = $user->getAvatar(); return $avatar; }
function getSupportedComponents() { static $supportedComponents = array(); if (empty($supportedComponents)) { $components = array_values(Komento::getHelper('components')->getAvailableComponents()); foreach ($components as $component) { $supportedComponents[] = $this->_db->quote($component); } } return $supportedComponents; }
public function getVersion() { $ajax = Komento::getAjax(); $local = Komento::komentoVersion(); $remote = Komento::getHelper('Version')->getVersion(); $html = '<span class="version_outdated">' . JText::sprintf('COM_KOMENTO_VERSION_OUTDATED', $local) . '</span>'; if ((string) $local >= (string) $remote) { $html = '<span class="version_latest">' . JText::sprintf('COM_KOMENTO_VERSION_LATEST', $local) . '</span>'; } $ajax->success($html); $ajax->send(); }
function display($tpl = null) { $document = JFactory::getDocument(); $user = JFactory::getUser(); $mainframe = JFactory::getApplication(); if (Komento::joomlaVersion() >= '1.6') { if (!$user->authorise('komento.manage.comments', 'com_komento')) { $mainframe->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $mainframe->close(); } } $filter_publish = $mainframe->getUserStateFromRequest('com_komento.comments.filter_publish', 'filter_publish', '*', 'string'); $filter_component = $mainframe->getUserStateFromRequest('com_komento.comments.filter_component', 'filter_component', '*', 'string'); $search = $mainframe->getUserStateFromRequest('com_komento.comments.search', 'search', '', 'string'); $search = trim(JString::strtolower($search)); $order = $mainframe->getUserStateFromRequest('com_komento.comments.filter_order', 'filter_order', 'created', 'string'); $orderDirection = $mainframe->getUserStateFromRequest('com_komento.comments.filter_order_Dir', 'filter_order_Dir', 'DESC', 'word'); $nosearch = JRequest::getInt('nosearch', 0); $parentId = JRequest::getVar('parentid', 0); // Construct options $options['no_tree'] = 0; $options['no_search'] = $nosearch; $options['parent_id'] = $parentId; // Get data from the model $commentsModel = Komento::getModel('comments'); $comments = $commentsModel->getData($options); $pagination = $commentsModel->getPagination(); if ($search) { $parentId = 0; } $parent = ''; if ($parentId) { $parent = Komento::getTable('comments'); $parent->load($parentId); $parent = Komento::getHelper('comment')->process($parent, 1); } $this->assignRef('comments', $comments); $this->assignRef('pagination', $pagination); $this->assign('parent', $parent); $this->assign('parentid', $parentId); $this->assign('state', $this->getPublishState($filter_publish)); $this->assign('search', $search); $this->assign('order', $order); $this->assign('orderDirection', $orderDirection); $this->assign('component', $this->getComponentState($filter_component)); $this->assign('columns', Komento::getConfig('com_komento_comments_columns', false)); $this->assign('columnCount', 2); parent::display($tpl); }
public function upload() { $component = JRequest::getString( 'component' ); Komento::setCurrentComponent( $component ); $profile = Komento::getProfile(); $config = Komento::getConfig(); // acl stuffs here if( !$config->get( 'upload_enable' ) || !$profile->allow( 'upload_attachment' ) ) { echo json_encode( array( 'status' => 'notallowed' ) ); exit; } $file = JRequest::getVar( 'file', '', 'FILES', 'array' ); // check for file size if runtime HTML4 is used if( $file['size'] > ( $config->get( 'upload_max_size' ) * 1024 * 1024 ) ) { echo json_encode( array( 'status' => 'exceedfilesize' ) ); exit; } // $file['name'] = filename // $file['type'] = mime // $file['tmp_name'] = temporary source // $file['size'] = size $id = Komento::getHelper( 'file' )->upload( $file ); $result = array( 'status' => 1, 'id' => 0 ); if( $id === false ) { $result['status'] = 0; } else { $result['id'] = $id; } // do not return // echo json string instead and exit echo json_encode( $result ); exit; }
public function getVersion() { $ajax = Komento::getAjax(); $local = Komento::komentoVersion(); $remote = Komento::getHelper('Version')->getVersion(); // Test build only since build will always be incremented regardless of version $localVersion = explode('.', $local); $localBuild = $localVersion[2]; $remoteVersion = explode('.', $remote); $build = $remoteVersion[2]; $html = '<span class="version_outdated">' . JText::sprintf('COM_KOMENTO_VERSION_OUTDATED', $local) . '</span>'; if ($localBuild >= $build) { $html = '<span class="version_latest">' . JText::sprintf('COM_KOMENTO_VERSION_LATEST', $local) . '</span>'; } $ajax->success($html); $ajax->send(); }
public function __construct() { $konfig = Komento::getKonfig(); $config = Komento::getConfig(); // @legacy: If environment is set to production, change to static. $environment = $konfig->get('komento_environment'); if ($environment=='production') { $environment='static'; } $this->fullName = 'Komento'; $this->shortName = 'kmt'; $this->environment = $environment; $this->mode = $konfig->get('komento_mode'); $this->version = (string) Komento::getHelper( 'Version' )->getLocalVersion(); $this->baseUrl = Komento::getHelper( 'Document' )->getBaseUrl(); $this->token = Komento::_( 'getToken' ); $newConfig = clone $config->toObject(); $newKonfig = clone $konfig->toObject(); unset( $newConfig->antispam_recaptcha_private_key ); unset( $newConfig->antispam_recaptcha_public_key ); unset( $newConfig->antispam_akismet_key ); unset( $newConfig->layout_phpbb_path ); unset( $newConfig->layout_phpbb_url ); unset( $newKonfig->layout_phpbb_path ); unset( $newKonfig->layout_phpbb_url ); $this->options = array( "responsive" => (bool) $config->get('enable_responsive'), "jversion" => Komento::joomlaVersion(), "spinner" => JURI::root() . 'media/com_komento/images/loader.gif', "view" => JRequest::getString( 'view', '' ), "guest" => Komento::getProfile()->guest ? 1 : 0, "config" => $newConfig, "konfig" => $newKonfig, "acl" => Komento::getACL(), "element" => new stdClass() ); parent::__construct(); }
public static function loadComments( $id, $component, $options = array() ) { $commentsModel = Komento::getModel( 'comments' ); $comments = $commentsModel->getComments( $component, $id, $options ); $commentsModel = Komento::getModel( 'comments' ); $commentCount = $commentsModel->getCount( $component, $id ); if( array_key_exists('raw', $options) ) { return $comments; } // @task: load necessary css and javascript files. Komento::getHelper( 'Document' )->loadHeaders(); $application = Komento::loadApplication( $component ); if( $application->load( $id ) === false ) { $application = Komento::getErrorApplication( $component, $id ); } $theme = Komento::getTheme(); $theme->set( 'component', $component ); $theme->set( 'cid', $id ); $theme->set( 'comments', $comments ); $theme->set( 'options', $options ); $theme->set( 'componentHelper', $application ); $theme->set( 'application', $application ); $theme->set( 'commentCount', $commentCount ); $contentLink = $application->getContentPermalink(); $theme->set( 'contentLink', $contentLink ); $html = $theme->fetch('comment/box.php'); /* [KOMENTO_POWERED_BY_LINK] */ // free version powered by link append (for reference only) // $html .= '<div style="text-align: center; padding: 20px 0;"><a href="http://stackideas.com">' . JText::_( 'COM_KOMENTO_POWERED_BY_KOMENTO' ) . '</a></div>'; return $html; }
function display($tpl = null) { //initialise variables $document = JFactory::getDocument(); $user = JFactory::getUser(); $mainframe = JFactory::getApplication(); $components = array(); $result = Komento::getHelper('components')->getAvailableComponents(); if (Komento::joomlaVersion() >= '1.6') { if (!$user->authorise('komento.manage.comments', 'com_komento')) { $mainframe->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $mainframe->close(); } } //Load pane behavior jimport('joomla.html.pane'); $commentId = JRequest::getVar('commentid', ''); $comment = Komento::getTable('Comments'); $comment->load($commentId); $this->comment = $comment; // Set default values for new entries. if (empty($comment->created)) { Komento::import('helper', 'date'); $date = KomentoDateHelper::getDate(); $now = KomentoDateHelper::toFormat($date); $comment->created = $now; $comment->published = true; } // Set all non published comments to unpublished if ($comment->published != 1) { $comment->published = 0; } // @task: Translate each component with human readable name. foreach ($result as $item) { $components[] = JHTML::_('select.option', $item, Komento::loadApplication($item)->getComponentName()); } $this->assignRef('comment', $comment); $this->assignRef('components', $components); parent::display($tpl); }
function mark() { $type = JRequest::getVar('type'); $id = JRequest::getInt('id'); $userId = JFactory::getUser()->id; $ajax = Komento::getHelper('Ajax'); $commentObj = Komento::getComment( $id ); $commentObj->load( $id ); $commentObj->flag = $type; $commentObj->flag_by = $userId; if( !$commentObj->save() ) { $ajax->fail(); $ajax->send(); } $ajax->success(); $ajax->send(); }
public function display($tpl = null) { $user = JFactory::getUser(); $mainframe = JFactory::getApplication(); if (Komento::joomlaVersion() >= '1.6') { if (!$user->authorise('komento.manage.integrations', 'com_komento')) { $mainframe->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $mainframe->close(); } } // This is necessary for tabbing. jimport('joomla.html.pane'); $app = JFactory::getApplication(); // $component = $app->getUserStateFromRequest( 'com_komento.integrations.component' , 'component' , 'com_content' ); $component = JRequest::getString('component', ''); if ($component == '') { $components = Komento::getHelper('components')->getAvailableComponents(); $this->assignRef('components', $components); parent::display('component'); } else { self::$extension = $component; $config = Komento::getConfig($component); $componentObj = Komento::loadApplication($component); $version = Komento::joomlaVersion(); // Get a list of components $components = array(); $result = Komento::getHelper('components')->getAvailableComponents(); // @task: Translate each component with human readable name. foreach ($result as $item) { $components[$item] = Komento::loadApplication($item)->getComponentName(); } $this->assignRef('config', $config); $this->assignRef('joomlaVersion', $version); $this->assignRef('component', $component); $this->assignRef('components', $components); $this->assignRef('componentObj', $componentObj); parent::display($tpl); } }
function stick($comments = array(), $stick = 1) { if (!is_array($comments)) { $comments = array($comments); } if (count($comments) > 0) { $allComments = implode(',', $comments); $query = 'UPDATE ' . $this->db->namequote('#__komento_comments'); $query .= ' SET ' . $this->db->namequote('sticked') . ' = ' . $this->db->quote($stick); $query .= ' WHERE ' . $this->db->namequote('id') . ' IN (' . $allComments . ')'; $this->db->setQuery($query); if (!$this->db->query()) { $this->setError($this->db->getErrorMsg()); return false; } foreach ($comments as $comment) { // process all activities if ($stick) { $activity = Komento::getHelper('activity')->process('stick', $comment); } else { $activity = Komento::getHelper('activity')->process('unstick', $comment); } } return true; } return false; }
* 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('Restricted access'); ?> <div class="row-fluid"> <div class="span12"> <div class="span6"> <fieldset class="adminform"> <legend><?php echo JText::_('COM_KOMENTO_SETTINGS_ACTIVITIES_DISCUSS'); ?> </legend> <?php if (Komento::getHelper('components')->isInstalled('com_easydiscuss')) { ?> <p><?php echo JText::_('COM_KOMENTO_SETTINGS_ACTIVITIES_DISCUSS_INSTRUCTIONS'); ?> </p> <table class="admintable" cellspacing="1"> <tbody> <!-- Enable Discuss Points --> <?php echo $this->renderSetting('COM_KOMENTO_SETTINGS_ACTIVITIES_ENABLE_DISCUSS_POINTS', 'enable_discuss_points'); ?> <!-- Enable Discuss Log --> <?php echo $this->renderSetting('COM_KOMENTO_SETTINGS_ACTIVITIES_ENABLE_DISCUSS_LOG', 'enable_discuss_log');
public static function escape($s) { $code = $s[3]; $code = str_replace("[", "[", $code); $code = str_replace("]", "]", $code); $brush = isset($s[2]) && !empty($s[2]) ? $s[2] : 'xml'; $code = html_entity_decode($code); $code = Komento::getHelper('String')->escape($code); if ($brush != '') { $result = '<pre><code class="language-' . htmlspecialchars($brush) . '">' . $code . '</code></pre>'; } else { $result = '<pre><code>' . $code . '</code></pre>'; } return $result; }
<?php /** * @package Komento * @copyright Copyright (C) 2012 Stack Ideas Private Limited. All rights reserved. * @license GNU/GPL, see LICENSE.php * Komento 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('Restricted access'); $componentHelper = Komento::getHelper('components'); if ($componentHelper->isInstalled('com_zoo')) { $zooObj = Komento::loadApplication('com_zoo'); $categories = $zooObj->getCategories(); $selection = $this->renderMultilist('category', '', $categories); ?> <table id="migrator-zoo" migrator-type="zoo" migration-type="article" class="noshow migratorTable"> <tr> <td width="50%" valign="top"> <fieldset class="adminform"> <legend><?php echo JText::_('COM_KOMENTO_MIGRATORS_LAYOUT_MAIN'); ?> </legend> <table class="migrator-options admintable"> <tr> <td class="key"><span><?php
<?php /** * @package Komento * @copyright Copyright (C) 2012 Stack Ideas Private Limited. All rights reserved. * @license GNU/GPL, see LICENSE.php * Komento 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. */ // No direct access defined('_JEXEC') or die('Restricted access'); require_once( JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . 'bootstrap.php' ); // process ajax calls here Komento::getHelper( 'Ajax' )->process(); jimport('joomla.application.component.controller'); require_once( KOMENTO_ROOT . DIRECTORY_SEPARATOR . 'controller.php' ); $task = JRequest::getCmd('task', 'display', 'GET'); $controllerName = JRequest::getCmd( 'controller' , '' ); $controller = KomentoController::getInstance( $controllerName ); $controller->execute( $task ); $controller->redirect();
public static function getIP() { return Komento::getHelper('ip')->getIP(); }
* other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ defined('_JEXEC') or die('Restricted access'); ?> <div class="kmt-mod modKomentoComments kmt-mod-comments<?php echo $params->get('moduleclass_sfx'); ?> "> <?php foreach ($comments as $row) { // initialise current row component Komento::setCurrentComponent($row->component); $config = Komento::getConfig(); $row = Komento::getHelper('comment')->process($row); //convert <br /> to \n $row->comment = str_replace("<br />", "\n", $row->comment); $row->comment = strip_tags($row->comment); // trim comment length if (JString::strlen($row->comment) > $params->get('maxcommentlength')) { $row->comment = JString::substr($row->comment, 0, $params->get('maxcommentlength')) . '...'; } // convert back \n to <br /> $row->comment = str_replace("\n", "<br/>", $row->comment); $row->comment = str_replace("<br/><br/>", "<br/>", $row->comment); // trim title length if (JString::strlen($row->contenttitle) > $params->get('maxtitlelength')) { $row->contenttitle = JString::substr($row->contenttitle, 0, $params->get('maxtitlelength')) . '...'; } ?>
<input type="hidden" name="return" value="<?php echo base64_encode(JRequest::getURI()); ?> " /> <?php } ?> <?php echo JHTML::_('form.token'); ?> </form> <div class="kmt-login-footer"> <a href="<?php echo Komento::getHelper('login')->getRegistrationLink(); ?> " class="kmt-login-link link-register"><i></i><?php echo JText::_('COM_KOMENTO_LOGIN_REGISTER'); ?> </a> · <a href="<?php echo Komento::getHelper('login')->getResetPasswordLink(); ?> " class="kmt-login-link link-forgot"><i></i><?php echo JText::_('COM_KOMENTO_LOGIN_FORGOT_PASSWORD'); ?> </a> </div> </div>
function getColumns() { $params = JRequest::getVar('params'); $columns = Komento::getHelper('database')->getColumns($params['tableName']); $html = ''; foreach ($columns as $column) { $html .= '<option value="' . $column . '">' . $column . '</option>'; } $this->ajax->success($html); $this->ajax->send(); }
<div id="submenu-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <div class="kmt-component-select"> <?php $app = JFactory::getApplication(); $component = $app->getUserStateFromRequest('com_komento.integrations.component', 'component', 'com_content'); // Get a list of components $components = array(); $result = Komento::getHelper('components')->getAvailableComponents(); // @task: Translate each component with human readable name. foreach ($result as $item) { $components[] = JHTML::_('select.option', $item, Komento::loadApplication($item)->getComponentName()); } echo JText::_('COM_KOMENTO_SETTINGS_SELECT_COMPONENT') . ': ' . JHTML::_('select.genericlist', $components, 'test', 'class="inputbox" onchange="changeComponent(this.value)"', 'value', 'text', $component); ?> </div> <div class="submenu-box"> <div class="submenu-pad"> <ul id="submenu" class="integrations"> <?php if (Komento::joomlaVersion() <= '1.5') { ?> <li><a id="home" class="goback" href="<?php
public function approveComment() { $id = JRequest::getInt('commentId', ''); $comment = Komento::getComment($id); Komento::setCurrentComponent($comment->component); $acl = Komento::getHelper('acl'); $type = 'message'; $message = ''; if (!$acl->allow('publish', $comment)) { $type = 'error'; $message = JText::_('COM_KOMENTO_NOT_ALLOWED'); $this->setRedirect('index.php?option=com_komento', $message, $type); return false; } $model = Komento::getModel('comments'); if ($model->publish($id)) { $message = JText::_('COM_KOMENTO_COMMENTS_COMMENT_PUBLISHED'); } else { $message = JText::_('COM_KOMENTO_COMMENTS_COMMENT_PUBLISH_ERROR'); $type = 'error'; } $this->setRedirect('index.php?option=com_komento', $message, $type); return true; }
* 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('Restricted access'); ?> <table class="noshow"> <tr> <td width="50%" valign="top"> <fieldset class="adminform"> <legend><?php echo JText::_('COM_KOMENTO_SETTINGS_ACTIVITIES_JOMSOCIAL'); ?> </legend> <?php if (Komento::getHelper('components')->isInstalled('com_community')) { ?> <table class="admintable" cellspacing="1"> <tbody> <!-- Post comments to Jomsocial --> <?php echo $this->renderSetting('COM_KOMENTO_SETTINGS_ACTIVITIES_JOMSOCIAL_ENABLE_COMMENT', 'jomsocial_enable_comment'); ?> <!-- Post replies to Jomsocial --> <?php echo $this->renderSetting('COM_KOMENTO_SETTINGS_ACTIVITIES_JOMSOCIAL_ENABLE_REPLY', 'jomsocial_enable_reply'); ?> <!-- Post likes to Jomsocial -->
?> <!-- New like --> <?php echo $this->renderSetting('COM_KOMENTO_SETTINGS_NOTIFICATION_EASYSOCIAL_EVENT_NEW_LIKE', 'notification_es_event_new_like'); ?> </div> </fieldset> <?php } ?> </div> <div class="col-md-6"> <?php if (Komento::getHelper('components')->isInstalled('com_easysocial')) { ?> <fieldset class="panel form-horizontal"> <div class="panel-head"><?php echo JText::_('COM_KOMENTO_SETTINGS_NOTIFICATION_RECIPIENTS'); ?> </div> <div class="panel-body"> <!-- Notify Author --> <?php echo $this->renderSetting('COM_KOMENTO_SETTINGS_NOTIFICATION_EASYSOCIAL_TO_AUTHOR', 'notification_es_to_author'); ?> <!-- Notify Participants --> <?php echo $this->renderSetting('COM_KOMENTO_SETTINGS_NOTIFICATION_EASYSOCIAL_TO_PARTICIPANT', 'notification_es_to_participant');
/** * @package Komento * @copyright Copyright (C) 2012 Stack Ideas Private Limited. All rights reserved. * @license GNU/GPL, see LICENSE.php * Komento 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( 'Restricted access' ); if( $system->config->get( 'enable_info' ) && $row->modified_by ) { ?> <span class="commentInfo kmt-info"> <?php $modified = $row->modified; if( $system->config->get( 'enable_lapsed_time' ) ) { $modified = Komento::getHelper( 'date' )->getLapsedTime( $row->modified ); } ?> <?php echo JText::sprintf( 'COM_KOMENTO_COMMENT_EDITTED_BY', $modified, Komento::getProfile( $row->modified_by )->getName() ); ?> <!-- Extended data for schema purposes --> <?php if( $system->konfig->get( 'enable_schema' ) ) { ?> <span class="hidden" itemprop="editor" itemscope itemtype="http://schema.org/Person"> <span itemprop="name"><?php echo Komento::getProfile( $row->modified_by )->getName(); ?></span> </span> <time class="hidden" itemprop="dateModified" datetime="<?php echo $this->formatDate( 'c', $row->modified ); ?>"></time> <?php } ?> </span> <?php } else { ?> <span class="commentInfo kmt-info hidden"></span> <?php }
<?php /** * @package Komento * @copyright Copyright (C) 2010 - 2015 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * Komento 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('Restricted access'); $this->row = Komento::getHelper('comment')->process($this->row, 1); ?> <tr id="<?php echo 'kmt-' . $this->row->id; ?> " class="<?php echo 'row' . $this->k; ?> kmt-row" childs="<?php echo $this->row->childs; ?> " depth="<?php echo $this->row->depth; ?> " parentid="<?php echo $this->row->parent_id; ?>
public function addJomSocialActivityLike( $comment, $uid ) { if( !is_object( $comment ) ) { $comment = Komento::getComment( $comment ); } $comment = Komento::getHelper( 'comment' )->process( $comment ); $comment->comment = JString::substr( strip_tags( $comment->comment ), 0 , Komento::getConfig()->get( 'jomsocial_comment_length' ) ); $options = array( 'title' => JText::sprintf('COM_KOMENTO_JOMSOCIAL_ACTIVITY_LIKED_COMMENT', $comment->permalink, $comment->pagelink, $comment->extension->getContentTitle() ), 'content' => $comment->comment, 'cmd' => 'komento.comment.like', // 'app' => $comment->component, // due to js 2.8 'app' => 'komento', 'cid' => $comment->cid, 'actor' => $uid, 'comment_id' => $comment->id, 'comment_type' => 'com_komento.comments', 'like_id' => $comment->id, 'like_type' => 'com_komento.likes' ); self::addJomSocialActivity( $options ); }
public function komento() { $komentoAPI = JPATH_ROOT . '/components/com_komento/configuration.php'; if (!JFile::exists($komentoAPI)) { return ''; } require_once $komentoAPI; require_once JPATH_ROOT . '/components/com_komento/views/profile/view.html.php'; Komento::getHelper('document')->loadHeaders(); $view = new KomentoViewProfile(); $view->display(); }