Changeset 552

Show
Ignore:
Timestamp:
07/07/08 14:56:01 (3 months ago)
Author:
sidtheduck
Message:

+ cleared out require and include functions from included files (no longer needed if included)
+ added code to stop direct access to included files
+ adding back r549 translatable themes
+ cleaned version of "Air" theme

Location:
trunk
Files:
1 added
49 modified

Legend:

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

    r550 r552  
    3131                header("Location: index.php"); 
    3232                exit; 
     33        } else { 
     34                echo "There was an error with the MySQL connection!"; 
    3335        } 
    3436} 
  • trunk/plog-admin/includes/install-form-setup-complete.php

    r550 r552  
    11<?php 
     2if (basename($_SERVER['PHP_SELF']) == basename( __FILE__ )) { 
     3        // ignorance is bliss 
     4        exit(); 
     5} 
     6 
    27if (!defined('PLOGGER_DIR')) { 
    38        return false; 
     
    712        <form method="POST"> 
    813        <p>Configuration setup is now complete.<br />Click 'Install' to finish installation.</p> 
    9         <p>Your username is <?php echo $_SESSION['install_values']['admin_username']; ?> and your password is `<?php echo $_SESSION['install_values']['admin_password']; ?>`</p> 
     14        <p>Your username is `<strong><?php echo $_SESSION['install_values']['admin_username']; ?></strong>` and your password is `<strong><?php echo $_SESSION['install_values']['admin_password']; ?></strong>`</p> 
    1015<?php if (!empty($_SESSION["plogger_config"])) { ?> 
    1116        <p>Before you can proceed, please <input type="submit" name="dlconfig" value="click here"/> to download configuration file for your gallery, then upload it to your webhost (into the same directory where you installed Plogger itself).</p> 
  • trunk/plog-admin/includes/install-form-setup.php

    r550 r552  
    11<?php 
     2if (basename($_SERVER['PHP_SELF']) == basename( __FILE__ )) { 
     3        // ignorance is bliss 
     4        exit(); 
     5} 
     6 
    27if (!defined('PLOGGER_DIR')) { 
    38        return false; 
    4 }; 
     9} 
    510?> 
    611        <h1>Plogger Configuration Setup</h1> 
  • trunk/plog-admin/includes/install-functions.php

    r551 r552  
    11<?php 
     2if (basename($_SERVER['PHP_SELF']) == basename( __FILE__ )) { 
     3        // ignorance is bliss 
     4        exit(); 
     5} 
     6 
    27if (!defined('PLOGGER_DIR')) { 
    38        return false; 
    49} 
     10 
     11@include_once(PLOGGER_DIR.'plog-config.php'); 
    512require_once(PLOGGER_DIR.'plog-admin/plog-admin-functions.php'); 
    6 @include(PLOGGER_DIR.'plog-config.php'); 
    713 
    814function do_install($form) { 
     
    367373        mysql_query($query) or die(mysql_error().'<br /><br />'. $query); 
    368374 
    369         mail($config['admin_email'],"Your new gallery","You have successfully installed your new Plogger gallery. You can manage it at ${config['gallery_url']}plog-admin Username is ${config['admin_username']} and password ${config['admin_password']}."); 
     375        mail($config['admin_email'],"Your new gallery","You have successfully installed your new Plogger gallery. You can manage it at ${config['gallery_url']}plog-admin Username is `${config['admin_username']}` and password `${config['admin_password']}`."); 
    370376} 
    371377 
     
    464470        } 
    465471 
    466         $files_to_write = array("./","./plog-content/images","./plog-content/thumbs", "./plog-content/uploads"); 
     472        $files_to_write = array("./plog-content/images","./plog-content/thumbs", "./plog-content/uploads"); 
    467473        foreach($files_to_write as $file){ 
    468474                if (!is_writable(PLOGGER_DIR . $file)){ 
  • trunk/plog-content/images/index.php

    r550 r552  
    11<?php 
    2 // Nothing to see here. 
     2// Ignorance is bliss 
    33?> 
  • trunk/plog-content/themes/air/album.php

    r550 r552  
    1919 
    2020                <li class="thumbnail"> 
    21                 <a href="<?php echo plogger_get_picture_url(); ?>"><img id="thumb-<?php echo plogger_get_picture_id(); ?>" class="photos" src="<?php echo plogger_get_picture_thumb(); ?>" width="<?php echo $thumb_width; ?>px" height="<?php echo $thumb_height; ?>px" title="<?php echo $picture_caption; ?>" alt="<?php echo $picture_caption; ?>" /></a> 
    22  
    23                 <div class="checkbox"><?php echo plogger_download_checkbox(plogger_get_picture_id()); ?></div> 
    24  
    25                 <p style="width:<?php echo $thumb_width; ?>px;"><?php echo $picture_caption; ?></p> 
     21                        <a href="<?php echo plogger_get_picture_url(); ?>"> 
     22                                <img id="thumb-<?php echo plogger_get_picture_id(); ?>" class="photos" src="<?php echo plogger_get_picture_thumb(); ?>" width="<?php echo $thumb_width; ?>px" height="<?php echo $thumb_height; ?>px" title="<?php echo $picture_caption; ?>" alt="<?php echo $picture_caption; ?>" /> 
     23                        </a> 
     24                        <div class="checkbox"><?php echo plogger_download_checkbox(plogger_get_picture_id()); ?></div> 
     25                        <p style="width:<?php echo $thumb_width; ?>px;"><?php echo $picture_caption; ?></p> 
    2626                </li> 
    27  
    28                 <?php endwhile; ?> 
     27        <?php endwhile; ?> 
    2928 
    3029        </ul> 
     
    3231        <?php else : ?> 
    3332 
    34         <div id="no-pictures-msg">There are no pictures in this album.</div> 
     33        <p id="no-pictures-msg"><?php echo plog_tr('There are no pictures in this album')?>.</p> 
    3534 
    3635        <?php endif; ?> 
  • trunk/plog-content/themes/air/collection.php

    r550 r552  
    11<?php plogger_get_header(); ?> 
    22 
    3 <div id="thumbnail-container"> 
     3<div id="thumbnail-container" class="clearfix"> 
    44 
    55<?php if (plogger_has_albums()) : ?> 
     
    1616                ?> 
    1717 
    18                 <div class="collection"><a href="<?php echo plogger_get_album_url(); ?>"> 
    19  
    20                 <?php // generate XHTML with thumbnail and link to picture view ?> 
    21                 <img class="photos" src="<?php echo plogger_get_album_thumb(); ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a> 
    22  
     18                <div class="collection"> 
     19                        <a class="collection-image-link" href="<?php echo plogger_get_album_url(); ?>"><img class="photos" src="<?php echo plogger_get_album_thumb(); ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a> 
    2320                        <h2><a href="<?php echo plogger_get_album_url(); ?>"><?php echo $name; ?></a></h2> 
    24  
    2521                        <?php echo plogger_download_checkbox(plogger_get_album_id()); ?> 
    26  
    27                         <span class="meta-header">Contains <?php echo $num_albums . ' '; echo ($num_albums == 1) ? "Picture" : "Pictures"; ?></span> 
    28  
     22                        <span class="meta-header"><?php echo plog_tr('Contains'); ?> <?php echo $num_albums . ' '; echo ($num_albums == 1) ? plog_tr("Picture") : plog_tr("Pictures"); ?></span> 
    2923                        <p class="description"><?php echo $desc; ?></p> 
    30  
    3124                </div> 
    3225 
    33                 <?php endwhile; ?> 
     26        <?php endwhile; ?> 
    3427 
    3528        </div> 
     
    3730        <?php else : ?> 
    3831 
    39         <p>No albums yet</p> 
     32        <p id="no-pictures-msg"><?php echo plog_tr('No albums yet')?>.</p> 
    4033 
    4134        <?php endif; ?> 
  • trunk/plog-content/themes/air/collections.php

    r550 r552  
    1717 
    1818                <div class="collection"> 
    19  
    20                 <a href="<?php echo plogger_get_collection_url(); ?>"> 
    21  
    22                 <?php // generate XHTML with thumbnail and link to album view ?> 
    23                 <img class="photos" src="<?php echo plogger_get_collection_thumb(); ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a> 
    24  
     19                        <a class="collection-image-link" href="<?php echo plogger_get_collection_url(); ?>"><img class="photos" src="<?php echo plogger_get_collection_thumb(); ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a> 
    2520                        <h2><a href="<?php echo plogger_get_collection_url(); ?>"><?php echo $name; ?></a></h2> 
    26  
    2721                        <?php echo plogger_download_checkbox(plogger_get_collection_id()); ?> 
    28  
    29                         <span class="meta-header">Contains <?php echo $num_albums . ' '; echo ($num_albums == 1) ? "Album" : "Albums"; ?></span> 
    30  
     22                        <span class="meta-header"><?php echo plog_tr('Contains'); ?> <?php echo $num_albums . ' '; echo ($num_albums == 1) ? plog_tr("Album") : Plog_tr("Albums"); ?></span> 
    3123                        <p class="description"><?php echo $desc; ?></p> 
    32  
    3324                </div> 
    3425 
     
    3930        <?php else : ?> 
    4031 
    41         <p>No collections yet</p> 
     32        <p id="no-pictures-msg"><?php echo plog_tr('No collections yet')?>.</p> 
    4233 
    4334        <?php endif; ?> 
  • trunk/plog-content/themes/air/comments.php

    r550 r552  
    1 <?php 
    2 if (plogger_comments_on()) { 
    3         print '<a name="comments"></a><h2 class="comment-heading">Comments:</h2>'; 
    41 
    5         if (plogger_picture_has_comments()) { 
    6                 print "<ol class=\"comments\">"; 
    7                 $counter = 0; 
    8                 while(plogger_picture_has_comments()) { 
    9                         plogger_load_comment(); 
     2<?php if (plogger_comments_on()) { ?> 
     3                <a name="comments"></a><h2 class="comment-heading">' . plog_tr('Comments') . ':</h2>'; 
    104 
    11                         $url = plogger_get_comment_url(); 
    12                         $author = plogger_get_comment_author(); 
     5                <? if (plogger_picture_has_comments()) { ?> 
     6                <ol class="comments"> 
     7                        <? $counter = 0; 
     8                        while(plogger_picture_has_comments()) { 
     9                                plogger_load_comment(); 
    1310 
    14                         // this code alternates the background color every other comment 
    15                         $comment_class = ($counter % 2) ? "comment_alt" : "comment"; 
     11                                $url = plogger_get_comment_url(); 
     12                                $author = plogger_get_comment_author(); 
    1613 
    17                         print "\n<li class=\"$comment_class\">"; 
    18                         print "<p>".plogger_get_comment_text()."</p>"; 
    19                         print "<cite>Comment by "; 
    20                         print (trim($url) != '') ? "<a href=\"$url\" rel=\"nofollow\">$author</a>" : "$author"; 
    21                         print " - posted on ".plogger_get_comment_date(); 
     14                                // this code alternates the background color every other comment 
     15                                $comment_class = ($counter % 2) ? "comment_alt" : "comment"; 
     16                        ?> 
    2217 
    23                         print "</cite></li>"; 
    24                         $counter++; 
    25                 } 
    26                 print "\n</ol>"; 
    27         } else { 
    28                 print "<p>No comments yet.</p>"; 
    29         }; 
     18                        <li class="$comment_class"> 
     19                                <p>"<?php echo plogger_get_comment_text(); ?>"</p> 
     20                                <cite>Comment by "<?php echo (trim($url) != '') ? "<a href=\"$url\" rel=\"nofollow\">$author</a>" : "$author"; ?> - posted on "<?php echo plogger_get_comment_date(); ?></cite> 
     21                        </li> 
    3022 
    31         if (plogger_picture_allows_comments()) { 
    32                 if (plogger_comment_post_error()) { 
    33                         print "<p class='errors'>Comment did not post!  Please fill in required fields.</p>"; 
    34                 }; 
     23                        <?php $counter++; 
     24                        } ?> 
     25                </ol> 
     26                <?php } else { ?> 
     27                <p>"<?php echo plog_tr('No comments yet'); ?>"</p> 
     28                <?php } ?> 
    3529 
     30        <?php if (plogger_picture_allows_comments()) { 
    3631                global $config; 
     32                if (plogger_comment_post_error()) { ?> 
     33                <p class='errors'>"<?php echo plog_tr('Comment did not post!  Please fill in required fields.'); ?>"</p> 
     34                <?php } ?> 
    3735 
    38                 print  '<a name="comment-post"></a><h2 class="comment-heading">Post a comment:</h2> 
    39                         <form action="' . $_SERVER['REQUEST_URI'] . '" method="post" id="commentform"> 
     36                <a name="comment-post"></a><h2 class="comment-heading"><?php echo plog_tr('Post a comment'); ?></h2> 
     37                <form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post" id="commentform"> 
    4038                        <p> 
    41                         <input type="text" name="author" id="author" class="textarea" value="" size="28" tabindex="1" /> 
    42                         <label for="author">Name</label> (required) <input type="hidden" name="comment_post_ID" value="40" /> 
    43                         <input type="hidden" name="parent" value="'.plogger_get_picture_id().'" /> 
     39                                <input type="text" name="author" id="author" class="textarea" value="" size="28" tabindex="1" /> 
     40                                <label for="author"><?php echo plog_tr('Name'); ?></label> (<?php echo plog_tr('required'); ?>) 
     41 
     42                                <input type="hidden" name="comment_post_ID" value="40"/> 
     43                                <input type="hidden" name="parent" value="'.plogger_get_picture_id().'" /> 
    4444                        </p> 
    4545                        <p> 
    46                         <input type="text" name="email" id="email" value="" size="28" tabindex="2" /> 
    47                         <label for="email">E-mail</label> (required, but not publicly displayed) 
     46                                <input type="text" name="email" id="email" value="" size="28" tabindex="2" /> 
     47                                <label for="email"><?php echo plog_tr('E-mail'); ?></label> (<?php echo plog_tr('required, but not publicly displayed'); ?>) 
    4848                        </p> 
    4949                        <p> 
    50                         <input type="text" name="url" id="url" value="" size="28" tabindex="3" /> 
    51                         <label for="url">Your Website (optional)</label> 
     50                                <input type="text" name="url" id="url" value="" size="28" tabindex="3" /> 
     51                                <label for="url"><?php echo plog_tr('Your Website (optional)'); ?></label> 
    5252                        </p> 
    5353                        <p> 
    54                         <label for="comment">Your Comment</label> 
    55                         <br /><textarea name="comment" id="comment" cols="70" rows="4" tabindex="4"></textarea> 
     54                                <label for="comment"><?php echo plog_tr('Your Comment'); ?></label> 
     55                                <br /><textarea name="comment" id="comment" cols="70" rows="4" tabindex="4"></textarea> 
    5656                        </p> 
    57                         <p class="inputbuttonp"> 
    58                         <input class="submit" name="submit" type="submit" tabindex="5" value="Post Comment" /> 
     57                        <p class="comment-input-button"> 
     58                                <input class="submit" name="submit" type="submit" tabindex="5" value="<?php echo plog_tr('Post Comment'); ?>" /> 
    5959                        </p> 
    60                         </form>'; 
     60                </form> 
    6161 
    62                 } else { 
    63                 print '<p class="comments-closed">Comments for this entry are closed</p>'; 
    64         } 
    65 };  
    66 ?> 
     62        <?php } else { ?> 
     63                <p class="comments-closed"><?php echo plog_tr('Comments for this entry are closed'); ?></p> 
     64        <?php } ?> 
     65<?php } ?> 
  • trunk/plog-content/themes/air/dynamics.js

    r550 r552  
    77                        } 
    88        } 
    9  
     9         
    1010        if (valid == false) { 
    1111                 alert('Nothing is selected!'); 
     
    3030 
    3131        httpRequest.send(null); 
     32         
     33        document.getElementById('exif_data').style.display = 'none'; 
     34        document.getElementById('hide_details').style.display = 'none';      // We have to switch visible tag 
     35        document.getElementById('show_details').style.display = 'inline';    // due to translations 
    3236 
    33         document.getElementById('exif_data').style.display = 'none'; 
    34         document.getElementById('exif_toggle').innerHTML = '<a accesskey="d" href="javascript:void(0);" onclick="show_details();">Show details</a>'; 
    3537} 
    3638 
     
    5153 
    5254        document.getElementById('exif_data').style.display = ''; 
    53         document.getElementById('exif_toggle').innerHTML = '<a accesskey="d" href="javascript:void(0);" onclick="hide_details();">Hide details</a>'; 
     55        document.getElementById('hide_details').style.display = 'inline';    // We have to switch visible tag 
     56        document.getElementById('show_details').style.display = 'none';      // due to translations 
     57 
    5458} 
    5559 
  • trunk/plog-content/themes/air/explorer.css

    r550 r552  
    11#breadcrumbs { 
    2         margin: 15px 0 10px; /* IE 6 */ 
    3         height: 20px; /* IE 6 */ 
     2        height: 24px; /* IE 6 */ 
    43} 
    5  
    6 b.bl { 
    7         bottom: -1px; 
    8         left: -1px; 
    9         background: url(images/bg-bl.gif) no-repeat; 
     4a:visited { 
     5        color: #01B4E2; 
    106} 
    11  
    12 b.br { 
    13         bottom: -1px; 
    14         right: -1px; 
    15         background: url(images/bg-br.gif) no-repeat; 
    16 } 
    17  
    18 #thumbnail-container, #big-picture-container { 
    19         margin: 20px 0 0; /* IE 6 */ 
    20         padding: 0; 
    21 } 
    22  
    237.collection a { 
    24         float: left; 
    25         margin: 0px 15px 0px 0px; 
    26         padding: 0px; 
    278        display: inline; 
    289        background: #fff; 
    2910} 
    30  
    31 .collection img { 
     11.collection h2 { 
     12        display: block; 
     13        height: 20px; 
     14} 
     15.collection h2 a, .collection h2 a:visited { 
     16        border: none; 
     17        color: #01B4E2; 
     18        display: block; 
     19} 
     20.collection h2 a:hover { 
     21        border: none; 
     22} 
     23.collection input { 
     24        float: left; 
     25        display: block; 
     26} 
     27.meta-header { 
     28        display: block; 
     29        height: 20px; 
     30        padding: 4px 0 0 0; 
     31} 
     32.collection img, ul.slides li img, #thumb-nav li img { 
    3233        margin: 0px; 
     34        border: none; 
    3335} 
    34  
     36#thumb-nav li img { 
     37        margin: 4px 0 0 0; 
     38} 
    3539li.thumbnail a, .collection a, #picture-holder a, #thumb-nav a { 
    3640/*      border: 1px solid #dfded6; */ 
     
    4044li.thumbnail a:hover, .collection a:hover, #picture-holder a:hover, #thumb-nav a:hover { 
    4145/*      border: 1px solid #b3b6b0; */ 
    42         border: 1px solid #01B4E2; 
     46        border: 1px solid #ff6600; 
    4347} 
    44  
    45 #sort-control p { 
    46         font-size: 1.1em; /* IE 6 */ 
    47         display: inline; 
     48#sort-control { 
     49        width: 330px; 
    4850} 
     51#download-selected input.submit { 
     52        background: #fff url('images/carrot_sel3.gif') no-repeat 0 50%; 
     53} 
  • trunk/plog-content/themes/air/footer.php

    r550 r552  
    11 
    2 <div id="footer"> 
     2<div id="footer" class="clearfix"> 
    33 
    44        <?php if (plogger_pagination_control() != '') { ?> 
     
    3333 
    3434        <?php echo plogger_link_back(); ?> 
    35         <div class="credit"><a href="http://www.ardamis.com/">Design by ardamis.com</a></div> 
     35        <div class="credit"><a href="http://www.ardamis.com/"><?php echo plog_tr('Design by')?> ardamis.com</a></div> 
    3636 
    3737</div> 
     38 
    3839<?php echo plogger_download_selected_form_end(); ?> 
    3940 
  • trunk/plog-content/themes/air/gallery.css

    r550 r552  
     1 
     2/* Begin general styles for all pages */ 
     3 
    14* { 
    25        margin: 0; 
    36        padding: 0; 
    47} 
    5  
    68body { 
     9        /* body contains and controls all visible elements of the entire page, this is where you want to set things like the background of the page */ 
    710        margin: 0; 
    811        padding: 0 0 25px 0; 
     
    1215        text-align: center; 
    1316} 
    14  
    1517img { 
     18        /* img controls anything that all of the images have in common; in this case, we make sure no images have borders (we can add borders to specific images later) */ 
    1619        border: 0; 
    1720} 
    18  
    1921a:link, a:visited { 
     22        /* a:link, a:visited control the default link behavior for all of the links on the page (but most of the link behaviors are changed later in the CSS) */ 
    2023        color: #7f807b; 
    2124        text-decoration: none; 
    2225} 
    23  
    2426a:hover { 
     27        /* a:hover controls the default hover behavior of all links */ 
    2528