IMPORTANT: If the avatars/ and my-templates/ folders (in additional-files/) are empty in the ZIP archive, please download the files directly from the SVN trunk:
http://plugins-dev.bbpress.org/browser/avatar-upload/trunk/additional-files/avatars/default.png
http://plugins-dev.bbpress.org/browser/avatar-upload/trunk/additional-files/my-templates/avatar.php
For each file above, scroll to the bottom of the page, where it says "Download in other formats" and click on the "Original format" link.
UPGRADING? If you are using a version older than 0.3 of this plugin you NEED to follow these instructions fully because the template functions are incompatible with older versions. If you are upgrading from version 0.3 or later then of this plugin you can ignore the template instructions (steps 2 to 4), but do check the rest.
After activating the plugin go to the "Avatar upload" admin page and configure the options displayed there. At least make sure you have set the avatar upload directory to the location of your choice.
The avatar upload page should appear as a tab ("Avatar") on the user's Profile menu. If you'd prefer the link to be elsewhere, insert the following "Upload Avatar" link wherever you wish:
<a href="<?php profile_tab_link($user->ID, 'avatar'); ?>"><?php _e("Upload Avatar"); ?></a>Use the available
$user->IDfor the page you place the link on.To display an uploaded avatar, insert the following template function.
a) On the user's profile page (
profile.phptemplate).<?php avatarupload_display($user->ID); ?>This grabs the avatar info file directly from the current user's profile information.
b) On each user's forum posts (
post.phptemplate)<?php avatarupload_display(get_post_author_id()); ?>You can include the avatar anywhere else you like, just be sure to have the user's ID available.
c) If you just want the URI of the avatar (for your own plugins for example):
<?php avatarupload_get_avatar(ID); ?>Where ID is a user ID. Returns false if no avatar exists for that user.
d) The
<IMG>tag that displays the avatar uses the class name 'avatar' to use in your CSS file.OPTIONAL: open up
my-templates/avatar.phpand edit the template if you wish, but be sure not to mess with the upload form.Upload the files in the "additional-files" directory to the following locations.
avatars/ - directory to the location specified on the admin page, rename if neccesary
avatars/default.png - default avatar image into the directory created above.
avatar-upload.php - bbPress root directory.
my-templates/avatar.php - your
my-templates/my-template-name/(or bb-templates/kakumei/) directory.Upload the plugin files.
bb-avatar-upload.php - your
my-plugins/directory (and activate it).identicon.php - your
my-plugins/directory (it is automatically included).unsharpmask.php - your
my-plugins/directory (it is automatically included).
That's it, the 'Avatar Upload' plugin should now be working.