- Timestamp:
- 07/17/06 19:33:18 (2 years ago)
- Location:
- branches/class-rewrite
- Files:
-
- 5 added
- 2 modified
-
common/admin.php (modified) (43 diffs)
-
common/mvblog.php (modified) (29 diffs)
-
locale (added)
-
locale/nl_NL (added)
-
locale/nl_NL/LC_MESSAGES (added)
-
locale/nl_NL/LC_MESSAGES/messages.mo (added)
-
locale/nl_NL/LC_MESSAGES/messages.po (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/class-rewrite/common/admin.php
r193 r194 184 184 public function show_index() { 185 185 ?> 186 <p class="first"> Welcome to MvBlog"<?php echo $_SESSION["author_fullname"]; ?>".</p>187 <p class="first"> You can administer your blog with the menu items right above this useless text.</p>188 <p class="first"> Enjoy keeping your blog up-to-date</p>186 <p class="first"><?php echo gettext("Welcome to MvBlog"); ?> "<?php echo $_SESSION["author_fullname"]; ?>".</p> 187 <p class="first"><?php echo gettext("You can administer your blog with the menu items right above this useless text."); ?></p> 188 <p class="first"><?php echo gettext("Enjoy keeping your blog up-to-date."); ?></p> 189 189 <p class="first"> 190 If you want to thank/support me, or complain about bugs, or tell me this tool sux, or whatever:<br />190 <?php echo gettext("If you want to thank/support me, or complain about bugs, or tell me this tool sux, or whatever"); ?>:<br /> 191 191 Michiel van Baak<br /> 192 192 michiel@vanbaak.info … … 205 205 } 206 206 207 ?><a href="./index.php?action=edit_cat&id=0"> create new</a><?php207 ?><a href="./index.php?action=edit_cat&id=0"><?php echo gettext("create new"); ?></a><?php 208 208 while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) { 209 209 ?> … … 218 218 $r->fetchInto($count, DB_FETCHMODE_ASSOC); 219 219 ?> 220 <h2 class="log_post_h2"> articles in this categorie: <?php echo $count["count"]; ?></h2>220 <h2 class="log_post_h2"><?php echo gettext("articles in this categorie"); ?>: <?php echo $count["count"]; ?></h2> 221 221 </div> 222 222 <div class="log_post_body"> … … 226 226 </div> 227 227 <div class="log_post_foot"> 228 <span class="log_post_date"> active: <?php echo $row["active"]; ?></span>229 <span class="log_post_author"> public: <?php echo $row["public"]; ?></span>228 <span class="log_post_date"><?php echo gettext("active"); ?>: <?php echo $row["active"]; ?></span> 229 <span class="log_post_author"><?php echo gettext("public"); ?>: <?php echo $row["public"]; ?></span> 230 230 </div> 231 231 </div> … … 268 268 $r->fetchInto($count, DB_FETCHMODE_ASSOC); 269 269 ?> 270 <h2 class="log_post_h2"> articles in this categorie: <?php echo $count["count"]; ?></h2>270 <h2 class="log_post_h2"><?php echo gettext("articles in this categorie"); ?>: <?php echo $count["count"]; ?></h2> 271 271 </div> 272 272 <div class="log_post_body"> 273 273 <textarea name="cat[description]" style="width: 200px; height: 100px;"><?php echo stripslashes($cat["desc"]); ?></textarea><br /> 274 <input type="submit" value=" save" />275 <input type="button" value=" cancel" onClick="document.forms.category.action.value='show_cats';document.forms.category.submit();" />274 <input type="submit" value="<?php echo gettext("save"); ?>" /> 275 <input type="button" value="<?php echo gettext("cancel"); ?>" onClick="document.forms.category.action.value='show_cats';document.forms.category.submit();" /> 276 276 <?php if ($id) { ?> 277 <input type="button" value=" delete" onClick="document.forms.category.action.value='delete_cat';document.forms.category.submit();" />277 <input type="button" value="<?php echo gettext("delete"); ?>" onClick="document.forms.category.action.value='delete_cat';document.forms.category.submit();" /> 278 278 <?php } ?> 279 279 </div> 280 280 <div class="log_post_foot"> 281 <span class="log_post_date"> active: <input type="checkbox" value="1" name="cat[active]" <?php if ($cat["active"]) { echo "checked=\"checked\""; } ?> /></span>282 <span class="log_post_author"> public: <input type="checkbox" value="1" name="cat[public]" <?php if ($cat["public"]) { echo "checked=\"checked\""; } ?> /></span>281 <span class="log_post_date"><?php echo gettext("active"); ?>: <input type="checkbox" value="1" name="cat[active]" <?php if ($cat["active"]) { echo "checked=\"checked\""; } ?> /></span> 282 <span class="log_post_author"><?php echo gettext("public"); ?>: <input type="checkbox" value="1" name="cat[public]" <?php if ($cat["public"]) { echo "checked=\"checked\""; } ?> /></span> 283 283 </div> 284 284 </div> … … 343 343 } 344 344 345 ?><a href="./index.php?action=edit_author&id=0"> create new</a><?php345 ?><a href="./index.php?action=edit_author&id=0"><?php echo gettext("create new"); ?></a><?php 346 346 while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) { 347 347 ?> … … 353 353 echo stripslashes($row["fullname"]); 354 354 if ($row["active"]) 355 echo "( active)";355 echo "(".gettext("active").")"; 356 356 else 357 echo "( inactive)";357 echo "(".gettext("inactive").")"; 358 358 ?> 359 359 </a> 360 360 </h1> 361 <h2 class="log_post_h2"> loginname: <?php echo stripslashes($row["login"]); ?></h2>361 <h2 class="log_post_h2"><?php echo gettext("loginname"); ?>: <?php echo stripslashes($row["login"]); ?></h2> 362 362 <br /> 363 363 </div> … … 405 405 echo stripslashes($author["login"]); 406 406 else 407 echo "login: <input type=\"text\" name=\"author[login]\" value=\"".stripslashes($author["login"])."\" />";407 echo gettext("login").": <input type=\"text\" name=\"author[login]\" value=\"".stripslashes($author["login"])."\" />"; 408 408 ?> 409 409 </h1> … … 413 413 <div class="log_post_normal"> 414 414 <table border="0" cellspacing="0" cellpadding="0"><tr> 415 <td align="right"> password:</td>415 <td align="right"><?php echo gettext("password"); ?>:</td> 416 416 <td><input type="password" name="author[password]" /></td> 417 417 </tr><tr> 418 <td align="right"> password(repeat):</td>418 <td align="right"><?php echo gettext("password")."(".gettext("repeat").")"; ?>:</td> 419 419 <td><input type="password" name="author[password1]" /></td> 420 420 </tr><tr> 421 <td align="right"> email:</td>421 <td align="right"><?php echo gettext("email"); ?>:</td> 422 422 <td><input type="text" name="author[email]" value="<?php echo stripslashes($author["email"]); ?>" /></td> 423 423 </tr><tr> 424 <td align="right"> website:</td>424 <td align="right"><?php echo gettext("website"); ?>:</td> 425 425 <td><input type="text" name="author[website]" value="<?php echo stripslashes($author["website"]); ?>" /></td> 426 426 </tr><tr> 427 <td align="right"> full name: </td>427 <td align="right"><?php echo gettext("full name"); ?>: </td> 428 428 <td><input type="text" name="author[fullname]" value="<?php echo stripslashes($author["fullname"]); ?>" /></td> 429 429 </tr></table> … … 432 432 <?php if ($authorid) { ?> 433 433 <?php if ($author["active"]) { ?> 434 <input type="button" value=" disable" onClick="document.forms.author.active.value=0;document.forms.author.action.value='save_author';document.forms.author.submit();" />434 <input type="button" value="<?php echo gettext("disable"); ?>" onClick="document.forms.author.active.value=0;document.forms.author.action.value='save_author';document.forms.author.submit();" /> 435 435 <?php } else { ?> 436 <input type="button" value=" enable" onClick="document.forms.author.active.value=1;document.forms.author.action.value='save_author';document.forms.author.submit();" />436 <input type="button" value="<?php echo gettext("enable"); ?>" onClick="document.forms.author.active.value=1;document.forms.author.action.value='save_author';document.forms.author.submit();" /> 437 437 <?php } ?> 438 438 <?php } ?> … … 517 517 echo stripslashes($row["realname"]); 518 518 if ($row["active"]) 519 echo "( active)";519 echo "(".gettext("active").")"; 520 520 else 521 echo "( inactive)";521 echo "(".gettext("inactive").")"; 522 522 ?> 523 523 </a> 524 524 </h1> 525 525 <h2 class="log_post_h2"> 526 loginname: <?php echostripslashes($row["username"]); ?>526 <?php echo gettext("loginname").": ".stripslashes($row["username"]); ?> 527 527 </h2> 528 528 </div> … … 572 572 echo stripslashes($user["username"]); 573 573 else 574 echo "login: <input type=\"text\" name=\"user[username]\" value=\"".stripslashes($user["username"])."\" />";574 echo gettext("login").": <input type=\"text\" name=\"user[username]\" value=\"".stripslashes($user["username"])."\" />"; 575 575 ?> 576 576 </h1> … … 579 579 <div class="log_post_normal"> 580 580 <table border="0" cellspacing="0" cellpadding="0"><tr> 581 <td align="right"> password:</td>581 <td align="right"><?php echo gettext("password"); ?>:</td> 582 582 <td><input type="password" name="user[password]" /></td> 583 583 </tr><tr> 584 <td align="right"> password(repeat):</td>584 <td align="right"><?php echo gettext("password")."(".gettext("repeat").")"; ?>:</td> 585 585 <td><input type="password" name="user[password1]" /></td> 586 586 </tr><tr> 587 <td align="right"> email:</td>587 <td align="right"><?php echo gettext("email"); ?>:</td> 588 588 <td><input type="text" name="user[email]" value="<?php echo stripslashes($user["email"]); ?>" /></td> 589 589 </tr><tr> 590 <td align="right"> website:</td>590 <td align="right"><?php echo gettext("website"); ?>:</td> 591 591 <td><input type="text" name="user[website]" value="<?php echo stripslashes($user["website"]); ?>" /></td> 592 592 </tr><tr> 593 <td align="right"> full name:</td>593 <td align="right"><?php echo gettext("full name"); ?>:</td> 594 594 <td><input type="text" name="user[realname]" value="<?php echo stripslashes($user["realname"]); ?>" /></td> 595 595 </tr></table> 596 596 </div> 597 <input type="submit" value=" save" />597 <input type="submit" value="<?php echo gettext("save"); ?>" /> 598 598 <?php if ($userid) { ?> 599 599 <?php if ($user["active"]) { ?> 600 <input type="button" value=" disable" onClick="document.forms.user.active.value=0;document.forms.user.action.value='save_user';document.forms.user.submit();" />600 <input type="button" value="<?php echo gettext("disable"); ?>" onClick="document.forms.user.active.value=0;document.forms.user.action.value='save_user';document.forms.user.submit();" /> 601 601 <?php } else { ?> 602 <input type="button" value=" enable" onClick="document.forms.user.active.value=1;document.forms.user.action.value='save_user';document.forms.user.submit();" />602 <input type="button" value="<?php echo gettext("enable"); ?>" onClick="document.forms.user.active.value=1;document.forms.user.action.value='save_user';document.forms.user.submit();" /> 603 603 <?php } ?> 604 <input type="button" value=" delete" onclick="del_user();" />604 <input type="button" value="<?php echo gettext("delete"); ?>" onclick="del_user();" /> 605 605 <?php } ?> 606 606 </div> … … 608 608 <script language="Javascript1.2" type="text/javascript"> 609 609 function del_user() { 610 if (confirm(' Are you sure you want to delete this user')) {610 if (confirm('<?php echo gettext("Are you sure you want to delete this user"); ?>')) { 611 611 document.forms.user.action.value='delete_user'; 612 612 document.forms.user.submit(); … … 629 629 if ($user["password"] && $user["password1"]) { 630 630 if ($user["password"] != $user["password1"]) { 631 $error = "Passwords don't match. Please correct this error and try again.";631 $error = gettext("Passwords don't match. Please correct this error and try again."); 632 632 } 633 633 } … … 637 637 $res->fetchInto($count); 638 638 if ($count[0]) { 639 $error = "Login already excists. Please correct this error and try again.";639 $error = gettext("Login already excists. Please correct this error and try again."); 640 640 } 641 641 } … … 722 722 } 723 723 ?> 724 <a href="./index.php?action=edit_post&id=0"> create new</a>724 <a href="./index.php?action=edit_post&id=0"><?php echo gettext("create new"); ?></a> 725 725 <form id="filter" method="post" action="index.php?action=show_posts"> 726 726 <div id="post_select"> 727 View month:727 <?php echo gettext("View month"); ?>: 728 728 <select name="options[month]"> 729 729 <option value="0">---</option> … … 748 748 ?> 749 749 </select> 750 <a href="javascript:document.getElementById('filter').submit();"> go</a>750 <a href="javascript:document.getElementById('filter').submit();"><?php echo gettext("go"); ?></a> 751 751 <br /><br /> 752 752 </div> … … 755 755 while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) { 756 756 if (!trim($row["title"])) { 757 $row["title"] = "[ no title]";757 $row["title"] = "[".gettext("no title")."]"; 758 758 } 759 759 if ($row["aside"] == 1) { … … 764 764 <div class="log_post_head"> 765 765 <h1 class="log_post_h1"><a href="?action=edit_post&id=<?php echo $row["id"]; ?>"><?php echo stripslashes($row["title"]); ?></a></h1> 766 <h2 class="log_post_h2"> category: <?php echo $this->categories[$row["categories_id"]]?></h2>766 <h2 class="log_post_h2"><?php echo gettext("category").": ".$this->categories[$row["categories_id"]]; ?></h2> 767 767 </div> 768 768 <div class="log_post_body"> … … 772 772 </div> 773 773 <div class="log_post_foot"> 774 <span class="log_post_author"> active: <?php echo (int)$row["active"]; ?></span>775 <span class="log_post_author"> public: <?php echo (int)$row["public"]; ?></span>776 <span class="log_post_author"> aside: <?php echo (int)$row["aside"]; ?></span>774 <span class="log_post_author"><?php echo gettext("active"); ?>: <?php echo (int)$row["active"]; ?></span> 775 <span class="log_post_author"><?php echo gettext("public"); ?>: <?php echo (int)$row["public"]; ?></span> 776 <span class="log_post_author"><?php echo gettext("aside"); ?>: <?php echo (int)$row["aside"]; ?></span> 777 777 </div> 778 778 </div> … … 780 780 } 781 781 if ($options["top"]) { 782 echo "<a class=\"link_prev\" href=\"index.php?action=show_posts&options[month]=".(int)$options["month"]."&options[year]=".(int)$options["year"]."&options[top]=".($options["top"]-$options["limit"])."\"> previous</a> ";782 echo "<a class=\"link_prev\" href=\"index.php?action=show_posts&options[month]=".(int)$options["month"]."&options[year]=".(int)$options["year"]."&options[top]=".($options["top"]-$options["limit"])."\">".gettext("previous")."</a> "; 783 783 } 784 784 if (($options["top"] + $options["limit"]) > $counter) { … … 788 788 } 789 789 if ($counter == 0) { 790 echo "<span class=\"log_cat\"> no posts";790 echo "<span class=\"log_cat\">".gettext("no posts"); 791 791 } else { 792 echo "<span class=\"log_cat\"> showing ".($options["top"]+1)." to ".$end." of ".$counter." total posts";792 echo "<span class=\"log_cat\">".gettext("showing")." ".($options["top"]+1)." ".gettext("to")." ".$end." ".gettext("of")." ".$counter." ".gettext("total posts"); 793 793 } 794 794 if (($options["top"]+$options["limit"]) < $counter) { 795 echo " <a class=\"link_next\" href=\"index.php?action=show_posts&options[month]=".(int)$options["month"]."&options[year]=".(int)$options["year"]."&options[top]=".($options["top"]+$options["limit"])."\"> next</a>";795 echo " <a class=\"link_next\" href=\"index.php?action=show_posts&options[month]=".(int)$options["month"]."&options[year]=".(int)$options["year"]."&options[top]=".($options["top"]+$options["limit"])."\">".gettext("next")."</a>"; 796 796 } 797 797 echo "</span>"; … … 807 807 if ($id==0) { 808 808 $post["id"] = 0; 809 $post["title"] = "post title";810 $post["body"] = "post body";809 $post["title"] = gettext("post title"); 810 $post["body"] = gettext("post body"); 811 811 $post["date"] = mktime(); 812 812 $post["categories_id"] = 0; … … 840 840 <div class="log_post_head"> 841 841 <h1 class="log_post_h1"><input type="text" id="title" name="post[title]" value="<?php echo stripslashes($post["title"]); ?>" /></h1> 842 <h2 class="log_post_h2"> category:842 <h2 class="log_post_h2"><?php echo gettext("category"); ?>: 843 843 <select name="post[categories_id]"> 844 844 <?php … … 858 858 <?php 859 859 860 echo "to limit this post on the frontpage, enter ##BREAKPOINT## in your post.<br />";861 echo "if this is not found, the frontpage article will be limited to 4000 characters";860 echo gettext("to limit this post on the frontpage, enter ##BREAKPOINT## in your post.")."<br />"; 861 echo gettext("if this is not found, the frontpage article will be limited to 4000 characters"); 862 862 ?> 863 863 <br /><br /> 864 date:864 <?php echo gettext("date"); ?>: 865 865 <select name="post[day]"> 866 866 <?php … … 885 885 </select> 886 886 <br /> 887 send trackback info to:887 <?php echo gettext("send trackback info to"); ?>: 888 888 <input type="text" name="post[tb_uri]" value="<?php echo $post["tb_uri"]; ?>" size="50" /><br /> 889 <input type="checkbox" value="1" name="post[mail_comments]"<?php if ($post["mail_comments"]) { echo " checked=\"checked\""; } ?> /> send comments as email to me.<br />890 <input type="submit" value=" save" />889 <input type="checkbox" value="1" name="post[mail_comments]"<?php if ($post["mail_comments"]) { echo " checked=\"checked\""; } ?> /> <?php echo gettext("send comments as email to me."); ?><br /> 890 <input type="submit" value="<?php echo gettext("save"); ?>" /> 891 891 <?php if ($post["id"]) { ?> 892 <input type="button" value=" delete" onClick="document.forms.blogpost.action.value='delete_post';document.forms.blogpost.submit();" />892 <input type="button" value="<?php echo gettext("delete"); ?>" onClick="document.forms.blogpost.action.value='delete_post';document.forms.blogpost.submit();" /> 893 893 <?php } else { ?> 894 <input type="button" value=" cancel" onClick="document.forms.blogpost.action.value='show_posts';document.forms.blogpost.submit();" />894 <input type="button" value="<?php echo gettext("cancel"); ?>" onClick="document.forms.blogpost.action.value='show_posts';document.forms.blogpost.submit();" /> 895 895 <?php } ?> 896 896 </div> 897 897 <div class="log_post_foot"> 898 <span class="log_post_date"> active: <input type="checkbox" value="1" name="post[active]" <?php if ($post["active"]) { echo "checked=\"checked\""; } ?> /></span>899 <span class="log_post_author"> public: <input type="checkbox" value="1" name="post[public]" <?php if ($post["public"]) { echo "checked=\"checked\""; } ?> /></span>900 <span class="log_post_author"> aside: <input type="checkbox" value="1" name="post[aside]" <?php if ($post["aside"]) { echo "checked=\"checked\""; } ?> /></span>901 <span class="log_post_author"> anoncomments: <input type="checkbox" value="1" name="post[allowanoncomments]" <?php if ($post["allowanoncomments"]) { echo "checked=\"checked\""; } ?> /></span>898 <span class="log_post_date"><?php echo gettext("active"); ?>: <input type="checkbox" value="1" name="post[active]" <?php if ($post["active"]) { echo "checked=\"checked\""; } ?> /></span> 899 <span class="log_post_author"><?php echo gettext("public"); ?>: <input type="checkbox" value="1" name="post[public]" <?php if ($post["public"]) { echo "checked=\"checked\""; } ?> /></span> 900 <span class="log_post_author"><?php echo gettext("aside"); ?>: <input type="checkbox" value="1" name="post[aside]" <?php if ($post["aside"]) { echo "checked=\"checked\""; } ?> /></span> 901 <span class="log_post_author"><?php echo gettext("anoncomments"); ?>: <input type="checkbox" value="1" name="post[allowanoncomments]" <?php if ($post["allowanoncomments"]) { echo "checked=\"checked\""; } ?> /></span> 902 902 </div> 903 903 </div> … … 1028 1028 $sql = "SELECT id,title FROM articles"; 1029 1029 $res = $this->db->query($sql); 1030 $articles[0] = "no article";1030 $articles[0] = gettext("no article"); 1031 1031 while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) { 1032 1032 $articles[$row["id"]] = stripslashes($row["title"]); … … 1042 1042 echo "<div class=\"log_post\"></div>"; 1043 1043 while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) { 1044 if (!trim($row["title"])) { $row["title"] = "no title"; }1044 if (!trim($row["title"])) { $row["title"] = gettext("no title"); } 1045 1045 ?> 1046 1046 <div class="log_post"> … … 1049 1049 <?php echo htmlspecialchars(stripslashes($row["title"])); ?> (<?php echo $articles[$row["articles_id"]]; ?>) 1050 1050 </h1><br /> 1051 <h2 class="log_post_h2"> name: <?php echo stripslashes(htmlspecialchars($row["name"])); ?> ip: <?php echo$row["ip"]; ?></h2>1052 <h2 class="log_post_h2"> website: <?php echo stripslashes(htmlspecialchars($row["website"])); ?> email: <?php echostripslashes(htmlspecialchars($row["email"])); ?></h2>1051 <h2 class="log_post_h2"><?php echo gettext("name").": ".stripslashes(htmlspecialchars($row["name"]))." ".gettext("ip").": ".$row["ip"]; ?></h2> 1052 <h2 class="log_post_h2"><?php echo gettext("website").": ".stripslashes(htmlspecialchars($row["website"]))." ".gettext("email").": ".stripslashes(htmlspecialchars($row["email"])); ?></h2> 1053 1053 </div> 1054 1054 <div class="log_post_body"> … … 1057 1057 <div class="log_post_foot"> 1058 1058 <?php if (!$row["deleted"]) { ?> 1059 <a href="index.php?action=delete_comment&id=<?php echo $row["id"]; ?>"> delete
