Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • Mohamed H. Jurriah Friend
    #205552

    hey

    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


    1. hits
    phong nam Friend
    #567058

    Hi 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 Friend
    #567228

    I 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 Friend
    #567249

    Please 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 Friend
    #567316

    Well, 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 Friend
    #567388

    I 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!

Viewing 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, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum