PDA

View Full Version : Sort Articles by View Count


kontagio.us
04-17-2012, 01:24 AM
Hey I want a list of my top articles. I know you can do it from the Section Edit page but would like to post it publicly. Maybe have a dynamic "Top 10" list. Thank you. :up:

kontagio.us
04-28-2012, 04:30 PM
Bump, please. :)

kh99
04-29-2012, 12:33 PM
There is a node viewcount available, so if you wanted to rank article by views you could modify the recent article widget to sort by viewcount instead of publish date.

kontagio.us
04-29-2012, 04:34 PM
Thanks for the response, it seems simple enough. I did a search for a widget folder but couldn't come up with a way to edit the default widgets. Could you help me find a way to copy the recent article widget and copy it into a new one that I could customize? Thanks. :)

kh99
04-29-2012, 11:20 PM
Well, to be honest when I made that suggestion I didn't really think is was a problem, now I realize that I don't know how to create a new widget type. I don't think there's any way to do it except to write to the cms_widget tables in the database. Paul M has some widget mods with install code that does it, but I haven't looked through it all yet. If I can figure it out I'll let you know.

I guess another way would be to make a php direct execution widget and somehow use the (modified) code from the existing widget. Maybe someone else will have an idea.

ETA: I found this article: www.vbulletin.org/forum/showthread.php?t=236224 which seems to outline the necessary steps.

kontagio.us
05-07-2012, 07:46 PM
I tried following that tutorial but my knowledge of PHP is not strong enough to build one myself. Anyone good with PHP?

kontagio.us
05-22-2012, 07:28 PM
Bump, please.