Changeset 501
- Timestamp:
- 07/19/07 17:02:07 (1 year ago)
- Files:
-
- avatar-upload/trunk/avatar-upload.php (modified) (4 diffs)
- avatar-upload/trunk/my-plugins/bb-avatar-upload.php (modified) (3 diffs)
- avatar-upload/trunk/my-templates/avatar.php (modified) (2 diffs)
- avatar-upload/trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
avatar-upload/trunk/avatar-upload.php
r477 r501 3 3 Plugin Name: Avatar Upload 4 4 Plugin URI: http://bbpress.org/plugins/topic/46 5 Version: 0.6. 15 Version: 0.6.2 6 6 Description: Allows users to upload an avatar (gif, jpeg/jpg or png) image to bbPress. 7 7 Author: Louise Dade … … 116 116 $meta_avatar = $user_filename . "?" . time() . "|" . $img_w . "|" . $img_h . "|avatar-upload"; 117 117 bb_update_usermeta( $user_id, 'avatar_file', $meta_avatar ); 118 $force_db = 1; // force download of new avatar from database 118 119 $success_message = "Your avatar has been uploaded."; 119 sleep(3); // give image a chance to copy from temp area120 120 } 121 121 else … … 169 169 } 170 170 171 bb_load_template( 'avatar.php', array('success_message', 'error_message', 'config') ); 171 // Load the template 172 bb_load_template( 'avatar.php', array('success_message', 'error_message', 'config', 'force_db') ); 172 173 173 174 … … 204 205 else 205 206 { 206 // image already within maximum limits - do no resize207 // image already within maximum limits - do not resize 207 208 return array($img_w, $img_h); 208 209 } avatar-upload/trunk/my-plugins/bb-avatar-upload.php
r477 r501 3 3 Plugin Name: Avatar Upload 4 4 Plugin URI: http://bbpress.org/plugins/topic/46 5 Version: 0.6. 15 Version: 0.6.2 6 6 Description: Allows users to upload an avatar (gif, jpeg/jpg or png) image to bbPress. 7 7 Author: Louise Dade … … 46 46 47 47 // Display the avatar image 48 function avatarupload_display($id )48 function avatarupload_display($id, $force_db=0) 49 49 { 50 if ($a = avatarupload_get_avatar($id ))50 if ($a = avatarupload_get_avatar($id,1,$force_db)) 51 51 { 52 52 echo '<img src="'.$a[0].'" width="'.$a[1].'" height="'.$a[2].'" alt="'.$a[4].'" />'; … … 66 66 67 67 // now fetch it from the database 68 if ($a = avatarupload_get_avatar($id ))68 if ($a = avatarupload_get_avatar($id,1,$force_db)) 69 69 { 70 70 echo '<img src="'.$a[0].'" width="'.$a[1].'" height="'.$a[2].'" alt="'.$a[4].'" />'; avatar-upload/trunk/my-templates/avatar.php
r473 r501 6 6 7 7 <?php 8 echo (!empty($error_message)) ? '<div class="infobox"><strong>'.__( "OOPS! ".$error_message).'</strong></div>' : "";9 echo (!empty($success_message)) ? '<div class="notice">'.__($success_message).'</div>' : "";8 echo (!empty($error_message)) ? '<div class="infobox"><strong>'.__($error_message).'</strong></div>' : ''; 9 echo (!empty($success_message)) ? '<div class="notice">'.__($success_message).'</div>' : ''; 10 10 ?> 11 11 … … 28 28 29 29 <h3><?php _e('Current Avatar'); ?></h3> 30 <p><?php echo avatarupload_display($user->ID); ?></p> 30 31 <p><?php echo avatarupload_display($user->ID, $force_db); ?></p> 31 32 32 33 <?php if (!usingidenticon($user->ID)) { ?> avatar-upload/trunk/readme.txt
r479 r501 4 4 Requires at least: 0.8.2 5 5 Tested up to: 0.8.2.1 6 Stable Tag: 0.6. 16 Stable Tag: 0.6.2 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. … … 108 108 == Change Log == 109 109 110 2007-07-19 Ver. 0.6.2 Bug-fix. 'Upload Avatar' page wasn't displaying new avatar after upload. 111 110 112 2007-07-17 Ver. 0.6.1 Bug-fix. Reset generic avatar as default option and stopped identicon.php 111 113 from being loaded with plugin *every* time.
