/** * Renders the article. * * @return string (X)HTML. * * @global array The configuration of the plugins. */ public function render() { global $plugin_cf; $html = '<div class="realblog_show_box">' . $this->renderLinks() . $this->renderHeading() . $this->renderDate() . $this->renderStory() . $this->renderLinks() . '</div>'; // output comments in RealBlog if ($this->wantsComments() && $this->article->isCommentable()) { $realblog_comments_id = 'comments' . $this->id; $bridge = $plugin_cf['realblog']['comments_plugin'] . '_RealblogBridge'; $html .= call_user_func(array($bridge, handle), $realblog_comments_id); } return $html; }
/** * 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 . '?&realblog&admin=plugin_main' . '&action=delete_realblog&realblogID=' . $article->getId() . '&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 . '?&realblog&admin=plugin_main' . '&action=modify_realblog&realblogID=' . $article->getId() . '&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>'; }
/** * Renders the comments checkbox. * * @return string (X)HTML. * * @global array The localization of the plugins. */ protected function renderCommentsCheckbox() { global $plugin_tx; $checked = $this->article->isCommentable() ? 'checked="checked"' : ''; return '<label>' . tag('input type="checkbox" name="realblog_comments" ' . $checked) . ' <span>' . $plugin_tx['realblog']['comment_label'] . '</span></label>'; }
/** * Renders an article footer. * * @param Realblog_Article $article An article. * * @return string (X)HTML. * * @global string The URL of the current page. * @global array The configuration of the plugins. * @global array The localization of the plugins. * @global Realblog_Controller The plugin controller. */ protected function renderArticleFooter(Realblog_Article $article) { global $su, $plugin_cf, $plugin_tx, $_Realblog_controller; $t = '<div class="realblog_entry_footer">'; $pcf = $plugin_cf['realblog']; if ($pcf['comments_plugin'] && class_exists($pcf['comments_plugin'] . '_RealblogBridge') && $article->isCommentable()) { $t .= $this->renderCommentCount($article); } $url = $_Realblog_controller->url($su, $article->getTitle(), array('realblogID' => $article->getId())); $t .= '<p class="realblog_read_more">' . '<a href="' . XH_hsc($url) . '" title="' . $plugin_tx['realblog']["tooltip_view"] . '">' . $plugin_tx['realblog']['read_more'] . '</a></p>' . '</div>'; return $t; }