Changeset 585 for trunk

Show
Ignore:
Timestamp:
09/05/08 18:49:51 (3 months ago)
Author:
kimparsell
Message:

+ Resolution for ticket 182: update Exifer lib to version 1.7 after successful testing with latest SVN version
+ Miscellaneous cleanup of the other libs
+ Admin:

  • Login: update to new style
  • Themes: Add 2 new column titles and make all titles translatable
  • Import: change table header and appearance to match overall admin theme
  • Miscellaneous file cleanup

+ Themes: miscellaneous cleanup
+ General: miscellaneous cleanup

Location:
trunk
Files:
12 added
2 removed
32 modified

Legend:

Unmodified
Added
Removed
  • trunk/plog-admin/_upgrade.php

    r555 r585  
    1 <?php 
    2 error_reporting(E_ERROR); 
    3 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
     1<?php error_reporting(E_ERROR); ?> 
     2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    43        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    54<html xmlns="http://www.w3.org/1999/xhtml"> 
     
    1312<div><img src="images/plogger.gif" alt="Plogger" /></div> 
    1413 
    15         <h1>Performing Upgrade...</h1>'; 
    16  
     14        <h1>Performing Upgrade...</h1> 
     15 
     16<?php 
    1717// This is the upgrade file for upgrading your Plogger gallery from Beta 1 
    1818$workdir = dirname(dirname(__FILE__)); 
    19 if (file_exists($workdir.'/plog-connect.php')) 
    20 { 
     19if (file_exists($workdir.'/plog-connect.php')) { 
    2120        print "Rewriting configuration files...<br />"; 
    2221        // this check will also make sure that we can delete plog-connect when done, since deleting 
     
    353352// convert charsets 
    354353// since 4.1 MySQL has support for specifying character encoding for tables 
    355 // and I really want to  use it if avaiable. So we need figure out what version 
     354// and I really want to use it if available. So we need figure out what version 
    356355// we are running on and to the right hting 
    357356$mysql_version = mysql_get_server_info(); 
     
    376375} 
    377376 
    378 echo "<p>Upgrade has completed!</p> 
     377echo "<p>Upgrade has completed!</p>" 
     378?> 
    379379 
    380380</body> 
    381 </html>" 
    382 ?> 
     381</html> 
  • trunk/plog-admin/css/admin.css

    r571 r585  
    1010 
    1111html, body, p, form, table, td, tr { 
    12         font-family: "Lucida Sans Unicode", "Lucida Sans", "Georgia", "Trebuchet MS", verdana, arial, sans-serif; 
    13         font-size: 13px; 
     12        font-family: tahoma, verdana, arial, sans-serif; 
     13        font-size: 14px; 
    1414} 
    1515 
     
    3030 
    3131h1 { 
    32         font-family: "Verdana", "Lucida Sans", "Lucida Grande", "Trebuchet MS", arial, sans-serif; 
     32        font-family: verdana, arial, sans-serif; 
    3333        font-size: 1.4em; 
    3434        margin-top: 25px; 
     
    3939 
    4040h2 { 
    41         font-family: "Verdana", "Lucida Sans", "Lucida Grande", "Trebuchet MS", arial, sans-serif; 
     41        font-family: verdana, arial, sans-serif; 
    4242        font-size: 1.2em; 
    4343        margin-top: 20px; 
     
    4747 
    4848h3 { 
    49         font-family: "Verdana", "Lucida Sans", "Lucida Grande", "Trebuchet MS", arial, sans-serif; 
     49        font-family: verdana, arial, sans-serif; 
    5050        font-size: 1.0em; 
    5151        margin-top: 15px; 
     
    6363        font-family: verdana, arial, sans-serif; 
    6464        font-size: 13px; 
     65        letter-spacing: normal; 
    6566} 
    6667 
     
    9596 
    9697#plogger-version { 
     98        font-family: verdana, arial, sans-serif; 
    9799        float: right; 
    98         color: #369; 
    99         font-weight: 300; 
     100        color: #54a154; 
     101        font-weight: 500; 
     102        font-variant: small-caps; 
    100103        letter-spacing: 1px; 
    101 } 
    102  
    103 /* Login page structure/elements */ 
    104  
    105 #login { 
    106         background-image: url("../images/login.gif"); 
    107         background-repeat: no-repeat; 
    108         width: 382px; 
    109         height: 327px; 
    110         padding: 187px 15px 10px 15px; 
    111         margin: auto; 
    112 } 
    113  
    114 #login-page { 
    115         background: #369; 
    116         text-align: center; 
    117         margin-top: 100px; 
    118 } 
    119  
    120 .login-error { 
    121         text-align: center; 
    122         font-size: 1.1em; 
    123         font-weight: bold; 
    124         color: #c00; 
    125104} 
    126105 
     
    161140 
    162141#contentList .pagination { 
    163         font-size: 1.0em; 
     142        font-size: 0.9em; 
    164143        margin-right: 5px; 
    165144        padding: 3px; 
     
    184163        display: block inline; 
    185164        margin-bottom: auto; 
     165        font-family: verdana, arial, sans-serif; 
     166        font-size: 13px; 
     167        letter-spacing: normal; 
    186168} 
    187169 
     
    372354        background-repeat: no-repeat; 
    373355        background-position: 5px 8px; 
     356        margin-right: 5px; 
    374357        margin-bottom: 15px; 
    375         margin-right: 15px; 
    376358        border-top:     2px solid #bb0; 
    377359        border-bottom: 2px solid #bb0; 
    378         padding: 8px; 
     360        padding: 8px 8px 8px 28px; 
    379361        background-color: #ffffe0; 
    380         padding-left: 28px; 
    381362        clear: both; 
    382363} 
     
    386367        background-repeat: no-repeat; 
    387368        background-position: 5px 8px; 
     369        margin-right: 5px; 
    388370        margin-bottom: 15px; 
    389         margin-right: 15px; 
    390371        border: 1px solid maroon; 
    391         padding:  8px; 
     372        padding: 8px 8px 8px 28px; 
    392373        background-color: #fcc; 
    393         padding-left: 28px; 
    394374        clear: both; 
    395375} 
     
    471451} 
    472452 
     453.invert-selection a, .invert-selection a:link, .invert-selection a:visited, .invert-selection a:active, .invert-selection a:hover { 
     454        font-size: 0.9em; 
     455} 
     456 
    473457.table-header-middle { 
    474458        background: url("../images/table-middle.gif") repeat-x top left; 
  • trunk/plog-admin/css/tabs.css

    r550 r585  
    33        width: 100%; 
    44        background: transparent url("../images/bg.gif") repeat-x bottom; 
     5        font-family: "Lucida Sans Unicode", verdana, arial, sans-serif; 
    56        font-size: 13px; 
     7        letter-spacing: normal; 
    68        line-height: normal; 
    79        margin-bottom: 18px; 
  • trunk/plog-admin/index.php

    r573 r585  
    99} 
    1010 
    11 $output = ''; 
    12  
    13 $output .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
     11?> 
     12<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    1413        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    1514<html xmlns="http://www.w3.org/1999/xhtml"> 
    1615<head> 
    17         <title>' . plog_tr('Plogger Administrative Login') . '</title> 
     16        <title><?php echo plog_tr('Plogger Administrative Login') ?></title> 
    1817        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    19         <link rel="stylesheet" href="'.$config['gallery_url'].'plog-admin/css/admin.css" type="text/css" media="all" /> 
    20         <script type="text/javascript" src="'.$config['gallery_url'].'plog-admin/js/plogger.js"></script> 
     18        <link rel="stylesheet" href="<?php echo $config['gallery_url'] ?>plog-admin/css/login.css" type="text/css" media="all" /> 
     19        <script type="text/javascript" src="<?php echo $config['gallery_url'] ?>plog-admin/js/plogger.js"></script> 
    2120</head> 
    2221 
    2322<body id="login-page" onload="focus_first_input()"> 
    2423 
    25 <div id="login"> 
     24        <div id="login-logo"> 
     25                <img src="<?php echo $config['gallery_url'] ?>plog-admin/images/login-logo.gif" width="334" height="89" alt="Plogger" /> 
     26        </div><!-- /login-logo --> 
     27<?php 
     28// Login error and action messages 
     29$output = ''; 
    2630 
    27 <form action="plog-upload.php" method="post"> 
     31if (isset($_REQUEST["loggedout"])) { 
     32                $output .= "\n\t" . '<div id="login-action">' . plog_tr('You have been successfully logged out') . '</div>' . "\n"; 
     33                echo $output; 
     34        } 
    2835 
    29 <div style="text-align: center;"> 
    30         <table width="350">'; 
    31 if (isset($_REQUEST["errorcode"])){ 
    32         switch($_REQUEST["errorcode"]){ 
    33                 case 1: 
    34                 $output .= "\n\t\t" . '<tr> 
    35                         <td colspan="2" class="login-error">' . plog_tr('Invalid login') . '</td> 
    36                 </tr>' . "\n"; 
    37                 break; 
     36if (isset($_REQUEST["loginerror"])) { 
     37                // Invalid login info, either username or password didn't match 
     38                $output .= "\n\t" . '<div id="login-error">' . plog_tr('Invalid username or password') . '</div>' . "\n"; 
     39                echo $output; 
    3840        } 
    39 } 
    40 $output .= "\n\t\t" . '<tr> 
    41                         <td><label for="plog-username"><strong>' . plog_tr('Username') . ':</strong></label></td> 
    42                         <td><input type="text" name="plog-username" id="plog-username" /></td> 
    43                 </tr> 
    44                 <tr> 
    45                         <td><label for="plog-password"><strong>' . plog_tr('Password') . ':</strong></label></td> 
    46                         <td><input type="password" name="plog-password" id="plog-password" /></td> 
    47                 </tr> 
    48                 <tr> 
    49                         <td>&nbsp;</td> 
    50                         <td><input type="hidden" name="action" value="log_in" /> 
    51                         <input class="submit" type="submit" value="' . plog_tr('Log In') . '" /></td> 
    52                 </tr> 
    53         </table> 
    54 </div> 
    5541 
    56 </form> 
    57 </div><!-- /content --> 
     42// End login messages 
     43?> 
     44 
     45        <div id="login-box"> 
     46        <form action="plog-upload.php" method="post"> 
     47                <p><label for="plog-username"><?php echo plog_tr('Username') ?>:</label> &nbsp;<input type="text" name="plog-username" id="plog-username" tabindex="10" /></p> 
     48                <p><label for="plog-password">&nbsp;<?php echo plog_tr('Password') ?>:</label> &nbsp;<input type="password" name="plog-password" id="plog-password" tabindex="20" /></p> 
     49                <p><input type="hidden" name="action" value="log_in" /><input class="submit" type="submit" value="<?php echo plog_tr('Log In') ?>" tabindex="50" /></p> 
     50        </form> 
     51        </div><!-- /login-box --> 
     52 
     53        <div id="login-nav"> 
     54                <a title="<?php echo plog_tr('View gallery') ?>" href="<?php echo $config['gallery_url'] ?>"><?php echo plog_tr('View gallery') ?></a> 
     55        </div><!-- /login-nav --> 
    5856 
    5957</body> 
    60 </html>'; 
    61  
    62 echo $output; 
    63  
    64 ?> 
     58</html> 
  • trunk/plog-admin/js/plogger.js

    r555 r585  
    2525        settings +='resizable=yes'; 
    2626        OpenWin = this.open(page, "Preview", settings); 
    27 }  
     27} 
    2828 
    2929function focus_first_input() { 
     
    7272                document.getElementById('description').disabled = true; 
    7373                document.getElementById('caption').style.background = "#fafafa"; 
    74                 document.getElementById('description').style.background = "#fafafa";  
     74                document.getElementById('description').style.background = "#fafafa"; 
    7575        } 
    7676        else { 
     
    7878                document.getElementById('description').disabled = false; 
    7979                document.getElementById('caption').style.background = "#ffffff"; 
    80                 document.getElementById('description').style.background = "#ffffff";  
     80                document.getElementById('description').style.background = "#ffffff"; 
    8181        } 
    8282 
  • trunk/plog-admin/plog-admin-functions.php

    r574 r585  
    138138 
    139139        // Get the EXIF data. 
    140         require_once(PLOGGER_DIR . "plog-includes/lib/exifer1_5/exif.php"); 
     140        require_once(PLOGGER_DIR . "plog-includes/lib/exifer1_7/exif.php"); 
    141141        $exif_raw = read_exif_data_raw($final_fqfn,false); 
    142142        $exif = array(); 
     
    13781378 
    13791379                        $imgtag = '<img src="'.$thumbpath.'" title="'.plogger_get_picture_caption().'" alt="'.plogger_get_picture_caption().'" />'; 
    1380                         //$target = 'plog-thumbpopup.php?src='.$id; 
    1381                         //$java = "javascript:this.ThumbPreviewPopup('$target')"; 
    13821380                        $output .= "\n\t\t\t\t" . '<td><div class="img-shadow"><a href="'.plogger_get_picture_thumb(THUMB_LARGE).'" rel="lightbox" title="'.plogger_get_picture_caption().'">'.$imgtag.'</a></div></td>'; 
    13831381                        $output .= "\n\t\t\t\t".'<td><strong><a class="folder" href="'.$_SERVER['PHP_SELF'].'?level=comments&amp;id=' . $id . '">' . basename(plogger_get_source_picture_path()) . '</a></strong><br /><span style="margin-left: 20px;">' . sprintf(plog_tr('Comments: %d'), plogger_picture_comment_count()) . '</span></td>'; 
  • trunk/plog-admin/plog-admin.php

    r577 r585  
    11<?php 
    2 header("Content-Type: text/html; charset=UTF-8"); 
     2header("Content-Type: text/html; charset=utf-8"); 
    33global $inHead; 
    44 
     
    88require_once(dirname(dirname(__FILE__))."/plog-load-config.php"); 
    99 
     10// Login/logout/reset password functions 
    1011if (isset($_REQUEST['action']) && $_REQUEST["action"] == "log_in"){ 
    11         // TODO: leiuta generic login funktsioon 
    1212 
    1313        if ( (isset($_REQUEST["plog-username"]) && $_REQUEST["plog-username"] == $config["admin_username"]) && (isset($_REQUEST["plog-password"]) && md5($_REQUEST["plog-password"]) == $config["admin_password"]) ){ 
    1414                $_SESSION["plogger_logged_in"] = true; 
    15         }       else { 
    16                 header("Location: index.php?errorcode=1"); 
     15        } else { 
     16                header("Location: index.php?loginerror"); 
    1717                exit; 
    1818        } 
     19 
    1920} elseif(isset($_REQUEST['action']) && $_REQUEST["action"] == "log_out") { 
    2021        $_SESSION = array(); 
     
    2223} 
    2324 
    24 if (!isset($_SESSION['plogger_logged_in']) || $_SESSION['plogger_logged_in'] !== true){  
    25         header("Location: index.php"); 
     25if (!isset($_SESSION['plogger_logged_in']) || $_SESSION['plogger_logged_in'] !== true){ 
     26        header("Location: index.php?loggedout"); 
    2627        exit; 
    2728} 
    2829 
     30// Display admin tabs 
    2931function display($string, $current){ 
    3032 
     
    6870 
    6971<div id="header"> 
    70         <img src="'.$config['gallery_url'].'plog-admin/images/plogger.gif" alt="Plogger" /> 
     72        <img src="'.$config['gallery_url'].'plog-admin/images/plogger.gif" width="393" height="90" alt="Plogger" /> 
    7173        <span id="plogger-version">'.$config['version'].'</span> 
    7274 
  • trunk/plog-admin/plog-feedback.php

    r574 r585  
    260260 
    261261        if (!$empty) { 
    262                 $output .= "\n\n\t\t" . '<div><a href="#" onclick="checkAll(document.getElementById(\'contentList\')); return false;">' . plog_tr('Invert Checkbox Selection') . '</a></div> 
     262                $output .= "\n\n\t\t" . '<div class="invert-selection"><a href="#" onclick="checkAll(document.getElementById(\'contentList\')); return false;">' . plog_tr('Invert Checkbox Selection') . '</a></div> 
    263263                        '.$pagination_menu; 
    264264        } 
  • trunk/plog-admin/plog-import.php

    r572 r585  
    22 
    33// Code by Mike Johnson -- mike@solanosystems.com October 23rd, 2004. 
    4 // This is the main administrative interface code.  To change the look of the interface, change /plog-admin/css/admin.css. 
     4// This is the main administrative interface code. To change the look of the interface, change /plog-admin/css/admin.css. 
    55 
    66// The initial tab is UPLOAD function. 
     
    5757        $descriptions = $_POST['descriptions']; 
    5858        $files = isset($_POST['files']) ? $_POST['files'] : ''; 
    59         $selected = $_POST['Selected']; 
     59        $selected = $_POST['selected']; 
    6060 
    6161        global $config; 
     
    235235                if (count($files) > 0) { 
    236236                        $percent = (isset($_GET['nojs'])) ? '100%': '0%'; 
    237                         $output .= "\n\n\t\t" . '<p class="actions">' . sprintf(plog_tr('You are currently looking at <strong>%d</strong> image(s) within the <strong>%s</strong> directory.<br />' . "\n\t\t" . 'Creating thumbnails: %s done.'), count($files), $show_directory, '<span id="progress">'.$percent.'</span>') . '</p>' . "\n"; 
     237                        $output .= "\n\n\t\t" . '<p class="actions">' . sprintf(plog_tr('You are currently looking at <strong>%d</strong> image(s) within the <strong>%s</strong> directory.<br /><br />' . "\n\t\t" . 'Creating thumbnails: %s done.'), count($files), $show_directory, '<span id="progress">'.$percent.'</span>') . '</p>' . "\n"; 
    238238                } 
    239239 
     
    252252                        if ($i == 0) 
    253253                        $output.= "\n\t\t\t" . '<form id="uploadForm" action="'.$_SERVER["PHP_SELF"].$query.'" method="post" enctype="multipart/form-data"> 
    254                         <table> 
     254                        <table style="width: 100%;" cellpadding="4"> 
    255255                                <tr class="header"> 
    256                                         <th></th> 
    257                                         <th>' . plog_tr('Thumbnail') . '</th> 
    258                                         <th>' . plog_tr('Filename') . '</th> 
    259                                         <th>' . plog_tr('Caption &amp; Description (optional)') . '</th> 
     256                                        <th class="table-header-left">&nbsp;</th> 
     257                                        <th class="table-header-middle" style="text-align: left;">' . plog_tr('Thumbnail') . '</th> 
     258                                        <th class="table-header-middle" style="text-align: left;">' . plog_tr('Filename') . '</th> 
     259                                        <th class="table-header-middle" style="text-align: left;">' . plog_tr('Caption &amp; Description (optional)') . '</th> 
     260                                        <th class="table-header-right">&nbsp;</th> 
    260261                                </tr>'; 
    261262 
     
    271272                        // start a new table row (alternating colors) and generate XHTML with thumbnail and link to picture view. 
    272273                        $output .= "\n\t\t\t\t" . '<tr class="'.$table_row_color.'"> 
    273                                         <td><input type="checkbox" name="Selected[]" value="'.$file_key.'" checked="checked" /></td> 
     274                                        <td><input type="checkbox" name="selected[]" value="'.$file_key.'" checked="checked" /></td> 
    274275                                        <td><div class="img-shadow" id="pic_'.$file_key . '"><img src="'.$thumbpath.'" alt="thumbnail" /></div></td> 
    275276                                        <td>'.basename($files[$i]).'</td> 
    276277                                        <td> 
    277                                                 <input type="text" size="67" name="captions[' . $file_key . ']" /><br /> 
    278                                                 <textarea name="descriptions[' . $file_key . ']" rows="3" cols="64"></textarea> 
     278                                                <input type="text" size="66" name="captions[' . $file_key . ']" /><br /> 
     279                                                <textarea name="descriptions[' . $file_key . ']" rows="4" cols="64"></textarea> 
    279280                                        </td> 
     281                                        <td>&nbsp;</td> 
    280282                                </tr>'; 
    281283                        $counter++; 
     
    284286 
    285287                if (count($files) != 0) { 
     288                        $output .= "\n\t\t\t\t" . '<tr class="footer"> 
     289                                        <td colspan="5"></td> 
     290                                </tr>' . "\n"; 
    286291                        $output .= "\n\t\t\t" . '</table>' . "\n"; 
    287                         $output .= "\n\t\t\t" . '<div><a href="#" onclick="checkAll(document.getElementById(\'uploadForm\')); return false; ">' . plog_tr('Invert Checkbox Selection') . '</a></div>' . "\n"; 
     292                        $output .= "\n\t\t\t" . '<div class="invert-selection"><a href="#" onclick="checkAll(document.getElementById(\'uploadForm\')); return false; ">' . plog_tr('Invert Checkbox Selection') . '</a></div>' . "\n"; 
    288293 
    289294                        // here we can preselect some default options based on the structure of the import directory 
  • trunk/plog-admin/plog-manage.php

    r571 r585  
    102102 
    103103/*if ($level == "collections") { // display some high level statistics on the main page. 
    104 $output .= "\n\t" . '<p class="highlight">You have a total of <strong>'. count_pictures().'</strong> images within <strong>'.count_albums() .'</strong> album(s).  Users have posted <strong>'. count_comments().'</strong> comment(s) to your gallery</p>' . "\n"; } */ 
     104$output .= "\n\t" . '<p class="highlight">You have a total of <strong>'. count_pictures().'</strong> images within <strong>'.count_albums() .'</strong> album(s). Users have posted <strong>'. count_comments().'</strong> comment(s) to your gallery</p>' . "\n"; } */ 
    105105 
    106106global $config; 
     
    337337        } 
    338338 
    339         $output .= "\n\t\t" . '<div><a href="#" onclick="checkAll(document.getElementById(\'contentList\')); return false; ">' . plog_tr('Invert Checkbox Selection') . '</a></div> 
     339        $output .= "\n\t\t" . '<div class="invert-selection"><a href="#" onclick="checkAll(document.getElementById(\'contentList\')); return false; ">' . plog_tr('Invert Checkbox Selection') . '</a></div> 
    340340                <div class="pagination">'.generate_pagination("admin", "manage", $plog_page, $totalRows, $_SESSION['entries_per_page'], array("level" => $level, "id" => $id, "entries_per_page" => $_SESSION['entries_per_page'])).'</div> 
    341341                <div class="move-del-manage"> 
  • trunk/plog-admin/plog-themes.php

    r572 r585  
    5858$output .= "\n\n\t\t" . '<table id="theme-table" cellpadding="1" width="100%"> 
    5959                        <tr class="header"> 
    60                                 <th class="table-header-left">&nbsp;</th> 
    61                                 <th class="table-header-middle">Theme</th> 
    62                                 <th class="table-header-middle">Description</th> 
    63                                 <th class="table-header-middle">Author</th> 
    64                                 <th class="table-header-right">&nbsp;</th> 
     60