TOPIC: About the article hit counter

About the article hit counter 23 Jul 2015 07:31 #1412

Hello

I just moved from Joomla caching system to JotCache. I find that JotCache is more customizable and it's faster even if I'm using file caching, not memcache yet, will do soon.

I'm just wondering if I can get my hit counter to work like there's no caching? I tried modify some stuffs and it doesn't work so I reverted them back. I'm now very happy with JotCache, just the hit counter that I want it to be working. Is there any solution for this yet?

Thank you,
Putthabut

Joomla version : 3.4
JotCache version : 5.1.2
site template: RocketTheme Audacity
system plugins :
The administrator has disabled public write access.

Re: About the article hit counter 23 Jul 2015 10:40 #1414

Unfortunatelly no general methods are available for article/K2 item hit counter correct processing on cached pages. The solution is strong dependable on used site template (and override if exists). The customized solution requires changes in JotCache plugin and use of external code.
The administrator has disabled public write access.

Re: About the article hit counter 23 Jul 2015 10:46 #1415

Thank you

I'm willing to do the modifications. Would you please guide me through this or is there any guide for this?

Thanks
The administrator has disabled public write access.

About the article hit counter 04 Apr 2016 16:33 #1689

Maybe is too late but I have solution for that
The administrator has disabled public write access.

About the article hit counter 06 Jun 2016 12:50 #1762

Aleksandar wrote:
Maybe is too late but I have solution for that
Hello
Care to share the solution?
JotCache is useful but I need article counter as well.
If JC is turned on, than article count stops completely
Thanks,
Regards
The administrator has disabled public write access.

About the article hit counter 15 Jun 2016 23:14 #1765

Hrvoje wrote:
Aleksandar wrote:
Maybe is too late but I have solution for that
Hello
Care to share the solution?
JotCache is useful but I need article counter as well.
If JC is turned on, than article count stops completely
Thanks,
Regards
Hi Hrvoje I can post the code on forum, it give me premission error.
Give me your email so I can send the code
Hrvoje wrote:
Aleksandar wrote:
Maybe is too late but I have solution for that
Hello
Care to share the solution?
JotCache is useful but I need article counter as well.
If JC is turned on, than article count stops completely
Thanks,
Regards

Hi Hrvoje,
Follow this steps and you will resolve problem.
1. Install "Flexi Custom Code" module
2. Place module on some position like Footer
3. Enter the code in to Flexi Custom Code module
4. Assign your Flexi Custom Code module to news page
5. Enable module
6. Go to JotCache and excclude your Flexi Custom Code module location in this case Footer
7. Clear cache

Work on joomla 2.5 and 3
The administrator has disabled public write access.

About the article hit counter 16 Jun 2016 13:36 #1767

Information from Aleksandar.

The code is embedded in php code tags:
defined( '_JEXEC' ) or die( 'Restricted access' );
$articleId = (int)JRequest::getVar('id');
echo "ID  " . $articleId;
$db = JFactory::getDBO();
$db->setQuery( 'UPDATE #__k2_items' .' SET hits = hits + 1' .' WHERE id = '.(int) $articleId);
$db->query(); 
If you use content article just replace 'UPDATE #__k2_items' with 'UPDATE #__content'
The administrator has disabled public write access.
Time to create page: 0.301 seconds
We have 83 guests and no members online
Copyright © 2015 JotComponents
We have 83 guests and no members online
Copyright © 2017 JotComponents