WordPress.org

Forums

"Top 10 Posts" Hack (5 posts)

  1. Laughinglizard
    Member
    Posted 11 years ago #

    I really liked the "Top 10 Posts" on Jeremy Zawodny's Blog and wanted it for my blog as well. So I wrote a small hack which keeps track of the number of times a particular post is clicked on (using the database) and then makes a list of these posts along with the number of clickthroughs. You can see it in work on the sidebar ( http://dinki.mine.nu/weblog/ ). Here is a link to the hack instructions. This is WordPress 0.72 and 1.0+ compatible.
    Also, to give my "Who is Online?" hack a little more exposure, here are the instructions to display the number of users on your site at any time.
    http://dinki.mine.nu/word/b2-img/whoisonline.txt You can see it at work on my blog http://dinki.mine.nu/weblog/ (look at the "other" area)

  2. Alex King
    Member
    Posted 11 years ago #

    I thought about this a little while ago and I decided some kind of scale was probably needed. This is what I came up with as an initial scale:
    1 point for a view on the home page
    1 point for a view in the archives by date
    2 points for a view in the archives by category
    10 points for a view of the post by itself
    20 points for a comment
    25 points for a trackback
    What do you think?

  3. Alex King
    Member
    Posted 11 years ago #

    One idea I had was to just write everything to a text file and have a CRON job run every night (or 12 hours, etc) to do the database work.

  4. stevecooley
    Member
    Posted 11 years ago #

    the initial part of this conversation works great. :) Thank you! That was very easy to add.

  5. Anonymous
    Unregistered
    Posted 11 years ago #

    blalblabla

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.