Changeset 552 for trunk/plog-content/themes/air/comments.php
- Timestamp:
- 07/07/08 14:56:01 (5 months ago)
- Files:
-
- 1 modified
-
trunk/plog-content/themes/air/comments.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plog-content/themes/air/comments.php
r550 r552 1 <?php2 if (plogger_comments_on()) {3 print '<a name="comments"></a><h2 class="comment-heading">Comments:</h2>';4 1 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>'; 10 4 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(); 13 10 14 // this code alternates the background color every other comment15 $comment_class = ($counter % 2) ? "comment_alt" : "comment";11 $url = plogger_get_comment_url(); 12 $author = plogger_get_comment_author(); 16 13 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 ?> 22 17 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> 30 22 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 } ?> 35 29 30 <?php if (plogger_picture_allows_comments()) { 36 31 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 } ?> 37 35 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"> 40 38 <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().'" /> 44 44 </p> 45 45 <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'); ?>) 48 48 </p> 49 49 <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> 52 52 </p> 53 53 <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> 56 56 </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'); ?>" /> 59 59 </p> 60 </form>';60 </form> 61 61 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 } ?>
