Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2014-03-13 07:22:42
- raminrahimi
- Member
- From: India
- Registered: 2013-03-19
- Posts: 278
how to make article hits count to the public
hi to all,
i’m making a news website, I searched a lot to find any good plugins but didn’t find for these two things:
1. to show the article hits count to the visitors, like how many hits got each articles.
2. list all the most popular articles which got more hits
any one please help me.
thanks
Last edited by raminrahimi (2014-03-13 07:28:35)
Offline
Re: how to make article hits count to the public
smd_article_stats should be of help
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#3 2014-03-13 08:36:51
- raminrahimi
- Member
- From: India
- Registered: 2013-03-19
- Posts: 278
Re: how to make article hits count to the public
i checked that before, that count the words of an article. i need to show the article hits count,
like to see how many clicks got the current article.
Offline
Re: how to make article hits count to the public
raminrahimi wrote #279710:
i need to show the article hits count
Unless someone comes up with something better, you can (ab)use smd_lately for this task, as long as you have Visitor Logs set to all hits:
Page view count in the last 30 days:
<txp:smd_lately
by=""
within="30 days"
show_current="1"
include='page::<txp:page_url />'
limit="1">
{smd_lately_count}
</txp:smd_lately>
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: how to make article hits count to the public
Offline
Re: how to make article hits count to the public
Bloke wrote #279712:
Unless someone comes up with something better, you can (ab)use smd_lately for this task, as long as you have Visitor Logs set to all hits:
We had a lot of problems with comment spam hits that did not succeed because they were filtered by Jukka’s comment spam plugin. These alternating GET/POST visitors, mostly originating from the Ukraine (!), were heavily polluting the logs. I don’t know if smd_lately has a routine to filter these from the logs? For now this made our most visited list completely unusable…
kees
Last edited by kees-b (2014-03-13 10:22:10)
Offline
Re: how to make article hits count to the public
kees-b wrote #279715:
I don’t know if smd_lately has a routine to filter these from the logs?
It has the include
and exclude
attributes which you may be able to use to match domain names or filter out crap.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: how to make article hits count to the public
Bloke wrote #279718:
It has the
include
andexclude
attributes which you may be able to use to match domain names or filter out crap.
Yeah, that’s what I did but the list of excluded objects was growing and growing…. It should also be a nice option to be able filter out all POST entrees. Is this possible?
Offline
Re: how to make article hits count to the public
kees-b wrote #279719:
It should also be a nice option to be able filter out all POST entrees. Is this possible?
Not yet, but it’s trivial to add. I’ll release a new version tonight for you.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: how to make article hits count to the public
Bloke wrote #279721:
Not yet, but it’s trivial to add. I’ll release a new version tonight for you.
super!
Offline
Re: how to make article hits count to the public
We highly encourage disabling Textpattern’s logging, tho; it’s resource hog and you are better off using other logging and storage method than our MySQL database, which truly neither offer anything special compared to raw request log files. Starting from 4.6.0, Textpattern will ship logging pre-disabled for new installations. The logs grow too fast, and the storage and log writing method causes issues on more busy sites.
I myself recommend using your web server to store and process hits, and then periodically update the database with new stats from there. If you have setup your server properly you are already most likely doing that for various other purposes; including security and defending yourself against attacks.
Offline