Beispiel #1
0
 public function getNewsIntro()
 {
     $news_items = NewsModel::getLatestNews(NEWS_ITEMS);
     $random_shot = ScreenshotsModel::getRandomScreenshot();
     $this->addCSSFiles(array('intro.css', 'news.css', '../javascripts/slimbox/css/slimbox2.css'));
     $this->addJSFiles(array('jquery-1.3.2.min.js', 'slimbox/js/slimbox2.js', 'introduction.js'));
     return $this->renderPage(array('title' => 'Home', 'content_title' => 'Latest Developments', 'show_intro' => true, 'news_items' => $news_items, 'news_archive_link' => true, 'random_shot' => $random_shot), $this->_template);
 }
Beispiel #2
0
 public function index()
 {
     $feed = $_GET['f'];
     if ($feed == 'atom') {
         $template = $this->_template_atom;
     } else {
         $template = $this->_template_rss;
     }
     $news_items = NewsModel::getLatestNews(NEWS_ITEMS, true);
     header('Content-Type: text/xml; charset=UTF-8');
     print $this->fetch($template, array('news' => $news_items));
     return True;
 }