Sat 18 Apr |
|
The Camp26 Latest News module provides a nice sidebar listing of your latest articles. With a couple of small changes you can show the number of page views as well. Open file joomla_root/modules/mod_camp26_latestnews/helper.php in any text editor and go to line 131. Add this line there after the $lists[$i]->name = htmlspecialchars( $row->name ); - $lists[$i]->hits = htmlspecialchars( $row->hits );Then open file joomla_root/modules/mod_camp26_latestnews/tmpl/default.php and go to line 44, although this depends on which $intregated_sys and $time_sys parameter you've selected. If you've chosen another parameter then scroll down until you've found the appropriate one. Change the php echo statement from - <?php echo "<span class=\"sharedby\"> $shared_by $item->name "; echo JHTML::_('date', $item->created,"$date_time_sys", $offset); echo "</span>";?>To this to display the views at the right hand side - <?php echo "<div style='height:20px;'><span class='sharedby'style='float:left;'> $shared_by "; echo JHTML::_('date', $item->created,"$date_time_sys", $offset); echo "</span><span style='float:right;' class='sharedby'>Views: ".$item->hits." </span> </div>";?>You now have this.... |
Last Updated on Wednesday, 22 April 2009 12:28 |