src/web/app/themes/atahualpa/comments-paged.php
changeset 0 505fe5249d9c
equal deleted inserted replaced
-1:000000000000 0:505fe5249d9c
       
     1 <?php // Do not delete these lines
       
     2 if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments-paged.php' == basename($_SERVER['SCRIPT_FILENAME']))
       
     3 	die (__('Please do not load this page directly. Thanks!','atahualpa'));
       
     4 
       
     5 if (!empty($post->post_password)) { // if there's a password
       
     6 	if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie ?>
       
     7 		<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.','atahualpa'); ?></p>
       
     8 		<?php
       
     9 		return;
       
    10 	}
       
    11 }
       
    12 
       
    13 /* This variable is for alternating comment background */
       
    14 $oddcomment = 'class="alt clearfix" ';
       
    15 
       
    16 global $bfa_ata;
       
    17 // You can start editing below: 
       
    18 ?>
       
    19 
       
    20 <?php // If there are any comments
       
    21 if ($comments) : ?>
       
    22 
       
    23 	<a name="comments"></a><!-- named anchor for skip links -->
       
    24 	<h3 id="comments"><?php // Comment Area Title 
       
    25 	comments_number(__('No comments yet to ', 'atahualpa'), __('1 comment to ', 'atahualpa'), 
       
    26 	__('% comments to ', 'atahualpa')); echo get_the_title(); ?></h3>
       
    27 	
       
    28 	<!-- Comment page numbers -->
       
    29 	<?php if ($paged_comments->pager->num_pages() > 1): ?>
       
    30 	<p class="comment-page-numbers"><?php _e('Pages:','atahualpa'); ?> <?php paged_comments_print_pages(); ?></p>
       
    31 	<?php endif; ?>
       
    32 	<!-- End comment page numbers -->
       
    33 	
       
    34 	<!-- Comment List -->
       
    35 	<ol class="commentlist">
       
    36 		
       
    37 
       
    38 		<?php // Do this for every comment -->
       
    39 		foreach ($comments as $comment) : 
       
    40 		if ( ($bfa_ata['separate_trackbacks'] == "Yes" AND get_comment_type() == 'comment') 
       
    41 		OR $bfa_ata['separate_trackbacks'] == "No" ) { ?>
       
    42 
       
    43 		<li <?php if ( $bfa_ata['author_highlight'] == "Yes" AND $comment->comment_author_email == get_the_author_meta('email') ) { 
       
    44 				echo 'class="authorcomment clearfix" '; 
       
    45 			} else { 
       
    46 				echo $oddcomment; 
       
    47 			} ?> id="comment-<?php comment_ID() ?>">
       
    48 			
       
    49 			<?php // GRAVATAR
       
    50 			if( get_comment_type() == 'comment' AND $bfa_ata['avatar_size'] != 0 AND $bfa_ata['avatar_size'] != "" ) 
       
    51 					echo get_avatar($comment -> comment_author_email, $size=$bfa_ata['avatar_size']);
       
    52 			?>
       
    53 		
       
    54 			<div class="comment-number"><a href="<?php echo paged_comments_url('comment-'.get_comment_ID()); ?>" title=""><?php echo $comment_number; $comment_number += $comment_delta; ?></a></div>
       
    55 			
       
    56 			<span class="authorname"><?php // Comment Author
       
    57 			comment_author_link() ?></span>
       
    58 			
       
    59 			<?php // Awaiting Moderation Text
       
    60 			if ($comment->comment_approved == '0') : 
       
    61 			_e('Your comment is awaiting moderation.','atahualpa'); 
       
    62 			endif; ?>
       
    63 		
       
    64 			<br />
       
    65 			
       
    66 			<span class="commentdate">
       
    67 			<?php // Comment Date and Time
       
    68 			printf(__('%1$s at %2$s','atahualpa'), get_comment_date(__('F jS, Y','atahualpa')),  get_comment_time()) ?>
       
    69 			</span>
       
    70 			
       
    71 			<?php // Comment Text
       
    72 			comment_text() ?>
       
    73 			
       
    74 			<?php // Edit Comment Link
       
    75 			edit_comment_link(__('Edit','atahualpa'),'<span class="editcomment">','</span>'); ?>
       
    76 			
       
    77 
       
    78 		</li>
       
    79 
       
    80 		<?php $oddcomment = ( $oddcomment == 'class="clearfix" ' ) ? 'class="alt clearfix" ' : 'class="clearfix" '; 
       
    81 		
       
    82 		}
       
    83 		endforeach; 
       
    84 		// END of "Do this for every comment "
       
    85 		?>
       
    86 		
       
    87 		<?php // Do this for every trackback / pingpack 
       
    88 		if ($bfa_ata['separate_trackbacks'] == "Yes") {
       
    89 		foreach ($comments as $comment) : 
       
    90 		if ( get_comment_type() != 'comment') { ?>
       
    91 
       
    92 		<li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
       
    93 					
       
    94 			<div class="comment-number"><a href="<?php echo paged_comments_url('comment-'.get_comment_ID()); ?>" title=""><?php echo $comment_number; $comment_number += $comment_delta; ?></a></div>
       
    95 			
       
    96 			<?php // Comment Author
       
    97 			comment_author_link() ?>:
       
    98 			
       
    99 			<br />
       
   100 			
       
   101 			<?php // Comment Date and Time
       
   102 			printf(__('%1$s at %2$s','atahualpa'), get_comment_date(__('F jS, Y','atahualpa')),  get_comment_time()) ?>
       
   103 			
       
   104 			<?php // Edit Comment Link
       
   105 			edit_comment_link(__('Edit','atahualpa'),'&nbsp;&nbsp;',''); ?>
       
   106 			
       
   107 			<?php // Comment Text
       
   108 			comment_text() ?>
       
   109 
       
   110 		</li>
       
   111 
       
   112 		<?php $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : ''; 
       
   113 		
       
   114 		}
       
   115 		endforeach; 
       
   116 		}
       
   117 		// END of "Do this for every trackback / pingback "
       
   118 		?>
       
   119 	
       
   120 	</ol>
       
   121 	<!-- / Comment List -->
       
   122 
       
   123 	<!-- Comment page numbers -->
       
   124 	<?php if ($paged_comments->pager->num_pages() > 1): ?>
       
   125 	<p class="comment-page-numbers"><?php _e('Pages:','atahualpa'); ?> <?php paged_comments_print_pages(); ?></p>
       
   126 	<?php endif; ?>
       
   127 	<!-- End comment page numbers -->
       
   128 	
       
   129 <?php // END of "If there ARE any comments"
       
   130 else : ?>
       
   131 
       
   132 	<?php // If comments are open, but there are no comments:
       
   133 	if ('open' == $post->comment_status) : ?>
       
   134 	
       
   135 		<!-- .... -->
       
   136 
       
   137 	<?php // If comments are closed:
       
   138 	else : ?>
       
   139 	
       
   140 		<p><?php _e('Comments are closed.','atahualpa'); ?></p>
       
   141 		
       
   142 	<?php endif; ?>
       
   143 
       
   144 <?php // END of "If there are NO comments"
       
   145 endif; ?>
       
   146 
       
   147 <?php // If comments are open
       
   148 if ('open' == $post->comment_status) : ?>
       
   149 
       
   150 	<div id="respond">
       
   151 	
       
   152 	<a name="commentform"></a><!-- named anchor for skip links -->
       
   153 	<h3 class="reply"><?php _e('Leave a Reply','atahualpa'); ?></h3>
       
   154 		
       
   155 	<?php // If Login is required and User is not logged in 
       
   156 	if ( get_option('comment_registration') && !$user_ID ) : ?>
       
   157 	<p><?php printf(__('You must be %slogged in</a> to post a comment.', 'atahualpa'), '<a href="' . 
       
   158 	get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink()) . '">')?></p>
       
   159 
       
   160 	<?php // If Login is not required, or User is logged in 
       
   161 	else : ?>
       
   162 		
       
   163 		<!-- Comment Form -->
       
   164 		<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
       
   165 
       
   166 			<?php // If User is logged in
       
   167 			if ( $user_ID ) : ?>
       
   168 			<p>
       
   169 			<?php printf(__('Logged in as %s.', 'atahualpa'), '<a href="' . get_option('siteurl') . 
       
   170 			'/wp-admin/profile.php">' . $user_identity . '</a>')?> 
       
   171 			<a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="
       
   172 			<?php _e('Log out of this account','atahualpa'); ?>"><?php _e('Logout &raquo;','atahualpa'); ?></a>
       
   173 			</p>
       
   174 
       
   175 			<?php // If User is not logged in: Display the form fields "Name", "Email", "URL"
       
   176 			else : ?>
       
   177 			<p>
       
   178 			<input class="text author" type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="30" tabindex="1" />
       
   179 			<label for="<?php _e('author','atahualpa'); ?>"><?php _e('Name ','atahualpa'); 
       
   180 			if ($req) _e('(required)','atahualpa'); ?></label>
       
   181 			</p>
       
   182 			<p>
       
   183 			<input class="text email" type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="30" tabindex="2" />
       
   184 			<label for="<?php _e('email','atahualpa'); ?>"><?php _e('Mail (will not be published) ','atahualpa'); 
       
   185 			if ($req) _e('(required)','atahualpa'); ?></label>
       
   186 			</p>
       
   187 			<p>
       
   188 			<input class="text url" type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="30" tabindex="3" />
       
   189 			<label for="<?php _e('url','atahualpa'); ?>"><?php _e('Website','atahualpa'); ?></label>
       
   190 			</p>
       
   191 			<?php endif; ?>
       
   192 	
       
   193 		<!-- Display Quicktags or allowed XHTML Tags -->
       
   194 		<?php if (function_exists('lmbbox_comment_quicktags_display')) { echo "<p>"; lmbbox_comment_quicktags_display(); echo "</p>"; } 
       
   195 		else { if ($bfa_ata['show_xhtml_tags'] == "Yes") { ?>
       
   196 		<p class="thesetags clearfix"><?php printf(__('You can use %1$sthese HTML tags</a>','atahualpa'), '<a class="xhtmltags" href="#" onclick="return false;">'); ?></p>
       
   197 		<div class="xhtml-tags"><p><code><?php echo allowed_tags(); ?></code></p></div>
       
   198 		<?php } } ?>
       
   199 	
       
   200 		<!-- Comment Textarea -->
       
   201 		<p><textarea name="comment" id="comment" rows="10" cols="10" tabindex="4"></textarea></p>
       
   202 		<?php do_action('comment_form', $post->ID); ?>
       
   203 		
       
   204 		<!-- Submit -->
       
   205 		<p><input name="submit" type="submit" class="button" id="submit" tabindex="5" value="<?php _e('Submit Comment','atahualpa'); ?>" />
       
   206 		<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
       
   207 		</p>
       
   208 		
       
   209 		</form>
       
   210 		</div><!-- / respond -->
       
   211 		<!-- / Comment Form -->
       
   212 
       
   213 	<?php endif; ?>
       
   214 	<!-- / If Login is not required, or User is logged in -->
       
   215 	
       
   216 <?php endif; ?>
       
   217 <!-- If comments are open -->