-
AuthorPosts
-
Mohamed H. Jurriah Friend
Mohamed H. Jurriah
- Join date:
- September 2014
- Posts:
- 125
- Downloads:
- 0
- Uploads:
- 47
- Thanks:
- 39
April 15, 2015 at 12:06 pm #205552hey
The hits in my articles are not so precise. It does not count every click and I have tried it from several computers with different internet connections?
What could cause the problem and how do I solve it?
url: http://www.laliganews.dk
phong nam Friendphong nam
- Join date:
- May 2015
- Posts:
- 3779
- Downloads:
- 1
- Uploads:
- 587
- Thanks:
- 499
- Thanked:
- 974 times in 888 posts
April 15, 2015 at 1:53 pm #567058Hi jurridk,
This caused by Hit counter and Joomla! caches system(Refer to Joomcode or Google group). You can use AJAX to increase the hit counter.
Please follow this tutorial and let me know the result.
Thanks
Mohamed H. Jurriah FriendMohamed H. Jurriah
- Join date:
- September 2014
- Posts:
- 125
- Downloads:
- 0
- Uploads:
- 47
- Thanks:
- 39
April 16, 2015 at 10:47 am #567228I have followed the whole guide but there is nothing. There is nothing showing up where the hits should show up.
I think it’s because I use another language but I dont know.?
phong nam Friendphong nam
- Join date:
- May 2015
- Posts:
- 3779
- Downloads:
- 1
- Uploads:
- 587
- Thanks:
- 499
- Thanked:
- 974 times in 888 posts
April 16, 2015 at 3:35 pm #567249Please sent the account via private message so I can take a look your site and settings.
<blockquote> have followed the whole guide but there is nothing</blockquote>
It would be nice if you kindly give me step by step.Thanks
Mohamed H. Jurriah FriendMohamed H. Jurriah
- Join date:
- September 2014
- Posts:
- 125
- Downloads:
- 0
- Uploads:
- 47
- Thanks:
- 39
April 17, 2015 at 1:25 am #567316Well, I inserted
“return true;”under the code
“public function hit($pk = 0)
{”in the file placed in:
components/com_content/models/article.php
Then I went to language –> overrides and placed the code below infront of the danish word for “hits:” (visninger:)
Hits: <span id=”article_hits”>%s</span>
and then I placed the code below in this file components/com_content/views/article/tmpl/default.php:
<script type=’text/javascript’>
jQuery.post(
‘<?php echo JURI::base(); ?>includes/increase_hits.php’,
{option:’com_content’,view:’article’,id:'<?php echo $this->item->id; ?>’},
function(data,status){jQuery(‘#article_hits’).html(data);},’text’
);
</script>and at last I created the file increase_hits.php with the code in the guide and placed it in includes/increase_hits.php
phong nam Friendphong nam
- Join date:
- May 2015
- Posts:
- 3779
- Downloads:
- 1
- Uploads:
- 587
- Thanks:
- 499
- Thanked:
- 974 times in 888 posts
April 17, 2015 at 8:44 am #567388I added the js script into joomla/templates/ja_fubix/html/com_content/article/default.php
Clear caches and now the hit counter working fine. E.g: check this link http://www.laliganews.dk/nyheder/103-real-madrid/449-la-liga-giganter-forer-champions-league-topscorerlisten then try to reload 🙂
Thanks and have a nice weekend!
AuthorPostsViewing 6 posts - 1 through 6 (of 6 total)This topic contains 6 replies, has 2 voices, and was last updated by phong nam 9 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Hits in articles are’nt so precise?
Viewing 6 posts - 1 through 6 (of 6 total)