Ejemplo n.º 1
0
 /**
  * Renders a row.
  *
  * @param Realblog_Article $article An article.
  *
  * @return string (X)HTML.
  *
  * @global string The script name.
  * @global array  The localization of the plugins.
  * @global Realblog_Controller The plugin controller.
  */
 protected function renderRow(Realblog_Article $article)
 {
     global $sn, $plugin_tx, $_Realblog_controller;
     $page = $_Realblog_controller->getPage();
     return '<tr>' . '<td class="realblog_table_line">' . tag('input type="checkbox" name="realblogtopics[]"' . ' value="' . $article->getId() . '"') . '</td>' . '<td class="realblog_table_line">' . '<a href="' . $sn . '?&amp;realblog&amp;admin=plugin_main' . '&amp;action=delete_realblog&amp;realblogID=' . $article->getId() . '&amp;page=' . $page . '">' . tag('img src="' . $this->imageFolder . 'delete.png"' . ' title="' . $plugin_tx['realblog']['tooltip_delete'] . '" alt="' . $plugin_tx['realblog']['tooltip_delete'] . '"') . '</a></td>' . '<td class="realblog_table_line">' . '<a href="' . $sn . '?&amp;realblog&amp;admin=plugin_main' . '&amp;action=modify_realblog&amp;realblogID=' . $article->getId() . '&amp;page=' . $page . '">' . tag('img src="' . $this->imageFolder . 'edit.png"' . ' title="' . $plugin_tx['realblog']['tooltip_modify'] . '" alt="' . $plugin_tx['realblog']['tooltip_modify'] . '"') . '</a></td>' . '<td class="realblog_table_line">' . $article->getId() . '</td>' . '<td class="realblog_table_line">' . date($plugin_tx['realblog']['date_format'], $article->getDate()) . '</td>' . '<td class="realblog_table_line">' . $article->getStatus() . '</td>' . '<td class="realblog_table_line">' . $article->isFeedable() . '</td>' . '<td class="realblog_table_line">' . $article->isCommentable() . '</td>' . '</tr>' . '<tr><td colspan="8" class="realblog_table_title">' . $article->getTitle() . '</td></tr>';
 }
Ejemplo n.º 2
0
 /**
  * Renders a link to an article.
  *
  * @param Realblog_Article $article An article.
  * @param string           $pageURL The URL of the blog page.
  *
  * @return string (X)HTML.
  *
  * @global array The localization of the plugins.
  */
 protected function renderArticleLink($article, $pageURL)
 {
     global $plugin_tx;
     $url = $this->url($pageURL, $article->getTitle(), array('realblogID' => $article->getId()));
     return '<div class="realblog_tpl_show_date">' . date($plugin_tx['realblog']['date_format'], $article->getDate()) . '</div>' . '<div class="realblog_tpl_show_title">' . '<a href="' . XH_hsc($url) . '">' . $article->getTitle() . '</a>' . '</div>';
 }
Ejemplo n.º 3
0
 /**
  * Renders the article administration view.
  *
  * @return string (X)HTML.
  *
  * @global array The paths of system files and folders.
  * @global string The script name.
  * @global array  The localization of the plugins.
  * @global string The title of the page.
  * @global string The (X)HTML fragment to insert before the closing body tag.
  */
 public function render()
 {
     global $pth, $sn, $plugin_tx, $title, $bjs;
     $bjs .= '<script type="text/javascript" src="' . $pth['folder']['plugins'] . 'realblog/realblog.js"></script>';
     return '<div class="realblog_fields_block"><h1>Realblog &ndash; ' . $title . '</h1>' . '<form name="realblog" method="post" action="' . $sn . '?&amp;' . 'realblog' . '&amp;admin=plugin_main">' . $this->renderHiddenFields() . '<table>' . '<tr><td><span class="realblog_date_label">' . $plugin_tx['realblog']['date_label'] . '</span></td>' . '<td><span class="realblog_date_label">' . $plugin_tx['realblog']['startdate_label'] . '</span></td>' . '<td><span class="realblog_date_label">' . $plugin_tx['realblog']['enddate_label'] . '</span></td></tr><tr>' . '<td>' . $this->renderDate() . '</td>' . '<td>' . $this->renderPublishingDate() . '</td>' . '<td>' . $this->renderArchiveDate() . '</td></tr><tr>' . '<td><span class="realblog_date_label">' . $plugin_tx['realblog']['label_status'] . '</span></td>' . '<td></td><td></td></tr><tr>' . '<td>' . $this->renderStatusSelect() . '</td>' . '<td>' . $this->renderCommentsCheckbox() . '</td>' . '<td>' . $this->renderFeedCheckbox() . '</td></tr>' . '</table>' . '<h4>' . $plugin_tx['realblog']['title_label'] . '</h4>' . tag('input type="text" value="' . $this->article->getTitle() . '" name="realblog_title" size="70"') . $this->renderHeadline() . $this->renderStory() . $this->renderSubmitButtons() . '</form>' . '</div>';
 }
Ejemplo n.º 4
0
 /**
  * Renders the article heading.
  *
  * @return string (X)HTML.
  *
  * @todo Heed $cf[menu][levels].
  */
 protected function renderHeading()
 {
     return '<h4>' . $this->article->getTitle() . '</h4>';
 }
Ejemplo n.º 5
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;
 }