/** * Get the link to comments. * * @param integer $iId * @param string $sTable * @return void */ public static function link($iId, $sTable) { $oCommentModel = new CommentCoreModel(); $iCommentNumber = $oCommentModel->total($iId, $sTable); unset($oCommentModel); echo '<p><a href="', Uri::get('comment', 'comment', 'add', "{$sTable},{$iId}"), '">', t('Add a comment'), '</a>'; if ($iCommentNumber > 0) { $sCommentTxt = nt('Read Comment', 'Read the Comments', $iCommentNumber); echo ' - ', t('OR'), ' - <a href="', Uri::get('comment', 'comment', 'read', $sTable . ',' . $iId), '">', $sCommentTxt, ' (', $iCommentNumber, ')</a> <a href="', Uri::get('xml', 'rss', 'xmlrouter', 'comment-' . $sTable . ',' . $iId), '"><img src="', PH7_URL_STATIC, PH7_IMG, 'icon/small-feed.png" alt="', t('RSS Feed'), '" /></a>'; } echo '</p>'; }