Changeset 1106 for trunk/wp-admin/post.php
- Timestamp:
- 04/20/2004 04:15:18 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r1094 r1106 1 1 <?php 2 2 /* <Edit> */ 3 4 require_once('../wp-includes/wp-l10n.php'); 3 5 4 6 function add_magic_quotes($array) { … … 85 87 86 88 if ($user_level == 0) 87 die ( 'Cheatin’ uh?');89 die (__('Cheatin’ uh?')); 88 90 89 91 if (($user_level > 4) && (!empty($HTTP_POST_VARS['edit_date']))) { … … 213 215 214 216 case 'edit': 215 $title = 'Edit';217 $title = __('Edit'); 216 218 217 219 $standalone = 0; … … 246 248 ?> 247 249 <div id='preview' class='wrap'> 248 <h2>Post Preview (updated when post is saved)</h2>249 <h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>250 <div class="meta">Filed under: <?php the_category()?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>250 <h2><?php _e('Post Preview (updated when post is saved)'); ?></h2> 251 <h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="<?php printf(__("Permanent Link: %s"), the_title()); ?>"><?php the_title(); ?></a></h3> 252 <div class="meta"><?php printf(__("Filed under: %s"), the_category()); ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div> 251 253 252 254 <div class="storycontent"> … … 257 259 } else { 258 260 ?> 259 <p>Since you’re a newcomer, you’ll have to wait for an admin to raise your level to 1, 260 in order to be authorized to post.<br /> 261 You can also <a href="mailto:<?php echo get_settings('admin_email'); ?>?subject=Promotion?">e-mail the admin</a> 262 to ask for a promotion.<br /> 263 When you’re promoted, just reload this page and you’ll be able to blog. :) 261 <p><?php printf(__('Since you’re a newcomer, you’ll have to wait for an admin to raise your level to 1, in order to be authorized to post.<br /> 262 You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br /> 263 When you’re promoted, just reload this page and you’ll be able to blog. :)'), get_settings('admin_email')); ?> 264 264 </p> 265 265 <?php … … 273 273 274 274 if ($user_level == 0) 275 die ( 'Cheatin’ uh?');275 die (__('Cheatin’ uh?')); 276 276 277 277 if (!isset($blog_ID)) { … … 418 418 419 419 $post_id = intval($HTTP_GET_VARS['post']); 420 $postdata = get_postdata($post_id) or die( 'Oops, no post with this ID. <a href="post.php">Go back</a>!');420 $postdata = get_postdata($post_id) or die(sprintf(__('Oops, no post with this ID. <a href="%s">Go back</a>!'), 'post.php')); 421 421 $authordata = get_userdata($postdata['Author_ID']); 422 422 423 423 if ($user_level < $authordata->user_level) 424 die ( 'You don’t have the right to delete <strong>'.$authordata[1].'</strong>’s posts.');424 die (sprintf(__('You don’t have the right to delete <strong>%s</strong>’s posts.'), $authordata[1])); 425 425 426 426 // send geoURL ping to "erase" from their DB … … 435 435 $result = $wpdb->query("DELETE FROM $tableposts WHERE ID=$post_id"); 436 436 if (!$result) 437 die( 'Error in deleting...');437 die(__('Error in deleting...')); 438 438 439 439 $result = $wpdb->query("DELETE FROM $tablecomments WHERE comment_post_ID=$post_id"); … … 452 452 453 453 case 'editcomment': 454 $title = 'Edit Comment';454 $title = __('Edit Comment'); 455 455 $standalone = 0; 456 456 $parent_file = 'edit.php'; … … 460 460 461 461 if ($user_level == 0) { 462 die ( 'Cheatin’ uh?');462 die (__('Cheatin’ uh?')); 463 463 } 464 464 465 465 $comment = $HTTP_GET_VARS['comment']; 466 $commentdata = get_commentdata($comment, 1, true) or die( 'Oops, no comment with this ID. <a href="javascript:history.go(-1)">Go back</a>!');466 $commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'javascript:history.go(-1)')); 467 467 $content = $commentdata['comment_content']; 468 468 $content = format_to_edit($content); … … 478 478 479 479 if ($user_level == 0) 480 die ( 'Cheatin’ uh?');480 die (__('Cheatin’ uh?')); 481 481 482 482 $comment = $HTTP_GET_VARS['comment']; 483 483 $p = $HTTP_GET_VARS['p']; 484 $commentdata = get_commentdata($comment, 1, true) or die('Oops, no comment with this ID. <a href="edit.php">Go back</a>!');484 $commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php')); 485 485 486 486 echo "<div class=\"wrap\">\n"; 487 echo "<p>< strong>Caution:</strong> You are about to delete the following comment:</p>\n";487 echo "<p><?php __('<strong>Caution:</strong> You are about to delete the following comment:'); ?></p>\n"; 488 488 echo "<table border=\"0\">\n"; 489 echo "<tr><td>Author:</td><td>" . $commentdata["comment_author"] . "</td></tr>\n";490 echo "<tr><td>E-Mail:</td><td>" . $commentdata["comment_author_email"] . "</td></tr>\n";491 echo "<tr><td>URL:</td><td>" . $commentdata["comment_author_url"] . "</td></tr>\n";492 echo "<tr><td>Comment:</td><td>" . stripslashes($commentdata["comment_content"]) . "</td></tr>\n";489 echo "<tr><td>" . __('Author:') . "</td><td>" . $commentdata["comment_author"] . "</td></tr>\n"; 490 echo "<tr><td>" . __('E-Mail:') . "</td><td>" . $commentdata["comment_author_email"] . "</td></tr>\n"; 491 echo "<tr><td>". __('URL:') . "</td><td>" . $commentdata["comment_author_url"] . "</td></tr>\n"; 492 echo "<tr><td>". __('Comment:') . "</td><td>" . stripslashes($commentdata["comment_content"]) . "</td></tr>\n"; 493 493 echo "</table>\n"; 494 echo "<p>Are you sure you want to do that?</p>\n";494 echo "<p>" . __('Are you sure you want to do that?') . "</p>\n"; 495 495 496 496 echo "<form action='".get_settings('siteurl')."/wp-admin/post.php' method='get'>\n"; … … 499 499 echo "<input type=\"hidden\" name=\"comment\" value=\"$comment\" />\n"; 500 500 echo "<input type=\"hidden\" name=\"noredir\" value=\"1\" />\n"; 501 echo "<input type=\"submit\" value=\"Yes\" />";501 echo "<input type=\"submit\" value=\"" . __('Yes') . "\" />"; 502 502 echo " "; 503 echo "<input type=\"button\" value=\"No\" onClick=\"self.location='". get_settings('siteurl') ."/wp-admin/edit.php?p=$p&c=1#comments';\" />\n";503 echo "<input type=\"button\" value=\"" . __('No') . "\" onClick=\"self.location='". get_settings('siteurl') ."/wp-admin/edit.php?p=$p&c=1#comments';\" />\n"; 504 504 echo "</form>\n"; 505 505 echo "</div>\n"; … … 513 513 514 514 if ($user_level == 0) 515 die ( 'Cheatin’ uh?');515 die (__('Cheatin’ uh?')); 516 516 517 517 … … 524 524 } 525 525 526 $postdata = get_postdata($p) or die('Oops, no post with this ID. <a href="edit.php">Go back</a>!');527 $commentdata = get_commentdata($comment, 1, true) or die('Oops, no comment with this ID. <a href="post.php">Go back</a>!');526 $postdata = get_postdata($p) or die(sprintf(__('Oops, no post with this ID. <a href="%s">Go back</a>!'), 'edit.php')); 527 $commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'post.php')); 528 528 529 529 $authordata = get_userdata($postdata['Author_ID']); 530 530 if ($user_level < $authordata->user_level) 531 die ( 'You don’t have the right to delete <strong>'.$authordata->user_nickname.'</strong>’s post comments. <a href="post.php">Go back</a>!');531 die (sprintf(__('You don’t have the right to delete <strong>%s</strong>’s post comments. <a href="%s">Go back</a>!'), $authordata->user_nickname, 'post.php')); 532 532 533 533 wp_set_comment_status($comment, "delete"); … … 548 548 549 549 if ($user_level == 0) 550 die ( 'Cheatin’ uh?');550 die (__('Cheatin’ uh?')); 551 551 552 552 $comment = $HTTP_GET_VARS['comment']; … … 558 558 } 559 559 560 $commentdata = get_commentdata($comment) or die('Oops, no comment with this ID. <a href="edit.php">Go back</a>!');560 $commentdata = get_commentdata($comment) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php')); 561 561 562 562 wp_set_comment_status($comment, "hold"); … … 576 576 577 577 if ($user_level == 0) 578 die ( 'Cheatin’ uh?');578 die (__('Cheatin’ uh?')); 579 579 580 580 $comment = $HTTP_GET_VARS['comment']; 581 581 $p = $HTTP_GET_VARS['p']; 582 $commentdata = get_commentdata($comment, 1, true) or die('Oops, no comment with this ID. <a href="edit.php">Go back</a>!');582 $commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php')); 583 583 584 584 wp_set_comment_status($comment, "approve"); … … 588 588 589 589 echo "<div class=\"wrap\">\n"; 590 echo "<p>Comment has been approved.</p>\n";590 echo "<p>" . __('Comment has been approved.') . "</p>\n"; 591 591 592 592 echo "<form action=\"". get_settings('siteurl') ."/wp-admin/edit.php?p=$p&c=1#comments\" method=\"get\">\n"; 593 593 echo "<input type=\"hidden\" name=\"p\" value=\"$p\" />\n"; 594 594 echo "<input type=\"hidden\" name=\"c\" value=\"1\" />\n"; 595 echo "<input type=\"submit\" value=\"Ok\" />";595 echo "<input type=\"submit\" value=\"" . __('Ok') . "\" />"; 596 596 echo "</form>\n"; 597 597 echo "</div>\n"; … … 605 605 606 606 if ($user_level == 0) 607 die ( 'Cheatin’ uh?');607 die (__('Cheatin’ uh?')); 608 608 609 609 $comment = $HTTP_GET_VARS['comment']; … … 614 614 $noredir = false; 615 615 } 616 $commentdata = get_commentdata($comment) or die('Oops, no comment with this ID. <a href="edit.php">Go back</a>!');616 $commentdata = get_commentdata($comment) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php')); 617 617 618 618 wp_set_comment_status($comment, "approve"); … … 636 636 637 637 if ($user_level == 0) 638 die ( 'Cheatin’ uh?');638 die (__('Cheatin’ uh?')); 639 639 640 640 $comment_ID = $HTTP_POST_VARS['comment_ID']; … … 681 681 682 682 default: 683 $title = 'Create New Post';684 683 $standalone = 0; 684 $title = __('Create New Post'); 685 685 require_once ('./admin-header.php'); 686 686 … … 694 694 ?> 695 695 <div class="wrap"> 696 <p><strong>Your Drafts:</strong>696 <p><strong><?php _e('Your Drafts:') ?></strong> 697 697 <?php 698 698 $i = 0; … … 702 702 $draft->post_title = stripslashes($draft->post_title); 703 703 if ($draft->post_title == '') 704 $draft->post_title = 'Post #'.$draft->ID;705 echo "<a href='post.php?action=edit&post=$draft->ID' title=' Edit this draft'>$draft->post_title</a>";704 $draft->post_title = sprintf(__('Post # %s'), $draft->ID); 705 echo "<a href='post.php?action=edit&post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>"; 706 706 ++$i; 707 707 } … … 725 725 ?> 726 726 <div class="wrap"> 727 < h3>WordPress bookmarklet</h3>728 <p>You can drag the following link to your links bar or add it to your bookmarks and when you "Press it" it will open up a popup window with information and a link to the site you 're currently browsing so you can make a quick post about it. Try it out:</p>727 <?php _e('<h3>WordPress bookmarklet</h3> 728 <p>You can drag the following link to your links bar or add it to your bookmarks and when you "Press it" it will open up a popup window with information and a link to the site you’re currently browsing so you can make a quick post about it. Try it out:</p>') ?> 729 729 <p> 730 730 … … 734 734 if ($is_NS4 || $is_gecko) { 735 735 ?> 736 <a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}void(window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'WordPress bookmarklet','scrollbars=yes,width=600,height=460,left=100,top=150,status=yes'));">Press It 737 - <?php echo get_settings('blogname'); ?></a> 736 <a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}void(window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'<?php _e('WordPress bookmarklet') ?>','scrollbars=yes,width=600,height=460,left=100,top=150,status=yes'));"><?php printf(__('Press It - %s'), get_settings('blogname')); ?></a> 738 737 <?php 739 738 } else if ($is_winIE) { 740 739 ?> 741 <a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">Press it 742 - <?php echo get_settings('blogname'); ?></a> 740 <a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a> 743 741 <script type="text/javascript" language="JavaScript"> 744 742 <!-- … … 755 753 } else if ($is_opera) { 756 754 ?> 757 <a href="javascript:void(window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));">Press it 758 - <?php echo get_settings('blogname'); ?></a> 755 <a href="javascript:void(window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a> 759 756 <?php 760 757 } else if ($is_macIE) { 761 758 ?> 762 <a href="javascript:Q='';if(top.frames.length==0);void(btw=window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">Press it 763 - <?php echo get_settings('blogname'); ?></a> 759 <a href="javascript:Q='';if(top.frames.length==0);void(btw=window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();"><?php prtinf(__('Press it - %s'), get_settings('blogname')); ?></a> 764 760 <?php 765 761 } … … 773 769 ?> 774 770 <div class="wrap"> 775 776 You can also <a href="mailto:<?php echo get_settings('admin_email'); ?>?subject=Blog posting permission">e-mail the admin</a> to ask for a promotion.<br />777 When you’re promoted, just reload this page and you’ll be able to blog. :)</p>771 <?php printf(__('<p>Since you’re a newcomer, you’ll have to wait for an admin to raise your level to 1, in order to be authorized to post blog items.<br /> 772 You can also <a href="mailto:%s?subject=Blog posting permission">e-mail the admin</a> to ask for a promotion.<br /> 773 When you’re promoted, just reload this page and you’ll be able to blog. :)</p>'), get_settings('admin_email')); ?> 778 774 </div> 779 775 <?php
Note: See TracChangeset
for help on using the changeset viewer.