Shiba

Adventures in WordPress

  • Home
  • Dog
  • Art
  • Contact
  • WordPress Articles
    • WP Plugins
    • WP Programming
    • WP Admin Panels
    • WP Theme Design
    • WP How-To
    • WP Theme Images
You are here: Home / WordPress Plugin / Shiba Comments / WordPress Comments Plugin – Cache and Customize Your Gravatars

WordPress Comments Plugin – Cache and Customize Your Gravatars

by ShibaShake 26 Comments

Shiba Gravatar is now called Shiba Comments because we are broadening the plugin to include other comment related capabilities.

The Shiba Comments Plugin allows you to –

  • Cache gravatar images locally on your server as well as use your own set of gravatar images.
  • Move comments between posts.
  • Parent a comment to any other comment. Note – make sure not to create comment loops while doing this.
  • Change the comment IP.

[Most recent Shiba Comments Plugin updates]

December, 2015
Tested on WordPress 4.4. No changes needed.

August, 2015
Tested on WordPress 4.3. No changes needed.

How to Get Shiba Comments Plugin.

1. Cache WordPress gravatar images locally on your server.

The gravatar.com site may sometimes get overly busy and as a result, it may significantly slow-down the load time of your WordPress posts and pages. This is especially true if you have many comments on one page.

Note that the slow-down will occur even if your comments may not have gravatar images registered to them. In this case, a call still has to be made to the gravatar.com site which then sends back a generated gravatar image (e.g. Wavatar, Monsters) or a fixed default image (e.g. Mystery Man).

Current WordPress gravatar settings.
”Current

The Shiba Comments Plugin will cache all of the gravatar images locally on your server.

When your article gets viewed, the author images can be retrieved quickly from your local cache without having to visit the gravatar.com site.

Unlike other gravatar caching plugins, the Shiba plugin will only create and update the gravatar cache when a new comment gets submitted, or when you explicitly tell it to rebuild the cache.

The disadvantage – You need to manually instruct the system to update its cache.

The advantage – The plugin is much simpler and you will not need to schedule any cron jobs on your server.

After you install the Shiba Comments plugin, go to Settings >> Discussion to assign the gravatar type of your choice. Note that there is a new gravatar setting called Shiba Gravatar. Select Shiba Gravatar if you want to use your own custom gravatars for non-registered comment authors.

New Shiba Gravatar option in Settings >> Discussion.
”New

Next, go to Comments >> Cache Gravatars to create an initial cache for all your existing comments.

There are three options in the Cache Gravatars menu –

  • Cache Gravatars – Extracts user information from all current comments, and use that email list to expand the gravatar database. Use Cache Gravatars when you first install the plugin, and need to populate your gravatar cache from scratch.
  • Update Cache – Updates existing user entries within the gravatar database. Use Update Cache if your cache has already been populated, and you only want to check for new registered gravatar images.
  • Clear Cache – Clears your gravatar cache. If your cache is corrupted, you can rebuild it by doing Clear Cache and then Cache Gravatars.

Note – When caching generated gravatars, make sure to always Clear Cache first, then Cache Gravatars.

Caching generated gravatars (wavatar). When caching generated gravatars make sure to first Clear Cache, then Cache Gravatars.
Caching generated gravatars (wavatar). When caching generated gravatars make sure to first Clear Cache, then Cache Gravatars.

I have observed that most people do not change their gravatar images very frequently. As a result, it is unnecessary to constantly update the gravatar cache, and place extra load on your web server.

I created this plugin because personally, I prefer to be in control of when the gravatar cache gets updated – which need not be very often at all.

2. Custom Gravatar Images

Custom gravatar images come into play when the comment author does not enter in an email address or when the email address is not linked to a gravatar account.

When this occurs, you can either instruct your WordPress system to return a fixed default image, or generate a custom image from one of the predefined custom image sets (e.g. Wavatar, Monsters). Currently, you can personalize the fixed default gravatar image, but it is not possible to use your own custom image set.

The Shiba Comments plugin allows you to specify your own set of custom gravatars. All you have to do is attach your set of custom images to a post, page, or gallery using the standard WordPress Media Library. Then, assign that gallery to the Gravatar Plugin in the Comments >> Cache Gravatar page.

If no gallery is assigned, the plugin will use its own set of custom gravatar images (shown below).

shiba-guy1
shiba-guy2
shiba-guy3

shiba-guy4
shiba-guy5
shiba-guy7

shiba-guy8
shiba-guy9
shiba-guy10

shiba-guy11
shiba-guy12
shiba-guy13

shiba-guy14
shiba-guy15
shiba-guy17

Shiba Comments Future Additions

  • Add update scheduling support (using wp_cron) in addition to manual update capability.

How to Get Shiba Comments Plugin.

Shiba Comments Plugin Updates

Shiba Comments 1.3.1

September 14th, 2014

  • Updated anonymous nonce creation function for the background cache gravatar process.
  • Tested on WordPress 4.0.

Shiba Comments 1.3

April 20th, 2014

  • Updated plugin directory and url to use functions instead of constants.
  • Added metaboxes to the Cache Gravatar page.
  • Updated the Cache Gravatar page so that it uses standard WordPress forms, settings, and messages.
  • Tested on WordPress 3.9.

Shiba Comments 1.2

Jan 20th, 2013

  • Streamlined caching process so that it makes fewer database calls.
  • Added security nonce check for caching process.
  • Added ability to stop caching process.

Shiba Comments 1.1.3

December 13th, 2012

  • Updated for WordPress 3.5.
  • Added AJAX calls for expanded quick edit functions.
  • Check for loops when assigning comment parent.
  • Divide comment avatar processing into segments so as to limit memory usage requirements. We can set the segment size in the Cache Gravatar page. A higher group size means higher memory requirements and vice versa.
  • New Emoti-Guy default avatar images!

Shiba Comments 1.0

Aug 3rd, 2012

  • Updated for WordPress 3.4.
  • Added ability to change comment post, comment parent, and comment IP from the Edit Comment and Quick Edit menus.
  • Upgraded gravatar cache to use user_id (in addition to comment email, IP, and author) while caching avatar images.

WordPress Gravatar Plugin 1.4

Jan 10th, 2011

  • Updated for WordPress 3.1.
  • Plugin will now cache ALL gravatar images including generated gravatar images. Only cache generated images if your site has a manageable number of comment authors. Otherwise, it is more efficient to use your own default set of gravatar images.
  • Gravatar images are now cached according to your gravatar settings in Settings >> Discussion.

WordPress Gravatar Plugin 1.3

June 29th, 2010

  • Attach a post, page, or gallery as your Custom Gravatar gallery. This allows you to use your own set of custom images for comment authors that are not registered with gravatar.com.
  • Easily switch to different sets of custom gravatar images by attaching the plugin to different posts or galleries.
  • Easily switch between using standard WordPress gravatars and your custom gravatars through the standard gravatar setting under Settings >> Discussion.
  • Plugin no longer uses proc_open to run the caching process. It should now work across most hosting platforms.

WordPress Gravatar Plugin 1.2

  • Plugin is updated for WordPress 3.0. It was tested on both 2.9 and 3.0.
  • Plugin no longer uses proc_open to run the caching process. It should now work across most hosting platforms.
  • Custom gravatar images will now appear in the WordPress administration menus.
  • Added an Update Cache button for updating existing gravatar entries in the cache.

WordPress Gravatar Plugin 1.0

  • Provides manual gravatar caching and custom gravatar image sets.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Comments

« Previous 1 2
  1. Roee yossef says

    October 14, 2017 at 2:40 pm

    Great Article, Thank you 🙂

    Reply
  2. Brandon says

    January 12, 2013 at 9:28 pm

    I am apparently illiterate when it comes to using plug-ins. I need some help changing my avatar to a personal picture for our blogging purposes. Can someone please Help? email me please.

    Reply
  3. jollymoon says

    September 9, 2012 at 10:06 pm

    Warning: Missing argument 1 for Shiba_Gravatar_Cache::get_custom_avatar(), called in /../blog/wp-content/plugins/shiba-comments/shiba-gravatar-settings.php on line 36 and defined in /../blog/wp-content/plugins/shiba-comments/shiba-gravatar-cache.php on line 166

    any ideas why I see this on the DISCUSSION page wp 3.4.2 in the avatar section??

    Reply
    • ShibaShake says

      September 10, 2012 at 8:40 pm

      Should be fixed in the new zip. Thanks for letting me know.

      Reply
  4. mark robertson says

    October 6, 2011 at 2:53 pm

    Is this compatible with w3total cache?

    Reply
  5. banesto says

    January 3, 2011 at 4:24 am

    Thanks for the work being done, but:
    1. title should not include word Gravatar as it has nothing to do with it – plugin displays local avatars for users without gravatars. I was looking for gravatar caching plugin and Your plugin name implies it does it, but it’s not.
    2. it gets a lot of errors when folder permissions are not set correctly and in readme file there are no mentioning about folder permissions.

    Reply
    • ShibaShake says

      January 3, 2011 at 7:45 am

      Dear Banesto,
      1. The plugin caches gravatars locally as well as displays local avatars.
      2. Thanks for letting me know. Which folders result in what errors? If you give me some details I can include it in the documentation.

      Reply
  6. Lane says

    June 24, 2010 at 7:54 pm

    Feature Request:

    Gravatar images created from a media gallery.

    Thanks for the great plugins! You make wordpress great!

    Reply
    • ShibaShake says

      June 25, 2010 at 1:25 pm

      That is an awesome idea! It would simplify the interface significantly, and make it easy to swap different custom images in and out.

      I will definitely start working on this next.

      Reply
  7. Monika says

    June 20, 2010 at 4:23 pm

    Hello,
    maybe I got it 😉 I try it on a very new domain with only 4 comments.

    I delete all your images and now your plugin shows my default gravatar and my admin-gravatar correct.

    No I’ll try it on another domain – there are more than 10thousand comments.

    I will give it a try 😉 and I’ll come back for feedback– if it does its job it would be great:-)

    Reply
    • ShibaShake says

      June 20, 2010 at 8:42 pm

      Hello Monika,
      If you have replaced the images, then make sure to do “Clear Cache” and then “Cache Gravatars” again to link the emails to the new images.

      Let me know if you run into any issues.

      Reply
  8. ShibaShake says

    May 9, 2010 at 8:26 am

    Hi Lynsey,

    This time all avatars have been replaced with the uploaded avatars until I went through and edited by simply re-saving the comments.

    Yikes – you really shouldn’t have to do that.

    In a situation like this, just try doing clear cache and build cache. This will rebuild the cache from the comments database.

    I also discovered a few days ago that proc_open can stop working due to certain server errors. This happened with one of my servers last week and I was getting the same kind of behavior as you did the first time.

    In the next release I will work on creating a cache option that does not use proc_open. I will also look into having the custom gravatars appear on admin screens, and integrate a custom gravatar interface into the current avatar control panel.

    Thanks for letting me know all the issues you encountered with the plugin. It helps a lot with future improvements.

    Reply
  9. Lynsey says

    May 9, 2010 at 5:04 am

    Just done another install, this time at http://freshnewday.net. Again, works, but not in an expected way. This time all avatars have been replaced with the uploaded avatars until I went through and edited by simply re-saving the comments. On each edit/save those comments with ‘official’ gravatars were restored. Working, but working in unexpected ways.

    Reply
« Previous 1 2

Recent Posts

  • Screenshot of an example article in code view of a modified Gutenberg editor.How to Harness the Power of WordPress Gutenberg Blocks and Combine It with Legacy Free-Form Text
  • Screenshot of the Success, WordPress has been installed page.Migrating Your WordPress Website to Amazon EC2 (AWS)
  • Screenshot of WinSCP for creating a SFTP configuration.How to Set-Up SFTP on Amazon EC2 (AWS)
  • WordPress Gutenberg code view screenshot of this article.How to Prevent Gutenberg Autop from Messing Up Your Code, Shortcodes, and Scripts
  • Screenshot of the Success, WordPress has been installed page.How to Create a WordPress Website on Amazon EC2 (AWS)

Recent Comments

  • Screenshot of an example article in code view of a modified Gutenberg editor.How to Harness the Power of WordPress Gutenberg Blocks and Combine It with Legacy Free-Form Text (1)
    • tom
      - hi,my experience was like the same, but for me as theme developer the "lazy blocks"(https://wordpress.org/plugins/lazy-blocks/) ...
  • WordPress Custom Taxonomy Input Panels (106)
    • Phil T
      - This is unnecessarily confusing. Why declare a variable with the same name as your taxonomy? Why did you choose a taxonomy ...
  • Create Pop-up Windows in Your WordPress Blog with Thickbox (57)
    • Jim Camomile
      - I have used this tutorial several times and it is one of the few simple and effective ways to add popups with dynamic content, ...
  • How to Add Admin Columns in WordPress (7)
    • Andy Globe
      - Hi Friends, I am facing two problem in WordPress admin1. Load custom CSS for wp-admin on user-role base (editor) 2. ...
  • Example blog front-page using excerpts and the Shiba Theme.Optimize Your WordPress Plugins with Tags (5)
    • DF
      - thanks, i went the other way and added a filter if pages I wanted.

Copyright © 2023 · Genesis Skins by ShibaShake · Terms of Service · Privacy Policy ·