/** * Returns the meta description for an article. * * @param Realblog_Article $article An article. * * @return string */ protected function getDescription(Realblog_Article $article) { return utf8_substr(html_entity_decode(strip_tags($article->getTeaser()), ENT_COMPAT, 'UTF-8'), 0, 150); }
/** * Renders the headline (teaser). * * @return string (X)HTML. * * @global array The localization of the plugins. */ protected function renderHeadline() { global $plugin_tx; return '<h4>' . $plugin_tx['realblog']['headline_label'] . '</h4>' . '<p>' . $plugin_tx['realblog']['label_template'] . tag('input type="text" value="{{{rbCat(\'|category1|category2|\');}}}"' . ' readonly="readonly" onclick="this.select()"' . ' style="margin-left: 0.5em"') . '</p>' . '<textarea class="realblog_headline_field" name="realblog_headline"' . ' id="realblog_headline" rows="6" cols="60">' . XH_hsc($this->article->getTeaser()) . '</textarea>'; }
/** * 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; }