[wp-cvs] wordpress/wp-content/themes/default comments.php,1.5,1.6

Matthew Mullenweg saxmatt at users.sourceforge.net
Mon Jan 31 06:38:13 GMT 2005


Update of /cvsroot/cafelog/wordpress/wp-content/themes/default
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12524/wp-content/themes/default

Modified Files:
	comments.php 
Log Message:
Comment registration goodness. Hat tip to Jason at noprequisite.com for user_identity code.

Index: comments.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-content/themes/default/comments.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** comments.php	31 Jan 2005 04:22:01 -0000	1.5
--- comments.php	31 Jan 2005 06:38:11 -0000	1.6
***************
*** 34,49 ****
  			<br />
  
- 			
- 			
  			<small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('e','',''); ?></small>
! 			
  			<?php comment_text() ?>
! 			
  		</li>
! 		
! 		<?php /* Changes every other comment to a different class */	
! 			if ('alt' == $oddcomment) $oddcomment = '';
! 			else $oddcomment = 'alt';
! 		?>
  
  	<?php endforeach; /* end for each comment */ ?>
--- 34,47 ----
  			<br />
  
  			<small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('e','',''); ?></small>
! 
  			<?php comment_text() ?>
! 
  		</li>
! 
! 	<?php /* Changes every other comment to a different class */	
! 		if ('alt' == $oddcomment) $oddcomment = '';
! 		else $oddcomment = 'alt';
! 	?>
  
  	<?php endforeach; /* end for each comment */ ?>
***************
*** 67,74 ****
  
  <h3 id="respond">Leave a Reply</h3>
! <form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  
  <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
- <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
  <label for="author"><small>Name <?php if ($req) _e('(required)'); ?></small></label></p>
  
--- 65,82 ----
  
  <h3 id="respond">Leave a Reply</h3>
! 
! <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
! <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
! <?php else : ?>
! 
! <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
! 
! <?php if ( $user_ID ) : ?>
! 
! <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>">Logout &raquo;</a></p>
! 
! <?php else : ?>
  
  <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
  <label for="author"><small>Name <?php if ($req) _e('(required)'); ?></small></label></p>
  
***************
*** 79,90 ****
  <label for="url"><small>Website</small></label></p>
  
  <!--<p><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small></p>-->
  
  <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
  
! <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" /></p>
  <?php do_action('comment_form', $post->ID); ?>
  
  </form>
  
  <?php endif; // if you delete this the sky will fall on your head ?>
\ No newline at end of file
--- 87,104 ----
  <label for="url"><small>Website</small></label></p>
  
+ <?php endif; ?>
+ 
  <!--<p><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small></p>-->
  
  <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
  
! <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
! <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
! </p>
  <?php do_action('comment_form', $post->ID); ?>
  
  </form>
  
+ <?php endif; // If registration required and not logged in ?>
+ 
  <?php endif; // if you delete this the sky will fall on your head ?>
\ No newline at end of file



More information about the cvs mailing list