Changeset 1175 for trunk/wp-admin/link-categories.php
- Timestamp:
- 04/25/2004 11:49:45 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/link-categories.php
r1100 r1175 2 2 // Links 3 3 // Copyright (C) 2002, 2003 Mike Little -- mike@zed1.com 4 5 $title = 'Link Categories';4 require_once('../wp-includes/wp-l10n.php'); 5 $title = __('Link Categories'); 6 6 $this_file='link-categories.php'; 7 7 $parent_file = 'link-manager.php'; … … 30 30 31 31 if ($user_level < get_settings('links_minadminlevel')) 32 die ( "Cheatin' uh ?");32 die (__("Cheatin' uh ?")); 33 33 34 34 $cat_name = addslashes($_POST['cat_name']); … … 91 91 92 92 if ($cat_id=="1") 93 die( "Can't delete the <strong>$cat_name</strong> link category: this is the default one");93 die(sprintf(__("Can't delete the <strong>%s</strong> link category: this is the default one"), $cat_name)); 94 94 95 95 if ($user_level < get_settings('links_minadminlevel')) 96 die ("Cheatin' uh ?");96 die (__("Cheatin' uh ?")); 97 97 98 98 $wpdb->query("DELETE FROM $tablelinkcategories WHERE cat_id='$cat_id'"); … … 116 116 117 117 <ul id="adminmenu2"> 118 <li><a href="link-manager.php" > Manage Links</a></li>119 <li><a href="link-add.php"> Add Link</a></li>120 <li><a href="link-categories.php" class="current"> Link Categories</a></li>121 <li class="last"><a href="link-import.php"> Import Blogroll</a></li>118 <li><a href="link-manager.php" ><?php _e('Manage Links') ?></a></li> 119 <li><a href="link-add.php"><?php _e('Add Link') ?></a></li> 120 <li><a href="link-categories.php" class="current"><?php _e('Link Categories') ?></a></li> 121 <li class="last"><a href="link-import.php"><?php _e('Import Blogroll') ?></a></li> 122 122 </ul> 123 123 … … 129 129 <input type="hidden" name="cat_id" value="<?php echo $row->cat_id ?>" /> 130 130 <fieldset class="options"> 131 <legend> Category Options</legend>131 <legend><?php _e('Category Options') ?></legend> 132 132 <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 133 133 <tr> 134 <th width="33%" scope="row"> Name:</th>134 <th width="33%" scope="row"><?php _e('Name:') ?></th> 135 135 <td width="67%"><input name="cat_name" type="text" value="<?php echo stripslashes($row->cat_name)?>" size="30" /></td> 136 136 </tr> 137 137 <tr> 138 <th scope="row"> Show:</th>138 <th scope="row"><?php _e('Show:') ?></th> 139 139 <td> 140 140 <label> 141 141 <input type="checkbox" name="show_images" value="Y" <?php checked('Y', $row->show_images); ?> /> 142 Image</label> <br />142 <?php _e('Image') ?></label> <br /> 143 143 <label> 144 144 <input type="checkbox" name="show_description" value="Y" <?php checked('Y', $row->show_description); ?> /> 145 Description</label>146 (shown in <code>title</code> regardless)<br />145 <?php _e('Description') ?></label> 146 <?php _e('(shown in <code>title</code> regardless)') ?><br /> 147 147 <label> 148 148 <input type="checkbox" name="show_rating" value="Y" <?php checked('Y', $row->show_rating); ?> /> 149 Rating</label> <br />149 <?php _e('Rating') ?></label> <br /> 150 150 <label> 151 151 <input type="checkbox" name="show_updated" value="Y" <?php checked('Y', $row->show_updated); ?> /> 152 Updated</label>153 (shown in <code>title</code> regardless)</td>154 </tr> 155 <tr> 156 <th scope="row"> Sort order:</th>152 <?php _e('Updated') ?></label> 153 <?php _e('(shown in <code>title</code> regardless)') ?></td> 154 </tr> 155 <tr> 156 <th scope="row"><?php _e('Sort order:') ?></th> 157 157 <td> 158 158 <select name="sort_order" size="1"> 159 <option value="name" <?php echo ($row->sort_order == 'name') ? 'selected' : ''?>> Name</option>160 <option value="id" <?php echo ($row->sort_order == 'id') ? 'selected' : ''?>> Id</option>161 <option value="url" <?php echo ($row->sort_order == 'url') ? 'selected' : ''?>> URL</option>162 <option value="rating" <?php echo ($row->sort_order == 'rating') ? 'selected' : ''?>> Rating</option>163 <option value="updated" <?php echo ($row->sort_order == 'updated') ? 'selected' : ''?>> Updated</option>164 <option value="rand" <?php echo ($row->sort_order == 'rand') ? 'selected' : ''?>> Random</option>165 <option value="length" <?php echo ($row->sort_order == 'length') ? 'selected' : ''?>> Name Length</option>159 <option value="name" <?php echo ($row->sort_order == 'name') ? 'selected' : ''?>><?php _e('Name') ?></option> 160 <option value="id" <?php echo ($row->sort_order == 'id') ? 'selected' : ''?>><?php _e('Id') ?></option> 161 <option value="url" <?php echo ($row->sort_order == 'url') ? 'selected' : ''?>><?php _e('URL') ?></option> 162 <option value="rating" <?php echo ($row->sort_order == 'rating') ? 'selected' : ''?>><?php _e('Rating') ?></option> 163 <option value="updated" <?php echo ($row->sort_order == 'updated') ? 'selected' : ''?>><?php _e('Updated') ?></option> 164 <option value="rand" <?php echo ($row->sort_order == 'rand') ? 'selected' : ''?>><?php _e('Random') ?></option> 165 <option value="length" <?php echo ($row->sort_order == 'length') ? 'selected' : ''?>><?php _e('Name Length') ?></option> 166 166 </select> 167 167 <label> 168 168 <input type="checkbox" name="sort_desc" value="Y" <?php checked('Y', $row->sort_desc); ?> /> 169 Descending</label>169 <?php _e('Descending') ?></label> 170 170 </td> 171 171 </tr> 172 172 <tr> 173 <th scope="row"> Limit:</th>173 <th scope="row"><?php _e('Limit:') ?></th> 174 174 <td> 175 175 <input type="text" name="list_limit" size="5" value="<?php echo $row->list_limit ?>" /> 176 (Leave empty for no limit to number of links shown)176 <?php _e('(Leave empty for no limit to number of links shown)') ?> 177 177 </td> 178 178 </tr> 179 179 <tr> 180 <th scope="row"> Toggle:</th>180 <th scope="row"><?php _e('Toggle:') ?></th> 181 181 <td><label> 182 182 <input type="checkbox" name="auto_toggle" value="Y" <?php checked('Y', $row->auto_toggle); ?> /> 183 When new link is added toggle all others to be invisible</label></td>183 <?php _e('When new link is added toggle all others to be invisible') ?></label></td> 184 184 </tr> 185 185 … … 187 187 </fieldset> 188 188 <fieldset class="options"> 189 <legend> Formatting</legend>189 <legend><?php _e('Formatting') ?></legend> 190 190 <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 191 191 <tr> 192 <th width="33%" scope="row"> Before Link:</th>192 <th width="33%" scope="row"><?php _e('Before Link:') ?></th> 193 193 <td width="67%"><input type="text" name="text_before_link" size="45" value="<?php echo stripslashes($row->text_before_link)?>" /></td> 194 194 </tr> 195 195 <tr> 196 <th scope="row"> Between Link and Description:</th>196 <th scope="row"><?php _e('Between Link and Description:') ?></th> 197 197 <td><input type="text" name="text_after_link" size="45" value="<?php echo stripslashes($row->text_after_link)?>" /></td> 198 198 </tr> 199 199 <tr> 200 <th scope="row"> After Link:</th>200 <th scope="row"><?php _e('After Link:') ?></th> 201 201 <td><input type="text" name="text_after_all" size="45" value="<?php echo stripslashes($row->text_after_all)?>"/></td> 202 202 </tr> 203 203 </table> 204 204 </fieldset> 205 <p class="submit"><input type="submit" name="submit" value=" Save Category Settings »" /></p>205 <p class="submit"><input type="submit" name="submit" value="<?php _e('Save Category Settings »') ?>" /></p> 206 206 </form> 207 207 … … 217 217 218 218 if ($user_level < get_settings('links_minadminlevel')) 219 die ( "Cheatin' uh ?");219 die (__("Cheatin' uh ?")); 220 220 221 221 $submit=$_POST["submit"]; … … 290 290 include_once ("./admin-header.php"); 291 291 if ($user_level < get_settings('links_minadminlevel')) { 292 die( "You have do not have sufficient permissions to edit the link categories for this blog. :)");292 die(__("You have do not have sufficient permissions to edit the link categories for this blog. :)")); 293 293 } 294 294 ?> 295 295 <ul id="adminmenu2"> 296 <li><a href="link-manager.php" > Manage Links</a></li>297 <li><a href="link-add.php"> Add Link</a></li>298 <li><a href="link-categories.php" class="current"> Link Categories</a></li>299 <li class="last"><a href="link-import.php"> Import Blogroll</a></li>296 <li><a href="link-manager.php" ><?php _e('Manage Links') ?></a></li> 297 <li><a href="link-add.php"><?php _e('Add Link') ?></a></li> 298 <li><a href="link-categories.php" class="current"><?php _e('Link Categories') ?></a></li> 299 <li class="last"><a href="link-import.php"><?php _e('Import Blogroll') ?></a></li> 300 300 </ul> 301 301 <div class="wrap"> 302 <h2> Link Categories:<?php echo gethelp_link($this_file,'edit_link_category');?></h2>302 <h2><?php _e('Link Categories:') ?><?php echo gethelp_link($this_file,'edit_link_category');?></h2> 303 303 <table width="100%" cellpadding="5" cellspacing="0" border="0"> 304 304 <tr> 305 <th rowspan="2" valign="bottom">Name</th>306 <th rowspan="2" valign="bottom"> ID</th>307 <th rowspan="2" valign="bottom"> Toggle?</th>308 <th colspan="4" valign="bottom"> Show</th>309 <th rowspan="2" valign="bottom"> Sort Order</th>310 <th rowspan="2" valign="bottom"> Desc?</th>311 <th colspan="3" valign="bottom"> Formatting</th>312 <th rowspan="2" valign="bottom"> Limit</th>305 <th rowspan="2" valign="bottom"><?php _e('Name') ?></th> 306 <th rowspan="2" valign="bottom"><?php _e('ID') ?></th> 307 <th rowspan="2" valign="bottom"><?php _e('Toggle?') ?></th> 308 <th colspan="4" valign="bottom"><?php _e('Show') ?></th> 309 <th rowspan="2" valign="bottom"><?php _e('Sort Order') ?></th> 310 <th rowspan="2" valign="bottom"><?php _e('Desc?') ?></th> 311 <th colspan="3" valign="bottom"><?php _e('Formatting') ?></th> 312 <th rowspan="2" valign="bottom"><?php _e('Limit') ?></th> 313 313 <th rowspan="2" colspan="2"> </th> 314 314 </tr> 315 315 <tr> 316 <th valign="top"> Images</th>317 <th valign="top"> Desc.</th>318 <th valign="top"> Rating</th>319 <th valign="top"> Updated</th>320 <th valign="top"> Before</th>321 <th valign="top"> Between</th>322 <th valign="top"> After</th>316 <th valign="top"><?php _e('Images') ?></th> 317 <th valign="top"><?php _e('Desc.') ?></th> 318 <th valign="top"><?php _e('Rating') ?></th> 319 <th valign="top"><?php _e('Updated') ?></th> 320 <th valign="top"><?php _e('Before') ?></th> 321 <th valign="top"><?php _e('Between') ?></th> 322 <th valign="top"><?php _e('After') ?></th> 323 323 </tr> 324 324 <?php … … 347 347 <td nowrap="nowrap"><?php echo htmlentities($row->text_after_all)?></td> 348 348 <td><?php echo $row->list_limit?></td> 349 <td><a href="link-categories.php?cat_id=<?php echo $row->cat_id?>&action=Edit" class="edit"> Edit</a></td>350 <td><a href="link-categories.php?cat_id=<?php echo $row->cat_id?>&action=Delete" onclick="return confirm(' You are about to delete this category.\n \'Cancel\' to stop, \'OK\' to delete.');" class="delete">Delete</a></td>349 <td><a href="link-categories.php?cat_id=<?php echo $row->cat_id?>&action=Edit" class="edit"><?php _e('Edit') ?></a></td> 350 <td><a href="link-categories.php?cat_id=<?php echo $row->cat_id?>&action=Delete" onclick="return confirm('<?php _e("You are about to delete this category.\\n \'Cancel\' to stop, \'OK\' to delete.") ?>');" class="delete"><?php _e('Delete') ?></a></td> 351 351 </tr> 352 352 <?php … … 355 355 ?> 356 356 </table> 357 <p> These are the defaults for when you call a link category with no additional arguments. All of these settings may be overwritten.</p>357 <p><?php _e('These are the defaults for when you call a link category with no additional arguments. All of these settings may be overwritten.') ?></p> 358 358 359 359 </div> … … 362 362 <form name="addcat" method="post"> 363 363 <input type="hidden" name="action" value="addcat" /> 364 <h2> Add a Link Category:<?php echo gethelp_link($this_file,'add_link_category');?></h2>364 <h2><?php _e('Add a Link Category:') ?><?php echo gethelp_link($this_file,'add_link_category');?></h2> 365 365 <fieldset class="options"> 366 <legend> Category Options</legend>366 <legend><?php _e('Category Options') ?></legend> 367 367 <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 368 368 <tr> 369 <th width="33%" scope="row"> Name:</th>369 <th width="33%" scope="row"><?php _e('Name:') ?></th> 370 370 <td width="67%"><input type="text" name="cat_name" size="30" /></td> 371 371 </tr> 372 372 <tr> 373 <th scope="row"> Show:</th>373 <th scope="row"><?php _e('Show:') ?></th> 374 374 <td> 375 375 <label> 376 376 <input type="checkbox" name="show_images" value="Y" /> 377 Image</label> <br />377 <?php _e('Image') ?></label> <br /> 378 378 <label> 379 379 <input type="checkbox" name="show_description" value="Y" /> 380 Description</label>381 (shown in <code>title</code> regardless)<br />380 <?php _e('Description') ?></label> 381 <?php _e('(shown in <code>title</code> regardless)') ?><br /> 382 382 <label> 383 383 <input type="checkbox" name="show_rating" value="Y" /> 384 Rating</label> <br />384 <?php _e('Rating') ?></label> <br /> 385 385 <label> 386 386 <input type="checkbox" name="show_updated" value="Y" /> 387 Updated</label>388 (shown in <code>title</code> regardless)</td>389 </tr> 390 <tr> 391 <th scope="row"> Sort order:</th>387 <?php _e('Updated') ?></label> 388 <?php _e('(shown in <code>title</code> regardless)') ?></td> 389 </tr> 390 <tr> 391 <th scope="row"><?php _e('Sort order:') ?></th> 392 392 <td> 393 393 <select name="sort_order" size="1"> 394 <option value="name"> Name</option>395 <option value="id"> Id</option>396 <option value="url"> URL</option>397 <option value="rating"> Rating</option>398 <option value="updated"> Updated</option>399 <option value="rand"> Random</option>394 <option value="name"><?php _e('Name') ?></option> 395 <option value="id"><?php _e('Id') ?></option> 396 <option value="url"><?php _e('URL') ?></option> 397 <option value="rating"><?php _e('Rating') ?></option> 398 <option value="updated"><?php _e('Updated') ?></option> 399 <option value="rand"><?php _e('Random') ?></option> 400 400 </select> 401 401 <label> 402 402 <input type="checkbox" name="sort_desc" value="Y" /> 403 Descending</label>403 <?php _e('Descending') ?></label> 404 404 </td> 405 405 </tr> 406 406 <tr> 407 <th scope="row"> Limit:</th>407 <th scope="row"><?php _e('Limit:') ?></th> 408 408 <td> 409 <input type="text" name="list_limit" size="5" value="" /> (Leave empty for no limit to number of links shown)409 <input type="text" name="list_limit" size="5" value="" /> <?php _e('(Leave empty for no limit to number of links shown)') ?> 410 410 </td> 411 411 </tr> 412 412 <tr> 413 <th scope="row"> Toggle:</th>413 <th scope="row"><?php _e('Toggle:') ?></th> 414 414 <td><label> 415 415 <input type="checkbox" name="auto_toggle" value="Y" /> 416 When new link is added toggle all others to be invisible</label></td>416 <?php _e('When new link is added toggle all others to be invisible') ?></label></td> 417 417 </tr> 418 418 … … 420 420 </fieldset> 421 421 <fieldset class="options"> 422 <legend> Formatting</legend>422 <legend><?php _e('Formatting') ?></legend> 423 423 <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 424 424 <tr> 425 <th width="33%" scope="row"> Before Link:</th>425 <th width="33%" scope="row"><?php _e('Before Link:') ?></th> 426 426 <td width="67%"><input type="text" name="text_before_link" size="45" value="<li>" /></td> 427 427 </tr> 428 428 <tr> 429 <th scope="row"> Between Link and Description:</th>429 <th scope="row"><?php _e('Between Link and Description:') ?></th> 430 430 <td><input type="text" name="text_after_link" size="45" value="<br />" /></td> 431 431 </tr> 432 432 <tr> 433 <th scope="row"> After Link:</th>433 <th scope="row"><?php _e('After Link:') ?></th> 434 434 <td><input type="text" name="text_after_all" size="45" value="</li>"/></td> 435 435 </tr> 436 436 </table> 437 437 </fieldset> 438 <p class="submit"><input type="submit" name="submit" value=" Add Category »" /></p>438 <p class="submit"><input type="submit" name="submit" value="<?php _e('Add Category »') ?>" /></p> 439 439 </form> 440 440 </div> 441 441 <div class="wrap"> 442 <h3>Note:</h3> 443 <p>Deleting a link category does not delete links from that category.<br /> 444 It will 445 just set them back to the default category <b><?php echo get_linkcatname(1) ?></b>. 442 <h3><?php _e('Note:') ?></h3> 443 <?php printf(__('<p>Deleting a link category does not delete links from that category.<br /> 444 It will just set them back to the default category <b>%s</b>.'), get_linkcatname(1)) ?> 446 445 </p> 447 446 </div>
Note: See TracChangeset
for help on using the changeset viewer.