Changeset 19
- Timestamp:
- 04/08/2008 11:32:12 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
bp_core.php (modified) (6 diffs)
-
bp_messages.php (modified) (3 diffs)
-
bp_xprofile.php (modified) (5 diffs)
-
bp_xprofile/bp_xprofile.admin.php (modified) (1 diff)
-
bp_xprofile/bp_xprofile.classes.php (modified) (12 diffs)
-
bp_xprofile/bp_xprofile.signup.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp_core.php
r18 r19 14 14 { 15 15 global $menu, $submenu; 16 16 17 17 /*** 18 18 * REMOVE tabs we don't want. … … 21 21 /** Remove Presentation Tab **/ 22 22 reset($menu); $page = key($menu); 23 23 24 24 if(!is_site_admin()) { 25 26 /***** REMOVING PRESENTATION / DESIGN TABS */ 25 27 while ((__('Presentation') != $menu[$page][0]) && next($menu)) 26 28 $page = key($menu); 27 29 if (__('Presentation') == $menu[$page][0]) unset($menu[$page]); 28 30 reset($menu); $page = key($menu); 31 32 while ((__('Design') != $menu[$page][0]) && next($menu)) 33 $page = key($menu); 34 if (__('Design') == $menu[$page][0]) unset($menu[$page]); 35 reset($menu); $page = key($menu); 36 /*******************************************/ 29 37 30 38 /** Remove Plugins Tab **/ … … 45 53 if (__('Options') == $menu[$page][0]) unset($menu[$page]); 46 54 reset($menu); $page = key($menu); 47 } 55 56 /** Remove Settings Tab **/ 57 while ((__('Settings') != $menu[$page][0]) && next($menu)) 58 $page = key($menu); 59 if (__('Settings') == $menu[$page][0]) unset($menu[$page]); 60 reset($menu); $page = key($menu); 61 } 62 63 /** Remove Comments Tab **/ 64 while ((__('edit-comments.php') != $menu[$page][2]) && next($menu)) 65 $page = key($menu); 66 if (__('edit-comments.php') == $menu[$page][2]) unset($menu[$page]); 67 reset($menu); $page = key($menu); 48 68 49 69 /** Remove Manage Tab **/ … … 51 71 $page = key($menu); 52 72 if (__('Manage') == $menu[$page][0]) unset($menu[$page]); 53 reset($menu); $page = key($menu);54 55 /** Remove Comments Tab **/56 while ((__('Comments') != $menu[$page][0]) && next($menu))57 $page = key($menu);58 if (__('Comments') == $menu[$page][0]) unset($menu[$page]);59 73 reset($menu); $page = key($menu); 60 74 … … 86 100 } 87 101 add_action('admin_menu', 'setup_tabs'); 102 103 function start_buffer() 104 { 105 ob_start(); 106 add_action('dashmenu', 'stop_buffer'); 107 } 108 add_action('admin_menu', 'start_buffer'); 109 110 function stop_buffer() 111 { 112 $contents = ob_get_contents(); 113 ob_end_clean(); 114 add_activity_tab($contents); 115 } 116 117 function add_activity_tab($contents) 118 { 119 if($_SERVER['SCRIPT_NAME'] == '/wp-admin/index.php') $current = ' class="current"'; 120 121 $activity_tab = '<ul id="dashmenu"><li><a href="' . get_option('home') . '/wp-admin/"' . $current . '>Activity Feed</a></li>'; 122 $filter = preg_split('/\<ul id=\"dashmenu\"\>[\S\s]*/',$contents); 123 124 echo $filter[0]; 125 echo $activity_tab; 126 } 127 88 128 89 129 function alter_tab_positions() … … 217 257 $dash .= ' 218 258 219 <h2>' . __(" BuddyPress Dashboard") . '</h2>220 <p>' . __(" Welcome to your personal dashboard.") . '</p>221 259 <h2>' . __("My Activity Feed") . '</h2> 260 <p>' . __("This is where your personal activity feed will go.") . '</p> 261 <p> </p><p> </p> 222 262 '; 223 263 -
trunk/bp_messages.php
r15 r19 190 190 191 191 <form action="admin.php?page=bp_messages.php&mode=send_message" method="post" id="send_message_form"> 192 193 <fieldset id="usernamediv"> 194 <legend><?php _e("Send To Username") ?></legend> 192 193 <p> 194 <div id="usernamediv"> 195 <label for="username"><?php _e("Send To Username") ?></label> 195 196 <div> 196 <input type="text" name="username" id="username" value="<?php echo $username; ?>" style="width: 50%" />197 <input type="text" name="username" id="username" value="<?php echo $username; ?>" style="width:30%" /> 197 198 </div> 198 </fieldset> 199 200 <fieldset id="subjectdiv"> 201 <legend><?php _e("Subject") ?></legend> 199 </div> 200 </p> 201 202 <p> 203 <div id="subjectdiv"> 204 <label for="subject"><?php _e("Subject") ?></label> 202 205 <div> 203 <input type="text" name="subject" id="subject" value="<?php echo $subject; ?>" />206 <input type="text" name="subject" id="subject" value="<?php echo $subject; ?>" style="width: 75%" /> 204 207 </div> 205 </fieldset> 206 208 </div> 209 </p> 210 207 211 <p> 208 < fieldsetid="messagediv">209 <l egend><?php _e("Message") ?></legend>212 <div id="messagediv"> 213 <label for="message_input"><?php _e("Message") ?></label> 210 214 <div> 211 215 <textarea name="message_input" id="message_input" rows="15" cols="40"><?php echo $message; ?></textarea> 212 216 </div> 213 </ fieldset>217 </div> 214 218 </p> 215 219 … … 912 916 <input type="hidden" name="respond_reply_username" id="respond_reply_username" value="<?php echo bp_core_get_username($message->sender_id) ?>" /> 913 917 914 < fieldsetid="recipientdiv"<?php if($show_respond != "forward") { ?>style="display:none;"<?php } ?>>915 <l egend><?php _e("Forward to Username:") ?></legend>918 <div id="recipientdiv"<?php if($show_respond != "forward") { ?>style="display:none;"<?php } ?>> 919 <label for="respond_forward_username"><?php _e("Forward to Username:") ?></label> 916 920 <div> 917 921 <input type="text" name="respond_forward_username" id="respond_forward_username" style="width: 50%;" value="<?php if(isset($callback["forward_username"])) { echo $callback["forward_username"]; } ?>" /> 918 922 </div> 919 </ fieldset>920 921 < fieldsetid="subjectdiv">922 <l egend><?php _e("Subject") ?></legend>923 </div> 924 925 <div id="subjectdiv"> 926 <label for="respond_subject"><?php _e("Subject") ?></label> 923 927 <div> 924 928 <input type="text" name="respond_subject" id="respond_subject" value="<?php if(isset($callback["subject"])) { echo $callback["subject"]; } else { echo $subject; } ?>" /> … … 927 931 928 932 <p> 929 < fieldsetid="messagediv">930 <l egend><?php _e("Message") ?></legend>933 <div id="messagediv"> 934 <label for="respond_message"><?php _e("Message") ?></label> 931 935 <div> 932 936 <textarea name="respond_message" id="respond_message" rows="15" cols="40"><?php if(isset($callback["message"])) { echo $callback["message"]; } else { ?><br /><br />-------- Original Message -------------------------------------<br /><br /><?php echo $message->message; ?></fieldset><?php } ?></textarea> 933 937 </div> 934 </ fieldset>938 </div> 935 939 </p> 936 940 -
trunk/bp_xprofile.php
r18 r19 216 216 217 217 <h2><?php echo $group->name ?> <?php _e("Information") ?></h2> 218 218 219 219 <?php 220 220 … … 321 321 <?php } ?> 322 322 323 < form action="admin.php?page=<?php echo $_GET['page'] ?>&mode=save" method="post">323 <p><form action="admin.php?page=<?php echo $_GET['page'] ?>&mode=save" method="post"> 324 324 <?php $field_ids = implode(",", $field_ids); ?> 325 325 <input type="hidden" name="field_ids" id="field_ids" value="<?php echo $field_ids; ?>" /> … … 328 328 329 329 </form> 330 </p> 330 331 331 332 </div> … … 405 406 406 407 <div id="currentPicture"> 407 <h 2><?php _e('Current Picture'); ?></h2>408 <h3><?php _e('Current Picture'); ?></h3> 408 409 <?php echo $current_thumbnail->html; ?> 409 410 … … 426 427 427 428 <div id="otherPictures"> 428 <h 2><?php _e('Previously Uploaded'); ?></h2>429 <h3><?php _e('Previously Uploaded'); ?></h3> 429 430 <?php $pictures = BP_XProfile_Picture::get_all(ABSPATH . $profile_picture_path); ?> 430 431 <ul> -
trunk/bp_xprofile/bp_xprofile.admin.php
r16 r19 49 49 50 50 <h2><?php _e("Profile Settings") ?></h2> 51 <br /> 51 52 <p><?php _e('Your users will distinguish themselves through their profile page. 52 53 You must give them profile fields that allow them to describe themselves -
trunk/bp_xprofile/bp_xprofile.classes.php
r18 r19 26 26 global $bp_xprofile_table_name; 27 27 28 29 28 $this->table_name = $bp_xprofile_table_name; 30 29 … … 157 156 158 157 <h2><?php echo $title; ?></h2> 159 158 <br /> 159 160 160 <?php if($message != '') { ?> 161 161 <div id="message" class="error fade"> … … 166 166 <form action="<?php echo $action; ?>" method="post"> 167 167 168 < fieldsetid="titlediv">169 <l egend><?php _e("Group Name") ?></legend>168 <div id="titlediv"> 169 <label for="group_name"><?php _e("Group Name") ?></label> 170 170 <div> 171 171 <input type="text" name="group_name" id="group_name" value="<?php echo $this->name ?>" style="width:50%" /> 172 172 </div> 173 </ fieldset>173 </div> 174 174 175 175 <p class="submit" style="text-align: left"> … … 617 617 618 618 <h2><?php echo $title; ?></h2> 619 619 <br /> 620 620 621 <?php if($message != '') { ?> 621 622 <div id="message" class="error fade"> … … 661 662 for($i=0; $i<count($options); $i++) { ?> 662 663 <p>Option <?php echo $i+1 ?>: 663 <input type="text" name="radio_option[]" id="radio_option<?php echo $i+1 ?>" value="<?php echo $options[$i]-> field_name ?>" />664 <input type="text" name="radio_option[]" id="radio_option<?php echo $i+1 ?>" value="<?php echo $options[$i]->name ?>" /> 664 665 </p> 665 666 <?php } ?> … … 679 680 for($i=0; $i<count($options); $i++) { ?> 680 681 <p>Option <?php echo $i+1 ?>: 681 <input type="text" name="select_option[]" id="select_option<?php echo $i+1 ?>" value="<?php echo $options[$i]-> field_name ?>" />682 <input type="text" name="select_option[]" id="select_option<?php echo $i+1 ?>" value="<?php echo $options[$i]->name ?>" /> 682 683 </p> 683 684 <?php } ?> … … 693 694 <p class="submit" style="float: left;"> 694 695 <input type="submit" value="<?php _e("Save") ?> »" name="saveField" id="saveField" style="font-weight: bold" /> 695 or <a href="admin.php?page=xprofile_settings" >Cancel</a>696 or <a href="admin.php?page=xprofile_settings" style="color: red">Cancel</a> 696 697 </p> 697 698 … … 1108 1109 function create_thumb() 1109 1110 { 1110 $thumb = wp_create_thumbnail($this->path . "/" . $this->filename, $this->thumb_max_dimension); 1111 //$thumb = wp_create_thumbnail($this->path . "/" . $this->filename, ); 1112 1113 $thumb = image_resize($this->path . "/" . $this->filename, $this->thumb_max_dimension, '', false, 'thumbnail'); 1114 $thumb = apply_filters( 'wp_create_thumbnail', $thumb ); 1115 1111 1116 if (!@file_exists($thumb)) 1112 1117 { … … 1120 1125 else 1121 1126 { 1122 $this->thumb_filename = $thumb; 1127 $filename = explode("/", $thumb); 1128 $this->thumb_filename = $filename[count($filename)-1]; 1123 1129 } 1124 1130 } … … 1154 1160 if(!strstr($this->filename, 'thumbnail')) 1155 1161 { 1156 $thumbnail_filename = explode('.', $this->filename); 1157 $thumbnail_filename = $thumbnail_filename[0] . '.' . 'thumbnail' . '.' . $thumbnail_filename[1]; 1158 1162 if($this->filename == "none.gif") { 1163 $thumbnail_filename = "none.gif"; 1164 } 1165 else 1166 { 1167 $thumbnail_filename = explode('.', $this->filename); 1168 $thumbnail_filename = $thumbnail_filename[0] . '-thumbnail' . '.' . $thumbnail_filename[1]; 1169 } 1170 1159 1171 return $thumbnail_filename; 1160 1172 } … … 1167 1179 function get_all($folder) 1168 1180 { 1181 global $profile_picture_path; 1182 1169 1183 if(!is_dir($folder)) { 1170 1184 return false; … … 1172 1186 1173 1187 $folder = dir($folder); 1174 1188 1175 1189 while($file = $folder->read()) 1176 1190 { 1177 1191 if(strpos($file, 'thumbnail')) 1178 1192 { 1179 $pictures[] = array("thumbnail" => $file, "file" => str_replace(' thumbnail.', '', $file));1193 $pictures[] = array("thumbnail" => $file, "file" => str_replace('-thumbnail', '', $file)); 1180 1194 } 1181 1195 } -
trunk/bp_xprofile/bp_xprofile.signup.php
r18 r19 269 269 { 270 270 copy(ABSPATH . 'wp-content/mu-plugins/bp_xprofile/images/none.gif', ABSPATH . $profile_picture_path . "/none.gif"); 271 copy(ABSPATH . 'wp-content/mu-plugins/bp_xprofile/images/none-thumbnail.gif', ABSPATH . $profile_picture_path . "/none-thumbnail.gif"); 272 271 273 272 $pic = new BP_XProfile_Picture("none.gif"); 273 $pic->create_thumb(); 274 $pic = new BP_XProfile_Picture("none.gif"); 275 update_blog_option($blog_id, "profile_picture", "none.gif"); 276 update_blog_option($blog_id, "profile_picture_thumbnail", "none-thumbnail.gif"); 274 277 275 $thumb = explode("/", $pic->thumb_filename);276 $thumb = $thumb[count($thumb)-1];277 278 update_blog_option($blog_id, "profile_picture", "none.gif");279 update_blog_option($blog_id, "profile_picture_thumbnail", $thumb);280 281 278 } 282 279
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)