Title: Lara Marks's Replies | WordPress.org

---

# Lara Marks

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/users/laramarks/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/laramarks/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Avatar Manager] Number of questions (migrating from User Photo plugin)](https://wordpress.org/support/topic/number-of-questions-migrating-from-user-photo-plugin/)
 *  [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/number-of-questions-migrating-from-user-photo-plugin/#post-4252212)
 * I need to restrict users to local avatars only too, no gravatars. Any ETA on 
   when this will be added?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred] Remove "My Balance" from wp-admin-bar](https://wordpress.org/support/topic/remove-my-balance-from-wp-admin-bar/)
 *  [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/remove-my-balance-from-wp-admin-bar/#post-4190033)
 * Somehow this function stopped working on 1.3.1, did the myCRED hook change?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred] Guest comments not affecting comment points?](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/)
 *  [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/page/2/#post-4193962)
 * Works! Thank you Gabriel.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred] Guest comments not affecting comment points?](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/)
 *  [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/page/2/#post-4193959)
 * I am returning with another request of adjustment. Currently, this awards points
   to Content Author (author of post). So basically the author gets points for commenting
   on their own post.
 * Is there a possibility to check if the commenter is the author of post, and if
   so, skip/don’t award?
 * Here is the complete code that I use:
 *     ```
       if ( function_exists( 'mycred_add' ) ) {
       	add_action( 'comment_post',              'award_new_guest_comments', 10, 2 );
       	function award_new_guest_comments( $comment_id, $comment_status )
       	{
       		if ( $comment_status == '1' )
       			award_points_for_guest_comments( 'approved', '', $comment_id );
       	}
       	add_action( 'transition_comment_status', 'award_points_for_guest_comments', 10, 3 );
       	function award_points_for_guest_comments( $new_status, $old_status, $comment )
       	{
       		// Look for approved comments
       		if ( $new_status != 'approved' ) return;
   
       		// Grab the comment object in case it is not there
       		if ( !is_object( $comment ) )
       			$comment = get_comment( $comment );
   
       		// Ignore Pingbacks or Trackbacks
       		if ( !empty( $comment->comment_type ) ) return;
   
       		// Get post author
       		$post = get_post( (int) $comment->comment_post_ID );
       		$post_author = $post->post_author;
   
       		// Check if the post author should be excluded
       		if ( mycred_exclude_user( $post_author ) === true ) return;
   
       		// Award points to author
       		mycred_add(
       			'new_comment', // reference
       			$post_author, // who to get points
       			1, // number of points to award
       			'Guest comment on <a href=%c_post_url%>%c_post_title%</a>', // log template to use
       			$comment->comment_ID, // save comment id as reference id
       			array( 'ref_type' => 'comment' ) // enable support for comment related template tags
       		);
       	}
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred] Stop content authors from gaining points when commenting on their own post](https://wordpress.org/support/topic/stop-content-authors-from-gaining-points-when-commenting-on-their-own-post/)
 *  Thread Starter [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/stop-content-authors-from-gaining-points-when-commenting-on-their-own-post/#post-4209370)
 * Alright! To clarify, instead of:
 * > The number of comments per post that grants points.
 * I suggest:
 * > The number of comments per post that grants points to comment author.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred] Stop content authors from gaining points when commenting on their own post](https://wordpress.org/support/topic/stop-content-authors-from-gaining-points-when-commenting-on-their-own-post/)
 *  Thread Starter [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/stop-content-authors-from-gaining-points-when-commenting-on-their-own-post/#post-4209223)
 * Oh I see now. The “Limit per post” field relates to individual commenter?
 * When I first came across that setting, I thought that it meant total comment 
   limit for the post (e.g. max 100 comments from any user on each post)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Add Multiple Users for WordPress] [PATCH] Lots of undefined variable fixes](https://wordpress.org/support/topic/patch-lots-of-undefined-variable-fixes/)
 *  [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/patch-lots-of-undefined-variable-fixes/#post-4181956)
 * Thank you very much for posting this. I hope that the plugin author will implement
   it in the next update.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred] Points for receiving a comment and question about logs](https://wordpress.org/support/topic/points-for-receiving-a-comment-and-question-about-logs/)
 *  [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/points-for-receiving-a-comment-and-question-about-logs/#post-4173491)
 * This was solved by Gabriel in a different thread.
 * Browse to your hook settings and set points for content authors to 0. Then add
   this to functions.php:
 *     ```
       if ( function_exists( 'mycred_add' ) ) {
       	add_action( 'comment_post',              'award_new_guest_comments', 10, 2 );
       	function award_new_guest_comments( $comment_id, $comment_status )
       	{
       		if ( $comment_status == '1' )
       			award_points_for_guest_comments( 'approved', '', $comment_id );
       	}
       	add_action( 'transition_comment_status', 'award_points_for_guest_comments', 10, 3 );
       	function award_points_for_guest_comments( $new_status, $old_status, $comment )
       	{
       		// Look for approved comments
       		if ( $new_status != 'approved' ) return;
   
       		// Grab the comment object in case it is not there
       		if ( !is_object( $comment ) )
       			$comment = get_comment( $comment );
   
       		// Ignore Pingbacks or Trackbacks
       		if ( !empty( $comment->comment_type ) ) return;
   
       		// Get post author
       		$post = get_post( (int) $comment->comment_post_ID );
       		$post_author = $post->post_author;
   
       		// Check if the post author should be excluded
       		if ( mycred_exclude_user( $post_author ) === true ) return;
   
       		// Award points to author
       		mycred_add(
       			'new_comment', // reference
       			$post_author, // who to get points
       			1, // number of points to award
       			'Someone posted a comment on <a href=%c_post_url%>%c_post_title%</a>', // log template to use
       			$comment->comment_ID, // save comment id as reference id
       			array( 'ref_type' => 'comment' ) // enable support for comment related template tags
       		);
       	}
       }
       ```
   
 * With this code, you can add your own log entry. Oh and, this gives points to 
   content author if the commenter is guest too (the core plugin doesn’t).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred] Guest comments not affecting comment points?](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/)
 *  [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/page/2/#post-4193899)
 * Ah, sorry to say but one final bug remains. It awards the post author twice if
   the commenter is a member (because I have set 1 point for Content Author in the
   core comment settings).
 * Can we make this custom hook to ignore giving points if the commenter is already
   a member, because the core plugin does that already…
 * edit: or the alternative would be to set points to 0 in core settings? 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred] Big crash on V1.3 upgrade – unable to restore](https://wordpress.org/support/topic/big-crash-on-v13-upgrade-unable-to-restore/)
 *  [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/big-crash-on-v13-upgrade-unable-to-restore/#post-4197871)
 * [@xberg](https://wordpress.org/support/users/xberg/) Please provide more feedback.
   More detail will give opportunity for plugin developer to fix any potential issues
   for other users.
 * So, have you added any custom hooks to myCRED? What is WP_DEBUG telling you? 
   Activate it through your config file and have a look through errors and post 
   them here. And maybe post a complete list of activated plugins, it can be useful.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred] Deactivate mycred-widget-css?](https://wordpress.org/support/topic/deactivate-mycred-widget-css/)
 *  Thread Starter [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/deactivate-mycred-widget-css/#post-4194957)
 * Thank you!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred] Guest comments not affecting comment points?](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/)
 *  [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/#post-4193852)
 * And it did! You are a star! Cheers for your hard work, it doesn’t go unnoticed.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred] Guest comments not affecting comment points?](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/)
 *  [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/#post-4193848)
 * I enabled WP_DEBUG and it did not show errors, only these warnings:
 * > Warning: session_start(): Cannot send session cache limiter – headers already
   > sent (output started at public_html/wp-content/plugins/w3-total-cache/lib/W3/
   > Cache/Memcached.php:15) in public_html/wp-content/plugins/myqaptcha/myQaptcha.
   > php on line 44
   > Warning: Cannot modify header information – headers already sent by (output
   > started at public_html/wp-content/plugins/w3-total-cache/lib/W3/Cache/Memcached.
   > php:15) in public_html/wp-includes/comment.php on line 621
   > Warning: Cannot modify header information – headers already sent by (output
   > started at public_html/wp-content/plugins/w3-total-cache/lib/W3/Cache/Memcached.
   > php:15) in public_html/wp-includes/comment.php on line 622
   > Warning: Cannot modify header information – headers already sent by (output
   > started at public_html/wp-content/plugins/w3-total-cache/lib/W3/Cache/Memcached.
   > php:15) in public_html/wp-includes/comment.php on line 623
   > Warning: Cannot modify header information – headers already sent by (output
   > started at public_html/wp-content/plugins/w3-total-cache/lib/W3/Cache/Memcached.
   > php:15) in public_html/wp-includes/pluggable.php on line 875
 * About your second step, I’m not sure what you mean. I have not excluded any users
   from using myCRED. And I tried guest commenting on more than one post.
 * Did that code work on your test environment?
 * Cheers for the support!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred] Guest comments not affecting comment points?](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/)
 *  [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/#post-4193845)
 * Added your fix but is still not working. Posted guest comment and no update in
   the logs. Maybe I am doing something wrong?
 * This is the complete code that I use:
 *     ```
       add_action( 'transition_comment_status', 'award_points_for_guest_comments', 10, 3 );
       function award_points_for_guest_comments( $new_status, $old_status, $comment )
       {
       	// Look for approved comments
       	if ( $new_status != 'approved' ) return;
   
       	// Grab the comment object in case it is not there
       	if ( !is_object( $comment ) )
       		$comment = get_comment( $comment );
   
       	// Ignore Pingbacks or Trackbacks
       	if ( !empty( $comment->comment_type ) ) return;
   
       	// Get post author
       	$post = get_post( (int) $comment->comment_post_ID );
       	$post_author = $post->post_author;
   
       	// Check if the post author should be excluded
       	if ( mycred_exclude_user( $post_author ) === true ) return;
   
       	// Award points to author
       	mycred_add(
       		'new_comment', // reference
       		$post_author, // who to get points
       		1, // number of points to award
       		'Guest comment on <a href=%c_post_url%>%c_post_title%</a>', // log template to use
       		$comment->comment_ID, // save comment id as reference id
       		array( 'ref_type' => 'comment' ) // enable support for comment related template tags
       	);
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred] Guest comments not affecting comment points?](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/)
 *  [Lara Marks](https://wordpress.org/support/users/laramarks/)
 * (@laramarks)
 * [13 years ago](https://wordpress.org/support/topic/guest-comments-not-affecting-comment-points/#post-4193766)
 * And when permanently deleting a comment, these warnings are shown:
 * > Warning: call_user_func_array() expects parameter 1 to be a valid callback,
   > first array member is not a valid class name or object in /public_html/wp-includes/
   > plugin.php on line 406
   > Warning: Cannot modify header information – headers already sent by (output
   > started at /public_html/wp-includes/plugin.php:406) in /public_html/wp-includes/
   > class-wp-ajax-response.php on line 129

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/users/laramarks/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/laramarks/replies/page/2/?output_format=md)