Advertisement
Darvil

Untitled

Jan 13th, 2012
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.04 KB | None | 0 0
  1. <?php
  2. // Do not delete these lines
  3.     if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  4.         die ('Please do not load this page directly. Thanks!');
  5.  
  6.     if ( post_password_required() ) { ?>
  7.         <p class="nocomments">This post is password protected. Enter the password to view
  8.  
  9. comments.</p>
  10.     <?php
  11.         return;
  12.     }
  13. ?>
  14.  
  15. <!-- You can start editing here. -->
  16.  
  17. <?php if (have_comments()) { ?>
  18. <div class="box">
  19.   <div id="commentspost"><a name="commentspost"></a>
  20.     <h2 class="title"><?php comment_type_count();?> <?php _e('komentara', 'wpzoom'); ?></h2>
  21.  <p><div class="navigation">
  22.         <div class="alignleft"><?php previous_comments_link() ?></div>
  23.         <div class="alignright"><?php next_comments_link() ?></div></p>
  24.     </div>
  25.     <ol class="normalComments"><?php wp_list_comments('type=all&avatar_size=40');?></ol>
  26.     </div><!-- end #commentspost -->
  27.  
  28. <?php if ('closed' == $post->comment_status) : ?>
  29. </div>
  30. <?php endif; ?>
  31.    
  32.  <?php }
  33.  else { // this is displayed if there are no comments so far ?>
  34.  
  35.     <?php if ('open' == $post->comment_status) { ?>
  36.         <!-- If comments are open, but there are no comments. -->
  37. <div class="box">
  38. <div id="commentspost">
  39.     <h2 class="title">0 <?php _e('Komentara', 'wpzoom'); ?></h2>
  40.   <p><?php _e('Možete biti prvi koji će ostaviti komentar (registracija nije potrebna).', 'wpzoom'); ?>.</p>
  41.  
  42. </div>
  43.      <?php } else { // comments are closed ?>
  44.         <!-- If comments are closed. -->
  45.     <?php } ?>
  46. <?php } ?>
  47.  
  48. <?php if ('open' == $post->comment_status) : ?>
  49.  
  50.  
  51. <div id="respond">
  52. <?php do_action( 'comment_form_before' ); ?>
  53. <h2 class="title"><?php comment_form_title( __('Ostavite komentar', 'wpzoom'), __('Citirajte %s', 'wpzoom')
  54.  
  55. ); ?></h2>
  56. <div class="cleaner">&nbsp;</div>
  57. <div class="cancel-comment-reply"><p><?php cancel_comment_reply_link(); ?></p></div>
  58.  
  59. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  60. <p><?php _e('Morate biti', 'wpzoom'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?
  61.  
  62. redirect_to=<?php echo urlencode(get_permalink()); ?>"><?php _e('Prijavljeni ste kao', 'wpzoom'); ?></a> <?
  63.  
  64. php _e('kako biste komentirali.', 'wpzoom'); ?></p>
  65. <?php else : ?>
  66.  
  67. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  68.  
  69. <?php if ( $user_ID ) : ?>
  70.  
  71. <p><?php _e('Logged in as', 'wpzoom'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-
  72.  
  73. admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?
  74.  
  75. >" title="Odjavite se s ovog računa."><?php _e('Log out', 'wpzoom'); ?> &raquo;</a></p>
  76.  
  77. <?php else : ?>
  78. <div id="formLabels">
  79. <label for="author"><?php _e('Ime', 'wpzoom'); ?> <?php if ($req) echo "(required)"; ?>:</label>
  80. <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1"
  81.  
  82. <?php if ($req) echo "aria-required='true'"; ?> /><br />
  83.  
  84. <label for="email"><?php _e('E-Mail', 'wpzoom'); ?> <?php if ($req) echo "(required)"; ?>:</label>
  85. <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22"
  86.  
  87. tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> /><br />
  88.  
  89. <label for="url"><?php _e('Web stranica', 'wpzoom'); ?>:</label>
  90. <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3"
  91.  
  92. /><br />
  93. </div>
  94. <?php endif; ?>
  95. <div id="formContent">
  96. <label for="comment"><?php _e('Komentar', 'wpzoom'); ?>:</label>
  97. <textarea name="comment" id="comment" tabindex="4" cols="140" rows="8"></textarea><br />
  98. <input name="submit" type="submit" id="submit" value="<?php _e('Add Comment', 'wpzoom'); ?>" />
  99. <!--<p><strong>XHTML:</strong> You can use these tags: <br /><code><?php echo allowed_tags(); ?
  100.  
  101. ></code></p>-->
  102. <?php do_action('comment_form_after', $post->ID); ?>
  103. </div>
  104. <div class="cleaner">&nbsp;</div>
  105. <?php comment_id_fields(); ?>
  106.  
  107. </form>
  108. <?php endif; // If registration required and not logged in ?>
  109. </div>
  110. </div>
  111. <?php endif; // if you delete this the sky will fall on your head ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement