Keyword

Advanced Search

Search Results (Searched for: Hits counter when using Jotcache)

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
15 Jul 2015 14:51
Replied by Krikor Boghossian on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

Wherever K2 items are present. If you have mapped all of your K2 categories into menu items, you can only publish it on those menus.
  • Alexandros Androutsos
  • Alexandros Androutsos's Avatar
15 Jul 2015 01:45
Replied by Alexandros Androutsos on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

Ok so I publish this thing on Every page?

Or just the menu items for each K2 category?
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
14 Jul 2015 20:44
Replied by Krikor Boghossian on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

It's ok :)

The code should be pasted on a K2 Tools Module.
PHP parsing must be enabled.

Finally this module should NOT be cached. Disable caching from the module's params and if Jotcache offers an additional caching layer, exclude it from there as well.
  • Alexandros Androutsos
  • Alexandros Androutsos's Avatar
14 Jul 2015 12:14
Replied by Alexandros Androutsos on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

Krikor wrote: In the item.php.
More information on overrides can be found here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates


Dear mr Krikor

The whole topic is a bit vague

It seems that K2 hits counter is not working when using joomla cache. Is there a simple, step by step way to actually make it workng?

if you say "add the code in item.php" then you just don't know what to do!

I need the information to provide popular items lists and similar statistics in my site.

I tried to use the code below
<?php // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); if (isset($_GET['view']) && strtolower($_GET['view']) == 'article') { $articleId = (int) $_GET['id']; $db = JFactory::getDBO(); $db->setQuery( 'UPDATE #__content' . ' SET hits = hits + 1' . ' WHERE id = '.(int) $articleId ); $db->query(); } ?>

in item.php but no luck. Please since it seems that this is an issue that has been haunting K2 for some time now, could you please help us solve it by providing a step-by-step instruction set?

if that includes adding jotcache, I don't mind, however at the moment jotcache is not installed on my website. (www.coffeespots.gr)

Thank you.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
27 Nov 2014 13:51
Replied by Krikor Boghossian on topic hits counter

hits counter

Category: English K2 Community

Hello,

Joomla! caches the hit count. That is why you are seeing an offset between these values.

This post will help you get past this. www.joomlaworks.net/forum/k2-en/36313-hits-counter-when-using-jotcache
  • Andi Setyaji
  • Andi Setyaji's Avatar
24 Nov 2014 17:55 - 24 Nov 2014 17:56
Replied by Andi Setyaji on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

Thanks for your reply Mr. Krikor. Sorry, I still do not understand. I use K2 v.2.6.8, joomla v 2.5.27. Where the line, code is inserted?

My regards,
Andi
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
24 Nov 2014 14:42
Replied by Krikor Boghossian on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

In the item.php.
More information on overrides can be found here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
  • Andi Setyaji
  • Andi Setyaji's Avatar
24 Nov 2014 14:10
Replied by Andi Setyaji on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

Sorry, I am new in K2 and Joomla. I also had the same problem.
May I ask, where the code is entered?
  • Lefteris
  • Lefteris's Avatar
02 Jun 2014 12:17
Replied by Lefteris on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

You also need to set "Parse PHP code" to "yes".
  • Petar
  • Petar's Avatar
31 May 2014 00:02
Replied by Petar on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

BIG BIG Thnx Lefteris Kavadas
I try with K2 tools custum code. Put this code in module, set module to desidered position, excluded this position from caching, but no result. Hit are not increased by +1
Is code good. I have latest K2 and latest joomla 3.3
Big Thnx
  • Lefteris
  • Lefteris's Avatar
30 May 2014 12:54
Replied by Lefteris on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

@Petar Grgurev

I cannot know why this does not work. I was just asked to provide some code. I don't even know how Jotcache works. K2 includes also a module for custom code. Try to use that.
  • Petar
  • Petar's Avatar
30 May 2014 00:31
Replied by Petar on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

What module use for php code
I try Blank module and Flexi custum code, put code you write above, exclude position in Jotcache, But does not work
Please help
  • Marcos
  • Marcos's Avatar
24 May 2014 03:51
Replied by Marcos on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

Hello! Would you be so kind as to share the module that has developed? Because my great ignorance did not allow me to implement it myself.
Thank you!
  • Lefteris
  • Lefteris's Avatar
23 May 2014 18:18
Replied by Lefteris on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

You are welcome.
  • dennisb
  • dennisb's Avatar
23 May 2014 16:17
Replied by dennisb on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

Thank you verry much!!!!

This worked for me!


I installed a custom code module.
insert this code and exclude this module position from being cached.

Now every time the k2 item page is recached, the new hits are displayed correct.
  • Lefteris
  • Lefteris's Avatar
23 May 2014 12:02
Replied by Lefteris on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

According to the link you provided the code should be:
<?php // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); if (isset($_GET['view']) && strtolower($_GET['view']) == 'item') { $articleId = (int) $_GET['id']; $db = JFactory::getDBO(); $db->setQuery( 'UPDATE #__k2_items' . ' SET hits = hits + 1' . ' WHERE id = '.(int) $articleId ); $db->query(); } ?>
  • dennisb
  • dennisb's Avatar
22 May 2014 13:52
Replied by dennisb on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

Ok, I will try to figure out how to modify the query for K2 items.

Yes I know that the amount of hits is to provide a general image of the item popularity, but it looks strange when a webpage has serveral thousands hits, a main article only showed up 62 hits.

I think there are more people with this problem, and looking for a solution.
  • Lefteris
  • Lefteris's Avatar
22 May 2014 13:00
Replied by Lefteris on topic Hits counter when using Jotcache

Hits counter when using Jotcache

Category: English K2 Community

Hi. Yes if it works for Joomla! articles it can also work for K2 items. You just need to modify the query so it updates the K2 items table. In general, hits are there to provide a general image of the item popularity, not to provide accurate statistics. For such usage you are suggested to use a tool like Google Analytics.
  • dennisb
  • dennisb's Avatar
21 May 2014 22:31
Hits counter when using Jotcache was created by dennisb

Hits counter when using Jotcache

Category: English K2 Community

Hi,

I'm looking for a solution to use full page caching (jotcache), but still counting and display the total hits.

When I activate the jotcache full page caching, the number of hits will only count up once in a while when the page cache is expired and have to be recached.

for normal Joomla! articles, I found a good solution, described in the topic below:

Joomla forum hits counter with full page cache

Is there a way to implement this solution for K2 items?
Displaying 21 - 39 out of 39 results.

Powered by Kunena Forum