function _HTML_commentLink(&$commentSet) { $commentSet->execute(); $renderer = AMP_get_renderer(); $text = $commentSet->RecordCount() ? $commentSet->RecordCount() . ' ' . AMP_pluralize(AMP_TEXT_COMMENT) : AMP_TEXT_NO_COMMENTS; $comments = $renderer->link(AMP_Url_AddAnchor($this->_article->getURL(), 'comments'), $text); $sections_output = ''; $sections = $this->render_sections(); if ($sections) { $sections_output = AMP_TEXT_POSTED_IN . $renderer->space() . $sections; } return $renderer->div($sections_output . $renderer->separator() . $comments, array('align' => 'right')) . $renderer->newline() . $renderer->hr() . $renderer->newline(); }
function _listLink($options = array()) { if (!isset($options['_linked_uid'])) { return false; } $comment_count_lookup = FormLookup::instance('commentCounts'); $comment_count = isset($comment_count_lookup[$options['_linked_uid']]) ? $comment_count_lookup[$options['_linked_uid']] : 0; $link_text = ($comment_count ? $comment_count : AMP_TEXT_NO) . ' ' . AMP_pluralize(AMP_TEXT_COMMENT); $renderer =& $this->_get_renderer(); //current comment count $comments = $renderer->link(AMP_Url_AddAnchor(AMP_Url_AddVars(PHP_SELF_QUERY(), array('uid=' . $options['_linked_uid'])), 'comments'), $link_text); //add comment link $comments .= $renderer->separator() . $renderer->link(AMP_Url_AddVars(AMP_CONTENT_URL_COMMENT_ADD, array('userdata_id=' . $options['_linked_uid'])), AMP_TEXT_ADD); return $comments . $renderer->newline(2); }
function _render_column_footer() { static $arrow_link = ''; if ($this->is_last_column()) { return; } if ($arrow_link) { return $arrow_link; } if (AMP_ICON_COLUMN_FOOTER) { require_once "AMP/Content/Image.inc.php"; #$image = new Content_Image( AMP_ICON_COLUMN_FOOTER ); $icon_value = $this->_renderer->image(AMP_image_url(AMP_ICON_COLUMN_FOOTER, AMP_IMAGE_CLASS_ORIGINAL), array('align' => 'right', 'border' => '0')); } else { $icon_value = '↑'; } $arrow_link = $this->_renderer->newline() . $this->_renderer->link(AMP_Url_AddAnchor($_SERVER['REQUEST_URI'], 'column_top'), $icon_value, array('alt' => 'Next Column', 'border' => 0, 'style' => 'float:right;')); return $arrow_link; }
function render_comments($source) { $comments = AMP_lookup('comments_live_by_article', $source->id); $text = empty($comments) ? AMP_TEXT_NO_COMMENTS : count($comments) . ' ' . AMP_pluralize(AMP_TEXT_COMMENT); return $this->_renderer->link(AMP_Url_AddAnchor($source->getURL(), 'comments'), $text); }