boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

I got an error after changing my template...Help PLEASE!

 
Post new topic   Reply to topic    boardom Forum Index -> Template help
View previous topic :: View next topic  
Author Message
Ditzyme



Joined: 19 May 2004
Posts: 1
Location: USA

PostPosted: Wed May 19, 2004 4:01 am    Post subject: I got an error after changing my template...Help PLEASE! Reply with quote

Question I'm so confused! I installed b2, and was trying to customize my b2 comments template. After I was done editing, I tested the comments and got this error:

Quote:
Warning: Cannot modify header information - headers already sent by (output started at /home/ritzypd/public_html/b2/b2config.php:354) in /home/ritzypd/public_html/b2/b2comments.post.php on line 122

Warning: Cannot modify header information - headers already sent by (output started at /home/ritzypd/public_html/b2/b2config.php:354) in /home/ritzypd/public_html/b2/b2comments.post.php on line 123

Warning: Cannot modify header information - headers already sent by (output started at /home/ritzypd/public_html/b2/b2config.php:354) in /home/ritzypd/public_html/b2/b2comments.post.php on line 124

Warning: Cannot modify header information - headers already sent by (output started at /home/ritzypd/public_html/b2/b2config.php:354) in /home/ritzypd/public_html/b2/b2comments.post.php on line 126

Warning: Cannot modify header information - headers already sent by (output started at /home/ritzypd/public_html/b2/b2config.php:354) in /home/ritzypd/public_html/b2/b2comments.post.php on line 127

Warning: Cannot modify header information - headers already sent by (output started at /home/ritzypd/public_html/b2/b2config.php:354) in /home/ritzypd/public_html/b2/b2comments.post.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /home/ritzypd/public_html/b2/b2config.php:354) in /home/ritzypd/public_html/b2/b2comments.post.php on line 129

Warning: Cannot modify header information - headers already sent by (output started at /home/ritzypd/public_html/b2/b2config.php:354) in /home/ritzypd/public_html/b2/b2comments.post.php on line 134


I really don't know what happened because I never edited the b2comments.post.php file! I only customized the b2commentspopup.php file. My blog can be found @ http://www.ritzy-ditzy.com if that helps any. I hope somebody out there can help me with this or can tell me what I've done wrong! Thanks so much!!! Oh yeah, here's the code for my b2commentspopup.php file in case that matters...

Code:
<?php /* Don't remove this line, it calls the b2 function files ! */
$blog=1; include ("blog.header.php"); while($row = mysql_fetch_object($result)) { start_b2();
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Blog Comments</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="reply-to" content="[email protected]" />
<meta http-equiv="imagetoolbar" content="no" />
<meta content="TRUE" name="MSSmartTagsPreventParsing" />

<style type="text/css" media="screen">
@import url( layout2b.css );
</style>
<link rel="stylesheet" type="text/css" media="print" href="b2-include/print.css" />
<link rel="alternate" type="text/xml" title="XML" href="<?php echo $siteurl ?>/b2rss.php" />

</head>
<body>

<div id="contentcomments">

<div class="storyContent">

<?php
$comment_author = (empty($HTTP_COOKIE_VARS["comment_author"])) ? "Name" : $HTTP_COOKIE_VARS["comment_author"];
$comment_author_email = (empty($HTTP_COOKIE_VARS["comment_author"])) ? "@" : trim($HTTP_COOKIE_VARS["comment_author_email"]);
$comment_author_url = (empty($HTTP_COOKIE_VARS["comment_author"])) ? "URL" : trim($HTTP_COOKIE_VARS["comment_author_url"]);

$queryc = "SELECT * FROM $tablecomments WHERE comment_post_ID = $id AND comment_content NOT LIKE '%<trackback />%' ORDER BY comment_date";
$resultc = mysql_query($queryc);
if ($resultc) {
?>



<!-- you can start editing here -->

<?php // these lines are b2's motor, do not delete
while($rowc = mysql_fetch_object($resultc)) {
   $commentdata = get_commentdata($rowc->comment_ID);
?><a name="c<?php comment_ID() ?>"></a>
   
<!-- comment -->
<hr color="1a1450" size="1">
<p><div align="right">
<b><?php comment_author() ?> <?php comment_author_email_link("@", " - ", "") ?><?php comment_author_url_link("URL", " - ", "") ?></b></div>
<br />
<?php comment_text() ?>
<br /><div align="right">
<?php comment_date() ?> @ <?php comment_time() ?>
</p></div>
<p> </p>
<!-- /comment -->


<?php //end of the loop, don't delete
}

?>

<Hr color="1A1450" size="1">


<!-- form to add a comment -->

<form action="b2comments.post.php" method="post" name="form">
   <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
   <input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($HTTP_SERVER_VARS["REQUEST_URI"]); ?>" />

   <p class="commentfield" align="center">
   Name<br />
   <input type="text" name="author" class="textarea" value="<?php echo $comment_author ?>" size="20" tabindex="1"
   onfocus="this.value=(this.value=='name') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'name' : this.value;" />
   </p>

   <p class="commentfield" align="center">
   Email<br />
   <input type="text" name="email" class="textarea" value="<?php echo $comment_author_email ?>" size="20" tabindex="2"
   onfocus="this.value=(this.value=='email') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'email' : this.value;" />
   </p>

   <p class="commentfield" align="center">
   URL<br />
   <input type="text" name="url" class="textarea" value="<?php echo $comment_author_url ?>" size="20" tabindex="3"
   onfocus="this.value=(this.value=='http://url') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'http://url' : this.value;" />
   </p>

   <p class="commentfield" align="center">
   Your comments<br />
   <textarea cols="40" rows="4" name="comment" tabindex="4" class="textarea"
    onfocus="this.value=(this.value=='comment') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'comment' : this.value;" >comment</textarea>
   </p>

<p align="center"><script language="JavaScript" type="text/javascript">
function emoticon(theSmilie) {
   theSmilie = ' ' + theSmilie + ' ';
   if (document.form.comment.createTextRange && document.form.comment.caretPos) {
      var caretPos = document.form.comment.caretPos;
      caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? theSmilie + ' ' : theSmilie;
   } else {
      document.form.comment.value  += theSmilie;
   }
   document.form.comment.focus();
   theSmilie = '';
}
</script>
<?php
$newrow = 0;
$prev_val="";
asort($b2smiliestrans);
while (list ($key, $val) = each ($b2smiliestrans)) {
            if($prev_val and $val==$prev_val) { }
            else if(!$prev_val or ($prev_val and $val!=$prev_val)){ 
?>

<img src="<?php echo "$smilies_directory/$val"; ?>" alt="<?php echo $key; ?>" border="0" onclick="emoticon('<?php echo $key; ?>')" onmouseover="style.cursor='hand'" />

<?php
                        $newrow++;

                        if($newrow == 8) { //new row after specified number of smilies
                                    echo '<br />';
                                    $newrow = 0;
                        }
            }
            $prev_val = $val;
}
?></p>

   <p class="commentfield" align="center">
   <input type="checkbox" name="comment_autobr" value="1" <?php
   if ($autobr)
   echo " checked=\"checked\"" ?> tabindex="6" /> Auto-BR (line-breaks become <br> tags)<br />
   <input type="submit" name="submit" style="background-color:#ffffff" class="buttonarea" value="Comment!" tabindex="5" />
   </p>

</form>

<!-- /form -->

<?php // if you delete this the sky will fall on your head
}
?>

</div>


<!-- // this is just the end of the motor - don't touch that line either :) -->
   <?php } ?>


</div>

<p class="centerP">
[Powered by <a href="http://cafelog.com" target="_blank"><b>b2</b></a>]
</p>


</body>
</html>


THANKS EVERYBODY! Smile
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Sigg3



Joined: 03 Jul 2003
Posts: 301
Location: Oslo, Norway

PostPosted: Wed May 19, 2004 8:55 am    Post subject: Reply with quote

That's strange. The post appears if you do a refresh after posting.... hmm..

If you never altered b2commentspopup.php, then the error must be in your b2config.php file...
_________________
Sigg3 dot net - because you're worth it!
Back to top
View user's profile Send private message Visit poster's website
stevem



Joined: 15 Mar 2003
Posts: 149

PostPosted: Wed May 19, 2004 9:38 am    Post subject: Reply with quote

It's the problem that always confuses people. You have got spaces or blank lines after the final ?> in b2config.php and PHP doesn't like it Sad Remove them and PHP will be happy Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Template help All times are GMT + 1 Hour
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


Powered by phpBB 2 © 2001, 2002 phpBB Group