public function display() { static $cssadded = false; require_once (KUNENA_PATH_LIB . DS . 'kunena.link.class.php'); require_once (KUNENA_PATH_LIB . DS . 'kunena.image.class.php'); require_once (KUNENA_PATH_LIB . DS . 'kunena.timeformat.class.php'); require_once (KUNENA_PATH_FUNCS . DS . 'latestx.php'); require_once (JPATH_ADMINISTRATOR . '/components/com_kunena/libraries/html/parser.php'); $this->kunena_config = KunenaFactory::getConfig (); $this->myprofile = KunenaFactory::getUser (); // load Kunena main language file so we can leverage langaueg strings from it KunenaFactory::loadLanguage(); // Initialize session $session = KunenaFactory::getSession (); $session->updateAllowedForums(); $this->latestdo = null; if ($this->params->get ( 'choosemodel' ) != 'latest') { $this->latestdo = $this->params->get ( 'choosemodel' ); } $this->ktemplate = KunenaFactory::getTemplate(); $this->klistpost = modKunenaLatestHelper::getKunenaLatestList ( $this->params ); $this->topic_ordering = modKunenaLatestHelper::getTopicsOrdering($this->myprofile, $this->kunena_config); require (JModuleHelper::getLayoutPath ( 'mod_kunenalatest' )); }
public function __construct($params) { static $cssadded = false; require_once KUNENA_PATH_LIB . DS . 'kunena.link.class.php'; require_once KUNENA_PATH_LIB . DS . 'kunena.image.class.php'; require_once KUNENA_PATH_LIB . DS . 'kunena.timeformat.class.php'; require_once KUNENA_PATH_FUNCS . DS . 'latestx.php'; require_once JPATH_ADMINISTRATOR . '/components/com_kunena/libraries/html/parser.php'; $this->kunena_config = KunenaFactory::getConfig(); $this->myprofile = KunenaFactory::getUser(); // load Kunena main language file so we can leverage langaueg strings from it KunenaFactory::loadLanguage(); // Initialize session $session = KunenaFactory::getSession(); $session->updateAllowedForums(); $this->document = JFactory::getDocument(); $kloadcss = $params->get('kunena_load_css'); if ($cssadded == false && $kloadcss) { $this->document->addStyleSheet(JURI::root() . 'modules/mod_kunenalatest/tmpl/css/kunenalatest.css'); $cssadded = true; } $this->latestdo = null; if ($params->get('choosemodel') != 'latest') { $this->latestdo = $params->get('choosemodel'); } $this->params = $params; $this->ktemplate = KunenaFactory::getTemplate(); $this->klistpost = modKunenaLatestHelper::getKunenaLatestList($params); $this->topic_ordering = modKunenaLatestHelper::getTopicsOrdering($this->myprofile, $this->kunena_config); require JModuleHelper::getLayoutPath('mod_kunenalatest'); }
<ul class="klatest-items"> <?php if (is_array($this->klistpost) && !$this->kunena_config->board_offline) { foreach ($this->klistpost as $item) { $threadPages = ceil($item->msgcount / $this->kunena_config->messages_per_page); ?> <li class="klatest-item"> <ul class="klatest-itemdetails"> <?php if ($this->params->get('sh_topiciconoravatar') == 1) { ?> <li class="klatest-avatar"> <?php echo modKunenaLatestHelper::userAvatar($item->userid, $this->params); ?> </li> <?php } elseif ($this->params->get('sh_topiciconoravatar') == 0) { ?> <li class="klatest-topicicon"> <?php echo $this->ktemplate->getTopicIcon($item); ?> </li> <?php } ?> <li class="klatest-subject"> <?php