Show
Ignore:
Timestamp:
07/07/08 14:56:01 (5 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

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • 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 } ?>