=== 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.8 Stable tag: trunk This plugin adds the ability to manage global, local, and use twitter avatars. == 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... Well, from WordPress 2.5 onwards, you can manage local and global avatars with this plugin. Plus you can use your Twitter avatar too! From v9.0 Avatars requires PHP version 5.1.3 or greater. 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: 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, Identicon, etc. * 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: == Screenshots == 1. An example of the main avatars administration page. Manage users global and local avatars etc. 2. The avatars options configuration section of the main avatars administration page. 3. The WordPress profile page shows the new floating section showing the current avatar. Click manage to change. 4. Avatar Management popup. Allowing upload of local avatars, with crop option, and setting of a Twitter ID. 5. Sample avatars: local, global, retro, gravatar, blank, wavatar, identicon, monsters, twitter - the lot! 6. Example of the optional simple sidebar widget allowing users to manage their own avatar. Available from the plugin's homepage. == 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... Enjoy! == Frequently Asked Questions == = How to install Avatars in a WordPress Multi Site environment = Getting this plugin to work under a WordPress (WP) Multi Site (MS) configuration can be tricky, but as the instructions for WP MS installations say, you are expected to know what you are doing and have basic WordPress development, PHP, HTML, CSS, and UNIX/Linux administration experience. See http://codex.wordpress.org/Create_A_Network. However, here are some steps that have worked for others configuring this plugin for WP MS.
  1. In the Network Admin area, network activate the plugin.
  2. Now under Users » Avatars look for the User Uploads option, check the box and save.
= When to use the Legacy Method for User Uploads = Often the *legacy method* for User Uploads is required when using sub-domains. Therefore, this is also regularly required for WordPress Multi Site setups. = Setting the User Upload directory = The directory uploaded Avatars are stored in is set by the field next to the enable user uploads option. There is an example /avatars given in the instructions beneath the field. This directory must be relative to your web-root. For example, if all of your HTML files and your WP installation are in a directory public_html provided by your web host, this is the web-root. So the /avatars directory goes here, i.e. ~/public_html/avatars. Make sure the privileges are set correctly. = Where are the Avatar options = The options for the Avatar plugin are available on the User » Avatars page, at the bottom. = Show the Avatar of the logged in User = If you are trying to show, say somewhere in a sidebar, the Avatar of the user who is logged-in try code something like this: <?php global $current_user; $known = !empty($current_user->nickname); ?> <div style="float: right; margin: 4px;"> <?php if($known) echo get_avatar($current_user->id, 30); ?> </div> = Optional Widget = If you are considering purchasing the optional user profile widget, please make sure that this free Avatars plugin is configured properly and functioning correctly first. The widget cannot work until the plugin is setup correctly. The widget is not required in any way to make full use of all the plugin's features. = Styling = Got problems with you layout? Take a look at adjusting the avatars.css file. Perhaps removing clear: both; if alignment is being disrupted. = New Ideas? = Got your own great idea for addition in to the Avatars plugin's capabilities? Let me know about it and I'll consider if it's possible to include in the next release... == 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: