Elxis CMS Forum
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Bug reports and fixes
 
Pages: [1]
  Print  
Author Topic: [Solved]Number of hits  (Read 2798 times)
nikos65
Hero Member
*****
Offline Offline

Posts: 1021



WWW
« on: June 11, 2009, 20:05:17 »

How i can add the hits number in a content item ?
« Last Edit: June 12, 2009, 20:01:53 by nikos65 » Logged

----
Γηράσκω αεί διδασκόμενος
www.gr-eshop.com  | www.e-epiros.gr
nikos65
Hero Member
*****
Offline Offline

Posts: 1021



WWW
« Reply #1 on: June 12, 2009, 17:06:52 »

I want to display inside the content the number of own hits !! Is that possible ? There is a counter inside can we display this one using bot?
(Was the same question in a different way  Wink)
Logged

----
Γηράσκω αεί διδασκόμενος
www.gr-eshop.com  | www.e-epiros.gr
Ivan Trebješanin
Elxis Team
Hero Member
*****
Offline Offline

Posts: 1646



WWW
« Reply #2 on: June 12, 2009, 17:14:59 »

But, I still don't understand the question... You can set to "show" number of hits for content items in global configuration.
Logged

I've got a snap in my finger...
Got rhythm in my walk...
nikos65
Hero Member
*****
Offline Offline

Posts: 1021



WWW
« Reply #3 on: June 12, 2009, 17:20:10 »

The set is on and nothing display , i have check also the menu item and i didnt find anything !!
Logged

----
Γηράσκω αεί διδασκόμενος
www.gr-eshop.com  | www.e-epiros.gr
ks-net
Elxis Community
Hero Member
*****
Offline Offline

Posts: 2075

Kostas Stathopoulos


WWW
« Reply #4 on: June 12, 2009, 17:52:17 »

you can see number of hits only in lists .... category-table
Logged

nikos65
Hero Member
*****
Offline Offline

Posts: 1021



WWW
« Reply #5 on: June 12, 2009, 17:56:19 »

Thank you ks-net for your reply, inside the content  ? Maybe an extra bot needed ?
Logged

----
Γηράσκω αεί διδασκόμενος
www.gr-eshop.com  | www.e-epiros.gr
nikos65
Hero Member
*****
Offline Offline

Posts: 1021



WWW
« Reply #6 on: June 12, 2009, 20:01:22 »

Thanks to Ivan Trebješanin the solution works fine to Elxis 2008.x and 2009

Via ftp find the /www/components/com_content/content.html.php
you have to open it and go to line 630 for elxis2008 or 639 for elxis 2009 and add this line

Quote
echo '<div class="item_hits"'.$rtl.'>'._E_HITS.': '.$row->hits.'</div>'._LEND;

This is before :
Quote
   /*****************************************/
   /* DISPLAY ITEM'S LAST MODIFICATION DATE */
   /*****************************************/
   static function ModifiedDate( $row, $params ) {
      if ( $params->get( 'modifydate' ) ) {
            if ((intval( $row->modified ) > 0) && ($row->modified != '1979-12-19 00:00:00')) {
                $mod_date = mosFormatDate( $row->modified );
                echo '<div class="item_modifydate">'._LAST_UPDATED.' '.$mod_date.'</div>'._LEND;
            }
        }
   }

and this is after
Quote
   /*****************************************/
   /* DISPLAY ITEM'S LAST MODIFICATION DATE */
   /*****************************************/
   static function ModifiedDate( $row, $params ) {
      if ( $params->get( 'modifydate' ) ) {
            if ((intval( $row->modified ) > 0) && ($row->modified != '1979-12-19 00:00:00')) {
                $mod_date = mosFormatDate( $row->modified );
                echo '<div class="item_modifydate">'._LAST_UPDATED.' '.$mod_date.'</div>'._LEND;
            }
        }
        echo '<div class="item_hits"'.$rtl.'>'._E_HITS.': '.$row->hits.'</div>'._LEND;
   }

Go to the global configuration and enable the hits to "Show"

Thank you Ivan  Cheesy Cheesy
« Last Edit: June 12, 2009, 20:05:24 by nikos65 » Logged

----
Γηράσκω αεί διδασκόμενος
www.gr-eshop.com  | www.e-epiros.gr
Pages: [1]
  Print  
 
Jump to: