rtMedia myCRED

myCRED is a point management system for WordPress sites. Through the rtMedia myCRED addon, you it is possible to assign points for various media-related activities that rtMedia provides.

Points

Points can currently be assigned for the following activities:
(Some activities require additional addons; these are noted where applicable)


UploadImage
Audio
Video
DocumentrtMedia Docs and Other Files
ViewImage
Audio
Video
DocumentrtMedia Docs and Other Files
MediaLike
Edit
Delete
Comment
Set Featured
RatertMedia 5 Star Rating
ReportrtMedia Moderation
DownloadrtMedia Direct Download Link
AlbumCreate
Edit
Set CoverrtMedia Set Custom Thumbnail for Audio/Video
Misc.Create PlaylistrtMedia Playlists

Setup

myCRED plugin

The rtMedia myCRED integrates myCRED points with media-related activities. Thus, the basic (free) version of the myCRED plugin needs to be installed and activated on your website.

Setting up myCRED Hooks

Once myCRED and rtMedia myCRED have both been installed and activated, a new myCRED Points tab will appear under rtMedia Settings.

Click on this tab, and the follow “Setup myCRED here” link.

Step 1: From the “Active Hooks” section, delete the default “rtMedia Galleries” integration and add the “Points for rtMedia” block instead:

step-1

Step 2: Assign points for activities as suitable, and set limits. The “Log template” field can be used to set text strings that will appear in the Points Log when points are awarded to a user.

step-2

Remember to save after making any changes! The “Save” button is right at the bottom of the “Points for rtMedia” section.

step-2-5

Limits

It is possible to limit the maximum number of points that can be awarded to a user over a period of time. Points can be limited independently for each rtMedia activity.

Limits can be configured to apply over a period of a day, week, month or in total (irrespective of time).

limit

In the above screenshot, every user will be awarded 2 points for every comment, for his/her first 10 comments of the day. This will set a maximum of 20 (2 x 10) points per day. Subsequent comments will not result in points being credited to the user till the day ends.

Points Log

The Points log under Points > Log in the WordPress Dashboard displays a detailed list of all points activity. Log entries can be filtered & edited if required.

log-1

To edit an entry, hover over it and click on the Edit option. A popup will display more details along with the option to permanently update the entry:

log-2

Filters

  • rtmedia_mycred_point

Use this filter to limit the number of points for media author.
For example, the snippet below will limit the number of points added to a user when s/he comments on his/her own media.

function rtmedia_mycred_point_for_comment_callback( $cred_details, $name, $rtmedia_points_media_id, $media, $arguments ) {

    if ( isset( $rtmedia_points_media_id ) ) {
        $model = new RTMediaModel();
        $media = $model->get_media( array(
            'id' => $rtmedia_points_media_id,
        ), 0, 1 );

        if ( 'after_comment' == $name ) {
            $media_author = $media[0]->media_author;

            if ( $media_author == $cred_details['user'] ) {
                $cred_details['media_point'] = 1;
            }
        }
    }

    return $cred_details;
}
add_filter( 'rtmedia_mycred_point', 'rtmedia_mycred_point_for_comment_callback', 10, 5 );