Viewing 5 replies - 1 through 5 (of 5 total)
  • i’m at the same hurdle here, did you ever figure it out?, you can clear the point logs but that only lets them get points for one more view,, there has to be a way cause i see others trying to limit the views, i’m just trying to unlimit the views lol.

    Also have you figured out how to pass a point type like ctype? something tells me you can only have one point type set for viewing videos, or there would be a way to signify the type.

    Thread Starter yashpranjale

    (@yashpranjale)

    Yeah! I Too Didn’t Find Out Any Solution. I Think MyCred Will Allow This Feature Soon With Posts Limit Per Day Feature.

    Plugin Author myCred

    (@designbymerovingi)

    Hi.

    So you can award points for a user that views a YouTube video that was embedded using the mycred_video shortcode.

    Now by default myCRED will only allow you to award points to a user once for each video they watch. But you can adjust this via some custom code.

    Before points are awarded, myCRED will do a “unique check” which we can manipulate:

    add_filter( 'mycred_has_entry', 'mycred_pro_video_points_for_all', 10, 4 );
    function mycred_pro_video_points_for_all( $has, $reference, $ref_id, $user_id ) {
    
    	// Only applicable to watching videos
    	if ( $reference != 'watching_video' ) return $has;
    
    	return false;
    
    }

    The above code goes into your child theme’s functions.php file and will allow users to gain points for ALL videos unlimited number of times. Your rules for getting points are still respected though.

    Thread Starter yashpranjale

    (@yashpranjale)

    Amazing Support Thank You Sir, Just What I Wanted 🙂

    Hi Gabriel,

    1. will this solution work for Vimeo videos?
    2. How to award points when user completed watching the video?

    Best,
    Chris.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How To Allow MyCred To Award Point's Each Time A User Watches The Same Video’ is closed to new replies.