Changeset 85

Show
Ignore:
Timestamp:
29/05/05 20:29:44 (4 years ago)
Author:
welshbyte
Message:

A few tweaks here and there, mainly making the admin bits look prettier and improved i18n. Please dont use variables inside gettext() or _() functions.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • admin.lib.php

    r83 r85  
    128128                echo "<ul class=\"side-menu\">\n"; 
    129129                echo "<li><a href=\"".$this->adminPath."newentry"."\">Add a new entry</a></li>\n"; 
    130                 echo "<li><a href=\"",$this->adminPath."settings"."\">Edit Blog settings</a></li>\n"; 
     130                echo "<li><a href=\"",$this->adminPath."settings"."\">Edit blog settings</a></li>\n"; 
    131131                echo "</ul>\n"; 
    132132        } 
     
    142142        { 
    143143                echo "<div class=\"login\">\n"; 
    144                 echo "<h2>Login<a id=\"cmt\"></a></h2>\n"; 
     144                echo "<h2>"._("Login")."</h2>\n"; 
    145145                echo "<div class=\"td\">\n"; 
    146146                if ($this->sessionError != "") { 
     
    150150                echo "<p>\n"; 
    151151                echo "<input type=\"text\" name=\"username\" id=\"username\" value=\"" . (($this->commentError != "") ? strip_tags(trim($_POST['username'])) : "") . "\" size=\"22\" maxlength=\"50\" tabindex=\"1\" />\n"; 
    152                 echo "<label for=\"username\">Username</label>\n"; 
     152                echo "<label for=\"username\">"._("Username")."</label>\n"; 
    153153                echo "</p>\n"; 
    154154                echo "<p>\n"; 
    155155                echo "<input type=\"password\" name=\"password\" id=\"password\" size=\"22\" maxlength=\"128\" tabindex=\"2\" />\n"; 
    156                 echo "<label for=\"password\">Password</label>\n"; 
     156                echo "<label for=\"password\">"._("Password")."</label>\n"; 
    157157                echo "</p>\n"; 
    158158                echo "<p>\n"; 
     
    247247                if ($this->inputError) { 
    248248                        //check to see this post exists 
    249                         $sql = db_query("SELECT id from entries where id = ".$id."';"); 
     249                        $sql = db_query("SELECT id from entries where id = ".$id.";"); 
    250250                        $sqlNum = db_num_rows($sql); 
    251251                        //yes?, we can update it then.. 
     
    253253                                $sql = db_query("UPDATE entries SET (category, subject, body) = ({$category},'{$subject}','{$body}') WHERE id = '{$id}';"); 
    254254                                if (!$sql) { 
    255                                         error(2,"Database commit failed - ".db_error()); 
     255                                        error(2,_("Database commit failed")." - ".db_error()); 
    256256                                }  
    257257                                else { 
     
    262262                        //cant update non-existant entrys 
    263263                        else { 
    264                                  error(2,_("Cannot update entry, as it does not exist.".db_error())); 
     264                                 error(2,_("Cannot update entry, as it does not exist.")." - ".db_error()); 
    265265                        } 
    266266                } 
     
    414414                                error(2,_("Database Insertion failed.")); 
    415415                        } else { 
    416                                 print(_("OK. New user '{$username}' added.\nPlease enable the account.")); //pleh? 
     416                                print(_("New user added:")." ".$username); //pleh? 
    417417                        } 
    418418                } else { 
  • admin.php

    r84 r85  
    2525    <div id="toppanel"> 
    2626        <h1><a href="<? echo $admin->adminPath;?>">Blog Admin</a></h1> 
    27         <h2>Blog management</h2> 
    28             </div> 
     27            <h2>Blog management</h2> 
     28        <h3> </h3> 
     29        </div> 
    2930    <div id="content"> 
    3031        <div id="sidepanel"> 
     
    3637        <div id="maincontent"><? 
    3738                if($_SESSION['userName'] or $_POST['submit']) { 
    38                         if ($_SESSION['userName']) echo "<p>"._("Hello")." {$admin->realName} (<a href=\"{$admin->adminPath}/logout\">"._("Logout")."</a>)</p>"; 
     39                        if ($_SESSION['userName']) echo "<div class=\"login\"><h3>"._("Hello")." {$admin->realName} (<a href=\"{$admin->adminPath}logout\">"._("Log out")."</a>)</h3></div>"; 
    3940                        switch (array_shift($request)) { 
    4041                        case "newentry": 
     
    5556                        default: 
    5657                                //Should display blog entries here 
    57  
    58                                 //temporary - to force box to be big enough for menu to display 
    59                                 echo "<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>\n"; 
     58                echo "<div class=\"entry\">\n"; 
     59                echo "<h2>"._("Blog Management")."</h2>\n"; 
     60                echo "<div class=\"td\">\n"; 
     61                echo "<p>"._("Use the links on the left to manage your blog")."</p>\n"; 
     62                echo "</div>\n"; 
     63                echo "<p>&nbsp;</p><p>&nbsp;</p>\n"; // To allow the menu to display properly 
     64                echo "</div>\n"; 
    6065 
    6166                                break; 
  • blog.css

    r83 r85  
    5959#sidepanel { 
    6060    margin: 0.5em; 
    61     padding: 0
    62     width: 10em; 
     61    padding: 1em 0.5em
     62    width: 8em; 
    6363    float: left; 
     64    font-size: 14px; 
    6465} 
    6566#maincontent { 
    6667    margin: 0; 
    6768    padding: 0 1.5em; 
    68     margin-left: 12em; 
     69    margin-left: 10em; 
    6970    background-color: #FFF; 
    7071    border-left: 1px #AFAFAF dotted; 
     
    8182 
    8283#listofblogs { 
     84    font-size: 12px; 
    8385    padding: 1em 0; 
    84     font-size: 14px; 
    8586} 
    8687 
     
    142143/* Style for the actual entries */ 
    143144 
    144 .entry
     145.entry, .login
    145146    padding: 1em 0; 
    146147} 
    147148 
    148 .entry h2 { 
     149.login { 
     150    padding-bottom: 0; 
     151
     152 
     153.entry h2, .login h2, .login h3 { 
    149154    color: #258; 
    150155    margin: 0; 
     
    155160} 
    156161 
    157 .entry h2 a { 
     162.login h3 { 
     163    text-align: right; 
     164    font-size: 14px; 
     165
     166.entry h2 a, .login h3 a { 
    158167    color: #258; 
    159168    text-decoration: none; 
     
    161170} 
    162171 
    163 .entry h2 a:hover
     172.entry h2 a:hover, .login h3 a:hover
    164173    color: #00F; 
    165174} 
     
    176185} 
    177186 
    178 .td a
    179     text-decoration: none; 
    180     color: #00F
    181 } 
    182  
    183 .td a:hover
     187.td a, #listofblogs a, #sidepanel a
     188    text-decoration: none; 
     189    color: #25B
     190} 
     191 
     192.td a:hover, #listofblogs a:hover, #sidepanel a:hover
    184193    border-bottom: 1px #25B dotted; 
    185194} 
     
    205214.bname, .btitle, .bupdated { 
    206215    font-weight: bold; 
     216    color: #258; 
     217    border-bottom: 1px #69E solid; 
     218    padding: 0.1em; 
    207219} 
    208220