function getMessage($item, $params) { $user =& JFactory::getUser(); // first strip BBCode // remove Quoted Text to save room. $item->message = preg_replace('#\\[quote(.*?)\\[/quote\\]#si', '', $item->message); // remove Spoilers, we don't want to spoil anything... $item->message = preg_replace('#\\[spoiler(.*?)\\[/spoiler\\]#si', JText::_('MOD_ZKUNENALATEST_BBC_SPOILER'), $item->message); // remove code block... $item->message = preg_replace('#\\[code(.*?)\\[/code\\]#si', JText::_('MOD_ZKUNENALATEST_BBC_CODE'), $item->message); // remove Ebay... $item->message = preg_replace('#\\[ebay(.*?)\\[/ebay\\]#si', JText::_('MOD_ZKUNENALATEST_BBC_EBAY'), $item->message); // remove Maps, we don't want to spoil anything... $item->message = preg_replace('#\\[map(.*?)\\[/map\\]#si', JText::_('MOD_ZKUNENALATEST_BBC_MAP'), $item->message); // remove Video... $item->message = preg_replace('#\\[video(.*?)\\[/video\\]#si', JText::_('MOD_ZKUNENALATEST_BBC_VIDEO'), $item->message); // remove Image links... $item->message = preg_replace('#\\[img(.*?)\\[/img\\]#si', JText::_('MOD_ZKUNENALATEST_BBC_IMAGE'), $item->message); //Don't show hiden stuff to guests... that would be rude... if ($user->guest) { $item->message = preg_replace('#\\[hide(.*?)\\[/hide\\]#si', JText::_('MOD_ZKUNENALATEST_BBC_HIDDEN'), $item->message); } // Strip the rest of the bbCodes $item->message = preg_replace('|[[\\/\\!]*?[^\\[\\]]*?]|si', '', $item->message); return modZKunenaLatestHelper::trimString($item->message, $params->get('messageTrim', 150), " "); //return JString::substr( htmlspecialchars ( KunenaParser::stripBBCode($item->message) ), '0', $params->get ( 'messageTrim', 150 ) ); }
defined('_JEXEC') or die('Restricted access'); JHTML::_('behavior.framework', true); // CHECK if Kunena NOT installed or Kunena version is not supported if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('2.0'))) { echo JText::_('MOD_ZKUENALATEST_NOKUNENA'); return; } if (!KunenaForum::enabled()) { // Kunena online check if ($params->get('showOffline', 1)) { echo JText::_('MOD_ZKUENALATEST_OFFLINE'); } return; } require_once dirname(__FILE__) . DS . 'helper.php'; require_once KPATH_SITE . '/lib/kunena.link.class.php'; //Initialize the Kunena Framework KunenaForum::setup(); KunenaFactory::loadLanguage(); KunenaFactory::loadLanguage('com_kunena.templates'); //$KunenaConfig = KunenaFactory::getConfig (); $document =& JFactory::getDocument(); $layout = 'default'; if (!($items = modZKunenaLatestHelper::getItems($params))) { return NULL; } if ($params->get('MooFX', 1)) { $document->addScriptDeclaration(modZKunenaLatestHelper::getScript($params, $module)); } $document->addStyleDeclaration(modZKunenaLatestHelper::getExtraCss($params, $module->id)); require JModuleHelper::getLayoutPath('mod_zkunenalatest', $layout);
?> </div> <?php } ?> <?php if ($params->get('MooFX', 1)) { ?> <?php require JModuleHelper::getLayoutPath('mod_zkunenalatest', $params->get('detailLayout', 'detail_default')); ?> <?php } ?> </div> </div> <?php } ?> </div> <?php if ($params->get('allowLink', 1)) { ?> <span class="small"><?php echo modZKunenaLatestHelper::getCredit(); ?> </span> <?php } ?> </div>
* @copyright Copyright (C) 2009 - 2012 Aaron Gilbert. All rights reserved. * @license GNU/GPL, see http://www.gnu.org/licenses/gpl-2.0.html */ // no direct access defined('_JEXEC') or die('Restricted access'); ?> <div class="topcover topKboxcaption"> <?php if ($params->get('showAvatar', 1) == 1) { ?> <div class="zKlatestAvatar_left"> <?php echo modZKunenaLatestHelper::getAvatar($item->userid, $params); ?> </div> <?php } elseif ($params->get('showAvatar') == 2) { ?> <div class="zKlatestAvatar_left"> <?php echo modZKunenaLatestHelper::getTopicIcon($item, $params); ?> </div> <?php } ?> <?php echo CKunenaLink::GetProfileLink($item->userid, $item->name); ?> </div>
* @author Created on 02-Feb-2012 * @copyright Copyright (C) 2009 - 2012 Aaron Gilbert. All rights reserved. * @license GNU/GPL, see http://www.gnu.org/licenses/gpl-2.0.html */ // no direct access defined('_JEXEC') or die('Restricted access'); ?> <div class="cover Kboxcaption"> <div class="KboxInner"> <?php echo modZKunenaLatestHelper::getSubject($item, $params, true); ?> <span class="zKlatestMessage"><?php echo modZKunenaLatestHelper::getMessage($item, $params); ?> </span> <div class="Kboxbottom"> <div class="Kboxbottomleft"> <?php echo modZKunenaLatestHelper::getTopic($item, $params); ?> </div> <div class="Kboxbottomright profilelink "> <?php echo modZKunenaLatestHelper::getAuthor($item, $params); ?> </div> </div><!--bottomKbox --> </div> <!--Inner --> </div><!--Kboxcaption cover -->