Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2011
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.37 KB | None | 0 0
  1. <?php
  2. global $options;
  3. foreach ($options as $value) {
  4.     if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
  5. }
  6.  
  7. ?>
  8. <?php if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  9.         die ('Please do not load this page directly. Thanks!');
  10.      
  11.     if ( post_password_required() ) { ?>
  12.     <p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'wpzoom' ); ?></p>
  13. <?php return;   } ?>
  14.  
  15.  
  16. <?php if ( have_comments() ) : ?>
  17.  
  18.     <h3><?php comments_number( __('No Comments', 'wpzoom'), __('1 Comment', 'wpzoom'), __('% Comments', 'wpzoom')); ?></h3>
  19.  
  20.     <ul class="comment-list">
  21.     <?php wp_list_comments('type=comment&avatar_size=16&callback=mytheme_comment');?>
  22.     </ul>
  23.    
  24.     <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
  25.     <div class="navigation">
  26.         <div class="alignleft"><?php previous_comments_link( __('Previous Comments', 'wpzoom')); ?></div>
  27.         <div class="alignright"><?php next_comments_link( __('Next Comments', 'wpzoom')); ?></div>
  28.     </div>
  29.     <?php endif; // check for comment navigation ?>
  30.    
  31.     <?php else : // this is displayed if there are no comments so far ?>
  32.  
  33.  
  34.     <?php if ('open' == $post->comment_status) : ?><!-- If comments are open, but there are no comments. -->
  35.    
  36.         <div id="commentspost">
  37.              
  38.         </div>
  39.        
  40.        
  41.     <?php else : // comments are closed ?><!-- If comments are closed. -->
  42.  
  43.         <h3><?php _e('Comments are closed', 'wpzoom'); ?></h3>
  44.  
  45.     <?php endif; ?>
  46.    
  47.    
  48. <?php endif; ?>
  49.  
  50.  
  51. <?php if ('open' == $post->comment_status) : ?>
  52.  
  53.     <div id="respond">
  54.  
  55.         <h3><?php comment_form_title( __('Leave a Reply', 'wpzoom' ), __('Leave a Reply to %s', 'wpzoom')); ?></h3>
  56.        
  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.            
  61.             <p><?php _e('You must be', 'wpzoom') ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>"><?php _e('logged in', 'wpzoom') ?></a> <?php _e('to post a comment.', 'wpzoom') ?></p>
  62.  
  63.             <?php else : ?>
  64.  
  65.            
  66.         <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  67.  
  68.          <div id="formLabels">
  69.             <?php if ( $user_ID ) : ?>
  70.            
  71.             <p><?php _e('Logged in as', 'wpzoom') ?> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(); ?>" title="<?php _e('Log out of this account', 'wpzoom') ?>"><?php _e('Logout', 'wpzoom') ?> &raquo;</a></p>
  72.            
  73.  
  74.         <?php else : ?>
  75.  
  76.            
  77.  
  78.                 <p><label for="author"><?php _e('Name:', 'wpzoom') ?></label> <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="4" tabindex="1" /> <?php if ($req) echo "&mdash; مطلوب *"; ?></p>
  79.  
  80.                 <p><label for="email"><?php _e('Email:', 'wpzoom') ?></label> <input type="text"name="email" id="email" value="<?php echo $comment_author_email; ?>" size="4" tabindex="2"  /> <?php if ($req) echo "&mdash; مطلوب *"; ?></p>
  81.  
  82.                 <p><label for="url"><?php _e('Website:', 'wpzoom') ?></label> <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="4" tabindex="3" /></p>
  83.            
  84.  
  85.             <?php endif; ?>
  86.                
  87.                 <p><label for="comment"><?php _e('Message:', 'wpzoom') ?></label> <textarea name="comment" id="comment" tabindex="4" rows="10" cols="140"></textarea></p>
  88.            
  89.                 <input name="submit" type="submit" id="submit" class="button" value="<?php _e('Submit Comment', 'wpzoom') ?>" />
  90.             </div>
  91.             <?php comment_id_fields(); ?>
  92.             <?php do_action('comment_form', $post->ID); ?>
  93.         <div class="clear"></div>
  94.         </form>
  95.        
  96.     <?php endif; // If registration required and not logged in ?>
  97.    
  98.     </div>
  99.    
  100.     <?php if ($wpzoom_trackbacks == 'Show') { ?>
  101.     <div id="trackbacks">
  102.     <h3><?php _e('Trackbacks', 'wpzoom'); ?></h3>
  103.     <ol>
  104.        <?php //Displays trackbacks only
  105.         foreach ($comments as $comment) : ?>
  106.              
  107.             <?php $comment_type = get_comment_type(); ?>
  108.  
  109.             <?php if($comment_type != 'comment') { ?>
  110.             <li><?php comment_author_link() ?></li>
  111.         <?php }
  112.         endforeach; ?>
  113.  
  114.     </ol>
  115.     </div>
  116.    
  117.     <?php } ?>
  118.        
  119.    
  120. <?php endif; // if you delete this the sky will fall on your head ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement