From 50b0613243d7a841306d3674fc258c9e6952f350 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 20 Dec 2008 20:04:57 +0000 Subject: Add view counts and show them properly. --- modules/info/helpers/info_block.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php index 5687d770..422e62da 100644 --- a/modules/info/helpers/info_block.php +++ b/modules/info/helpers/info_block.php @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ - class info_block_Core { public static function sidebar_blocks($theme) { if ($theme->item()) { @@ -30,7 +29,12 @@ class info_block_Core { } public static function thumb_info($theme, $item) { - $results = "
  • Views: 321
  • "; + $results = ""; + if ($item->view_count) { + $results .= "
  • "; + $results .= sprintf(_("Views: %d"), $item->view_count); + $results .= "
  • "; + } if ($item->owner) { $results .= "
  • "; $results .= sprintf(_("By: %s"), "{$item->owner->name}"); -- cgit v1.2.3