Setup

As of version 1.7, myCRED Hooks are managed just like WordPress widgets. You have one “sidebar” called “Active Hooks” where you drag hooks you want to use. Hooks dragged out of the sidebar are disabled.

In older versions, Hooks are listed one by one and a green icon indicates the hook being enabled while red icon indicates the hook being disabled.

Figure 1. Hook management in older versions (pre 1.7).

Figure 2. Hook management as of version 1.7

Hooks for each Type

If you are using multiple point types, myCRED will add the hook page for each new point type you create.

This will allow you to setup hooks on point type basis giving or taking any number of point types. Your hook settings will be kept separate for each point type.

Points for Clicking on Links

This custom hook allows you to award or deduct points from users clicking on links. In order for to do, myCRED provides the mycred_link shortcode. The shortcode generates an anchor element which is attached a unique token. This token prevents tempering with the setup you choose (e.g. how many points the link gives).

Minimum Requirements:

  • Links will only give points when clicked on by logged in users.
  • Users who have been excluded will not receive points.
  • If you want to enforce a limit, you must provide a unique ID for each shortcode you use.

Points for Watching Videos

This custom hook allows you to award or deduct points from your users for watching YouTube Videos. The Video Add-on premium version replaces this hook and adds support for Vimeo as well as YouTube.

In order for this to work, you must use the mycred_video shortcode to embed your video. You can award or deduct points in three different ways:

Minimum Requirements:

  • Users must be logged in while watching the video.
  • Users who have been excluded will not receive points.

If you select to reward users using the “Interval” logic, no badges, ranks or notifications will be given to the user for watching the video! If the user gains enough points to reach a new rank, their new rank will not be awarded until they gain points some other way after watching the video.

Users can only get points once per each video.

Play

Awards or deducts points as soon as the user hits play.

Full

Award or deducts points once a user has watched the entire video. Since a lot of things can go wrong while watching a full video, a leniency percentage must be set. This leniency value is the maximum percentage a users view of a movie can differ from the actual length.

Interval

Awards or deducts points for every x number of seconds watched of the video.

Points for Referrals

This custom hook is a very basic referral system that allows you to award or deduct points from users who refer visitors and/or signups. For this to work, each user on your website gains a unique referral ID. This ID is appended to a URL that points to your website. You can point to any URL except for the wp-login.php file.

When someone who is not a member of your website uses a link, that has a referral ID attached, they receive a cookie when they arrive on your website. If you award or deduct points for referring visitors, the referring user will receive points for each unique referral. If you reward signups, the cookie the user received will trigger the payout once they finished registration.

The hook provides you with two shortcodes:

Minimum Requirements:

  • The referred visitor can not be logged in / member on your website.
  • If the referred visitor hides their IP address or use a proxy that hides their IP, the hook will ignore them.
  • Referred visitors that already have a cookie will not trigger payouts.
  • If a user is excluded, their referrals will not trigger any points.

This hook is not guaranteed to work with all third-party registration plugins.

mycred_affiliate_id

This shortcode will render the unique referral ID of the user viewing the shortcode. You can use this to show each user their referral ID.

mycred_affiliate_link

This shortcode allows you to automatically attach the current users referral ID to a given URL. You could use this to auto generate referral links for your users. They just need to copy and share the URL any way they see fit.

Last edited August 11, 2016