Title: MathiasP's Replies | WordPress.org

---

# MathiasP

  [  ](https://wordpress.org/support/users/mathiasp/)

 *   [Profile](https://wordpress.org/support/users/mathiasp/)
 *   [Topics Started](https://wordpress.org/support/users/mathiasp/topics/)
 *   [Replies Created](https://wordpress.org/support/users/mathiasp/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/mathiasp/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/mathiasp/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/mathiasp/engagements/)
 *   [Favorites](https://wordpress.org/support/users/mathiasp/favorites/)

 Search replies:

## Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPoints] Hide My Points / WordPoints from wp-admin/profile.php](https://wordpress.org/support/topic/hide-my-points-wordpoints-from-wp-adminprofilephp/)
 *  Thread Starter [MathiasP](https://wordpress.org/support/users/mathiasp/)
 * (@mathiasp)
 * [11 years ago](https://wordpress.org/support/topic/hide-my-points-wordpoints-from-wp-adminprofilephp/#post-6519655)
 * Great thx!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPoints] Why saving Points in usermeta](https://wordpress.org/support/topic/why-saving-points-in-usermeta/)
 *  Thread Starter [MathiasP](https://wordpress.org/support/users/mathiasp/)
 * (@mathiasp)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/why-saving-points-in-usermeta/#post-6368889)
 * Totally, thank you!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPoints] substract more poits than earned in one point hook](https://wordpress.org/support/topic/substract-more-poits-than-earned-in-one-point-hook/)
 *  Thread Starter [MathiasP](https://wordpress.org/support/users/mathiasp/)
 * (@mathiasp)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/substract-more-poits-than-earned-in-one-point-hook/#post-6359009)
 * Uh yeah the – did it 😉 thx
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPoints] substract more poits than earned in one point hook](https://wordpress.org/support/topic/substract-more-poits-than-earned-in-one-point-hook/)
 *  Thread Starter [MathiasP](https://wordpress.org/support/users/mathiasp/)
 * (@mathiasp)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/substract-more-poits-than-earned-in-one-point-hook/#post-6358985)
 * Hey, review for a good plugin 🙂
 * one more question:
 * I tried to implement the minimum filter but it doesn’t work the way I need it
 * Here is my code:
 *     ```
       function user_stats_set_minimum_points($minimum, $type){
           if ( 'substract' === $type ) {
               $minimum = 5000;
           }
           return $minimum;
       }
       add_filter('wordpoints_points_minimum','user_stats_set_minimum_points',10,2);
       ```
   
 * If I now substract points with
 *     ```
       wordpoints_subtract_points($user_id, 200, 'substract', 'training_event_winner');
       ```
   
 * the log shows (+) 5000 Points for the user in substract points type.
 * What I need is: If I use wordpoints_substract_points in the Points type substract(
   let’s say 200) just substract the points even if the user has 0 Points in that
   points type
 * p.s.: I dont even need a limit just substract some points if need to.
 * is it possible with this filter?
 * I hope you unterstand my question 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WTI Like Post] User ID is set to 0 in database](https://wordpress.org/support/topic/user-id-is-set-to-0-in-database/)
 *  Thread Starter [MathiasP](https://wordpress.org/support/users/mathiasp/)
 * (@mathiasp)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/user-id-is-set-to-0-in-database/#post-6178810)
 * You just need to fix the wti_like_post_ajax.php
 *     ```
       $user_ID = get_current_user_id();
       if ( $task == "like" ) {
       				if ( $has_already_voted ) {
       					$query = "UPDATE {$wpdb->prefix}wti_like_post SET ";
       					$query .= "value = value + 1, ";
       					$query .= "date_time = '" . date( 'Y-m-d H:i:s' ) . "' ";
       					$query .= "WHERE post_id = '" . $post_id . "' AND ";
       					$query .= "ip = '$ip'";
       				} else {
       					$query = "INSERT INTO {$wpdb->prefix}wti_like_post SET ";
       					$query .= "post_id = '" . $post_id . "', ";
       					$query .= "value = '1', ";
       					$query .= "date_time = '" . date( 'Y-m-d H:i:s' ) . "', ";
       					$query .= "ip = '$ip', ";
                           $query .= "user_id = '$user_ID'";
       				}
       			} else {
       				if ( $has_already_voted ) {
       					$query = "UPDATE {$wpdb->prefix}wti_like_post SET ";
       					$query .= "value = value - 1, ";
       					$query .= "date_time = '" . date( 'Y-m-d H:i:s' ) . "' ";
       					$query .= "WHERE post_id = '" . $post_id . "' AND ";
       					$query .= "ip = '$ip'";
       				} else {
       					$query = "INSERT INTO {$wpdb->prefix}wti_like_post SET ";
       					$query .= "post_id = '" . $post_id . "', ";
       					$query .= "value = '-1', ";
       					$query .= "date_time = '" . date( 'Y-m-d H:i:s' ) . "', ";
       					$query .= "ip = '$ip', ";
                           $query .= "user_id = '$user_ID'";
       				}
       			}
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPoints] Give a Point for a post – Hook needed](https://wordpress.org/support/topic/give-a-point-for-a-post-hook-needed/)
 *  Thread Starter [MathiasP](https://wordpress.org/support/users/mathiasp/)
 * (@mathiasp)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/give-a-point-for-a-post-hook-needed/#post-6175389)
 * Thank you. I think I will use WTI Like posts to realize that. Thanks for the 
   quick answer and I hope u will implement the function in a future update.. but
   as I recognized u have a lot of work to do 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPoints] "Likes" Hook](https://wordpress.org/support/topic/likes-hook/)
 *  [MathiasP](https://wordpress.org/support/users/mathiasp/)
 * (@mathiasp)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/likes-hook/#post-5772012)
 * Hey robint,
 * did you just get the Hook working well?
    I need to realize the same thing (see
   the newest topic in this support section)
 * Maybe you can help me with that?
 * Mathias

Viewing 7 replies - 1 through 7 (of 7 total)