public function hookDisplayPreFooter($params) { if (Module::isInstalled('smartblog') != 1) { $this->smarty->assign(array('smartmodname' => $this->name)); return $this->display(__FILE__, 'views/templates/front/install_required.tpl'); } else { if (!$this->isCached('smartblog_latest_news.tpl', $this->getCacheId())) { $view_data['posts'] = SmartBlogPost::GetPostLatestHome(4); $this->smarty->assign(array('view_data' => $view_data['posts'])); } return $this->display(__FILE__, 'views/templates/front/smartblog_latest_news.tpl', $this->getCacheId()); } }
public function smartbloghomelatestnewsHookDisplayHome($params) { /* Server Params */ $protocol_link = Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://'; $protocol_content = (isset($useSSL) and $useSSL and Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://'; $smartbloglink = new SmartBlogLink($protocol_link, $protocol_content); if (!$this->isCached('plugins/smartblog_latest_news.tpl')) { $view_data['posts'] = SmartBlogPost::GetPostLatestHome(Configuration::get('smartshowhomepost')); $this->smarty->assign(array('smartbloglink' => $smartbloglink, 'view_data' => $view_data['posts'])); } return $this->display(__FILE__, 'views/templates/front/plugins/smartblog_latest_news.tpl'); }