=== Add Local Avatar ===
Contributors: peterwsterling
Donate link: http://www.sterling-adventures.co.uk/blog/2008/03/01/avatars-plugin/
Author URI: http://www.sterling-adventures.co.uk/
Plugin URI: http://www.sterling-adventures.co.uk/blog/2008/03/01/avatars-plugin/
Tags: avatar, gravatar, images, user, pictures, photos, global, local
Requires at least: 2.5
Tested up to: 3.0
Stable tag: trunk
This plugin adds the ability to have local avatars in WordPress 2.5+
== Description ==
Adds local (private) avatars for your users. Maybe your users don't want a global avatar, aren't IT savvy enough to set a Gravatar up, simply want a private avatar for your blog, or any other reason too...
The plug-in now delivers the much requested feature of allowing users to upload their own local avatar. And, the latest new feature allows your users to use their Twitter avatar. The order of precedence is; Local, Twitter, then Global. In other words; if you define a Local avatar for a user, that will be used, if there is no Local avatar defined and a Twitter ID is given for a user, the plugin will try to use that avatar. Lastly, where no Local avatar is defined and no Twitter ID is given (or Twitter doesn't return a match), a unique Global avatar (Gravatar) will be generated.
The local avatar feature list:
- Have global or local avatars for your users.
- Use Twitter avatars for your users.
- Allow avatars to be included in posts. This is achieved securely; e-mail addresses are not exposed.
- Detailed control over the default avatar to use for those users who do not have a global or local avatar. Allows a choice of a custom image, 'mystery' blank image, blank, Wavatar, Monster ID, or Identicon.
- Wraps avatars in code to support SnapShots (www.snap.com), should your site use these.
- Permits users to upload their own local avatars.
You may also be interested in the sister Comments with Avatars plugin.
Plus there is now a new sidebar widget extension to the plug-in that provides a feature allowing users to manage their avatar from the sidebar without having to use WordPress' profile administration page. It provides the same capability as the profile page. This new feature provides yet more support for users who may not, for example, be savvy enough to use the WordPress administration interface. Get the extension here.
Donations are welcome and help keep development going.
== Installation ==
* Just put the plug-in into your plug-in directory and activate it.
* Use the form, Users » Avatars, to define any local avatars for your users. Specify the URI for an avatar image, something like http://your.domain/avatars/image.jpg, where avatars is a directory containing your local images.
* Also, you may set a default size (in pixels) for avatars and define a default image (e.g. http://your.domain/avatars/default.jpg) to use when no local or global avatar is available.
* Plus, you can also take advantage of the Gravatar.com feature to use Wavatar, Monster ID or Identicon.
* Use: <?php $avtr = get_avatar(id [, size [, default-image-url]]); echo $avtr; ?>
* More example code to include in your template files is documented on the Users » Avatars page.
== Change Log ==
Changes and feature additions for the Local Avatar plugin:
- 0.1 - Initial release.
- 1.0 - Added pagination of users list.
- 2.0 - Added pagination of the commenters list too.
- 2.1 - Added example formatting information.
- 3.0 - Added ability to place avatars in written post content (plus other tweaks).
- 3.1 - Minor tweaks to usage text and options.
- 3.2 - Added check for administration pages to stop user URL wrapping breaking comment editing.
- 3.3 - Spelling fixes!
- 4.0 - Wavatar, Monster ID and Identicon can be used.
- 4.1 - Author credit.
- 4.2 - Fix for credit option un-setting.
- 5.0 - Avatar options should only be managed by Administrators.
- 5.1 - Minor fix to repetition of show avatars WordPress setting.
- 5.2 - Cope with WP 2.6 avatar default.
- 6.0 - Added feature to allow users to upload their own avatar.
- 6.1 - Explanation of directory structure and 'chmod' fix, thanks to Tobias Schwarz.
- 6.2 - Improved unique file name creation, optional avatar upload resizing/cropping, and PHP 4 fix. Thanks to Gioele Agostinelli.
- 6.3 - Oops, a bug (mistake) with the scaling size fixed.
- 6.4 - Error in file naming fixed, with some help from "noyz319".
- 6.5 - Upload file type check (thanks to SumoSulsi) and internationalisation preparation.
- 6.6 - Fix to scaling when upgrading from old version of plugin without scaling option.
- 6.7 - Fix for lowercase extensions.
- 6.8 - Option for nickname / first name & surname.
- 7.0 - Support for user profile widget plug-in.
- 7.1 - Update for Marc Adrian to provide support for option for showing text in the optional widget.
- 7.2 - Class added to help with styling widget.
- 7.3 - Fix for user avatar upload that doesn't need re-sizing and a Russian translation thanks to "Fatcow".
- 7.4 - Root directory no longer DOCUMENT_ROOT.
- 7.5 - Use DOCUMENT_ROOT option for legacy users.
- 7.6 - Check for required core WP upload functions, only required for themes that expose the user profile pages.
- 8.0 - Added option to try to use a Twitter avatar.
- 8.1 - Simplified Twitter image URL logic.
== Screenshots ==
1. An example of the main avatars page. Manage users global and local avatars etc.
2. The avatars options configuration section of the main avatars page.
3. From the WordPress profile page, the new section allows users to upload their own local avatar.
== Thanks ==
A lot of hard work has gone in to this plug-in, much of it at the request of people who use it, and I hope it is useful to you too! Please consider these things...
- Please recognise your use of the plug-in on your blog. Maybe post an article (with a link back to http://www.sterling-adventures.co.uk/blog/) to say how you've integrated the plug-in into your site? Or simply make sure the Author Credit option is enabled on the options page.
- Remember that a lot of the features of the plug-in are a direct result of people asking for them. So, please get in contact and let me know what you think.
- If you do find value in using the plug-in, please consider a donation at http://www.sterling-adventures.co.uk/blog/2008/03/01/avatars-plugin/ Size isn't important, it's the thought that counts!
Enjoy!
== Internationalisation ==
Avatars provides support for language translations. Ensure WPLANG is set in your wp-config file.
To help with the available translations create a .po translation and compile a .mo file. If you would like this to be included in the general distribution please send these files back via the feedback link. I can't accept any credit for these languages files, nor can I guarantee they are correct.
Available translations, from the English default, are:
- Persian (WPLANG = fa_IR). Thanks to Mustafa Sufi.
- Russian (WPLANG = ru_RU). Thanks to Fatcow - http://www.fatcow.com/
- French (WPLANG - fr_FR). Thanks to Adrien Schvalberg.
- Spanish (WPLANG - es_ES). Thanks to Naceira - http://www.naceira.com/
- Ukrainian (WPLANG - uk_UK). Thanks to Vadim Nekhai, website: http://onix.name/portfolio/
- Portuguese Brazil (WPLANG - pt_BR). Thanks to Steff.