Changeset 532
- Timestamp:
- 08/02/07 16:25:17 (1 year ago)
- Files:
-
- avatar-upload/trunk/additional-files/my-templates/avatar.php (modified) (1 diff)
- avatar-upload/trunk/bb-avatar-upload.php (modified) (4 diffs)
- avatar-upload/trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
avatar-upload/trunk/additional-files/my-templates/avatar.php
r510 r532 33 33 <?php if (!usingidenticon($user->ID)) { ?> 34 34 <form method="POST" action="<?php profile_tab_link($user->ID, 'avatar'); ?>"> 35 <p><label for "useidenticon"><input type="checkbox" name="identicon" value="1" id="useidenticon" /> <?php _e('Use your Identicon instead?'); ?></label></p>35 <p><label for="useidenticon"><input type="checkbox" name="identicon" value="1" id="useidenticon" /> <?php _e('Use your Identicon instead?'); ?></label></p> 36 36 <p><input type="submit" name="submit" id="submit" value="Use Identicon" /></p> 37 37 </form> avatar-upload/trunk/bb-avatar-upload.php
r531 r532 3 3 Plugin Name: Avatar Upload 4 4 Plugin URI: http://bbpress.org/plugins/topic/46 5 Version: 0.8 5 Version: 0.8.1 6 6 Description: Allows users to upload an avatar (gif, jpeg/jpg or png) image to bbPress. 7 7 Author: Louise Dade … … 108 108 global $bbdb, $user; 109 109 110 if ($id == $user->ID && $force_db == 0) 110 $cached = bb_get_user($id); 111 112 if ($force_db == 0 && (!empty($user) || !empty($cached)) ) 111 113 { 112 114 if (!empty($user->avatar_file)) { 113 115 $a = explode("|", $user->avatar_file); 116 $a[] = $user->user_login; // for 'alt' attribute 114 117 } else { 115 return false; 118 if (!empty($cached)) { 119 $a = explode("|", $cached->avatar_file); 120 $a[] = $cached->user_login; // for 'alt' attribute 121 } else { 122 return false; 123 } 116 124 } 117 125 } … … 122 130 if ( $avatar = $bbdb->get_results($bb_query) ) { 123 131 $a = explode("|", $avatar[0]->meta_value); 132 $a[] = substr($a[0], 0, strrpos($a[0], ".")); // for 'alt' attribute (extract from filename) 124 133 } else { 125 134 return false; … … 133 142 $a[0] = bb_get_option('uri') . $config->avatar_dir . $a[0]; 134 143 } 135 136 // Add the username for use in 'alt' attribute to end of array137 $a[] = $user->user_login;138 144 139 145 return $a; avatar-upload/trunk/readme.txt
r531 r532 4 4 Requires at least: 0.8.2 5 5 Tested up to: 0.8.2.1 6 Stable Tag: 0.8 6 Stable Tag: 0.8.1 7 7 8 8 Allows users to upload an avatar (gif, jpeg/jpg or png) image to bbPress. Admins can configure maximum allowed file size and image dimensions. Includes fel64's code enabling 'Identicons' - default avatars made of abstract patterns unique to each user. … … 133 133 134 134 == Change Log == 135 2007-08-02 Ver. 0.8.1 Bug-fix, plus improved cache support that should have been in previous update. 136 135 137 2007-08-02 Ver. 0.8 Added support for transparent GIFs and PNGs in resize routine. 136 138
