Example #1
0
 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');
 }
Example #2
0
	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' ));
	}