WordPress.org

Ready to get started?Download WordPress

Forums

Gravatar Signup Encouragement
False singup encouragement for non-G avatars (2 posts)

  1. Parakoos
    Member
    Posted 1 year ago #

    I found a problem in that the plugin doesn't make use of the desired Avatar ratings that you can set in WordPress. I had a situation recently where a reader had an image not appropriate for G but ok for PG, R and X. My wordpress site allows G, PG and R avatars, so his avatar does show up. However, the Gravatar Signup Encourager only checks if the G rating is there, and it wasn't. Thus my reader always got the signup encouragement.

    I fixed it by making the following changes in the plugin:

    gravatar-signup-encouragment.php: line 654 (ish)

    jQuery.post("<?php echo gravatar_signup_encouragement_check_url(); ?>",{ gravmail:jQuery(this).val(), gravrating:"<?php echo get_option('avatar_rating') ; ?>" }

    gravatar-check.php:

    $fileUrl = "http://www.gravatar.com/avatar/".md5( strtolower($gravatar_email) )."?s=2&d=404";<br />
    $rating = $_POST['gravrating'];<br />
    if ( !empty( $rating ) )<br />
       $fileUrl .= "&r={$rating}";

    This only fixes the problem for how I use the plugin. If you want to incorporate this change in your plugin, you may want to do a more thorough job.

    Hope it helps, and thanks for a great plugin.

    http://wordpress.org/extend/plugins/gravatar-signup-encouragement/

  2. Milan Dinić
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for report. This is added in version 3.1.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic