Ticket #590: restyle-wpmublogs.patch
| File restyle-wpmublogs.patch, 11.8 kB (added by momo360modena, 6 months ago) |
|---|
-
includes/mu.php
old new 273 273 $quota = ''; 274 274 275 275 ?> 276 <strong><?php _e('Blog Upload Space Quota'); ?></strong> 277 <input type="text" size="3" name="option[blog_upload_space]" value="<?php echo $quota; ?>" /><?php _e('MB (Leave blank for site default)'); ?><br /> 276 <tr> 277 <th><?php _e('Blog Upload Space Quota'); ?></th> 278 <td><input type="text" size="3" name="option[blog_upload_space]" value="<?php echo $quota; ?>" /><?php _e('MB (Leave blank for site default)'); ?></td> 279 </tr> 278 280 <?php 279 281 } 280 282 add_action('wpmueditblogaction', 'upload_space_setting'); … … 524 526 525 527 // Use siteurl for this in case of mapping 526 528 $parsed = parse_url( $blog->siteurl ); 527 $domain = $parsed['host'];529 // $domain = $parsed['host']; 528 530 529 531 if ( $current_blog->blog_id == $blog->userblog_id ) { 530 532 $current = ' class="current"'; -
wpmu-blogs.php
old new 73 73 $editblog_roles = get_blog_option( $id, "{$wpdb->base_prefix}{$id}_user_roles" ); 74 74 ?> 75 75 <div class="wrap"> 76 <h2><?php _e('Edit Blog'); ?></h2> 77 <a href='http://<?php echo $details['domain'].$details['path']; ?>'><?php echo $details['domain'].$details['path']; ?></a> 76 <h2><?php _e('Edit Blog'); ?> - <a href='http://<?php echo $details['domain'].$details['path']; ?>'><?php echo $details['domain'].$details['path']; ?></a></h2> 78 77 <form method="post" action="wpmu-edit.php?action=updateblog"> 79 78 <?php wp_nonce_field('editblog'); ?> 80 79 <input type="hidden" name="id" value="<?php echo $id ?>" /> … … 82 81 <tr> 83 82 <td valign="top"> 84 83 <div class="wrap"> 85 <table style="border:0; width:100%;" cellspacing="2" cellpadding="5" class="editform"> 86 <tr valign="top"> 84 <h3><?php _e('Blog info (wp_blogs)'); ?></h3> 85 <table class="form-table"> 86 <tr class="form-field form-required"> 87 87 <th scope="row"><?php _e('Domain') ?></th> 88 88 <td>http://<input name="blog[domain]" type="text" id="domain" value="<?php echo $details['domain'] ?>" size="33" /></td> 89 89 </tr> 90 <tr valign="top">90 <tr class="form-field form-required"> 91 91 <th scope="row"><?php _e('Path') ?></th> 92 92 <td><input name="blog[path]" type="text" id="path" value="<?php echo $details['path'] ?>" size="40" /> 93 93 <br />(<?php _e( 'siteurl and home will be modified too' ); ?>)</td> 94 94 </tr> 95 <tr valign="top">95 <tr class="form-field"> 96 96 <th scope="row"><?php _e('Registered') ?></th> 97 97 <td><input name="blog[registered]" type="text" id="blog_registered" value="<?php echo $details['registered'] ?>" size="40" /></td> 98 98 </tr> 99 <tr valign="top">99 <tr class="form-field"> 100 100 <th scope="row"><?php _e('Last Updated') ?></th> 101 101 <td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo $details['last_updated'] ?>" size="40" /></td> 102 102 </tr> 103 <tr valign="top">103 <tr class="form-field"> 104 104 <th scope="row"><?php _e('Public') ?></th> 105 105 <td> 106 106 <input type='radio' name='blog[public]' value='1' <?php if( $details['public'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 107 107 <input type='radio' name='blog[public]' value='0' <?php if( $details['public'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 108 108 </td> 109 109 </tr> 110 <tr valign="top">110 <tr class="form-field"> 111 111 <th scope="row"><?php _e( 'Archived' ); ?></th> 112 112 <td> 113 113 <input type='radio' name='blog[archived]' value='1' <?php if( $details['archived'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 114 114 <input type='radio' name='blog[archived]' value='0' <?php if( $details['archived'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 115 115 </td> 116 116 </tr> 117 <tr valign="top">117 <tr class="form-field"> 118 118 <th scope="row"><?php _e( 'Mature' ); ?></th> 119 119 <td> 120 120 <input type='radio' name='blog[mature]' value='1' <?php if( $details['mature'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 121 121 <input type='radio' name='blog[mature]' value='0' <?php if( $details['mature'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 122 122 </td> 123 123 </tr> 124 <tr valign="top">124 <tr class="form-field"> 125 125 <th scope="row"><?php _e( 'Spam' ); ?></th> 126 126 <td> 127 127 <input type='radio' name='blog[spam]' value='1' <?php if( $details['spam'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 128 128 <input type='radio' name='blog[spam]' value='0' <?php if( $details['spam'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 129 129 </td> 130 130 </tr> 131 <tr valign="top">131 <tr class="form-field"> 132 132 <th scope="row"><?php _e( 'Deleted' ); ?></th> 133 133 <td> 134 134 <input type='radio' name='blog[deleted]' value='1' <?php if( $details['deleted'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 135 135 <input type='radio' name='blog[deleted]' value='0' <?php if( $details['deleted'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 136 136 </td> 137 137 </tr> 138 <tr> 139 <td colspan="2"><br /><br /></td> 140 </tr> 138 </table> 139 140 <h3><?php printf( __('Blog options (wp_%s_options)'), $id ); ?></h3> 141 <table class="form-table"> 141 142 <?php 142 143 $editblog_default_role = 'subscriber'; 143 144 foreach ( $options as $key => $val ) { … … 155 156 } 156 157 if ( stristr($val['option_value'], "\r") || stristr($val['option_value'], "\n") || stristr($val['option_value'], "\r\n") ) { 157 158 ?> 158 <tr valign="top">159 <tr class="form-field"> 159 160 <th scope="row"><?php echo ucwords( str_replace( "_", " ", $val['option_name'] ) ) ?></th> 160 161 <td><textarea rows="5" cols="40" name="option[<?php echo $val['option_name'] ?>]" type="text" id="<?php echo $val['option_name'] ?>"<?php echo $disabled ?>><?php echo wp_specialchars( stripslashes( $val['option_value'] ), 1 ) ?></textarea></td> 161 162 </tr> 162 163 <?php 163 164 } else { 164 165 ?> 165 <tr valign="top">166 <tr class="form-field"> 166 167 <th scope="row"><?php echo ucwords( str_replace( "_", " ", $val['option_name'] ) ) ?></th> 167 168 <td><input name="option[<?php echo $val['option_name'] ?>]" type="text" id="<?php echo $val['option_name'] ?>" value="<?php echo wp_specialchars( stripslashes( $val['option_value'] ), 1 ) ?>" size="40" <?php echo $disabled ?> /></td> 168 169 </tr> … … 172 173 ?> 173 174 </table> 174 175 <p class="submit"> 175 <input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p>176 <input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> 176 177 </div> 177 178 </td> 178 179 <td valign="top"> … … 189 190 $theme_key = wp_specialchars( $theme['Stylesheet'] ); 190 191 if( isset($allowed_themes[$theme_key] ) == false ) { 191 192 $checked = ( isset($blog_allowed_themes[ $theme_key ]) ) ? 'checked="checked"' : ''; 192 $out .= '<tr valign="top">193 $out .= '<tr class="form-field form-required"> 193 194 <th title="'.htmlspecialchars( $theme["Description"] ).'" scope="row">'.$key.'</th> 194 195 <td><input name="theme['.$theme_key.']" type="checkbox" value="on" '.$checked.'/></td> 195 196 </tr>'; 196 197 } 197 198 } 198 199 200 199 201 if( $out != '' ) { 200 echo "< div class='wrap'><h3>" . __('Blog Themes') . "</h3>";201 echo '<table width="100%" border="0" cellspacing="2" cellpadding="5" class="editform">';202 echo '<tr><th>' . __('Theme') . '</th><th>' . __('Enable') . '</th></tr>';203 echo $out;204 echo "</table> </div>";202 echo "<h3>" . __('Blog Themes') . "</h3>"; 203 echo '<table class="form-table">'; 204 echo '<tr class=""><th>' . __('Theme') . '</th><th>' . __('Enable') . '</th></tr>'; 205 echo $out; 206 echo "</table>"; 205 207 } 206 208 207 209 // Blog users 208 210 $blogusers = get_users_of_blog( $id ); 209 echo '< div class="wrap"><h3>' . __('Blog Users') . '</h3>';211 echo '<h3>' . __('Blog Users') . '</h3>'; 210 212 if( is_array( $blogusers ) ) { 211 echo '<table width="100%"><caption>' . __('Current Users') . '</caption>';212 echo "<tr><th>" . __('User') . "</th><th>" . __('Role') . "</th><th>" . __('Password') . "</th><th>" . __('Remove') . "</th>< th></th></tr>";213 echo '<table class="form-table">'; 214 echo "<tr><th>" . __('User') . "</th><th>" . __('Role') . "</th><th>" . __('Password') . "</th><th>" . __('Remove') . "</th></tr>"; 213 215 reset($blogusers); 214 216 foreach ( (array) $blogusers as $key => $val ) { 215 217 $t = @unserialize( $val->meta_value ); … … 217 219 reset( $t ); 218 220 $existing_role = key( $t ); 219 221 } 220 echo "<tr><td>" . $val->user_login . "</td>";222 echo '<tr><td><a href="user-edit.php?user_id=' . $val->user_id . '">' . $val->user_login . '</a></td>'; 221 223 if( $val->user_id != $current_user->data->ID ) { 222 224 ?> 223 225 <td> 224 226 <select name="role[<?php echo $val->user_id ?>]" id="new_role"><?php 225 227 foreach( $editblog_roles as $role => $role_assoc ){ 228 $name = translate_with_context($role_assoc['name']); 226 229 $selected = ( $role == $existing_role ) ? 'selected="selected"' : ''; 227 echo "<option {$selected} value=\"{$role}\">{$ role_assoc['name']}</option>";230 echo "<option {$selected} value=\"{$role}\">{$name}</option>"; 228 231 } 229 232 ?> 230 233 </select> … … 237 240 } else { 238 241 echo "<td><strong>" . __ ('N/A') . "</strong></td><td><strong>" . __ ('N/A') . "</strong></td><td><strong>" . __('N/A') . "</strong></td>"; 239 242 } 240 echo '< td><a href="user-edit.php?user_id=' . $val->user_id . '">' . __('Edit') . "</a></td></tr>";243 echo '</tr>'; 241 244 } 242 245 echo "</table>"; 243 246 } 244 247 245 248 // New blog user 246 echo "<h3>" . __('Add a new user') . "</h3>"; 247 ?> 249 echo "<h3>" . __('Add a new user') . "</h3>"; ?> 248 250 <p><?php _e('As you type WordPress will offer you a choice of usernames.<br /> Click them to select and hit <em>Update Options</em> to add the user.') ?></p> 249 <table >251 <table class="form-table"> 250 252 <tr> 251 253 <th scope="row"><?php _e('User Login:') ?></th> 252 254 <td><input type="text" name="newuser" id="newuser" /></td> … … 258 260 <?php 259 261 reset( $editblog_roles ); 260 262 foreach( $editblog_roles as $role => $role_assoc ){ 263 $name = translate_with_context($role_assoc['name']); 261 264 $selected = ( $role == $editblog_default_role ) ? 'selected="selected"' : ''; 262 echo "<option {$selected} value=\"{$role}\">{$ role_assoc['name']}</option>";265 echo "<option {$selected} value=\"{$role}\">{$name}</option>"; 263 266 } 264 267 ?> 265 268 </select> 266 269 </td> 267 270 </tr> 268 271 </table> 269 </div>270 272 271 < div class="wrap">272 <strong><?php _e('Misc Blog Actions') ?></strong>273 < p><?php do_action( 'wpmueditblogaction', $id ); ?></p>274 </ div>273 <h3><?php _e('Misc Blog Actions') ?></h3> 274 <table class="form-table"> 275 <?php do_action( 'wpmueditblogaction', $id ); ?> 276 </table> 275 277 276 278 <p class="submit"> 277 279 <input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> … … 422 424 <tbody id="the-list"> 423 425 <?php 424 426 if ($blog_list) { 425 $bgcolor = '';427 $bgcolor = $class = ''; 426 428 $status_list = array( "archived" => "#fee", "spam" => "#faa", "deleted" => "#f55" ); 427 429 foreach ($blog_list as $blog) { 428 430 $class = ('alternate' == $class) ? '' : 'alternate';
