Changeset 568

Show
Ignore:
Timestamp:
07/25/08 08:31:16 (4 months ago)
Author:
kimparsell
Message:

+ Fix added to resolve ticket #124 (404 error) - proper 404 errors are now generated with both default and cruft-free URLs (joint effort between sidtheduck and kimparsell)
+ Themes updated to include 404.php and stylesheet change for new page
+ Minor markup change to plog-themes.php to provide alt text for theme thumbnails
+ Added dropdown menu to plog-manage.php for selection entries/page
+ Minor changes to admin.css
+ Misc. cleanup

Location:
trunk
Files:
3 added
36 modified

Legend:

Unmodified
Added
Removed
  • trunk/plog-admin/css/admin.css

    r555 r568  
    1111 
    1212#theme-table td { 
    13         padding: 15px; 
    14 } 
    15  
    16 #theme-table tr.header td { 
     13        padding: 8px; 
     14} 
     15 
     16#theme-table tr.header th { 
    1717        padding: 8px; 
    1818} 
     
    305305        border-top: 2px solid #ccc; 
    306306        border-bottom: 2px solid #ccc; 
    307         width: 100%; 
     307        width: 98%; 
    308308} 
    309309 
     
    404404 
    405405#contentList #breadcrumb_links { 
    406         font-size: 1.1em; 
    407         padding: 5px 3px 5px 0; 
     406        font-size: 1.0em; 
     407        padding: 3px; 
    408408} 
    409409 
    410410#contentList .pagination { 
    411         font-size: 1.3em; 
    412         padding: 5px 3px 5px 0; 
    413         font-weight: bold; 
     411        font-size: 1.0em; 
     412        margin-right: 5px; 
     413        padding: 3px; 
     414        font-weight: bold; 
     415        text-align: right; 
     416} 
     417 
     418#contentList label, select, option { 
     419        font-weight: normal; 
     420} 
     421 
     422#contentList .entries-page { 
     423        text-align: right; 
     424} 
     425 
     426#contentList .entries-page label, select { 
     427        display: block inline; 
     428        margin-bottom: auto; 
     429} 
     430 
     431#contentList .move-del-manage input, select { 
     432        display: block inline; 
     433        margin-bottom: auto; 
    414434} 
    415435 
  • trunk/plog-admin/plog-admin-functions.php

    r561 r568  
    10011001} 
    10021002 
    1003 //  
     1003// 
    10041004function configure_htaccess_fullpic($allow = false) { 
    10051005        $cfg = ""; 
     
    10721072                $cfg .= "RewriteEngine on\n"; 
    10731073                $cfg .= "RewriteBase ".$rewritebase."\n"; 
    1074     $cfg .= "RewriteCond %{REQUEST_URI} !(\.|/\$)\n"; 
     1074                $cfg .= "RewriteCond %{REQUEST_URI} !(\.|/\$)\n"; 
    10751075                $cfg .= "RewriteRule ^.*\$ http://".parse_url($config['gallery_url'], PHP_URL_HOST)."%{REQUEST_URI}/ [R=301,L]\n"; 
    1076     /*$cfg .= "RewriteCond %{HTTP_HOST} !^www [NC]\n"; 
     1076                /*$cfg .= "RewriteCond %{HTTP_HOST} !^www [NC]\n"; 
    10771077                $cfg .= "RewriteRule ^(.*)\$ ".$config['gallery_url']."\$1 [R=301,L]\n";*/ 
    10781078                $cfg .= "RewriteCond %{REQUEST_FILENAME} -d [OR]\n"; 
  • trunk/plog-admin/plog-feedback.php

    r563 r568  
    1414 
    1515        $possible_values = array("5"=>5, "10"=>10, "20"=>20, "50"=>50); 
    16         $output = plog_tr('Entries per page') . '  
    17                                         <select onchange="'.$java.'" name="entries_per_page">'; 
     16        $output = "\n\t\t\t\t\t" . '<label accesskey="e" for="entries_on_page">' .plog_tr('<em>E</em>ntries per page') . '</label> 
     17                                        <select class="entries-page" onchange="'.$java.'" name="entries_per_page" style="width: 60px;">'; 
    1818        foreach ($possible_values as $key => $value) 
    1919                if ($_SESSION['entries_per_page'] == $key) 
     
    283283} 
    284284 
    285 $output .= "\n\n\t\t" . '</form>'. "\n"; 
     285$output .= "\n\t\t" . '</form>'. "\n"; 
    286286 
    287287display($output, "feedback"); 
  • trunk/plog-admin/plog-manage.php

    r563 r568  
    1111function generate_pagination_view_menu() { 
    1212 
    13         $java = 'document.location.href = \''.$_SERVER["PHP_SELF"].'?level='.$_REQUEST["level"]. 
    14         '&amp;id='.$_REQUEST["id"].'&amp;entries_per_page=\'+this.options[this.selectedIndex].value'; 
     13        $java = 'document.location.href = \''.$_SERVER["PHP_SELF"].'?level='.$_REQUEST["level"].'&amp;id='.$_REQUEST["id"].'&amp;entries_per_page=\'+this.options[this.selectedIndex].value'; 
    1514 
    1615        $possible_values = array("5"=>5, "10"=>10, "20"=>20, "50"=>50); 
    17         $output= '<label accesskey="e" for="entries_on_page"><em>E</em>ntries per page</label> 
    18         <select onchange="'.$java.'" name="entries_per_page">'; 
     16        $output= "\n\t\t\t" . '<label accesskey="e" for="entries_on_page">' .plog_tr('<em>E</em>ntries per page') . '</label> 
     17                        <select class="entries-page" onchange="'.$java.'" name="entries_per_page" style="width: 60px;">'; 
    1918        foreach ($possible_values as $key => $value) 
    2019        if ($_SESSION['entries_per_page'] == $key) 
    21         $output .= "<option value=\"$value\" selected>$key</option>"; 
     20        $output .= "\n\t\t\t\t<option value=\"$value\" selected=\"selected\">$key</option>"; 
    2221        else 
    23         $output .= "<option value=\"$value\">$key</option>"; 
    24         $output.= '</select>'; 
     22        $output .= "\n\t\t\t\t<option value=\"$value\">$key</option>"; 
     23        $output.= "\n\t\t\t</select>"; 
    2524        return $output; 
    2625} 
     
    2928        if ($level == "albums") $parent = "collections"; 
    3029        if ($level == "pictures") $parent = "albums"; 
    31         $output = "\n\t\t" . '<input class="submit" type="submit" name="move_checked" value="' . plog_tr("Move Checked To") . '" />'; 
     30        $output = "\n\t\t\t" . '<input class="submit" type="submit" name="move_checked" value="' . plog_tr("Move Checked To") . '" />'; 
    3231 
    3332        if ($level == "pictures") { 
     
    3534                $output .= generate_albums_menu($albums); 
    3635        } else { 
    37                 $output .= "\n\t\t\t" . '<select id="group_id" name="group_id">'; 
     36                $output .= "\n\t\t\t\t" . '<select class="move-del-manage" id="group_id" name="group_id">'; 
    3837                $collections = get_collections(); 
    3938                foreach($collections as $collection) { 
    40                         $output .= "\n\t\t\t\t" . '<option value="'.$collection["id"].'">'.SmartStripSlashes($collection["name"]); 
     39                        $output .= "\n\t\t\t\t\t" . '<option value="'.$collection["id"].'">'.SmartStripSlashes($collection["name"]); 
    4140                        $output .= '</option>'; 
    4241                } 
    43                 $output .= "\n\t\t\t" . '</select>'; 
     42                $output .= "\n\t\t\t\t" . '</select>'; 
    4443        } 
    4544 
     
    5453                if (isset($_REQUEST["albums_menu"]) && isset($_REQUEST["new_album_name"])){ 
    5554                        if ($albums_menu == $album_id || $new_album_name == $album['album_name']){ 
    56                                 $selected = " selected"; 
     55                                $selected = " selected=\"selected\""; 
    5756                        } 
    5857                } 
     
    125124$output = "\n\t" . '<h1>' . plog_tr('Manage Content') . '</h1>' . "\n"; 
    126125 
    127 /* if ($level == "collections") { // display some high level statistics on the main page. 
    128 $output .= '<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>'; } */ 
     126/*if ($level == "collections") { // display some high level statistics on the main page. 
     127$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"; } */ 
    129128 
    130129global $config; 
     
    329328        $totalRows = mysql_result($totalRowsResult,'num_items'); 
    330329 
    331         $pagination_menu = "\n\t\t" . '<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>'; 
     330        $pagination_menu = "\n\t\t" . '<div class="entries-page">'.generate_pagination_view_menu().'</div> 
     331                        <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'])).' 
     332                </div>'; 
    332333 
    333334        $output .= "\n\t\t" . '<form id="contentList" action="'.$_SERVER["PHP_SELF"].'" method="get">'; 
     
    336337 
    337338        if (empty($level) || $level == "collections") { 
    338                 $output .= generate_breadcrumb_admin("").$pagination_menu; 
     339                $output .= $pagination_menu.generate_breadcrumb_admin(""); 
    339340                $output .= plog_collection_manager($first_item,$_SESSION['entries_per_page']); 
    340341        } 
    341342 
    342343        if ($level == "albums") { 
    343                 $output .= generate_breadcrumb_admin("albums", $id).$pagination_menu; 
     344                $output .= $pagination_menu.generate_breadcrumb_admin("albums", $id); 
    344345                $output .= plog_album_manager($id,$first_item,$_SESSION['entries_per_page']); 
    345346        }; 
    346347 
    347348        if ($level == "pictures") { 
    348                 $output .= generate_breadcrumb_admin("pictures", $id).$pagination_menu; 
     349                $output .= $pagination_menu.generate_breadcrumb_admin("pictures", $id); 
    349350                $output .= plog_picture_manager($id,$first_item,$_SESSION['entries_per_page']); 
    350351 
     
    352353 
    353354        if ($level == "comments") { 
    354                 $output .= generate_breadcrumb_admin("comments", $id).$pagination_menu; 
     355                $output .= $pagination_menu.generate_breadcrumb_admin("comments", $id); 
    355356                $output .= plog_comment_manager($id,$first_item,$_SESSION['entries_per_page']); 
    356357        }; 
    357358 
    358359        $output .= "\n\t\t" . '<div><a href="#" onclick="checkAll(document.getElementById(\'contentList\')); return false; ">' . plog_tr('Invert Checkbox Selection') . '</a></div> 
    359                 '.$pagination_menu.' 
    360                 <div><input type="hidden" name="level" value="'.$level.'" /> 
    361                 <input type="hidden" name="id" value="'.$id.'" /> 
    362                 <input type="hidden" name="action" value="1" /> 
    363                 <input class="submit" type="submit" name="delete_checked" onclick="return confirm(\'' . plog_tr('Are you sure you want to delete selected items?') . '\');" value="' . plog_tr('Delete Checked') . '" />'; 
     360                <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> 
     361                <div class="move-del-manage"> 
     362                        <input type="hidden" name="level" value="'.$level.'" /> 
     363                        <input type="hidden" name="id" value="'.$id.'" /> 
     364                        <input type="hidden" name="action" value="1" /> 
     365                        <input class="submit" type="submit" name="delete_checked" onclick="return confirm(\'' . plog_tr('Are you sure you want to delete selected items?') . '\');" value="' . plog_tr('Delete Checked') . '" />'; 
    364366        if (!empty($level) && $level != "collections" && $level != "comments"){ 
    365367                $output .= generate_move_menu($level); 
  • trunk/plog-admin/plog-themes.php

    r567 r568  
    5858 
    5959// Output table header 
    60 $output .= "\n\n\t\t" . '<table id="theme-table" cellpadding="5" width="100%"> 
     60$output .= "\n\n\t\t" . '<table id="theme-table" cellpadding="1" width="100%"> 
    6161                        <tr class="header"> 
    6262                                <th class="table-header-left">&nbsp;</th> 
     
    9898 
    9999                $output .= "\t\t\t\t<td>"; 
    100                  
     100 
    101101                if ($preview_thumb) 
    102                         $output .= "<div class=\"img-shadow\"><a rel=\"lightbox\" href=\"$preview_thumb_large\"><img src=\"$preview_thumb\"/></a></div>"; 
    103                  
    104                 $output .= "</td><td><strong>$theme_name</strong><br /> Version $version</td> 
     102                        $output .= "<div class=\"img-shadow\"><a rel=\"lightbox\" href=\"$preview_thumb_large\"><img src=\"$preview_thumb\" alt=\"$theme_name\" /></a></div>"; 
     103 
     104                $output .= "</td> 
     105                                <td><strong>$theme_name</strong><br /> Version $version</td> 
    105106                                <td>$description</td> 
    106107                                <td><a href=\"$url\">$author</a></td>\n"; 
  • trunk/plog-content/themes/air/album.php

    r557 r568  
    2222                </ul><!-- /slides --> 
    2323<?php else : ?> 
    24                 <p id="no-pictures-msg"><?php echo plog_tr('There are no pictures in this album')?>.</p> 
     24                <div id="error-404"> 
     25                        <h2><?php echo plog_tr('404 - Not Found')?></h2> 
     26                        <p><?php echo plog_tr('We are sorry, but the image that you requested does not exist. You might try using the <strong>Search</strong> feature to locate the image you are looking for.')?></p> 
     27                </div> 
    2528<?php endif; ?> 
    2629 
  • trunk/plog-content/themes/air/collection.php

    r557 r568  
    2424 
    2525<?php else : ?> 
    26                 <p id="no-pictures-msg"><?php echo plog_tr('No albums yet')?>.</p> 
     26                <div id="error-404"> 
     27                        <h2><?php echo plog_tr('404 - Not Found')?></h2> 
     28                        <p><?php echo plog_tr('We are sorry, but the collection that you requested does not exist.')?></p> 
     29                </div> 
    2730<?php endif; ?> 
    2831        </div><!-- /thumbnail-container --> 
  • trunk/plog-content/themes/air/collections.php

    r557 r568  
    2323 
    2424        <?php else : ?> 
    25                 <p id="no-pictures-msg"><?php echo plog_tr('No collections yet')?>.</p> 
     25                <div id="error-404"> 
     26                        <h2><?php echo plog_tr('404 - Not Found')?></h2> 
     27                        <p><?php echo plog_tr('We are sorry, but the collection that you requested does not exist.')?></p> 
     28                </div> 
    2629        <?php endif; ?> 
    2730</div><!-- /thumbnail-container --> 
  • trunk/plog-content/themes/air/gallery.css

    r557 r568  
    135135        font-size: 1.4em; 
    136136        text-align: center; 
     137} 
     138 
     139#error-404 { 
     140        /* error-404 controls the "not found" message received when going to a non-existent URL */ 
     141        margin: 50px; 
     142        text-align: justify; 
    137143} 
    138144 
  • trunk/plog-content/themes/air/header.php

    r557 r568  
    1 <?php plogger_init(); ?> 
    21<div id="wrapper"> 
    32 
  • trunk/plog-content/themes/air/picture.php

    r557 r568  
    4545<?php endwhile; ?> 
    4646<?php else : ?> 
    47                 <p id="no-pictures-msg"><?php echo plog_tr('No such image')?>.</p> 
     47                <div id="error-404"> 
     48                        <h2><?php echo plog_tr('404 - Not Found')?></h2> 
     49                        <p><?php echo plog_tr('We are sorry, but the image that you requested does not exist. You might try using the <strong>Search</strong> feature to locate the image you are looking for.')?></p> 
     50                </div> 
    4851        <?php endif; ?> 
    4952        </div><!-- /big-picture-container --> 
  • trunk/plog-content/themes/air/search.php

    r557 r568  
    2222                </ul><!-- /slides --> 
    2323<?php else : ?> 
    24                 <p id="no-pictures-msg"><?php echo plog_tr('There are no pictures that match this search')?>.</p> 
     24                <div id="error-404"> 
     25                        <h2><?php echo plog_tr('Search Results')?></h2> 
     26                        <p><?php echo plog_tr('We are sorry, but there are no pictures that matched your search.')?></p> 
     27                </div> 
    2528<?php endif; ?> 
    2629 
  • trunk/plog-content/themes/air/slideshow.php

    r561 r568  
    2525<?php echo generate_slideshow_interface(); ?> 
    2626<?php else : ?> 
    27                 <p id="no-pictures-msg"><?php echo plog_tr('There are no pictures to show')?>.</p> 
     27                <div id="error-404"> 
     28                        <h2><?php echo plog_tr('404 - Not Found')?></h2> 
     29                        <p><?php echo plog_tr('We are sorry, but there are no images in this album to create a slideshow with.')?></p> 
     30                </div> 
    2831 
    2932<?php endif; ?> 
  • trunk/plog-content/themes/default/album.php

    r557 r568  
    2929                        </ul><!-- /slides --> 
    3030<?php else : ?> 
    31                         <p id="no-pictures-msg"><?php echo plog_tr('There are no pictures in this album')?>.</p> 
     31                        <div id="error-404"> 
     32                                <h2><?php echo plog_tr('404 - Not Found')?></h2> 
     33                                <p><?php echo plog_tr('We are sorry, but the image that you requested does not exist. You might try using the <strong>Search</strong> feature to locate the image you are looking for.')?></p> 
     34                        </div> 
    3235 
    3336<?php endif; ?> 
  • trunk/plog-content/themes/default/collection.php

    r557 r568  
    2323                        </ul><!-- /slides --> 
    2424<?php else : ?> 
    25                         <p id="no-pictures-msg"><?php echo plog_tr('No albums yet')?>.</p> 
     25                        <div id="error-404"> 
     26                                <h2><?php echo plog_tr('404 - Not Found')?></h2> 
     27                                <p><?php echo plog_tr('We are sorry, but the collection that you requested does not exist.')?></p> 
     28                        </div> 
    2629 
    2730<?php endif; ?> 
  • trunk/plog-content/themes/default/collections.php

    r557 r568  
    2222                        </ul><!-- /slides --> 
    2323<?php else : ?> 
    24                         <p id="no-pictures-msg"><?php echo plog_tr('No collections yet')?>.</p> 
     24                        <div id="error-404"> 
     25                                <h2><?php echo plog_tr('404 - Not Found')?></h2> 
     26                                <p><?php echo plog_tr('We are sorry, but the collection that you requested does not exist.')?></p> 
     27                        </div> 
    2528 
    2629<?php endif; ?> 
  • trunk/plog-content/themes/default/gallery.css

    r557 r568  
    252252} 
    253253 
     254#error-404 { 
     255        margin: 50px 75px; 
     256        text-align: justify; 
     257} 
     258 
    254259/* Form Structure/Elements */ 
    255260 
    256261#jump_menu { 
    257         float: right; 
     262        text-align: right; 
    258263} 
    259264 
     
    264269 
    265270#search_box { 
    266         margin-left: 5px; 
    267         float: right; 
     271        text-align: right; 
    268272} 
    269273 
  • trunk/plog-content/themes/default/header.php

    r557 r568  
    1 <?php plogger_init(); ?> 
    21<!--Output highest level container division--> 
    32<div id="wrapper"> 
     
    76                        <td id="jump-search-container"> 
    87                                <?php echo generate_jump_menu(); ?> 
    9                                 <br /><br /> 
     8                                <br /> 
    109                                <?php echo generate_search_box(); ?> 
    1110                        </td> 
  • trunk/plog-content/themes/default/picture.php

    r557 r568  
    4949<?php endwhile; ?> 
    5050<?php else : ?> 
    51                         <p id="no-pictures-msg"><?php echo plog_tr('No such image')?>.</p> 
     51                        <div id="error-404"> 
     52                                <h2><?php echo plog_tr('404 - Not Found')?></h2> 
     53                                <p><?php echo plog_tr('We are sorry, but the image that you requested does not exist. You might try using the <strong>Search</strong> feature to locate the image you are looking for.')?></p> 
     54                        </div> 
    5255<?php endif; ?> 
    5356                </div><!-- /inner_wrapper --> 
  • trunk/plog-content/themes/default/search.php

    r557 r568  
    2626                        </ul><!-- /slides --> 
    2727<?php else : ?> 
    28                         <p id="no-pictures-msg"><?php echo plog_tr('There are no pictures that matched your search')?>.</p> 
    29  
     28                        <div id="error-404"> 
     29                                <h2><?php echo plog_tr('Search Results')?></h2> 
     30                                <p><?php echo plog_tr('We are sorry, but there are no pictures that matched your search.')?></p> 
     31                        </div> 
    3032<?php endif; ?> 
    3133                </div><!-- /thumbnail container --> 
  • trunk/plog-content/themes/default/slideshow.php

    r561 r568  
    3333<?php echo generate_slideshow_interface(); ?> 
    3434<?php else : ?> 
    35                         <p id="no-pictures-msg"><?php echo plog_tr('There are no pictures to show')?>.</p> 
     35                        <div id="error-404"> 
     36                                <h2><?php echo plog_tr('404 - Not Found')?></h2> 
     37                                <p><?php echo plog_tr('We are sorry, but there are no images in this album to create a slideshow with.')?></p> 
     38                        </div> 
    3639 
    3740<?php endif; ?> 
  • trunk/plog-content/themes/lucid/album.php

    r557 r568  
    2727                        </ul><!-- /slides --> 
    2828<?php else : ?> 
    29                         <p id="no-pictures-msg"><?php echo plog_tr('There are no pictures in this album')?>.</p> 
     29                        <div id="error-404"> 
     30                                <h2><?php ec