/** * Renders the feed items. * * @return string XML. * * @global string The script name. * @global array The localization of the plugins. * @global Realblog_Controller The plugin controller. */ protected function renderItems() { global $sn, $plugin_tx, $_Realblog_controller; $xml = ''; foreach ($this->articles as $article) { $url = CMSIMPLE_URL . substr($_Realblog_controller->url($plugin_tx['realblog']["rss_page"], $article->getTitle(), array('realblogID' => $article->getId())), strlen($sn)); $xml .= '<item>' . '<title>' . XH_hsc($article->getTitle()) . '</title>' . '<link>' . XH_hsc($url) . '</link>' . '<description>' . XH_hsc(evaluate_scripting($article->getTeaser())) . '</description>' . '<pubDate>' . date('r', $article->getDate()) . '</pubDate>' . '</item>'; } return $xml; }
/** * Renders the article story. * * @return string (X)HTML. */ protected function renderStory() { $story = $this->article->getBody() != '' ? $this->article->getBody() : $this->article->getTeaser(); return '<div class="realblog_show_story_entry">' . evaluate_scripting($story) . '</div>'; }
/** * Renders an article preview. * * @param Realblog_Article $article An article. * * @return string (X)HTML. * * @global array The configuration of the plugins. * @global Realblog_Controller The plugin controller. */ protected function renderArticlePreview(Realblog_Article $article) { global $plugin_cf, $_Realblog_controller; $t = ''; if (strstr($article->getTeaser(), '|' . $this->categories . '|') || strstr($article->getBody(), '|' . $this->categories . '|') || $this->categories == 'all' || $_Realblog_controller->getPgParameter('realblog_search') && strstr($article->getTeaser(), '|' . $this->categories . '|')) { if ($plugin_cf['realblog']['teaser_multicolumns']) { $t .= '<div class="realblog_single_entry_preview">' . '<div class="realblog_single_entry_preview_in">'; } $t .= $this->renderArticleHeading($article); $t .= $this->renderArticleDate($article); $t .= "\n" . '<div class="realblog_show_story">' . "\n"; $t .= evaluate_scripting($article->getTeaser()); if ($plugin_cf['realblog']['show_read_more_link'] && $article->getBody() != '') { $t .= $this->renderArticleFooter($article); } $t .= '<div style="clear: both;"></div>' . "\n" . '</div>' . "\n"; if ($plugin_cf['realblog']['teaser_multicolumns']) { $t .= '</div>' . "\n" . '</div>' . "\n"; } } return $t; }