tgilber007
Forum Replies Created
-
1. resolved
2. Where to see the list of available actions and filters for forminator plugin. Like this https://hookr.io/plugins/buddypress/2.8.2/actions/Thanks @wpmudev-support7 and @wpmudev-support8
Working Perfectly1) Hi, I try to delete a poll via API after calling a function it returns – wordpress error (There has been a critical error on this website.)
function delete_poll() { $poll_id = 65; $form = Forminator_API::delete_poll( $poll_id ); }
Or
2) How to delete the poll automatically after the vote open until time (specified time)
https://prnt.sc/qPaizhlkRtl7- This reply was modified 2 years, 8 months ago by tgilber007.
Forum: Developing with WordPress
In reply to: execute shortcode and link from custom fieldThank You, Steve
add_filter( 'mycred_video_output', 'mycred_limit_video_views', 10, 2 ); function mycred_limit_video_views( $output, $atts ) { global $wpdb; $mycred = mycred(); $user_id = get_current_user_id(); $count = $wpdb->get_var( "SELECT COUNT( * ) FROM {$mycred->log_table} WHERE ref = 'watching_video' AND user_id = %d AND data = %s;", $user_id, $atts['id'] ); $limit = 1; //total no of views if ( $count >= $limit ) return ''; return $output; }
I tried out this code but it not work
Thank you for a suggestion, By surfing online i find the below method and it’s work well.
1. But i have one doubt if this code is secure for use or not.
2. How to apply this code only for form with id (342).Thanks in advance
add_action( 'forminator_post_data_field_post_saved', function($post_id, $field, $data){ $the_post = array( 'ID' => $post_id, //the ID of the Post 'meta_input' => array( 'custom' => '<a href="'.$_POST['url-1'] .'">view</a>' ) ); wp_update_post( $the_post ); }, 10, 3);
- This reply was modified 2 years, 11 months ago by tgilber007.
Thanks @arsalantariq Now it works well
Thank you the code is working well
1.another how to disable the video after it watched by the user
2. Allow users to gain points for watching the same video every 24 hours https://pastebin.com/h9wdkZpX This code is not work for me
I tried this one also its not work https://mycred.me/support/forums/topic/seem-to-have-lost-video-watching-points/
add_action( 'mycred_has_entry', 'mycred_pro_unlimited_video_points', 10, 6 ); function mycred_pro_unlimited_video_points( $has_entry, $reference, $ref_id, $user_id, $data, $type ) { if ( $reference == 'watching_video' ) return false; return $has_entry; }
- This reply was modified 3 years ago by tgilber007.
And how to work with this code
https://gist.github.com/mycred/020fd2d97529267a98133949c67532e01.In Poll Voting Limit method how to I add the third option User Ip, Brower cookie, third One (User Id) #limit submission by user id
2. In poll how to display a final custom messages to the users like in quiz->behaviour-> final message
3. For Quiz, yes i collecting Leads on Quiz?
- This reply was modified 3 years, 1 month ago by tgilber007.
the Submission Behavior and After Submission option is not available in polls and quizes
Thank you for reply
the above code is work well with forms but how limit submission in polls and quiz how to achieve thisAnd How to give mycred plugin points after submitting a poll or quiz.
i want to show the post tab to author profiles only not for subscribers
Yeh I am Fine
one small issue the Message appears after the user logged in.