User list with a ranking or scoreboard rank

Christian asked for what he calls a ‘criteria’ number for his member list, and what others may call a scoreboard ranking, top 10 chart listing etc…..

Basically we want to show the row or list number as displayed.  You can use any user or usermeta field generated by another plugin (or further fields if the necessary add-on is available) to determine the ranking (Eg; post counts?  or for gaming sites, perhaps you have some score field? ).  You can list both the score field and the ranking.

Define the sort order in your normal list configuration.   When the report is run, the formatting function will add one as each user is displayed.  Thus the sort order determines the current ‘ranking’.

The ranking will work for more than one page.  It checks which page was requested and how many rows per page are being displayed.  Then starts the ranking count appropriately, and increments from there.

ranked users

The add-on is a very simple little example plugin.

Instructions

  1. It allows a ranking field to be displayed.  Use “find fields” to bring it up after plugin activation.
  2. Then configure your list, scroll down till you see the ranking field.  Add a number to the display column to say which column it should display in.
  3. Save
  4. Rebuild cache.

Download

The downloads will be accessible to logged in users who have access to amr-users-plus.  If you are not already registered, the most cost effective options are the ‘developer’ memberships as they give you access to the most add-ons and plugins.  Alternatively you can purchase short term access.  Note if upgrades are made after access expiry , membership repurchase or upgrade will be required.

About anmari

the developer at http://anmari.com
Bookmark the permalink.