Ticket #4: bp_xprofile.patch
File bp_xprofile.patch, 4.0 KB (added by , 17 years ago) |
---|
-
.
86 86 { 87 87 global $wpdb, $bp_xprofile_table_name, $wpmuBaseTablePrefix, $bp_xprofile, $groups; 88 88 89 add_menu_page( "Profile", "Profile", 1, basename(__FILE__), "xprofile_picture");90 add_submenu_page(basename(__FILE__), "Picture", "Picture", 1, basename(__FILE__), "xprofile_picture");89 add_menu_page(__("Profile"), __("Profile"), 1, basename(__FILE__), "xprofile_picture"); 90 add_submenu_page(basename(__FILE__), __("Picture"), __("Picture"), 1, basename(__FILE__), "xprofile_picture"); 91 91 92 92 $groups = BP_XProfile_Group::get_all(); 93 93 … … 98 98 } 99 99 100 100 /* Add the administration tab under the "Site Admin" tab for site administrators */ 101 add_submenu_page('bp_core.php', "Profiles", "Profiles", 1, "xprofile_settings", "xprofile_admin");101 add_submenu_page('bp_core.php', __("Profiles"), __("Profiles"), 1, "xprofile_settings", "xprofile_admin"); 102 102 103 103 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 104 104 if($wpdb->get_var("show tables like '$bp_xprofile_table_name'") != $bp_xprofile_table_name) xprofile_install(); … … 238 238 ($field->is_required && $current_field == '')) 239 239 { 240 240 // Validate the field. 241 $field->message = __($field->name . ' cannot be left blank.');241 $field->message = sprintf(__('%s cannot be left blank.'), $field->name); 242 242 $errors[] = $field->message . "<br />"; 243 243 } 244 244 else if(!$field->is_required && $current_field == '') … … 286 286 $list_html .= '</ul>'; 287 287 288 288 $list_html .= '<p class="submit"> 289 <input type="submit" name="save" id="save" value=" Save Changes »" />289 <input type="submit" name="save" id="save" value="'.__('Save Changes »').'" /> 290 290 </p>'; 291 291 292 292 if($errors && isset($_POST['save'])) … … 308 308 } 309 309 else 310 310 { 311 $list_html .= '<p> This group is currently empty. Please contact the site admin if this is incorrect.</p>';311 $list_html .= '<p>'.__('This group is currently empty. Please contact the site admin if this is incorrect.').'</p>'; 312 312 } 313 313 314 314 ?> … … 412 412 <div id="profilePicture"> 413 413 414 414 <div id="currentPicture"> 415 <h2> Current Picture</h2>415 <h2><?php _e('Current Picture'); ?></h2> 416 416 <?php echo $current_thumbnail->html; ?> 417 417 418 418 <p style="text-align: center">[ <a href="admin.php?page=bp_xprofile.php&mode=delete_picture&file=<?php echo $current["picture"]; ?>">delete picture</a> ]</p> 419 419 420 420 <form action="admin.php?page=bp_xprofile.php" enctype="multipart/form-data" method="post"> 421 <h3> Upload a Picture</h3>421 <h3><?php _e('Upload a Picture'); ?></h3> 422 422 423 423 <input type="file" name="profile_image" id="profile_image" /> 424 <p class="submit" style="text-align: center"><input type="submit" name="submit" value="Upload Picture »" /></p> 424 <p class="submit" style="text-align: center"> 425 <input type="submit" name="submit" value="<?php _e('Upload Picture »'); ?>" /></p> 425 426 426 427 <input type="hidden" name="action" value="save" /> 427 428 <input type="hidden" name="max_file_size" value="1000000" /> … … 431 432 </div> 432 433 433 434 <div id="otherPictures"> 434 <h2> Previously Uploaded</h2>435 <h2><?php _e('Previously Uploaded'); ?></h2> 435 436 <?php $pictures = BP_XProfile_Picture::get_all(ABSPATH . $profile_picture_path); ?> 436 437 <ul> 437 438 <?php for($i=0; $i<count($pictures); $i++) { ?> 438 439 <li> 439 440 <a href="admin.php?page=bp_xprofile.php&mode=set_picture&file=<?php echo $pictures[$i]["file"]; ?>"> 440 <img src="<?php echo get_option('site_url') . 'files/profilepics/' . $pictures[$i]["thumbnail"]; ?>" alt=" Alternate Pic" style="height: 100px;" /></li>441 <img src="<?php echo get_option('site_url') . 'files/profilepics/' . $pictures[$i]["thumbnail"]; ?>" alt="<?php _e('Alternate Pic'); ?>" style="height: 100px;" /></li> 441 442 </a> 442 443 </li> 443 444 <?php } ?>