Esempio n. 1
0
 /**
  * Returns whether a record belongs to a certain category.
  *
  * @param string           $category A category.
  * @param Realblog_Article $article  An article.
  *
  * @return bool
  */
 protected function belongsToCategory($category, $article)
 {
     return strpos($article->getTeaser(), '|' . $category . '|') !== false || strpos($article->getBody(), '|' . $category . '|') !== false || $category == 'all';
 }
Esempio n. 2
0
 /**
  * Renders the story (body).
  *
  * @return string (X)HTML.
  *
  * @global array The localization of the plugins.
  */
 protected function renderStory()
 {
     global $plugin_tx;
     return '<h4>' . $plugin_tx['realblog']['story_label'] . '</h4>' . '<textarea class="realblog_story_field"' . ' name="realblog_story" id="realblog_story" rows="30" cols="80">' . XH_hsc($this->article->getBody()) . '</textarea>';
 }
Esempio n. 3
0
 /**
  * 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>';
 }
Esempio n. 4
0
 /**
  * Renders an article heading.
  *
  * @param Realblog_Article $article An article.
  *
  * @return string (X)HTML.
  *
  * @global string              The URL of the current page.
  * @global array               The localization of the plugins.
  * @global Realblog_Controller The plugin controller.
  */
 protected function renderArticleHeading(Realblog_Article $article)
 {
     global $su, $plugin_tx, $_Realblog_controller;
     $t = '<h4>';
     $url = $_Realblog_controller->url($su, $article->getTitle(), array('realblogID' => $article->getId()));
     if ($article->getBody() != '' || XH_ADM) {
         $t .= '<a href="' . XH_hsc($url) . '" title="' . $plugin_tx['realblog']["tooltip_view"] . '">';
     }
     $t .= $article->getTitle();
     if ($article->getBody() != '' || XH_ADM) {
         $t .= '</a>';
     }
     $t .= '</h4>' . "\n";
     return $t;
 }