Advertisement
Guest User

Untitled

a guest
Feb 27th, 2014
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.12 KB | None | 0 0
  1. <?php $template_directory =  get_template_directory_uri(); ?>
  2. <?php
  3.  
  4. // Do not delete these lines or the sky will fall over your head
  5.     if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  6.         die ('Please do not load this page directly. Thanks!');
  7.  
  8.     if ( post_password_required() ) { ?>
  9.         <p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'framework') ?></p>
  10.     <?php
  11.         return;
  12.     }
  13.  
  14. /*-----------------------------------------------------------------------------------*/
  15. /*  Display the comments + Pings
  16. /*-----------------------------------------------------------------------------------*/
  17.  
  18.     if ( have_comments() ) : // if there are comments ?>
  19.  
  20. <div class="comments-container span12"> <?php // THANKS TO FLORIAN FOR FIXING THIS BUG BEFORE ME ;-) ?>
  21.        
  22.     <?php if ( ! empty($comments_by_type['comment']) ) : // if there are normal comments ?>
  23.  
  24.         <div class="share-post">
  25.             <?php if( function_exists('zilla_likes') ) : ?> <?php zilla_likes(); ?> / <?php endif; ?><a class="facebook" href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>" target="blank"><i class="icon-thumbs-up"></i> <?php _e('Like', 'framework'); ?></a> / <a href="http://twitter.com/home?status=<?php the_title(); ?> - <?php the_permalink();?>" target="blank" class="twitter"><i class="icon-twitter"></i> <?php _e('Tweet', 'framework'); ?></a>
  26.         </div>
  27.  
  28.         <div class="comments-message">
  29.             <?php if(get_option('icy_comments_message') == '') : ?>
  30.                 <?php _e('Write us your thoughts about this post. Be kind & Play nice.', 'framework'); ?>
  31.             <?php else : ?>
  32.                 <?php echo get_option('icy_comments_message'); ?>
  33.             <?php endif; ?>    
  34.         </div>
  35.  
  36.     <!-- BEGIN .list-of-comments -->   
  37.     <div class="span12 commentaries-border">
  38.        
  39.         <!--BEGIN .list-of-comments OUTPUT -->
  40.         <ol id="comments" class="list-of-comments">
  41.        
  42.         <?php wp_list_comments('type=comment&avatar_size=48&callback=icy_comment'); ?>
  43.        
  44.         <!--END .list-of-comments OUTPUT -->
  45.         </ol>
  46.  
  47.         <?php endif; ?>
  48.  
  49.         <?php if ( ! empty($comments_by_type['pings']) ) : // if there are pings ?>
  50.        
  51.        
  52.         <!--START separated pings listing -->
  53.         <h4 id="pings"><?php _e('Trackbacks for this post', 'framework') ?></h4>
  54.  
  55.         <ol class="pinglist">
  56.        
  57.             <?php wp_list_comments('type=pings&callback=icy_list_pings'); ?>
  58.        
  59.         </ol>
  60.         <!--END separated pings listing -->
  61.        
  62.        
  63.        
  64.         <?php endif; ?>
  65.        
  66.         <!--BEGIN comment navigation -->
  67.         <div class="navigation">
  68.        
  69.             <div class="alignright"><?php next_comments_link(); ?></div>
  70.             <div class="alignleft"><?php previous_comments_link(); ?></div>
  71.        
  72.         <!--END comment navigation -->
  73.         </div>
  74.  
  75.     <!--END .list-of-comments -->
  76.     </div>
  77.  
  78.         <?php
  79.        
  80.        
  81. /*-----------------------------------------------------------------------------------*/
  82. /*  Dealing with no comments or closed comments
  83. /*-----------------------------------------------------------------------------------*/
  84.        
  85.         if ('closed' == $post->comment_status ) : // if the post has comments but comments are now closed ?>
  86.        
  87.         <p class="nocomments"><?php _e('Comments are closed now.', 'framework') ?></p>
  88.        
  89.         <?php endif; ?>
  90.  
  91.         <?php else :  ?>
  92.        
  93.         <?php if ('open' == $post->comment_status) : // if comments are open but no comments so far ?>
  94.         <div class="comments-container" style="margin-top: 0; margin-bottom: 40px">
  95.             <div class="share-post">
  96.                 <?php if( function_exists('zilla_likes') ) : ?> <?php zilla_likes(); ?> / <?php endif; ?><a class="facebook" href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>" target="blank"><i class="icon-thumbs-up"></i> <?php _e('Like', 'framework'); ?></a> / <a href="http://twitter.com/home?status=<?php the_title(); ?> - <?php the_permalink();?>" target="blank" class="twitter"><i class="icon-twitter"></i> <?php _e('Tweet', 'framework'); ?></a>
  97.             </div>
  98.  
  99.             <div class="comments-message">
  100.                 <?php if(get_option('icy_comments_message') == '') : ?>
  101.                     <?php _e('Write us your thoughts about this post. Be kind & Play nice.', 'framework'); ?>
  102.                 <?php else : ?>
  103.                     <?php echo get_option('icy_comments_message'); ?>
  104.                 <?php endif; ?>    
  105.             </div>
  106.  
  107.         </div>
  108.         <?php else : // if comments are closed ?>
  109.        
  110.         <?php if (is_single()) { ?><p class="nocomments"><?php _e('Comments are closed.', 'framework') ?></p><?php } ?>
  111.  
  112.         <?php endif; ?>
  113.        
  114. <?php endif;
  115.  
  116.  
  117. /*-----------------------------------------------------------------------------------*/
  118. /*  Comment Form
  119. /*-----------------------------------------------------------------------------------*/
  120.  
  121.     if ( comments_open() ) : ?>
  122.    
  123.     <div id="respond" class="span12" style="margin-left: 0">
  124.  
  125.         <h3 class="no-bottom"><?php comment_form_title( __('Leave a reply.', 'framework'), __('Reply to %s', 'framework') ); ?></h3>
  126.  
  127.         <div class="cancel-comment-reply">      
  128.             <?php cancel_comment_reply_link(); ?>
  129.         </div>
  130.  
  131.         <?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>   
  132.         <p><?php printf(__('You must be %1$slogged in%2$s to post a comment.', 'framework'), '<a href="'.get_option('siteurl').'/wp-login.php?redirect_to='.urlencode(get_permalink()).'">', '</a>') ?></p>
  133.         <?php else : ?>
  134.    
  135.         <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" class="span12" id="comments-form" style="margin-left: 0">
  136.  
  137.             <?php if ( is_user_logged_in() ) : ?>      
  138.             <p><?php printf(__('Logged in as %1$s. %2$sLog out &raquo;%3$s', 'framework'), '<a href="'.get_option('siteurl').'/wp-admin/profile.php">'.$user_identity.'</a>', '<a href="'.(function_exists('wp_logout_url') ? wp_logout_url(get_permalink()) : get_option('siteurl').'/wp-login.php?action=logout" title="').'" title="'.__('Log out of this account', 'framework').'">', '</a>') ?></p>       
  139.             <?php else : ?>
  140.        
  141.             <p>
  142.             <input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="20" tabindex="1"
  143.                 placeholder="<?php _e('Your Name *', 'framework'); ?>" />
  144.             </p>
  145.        
  146.             <p>
  147.             <input type="text" name="email"  id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="20" tabindex="2" placeholder="<?php _e('Your Email *', 'framework'); ?>" />
  148.             </p>
  149.        
  150.             <p>
  151.             <input type="text" name="url" id="url" size="20" tabindex="3" placeholder="<?php _e('Your Website', 'framework'); ?>" />
  152.             </p>
  153.        
  154.             <?php endif; ?>
  155.        
  156.             <p>
  157.             <textarea name="comment" id="comment" cols="55" rows="10" tabindex="4" placeholder="<?php _e('Write your message here.', 'framework'); ?>"></textarea>
  158.             </p>       
  159.        
  160.             <p class="no-bottom">
  161.             <input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'framework') ?>" />
  162.             <?php comment_id_fields(); ?>
  163.             </p>
  164.             <?php do_action('comment_form', $post->ID); ?>
  165.    
  166.         </form>
  167.  
  168.     <?php endif; // If registration required and not logged in ?>
  169.     </div>
  170.     <?php endif; // if you delete this the sky will fall on your head ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement