User Awards

User Awards

Wordpress plugin

Install on Wordpress

App Details

Activating this plugin now means that you are able to award users for specific actions that they take.

NOTE: Currently this only works for actions that update or add to user meta values.

At a basic level, the following happens when you activate this plugin:

  • Awards custom post type is added to the administration window. Regular post type window but with a few additional meta boxes that provide access to the core behavior of this plugin.

  • A new table is created under the name of {wpdb_prefix}user_awards. This contains all award assignment references to users. The User Awards sub-menu provides an interface to help perform administrative actions on the table.

There is also a User Awards sub-menu which gives a tabular view of all the awards that are assigned to users. This is accessible from the Awards admin menu in your WordPress administration area.

Usage

Understanding the different actions you can take in each available window is key to having this plugin work for you.

Award List Window

This window displays all of the specific “Award” post types.

There are two different bulk actions available to you:

  • Bulk Assign – Assign multiple awards to a user

  • Bulk Give – Give multiple awards to a user

New Award / Edit Award Window

These administration windows have three meta boxes associated with them. Below are descriptions of each metabox and why it is included.

Awards Trigger

Text Input. Accepts an awards trigger string, which will describe the behavior of how an award will be assigned to users. Documentation for the awards trigger is shown below.

Example

You have a membership blog site, and because you’re a nice person, you want to award your members for being engaged with your site and liking at least ten blog posts!

A previous developer implemented a like button on each of your site’s blog posts that increments a post_likes user_meta value on the user that clicks it (e.g. If a member likes 3 blog posts, they will have a post_likes meta value of 3).

We’ve decided to name our award the “User Engagement” award. In order to assign it to a member based on the prerequisites, you would put something like this in the “Awards Trigger” input.

CURRENT_USER_META ASSIGNED WHERE key=post_likes EQ 10 

This string tells the award to assign itself to the user if the post_likes value of the current user’s meta was updated or created to equal a value of 10.

Auto-Give Award

Checkbox input. Check this box to automatically have the award be given to a user when it would originally be assigned.

Apply/Give Award To User

Select Input combined with a checkbox input. Select a user from your member list to either assign/give an award by clicking on the Assign submit button.

User Awards Window

This window allows administrators to physically see and update the status of all of the awards that are assigned to users.

This window will allow you to perform the following actions:

  • Singular/Bulk remove awards from members
  • Singular give awards to members
  • Edit Awards

Documentation

Awards Trigger Syntax

Explanation of each of the items that make up our trigger string, with accepted values of each listed under.

  • [ entity ] — Used to scope your awards trigger to a specific action.

    • CURRENT_USER_META — Consider the meta value of the current user
  • [ trigger_type ] — Type of action that is performed to the current entity.

    • UPDATED — When entity value is updated (Listens to calls of the update_user_meta() function)
    • CREATED — When entity value is created (Listens to calls of the add_user_meta() function)
    • ASSIGNED — Listens to calls of both the update_user_meta() and add_user_meta() function.
    • ~EXCLUDED~ — Not Implemented
  • [ trigger ] – Made up of three separate values itself, [ descriptor ] [ operator ] [ control ]

    • [ descriptor ]

      • [ entity_type ] = [ value ] ex: key = hours
    • [ operator ]

      • GT – greater than
      • LT – less than
      • EQ – equal to
      • GTEQ – greater than equal to
      • LTEQ – less than equal to
    • [ control ]

      • Value used to compare against. e.g. 2
      • NOTE: The control can also be a string, but in order for this to work, you must use the EQ operator, as shown above.

EXAMPLE:

CURRENT_USER_META UPDATED WHERE key=total_hours GT 600 

This example creates a wp action handler that only applies when a user’s meta tags are updated.
In the handler, we will compare the meta tag being updated to the given comparitors in the [ trigger ].
i.e. we will look for a meta tag of the current user that is labeled “total_hours” and check to see if the value is
greater than 600. If that’s the case then the award will be assigned. If not then nothing happens.

$UserAward Global Object

The awards trigger syntax, while nice, is too limited in its current form. Our plugin provides a global $UserAward variable that allows developers to interact with the core API of the plugin in order to award items through methods that simply are not possible / too complex.

You will find documentation and usage for functions available to you below.

global $UserAward;

/**
* Check to see if a user already has a specific award
* @param int $user_id – WPUser_ID
* @param int $award_id – UserAward_ID (Post ID)
* @return bool Whether or not this user has an award with the current award id
*/
$UserAwards->UserHasAward( $user_id, $award_id );

/**
* Assigns multiple awards to users using AssignAward
* @param int $user_id – WPUser_ID
* @param array $award_ids – Array of UserAward_IDs (Post ID)
* @return bool – True if awards were assigned, false if there was an error with assigning awards
*/
$UserAwards->AssignAwards( $user_id, $award_ids );

/**
* Function that marks an award as assigned to a user.
* We insert a new record into our awards table that relates the award to the user.
*
* We do check to see if there is an auto-assignment of the award before we finish up our function though.
*
* @param int $user_id – ID of the user that we are “awarding” the award to
* @param int $award_id – ID of the award that we are “awarding”
* @return bool – True if award was assigned,
* False if:
* – User already has that award
* – Error with assigning our award
*/
$UserAwards->AssignAward( $user_id, $award_id );

/**
* Give multiple awards to users using GiveAward().
* @param int $user_id – WPUser_ID
* @param array $award_ids – Array of UserAward_IDs (Post ID)
* @return bool – True if awards were given, false if there was an error with giving awards
*/
$UserAwards->GiveAwards( $user_id, $award_ids );

/**
* Function that will mark an award as given to a user,
* which essentially means that we mark the “date_given” time with
* an actual date.
*
* Returns the return value of a db->update call
*
* @param int $user_id – ID of the user that we are “awarding” the award to
* @param int $award_id – ID of the award that we are “awarding”
* @return mixed – Return value of a $wpdb->update() call
*/
$UserAwards->GiveAward( $user_id, $award_id );

/**
* Removes awards from our database.
* If “$award_id” is null, then we are going to delete everything in the database with the specific “$user_id”
*
* @param int $user_id – ID of the user that we are “awarding” the award to
* @param int $award_id – ID of the award that we are “awarding”
* @return mixed – Return the value of a $wpdb->delete() call
*/
$UserAwards->RemoveUserAward( $user_id, $award_id = NULL );

/**
* Function that grabs as many awards assigned to the user as we can based on the parameters given.
* For example, if just a user_id is supplied, then we will return all of the awards with that user_id.
* If an award_id is supplied along with our user_id then we will probably get only one award. Hopefully
*
* @param int $user_id – ID of the user that we are “awarding” the award to
* @param int $award_id – ID of the award that we are “awarding”
* @return mixed – Returnes the value of a $wpdb->get_results() call
*/
$UserAwards->GetUserAward( $user_id, $award_id = NULL);

Attribution

This plugin’s icon is not an original piece of work. It was made by Freepik from Flaticon.com

Pricing

Starting from $0 per month.

Check Out the Bluesky Feed Carousel Widget

By Common Ninja

Bluesky Feed CarouselTry For Free!

App Info

Rating

Reviewers

No reviews

Tags

Awards
user engagement

Developed By

kwmartin

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Bluesky Feed Carousel for Wordpress logo

Bluesky Feed Carousel

Display Bluesky posts with a Bluesky feed carousel that auto updates, shows posts in a clear layout, and keeps visitors engaged.

Logo Slider for Wordpress logo

Logo Slider

Add a logo slider to your site to showcase clients and partners, strengthen brand credibility, and build trust with new visitors.

Stories for Wordpress logo

Stories

Add interactive stories to your site to showcase content in a visual, mobile friendly format that boosts engagement and guides visitors toward action.

Notification Bar for Wordpress logo

Notification Bar

Use a notification bar to alert users, highlight offers, and drive clicks that boost engagement, signups, and conversions.

Glassdoor Reviews for Wordpress logo

Glassdoor Reviews

Show Glassdoor reviews to highlight employee feedback, strengthen employer brand, and help candidates trust your company.

Live Weather Forecast for Wordpress logo

Live Weather Forecast

Use a live weather forecast widget to show current conditions and upcoming predictions, giving visitors real time local weather updates for better planning.

Social Proof for Wordpress logo

Social Proof

Show social proof that displays real user activity to build trust instantly, boost credibility, and help increase conversions across your site.

Skill List for Wordpress logo

Skill List

Showcase your abilities with a structured skill list that highlights strengths clearly, builds credibility, and improves your chances of getting hired.

Vimeo Carousel for Wordpress logo

Vimeo Carousel

Show Vimeo videos with a Vimeo carousel that displays clips in a smooth, flexible layout to boost visibility and engagement.

Music Player for Wordpress logo

Music Player

Add a no-code music player to your site to stream audio, share playlists, and support multiple formats with easy setup.

My Reviews on Amazon for Wordpress logo

My Reviews on Amazon

Show your Amazon product reviews with My Reviews on Amazon to build trust, boost credibility, and help visitors make confident purchase decisions.

All In One Chat for Wordpress logo

All In One Chat

Add a unified chat tool to your site that connects users via WhatsApp, Messenger, Telegram, or email for seamless support.

More plugins

plugins You Might Like

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms