Ejemplo n.º 1
0
 public function templateShow()
 {
     if (false === ($news = GWF_News::getNewsQuick($this->module->getNewsPerPage(), $this->catid, $this->page, GWF_Language::getCurrentID()))) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     $date = count($news) > 0 ? $news[0]['news_date'] : GWF_Settings::getSetting('gwf_site_birthday') . '090000';
     $date = GWF_Time::displayDate($date);
     GWF_Website::setPageTitle($this->module->lang('pt_news', array($date)));
     GWF_Website::setMetaTags($this->module->lang('mt_news', array($date)));
     GWF_Website::setMetaDescr($this->module->lang('md_news', array($this->page, $this->nPages)));
     //		$mod_forum = GWF_Module::getModule('Forum', true);
     $tVars = array('news' => $news, 'titles' => GWF_News::getTitlesQuick($this->catid, GWF_Language::getCurrentID()), 'cats' => GWF_News::getCategories(), 'catid' => $this->catid, 'cat' => GWF_HTML::display($this->catTitle), 'page_menu' => $this->getPageMenu(), 'page' => $this->page, 'can_sign' => $this->module->canSignNewsletter(GWF_Session::getUser()), 'href_sign_news' => $this->module->hrefSignNewsletter(), 'may_add' => GWF_User::isAdminS() || GWF_User::isStaffS(), 'href_add' => $this->module->hrefAddNews());
     return $this->module->templatePHP('show.php', $tVars);
 }