HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Problem with Comment Formatting
Post new topic   Reply to topic    HTML Help Forum Index -> Templates
View previous topic :: View next topic  
Author Message
mandikaye



Joined: 29 Jan 2008
Posts: 4

PostPosted: Fri Feb 08, 2008 6:51 pm     Problem with Comment Formatting Reply with quote

I've installed two new templates on my site (www.mandikaye.com) from skinpress.com, and both of them have screwy formatting in the comments section, and I can't figure out how to fix it.

A hard return should insert a <p>, but there is no spacing between lines, not matter how often you hit return.

How can I make it so the spacing is correct?
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8269
Location: Castle Rock CO USA

PostPosted: Sat Feb 09, 2008 9:06 am     Reply with quote



What's the source code in there? Where are you hitting "return" - in a CMS / WYSIWYG editor? If so this might not be converting properly

_________________
Corey
Toll Free Fax Solutions | Mile High Merchant Accounts | Expression Web Blog
mandikaye



Joined: 29 Jan 2008
Posts: 4

PostPosted: Sat Feb 09, 2008 11:01 am     Reply with quote

People enter comments on individual posts - here for example http://www.mandikaye.com/2008/02/06/lent-goodbye-tv/


The code for the comments is:


<?php // Do not delete these lines
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');

if (!empty($post->post_password)) { // if there's a password
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
?>

<p class="nocomments">This post is password protected. Enter the password to view comments.<p>

<?php
return;
}
}

/* This variable is for alternating comment background */
$oddcomment = 'alt';
?>

<!-- You can start editing here. -->

<?php if ($comments) : ?>
<a id="comments"></a>
<div class="blog_comm">
<div class="comm_title">
Comments
</div>
<!--<div class="comm_count">
<?php comments_number('0 Comments', '1 Comment', '% Comments' );?> posted on "<?php the_title(); ?>"
</div>-->
<?php foreach ($comments as $comment) : ?>

<div class="comm_data">
<div class="comm_data_pad">
<b><?php comment_author_link() ?></b> on <?php comment_date('F jS, Y') ?> at <?php comment_time() ?> #
</div>
</div>
<div class="comm_text">
<?php comment_text() ?>
</div>
<div class="bl_line"></div>

<?php /* Changes every other comment to a different class */
if ('alt' == $oddcomment) $oddcomment = '';
else $oddcomment = 'alt';
?>

<?php endforeach; /* end for each comment */ ?>

</div>

<?php else : // this is displayed if there are no comments so far ?>

<?php if ('open' == $post->comment_status) : ?>
<!-- If comments are open, but there are no comments. -->

<?php else : // comments are closed ?>
<!-- If comments are closed. -->
<p class="nocomments">Comments are closed.</p>

<?php endif; ?>
<?php endif; ?>


<?php if ('open' == $post->comment_status) : ?>

<div id="comm_form">

<?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 : ?>

<div class="form_table">
<div id="form_title">
<div id="form_title_text">Post a comment</div>
</div>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<table cellpadding="2">

<?php if ( $user_ID ) : ?>

<tr>
<td align="right" width="110"></td>
<td>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="Log out of this account">Logout &raquo;</a></td>
</tr>

<?php else : ?>

<tr>
<td align="right" width="110">Name:&nbsp;</td>
<td><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="30" tabindex="1" /></td>
</tr>
<tr>
<td align="right">Email:&nbsp;</td>
<td><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="30" tabindex="2" /></td>
</tr>
<tr>
<td align="right">URL:&nbsp;</td>
<td><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="30" tabindex="3" /></td>
</tr>

<?php endif; ?>

<!--<p><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small></p>-->
<tr>
<td align="right" valign="top">Comments:&nbsp;</td>
<td><textarea cols="38" rows="5" name="comment" id="comment"></textarea></td>
</tr>
<tr>
<td></td>
<td>
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
<input type="image" src="<?php bloginfo('stylesheet_directory'); ?>/images/sub.png" id="submit" class="sub" tabindex="5" />
</td>
</tr>

</table>
<?php do_action('comment_form', $post->ID); ?>
</form>
<div class="form_comm_end"></div>
</div>

<?php endif; // If registration required and not logged in ?>
</div>

<?php endif; // if you delete this the sky will fall on your head ?>
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8269
Location: Castle Rock CO USA

PostPosted: Sat Feb 09, 2008 2:35 pm     Reply with quote

Code:
<textarea cols="38" rows="5" name="comment" id="comment"></textarea>
You would need to use some type of WYSIWYG editor so that it would create the extra spaces when someone hits the enter button. Right now, that's just a text box so all you are getting is plain text.

FCKEditor is one that a lot of people use.

_________________
Corey
Toll Free Fax Solutions | Mile High Merchant Accounts | Expression Web Blog
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> Templates All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial