WordPress.org

Forums

login problems (8 posts)

  1. babyqrl84
    Member
    Posted 11 years ago #

    the script had been working fine, except that today I added a my-hacks.php and now I got this error:
    Warning: Cannot modify header information - headers already sent by (output started at /home/sandy/public_html/my-hacks.php:3) in /home/sandy/public_html/wp-login.php on line 254
    Warning: Cannot modify header information - headers already sent by (output started at /home/sandy/public_html/my-hacks.php:3) in /home/sandy/public_html/wp-login.php on line 255
    Warning: Cannot modify header information - headers already sent by (output started at /home/sandy/public_html/my-hacks.php:3) in /home/sandy/public_html/wp-login.php on line 256
    Warning: Cannot modify header information - headers already sent by (output started at /home/sandy/public_html/my-hacks.php:3) in /home/sandy/public_html/wp-login.php on line 257
    Warning: Cannot modify header information - headers already sent by (output started at /home/sandy/public_html/my-hacks.php:3) in /home/sandy/public_html/wp-login.php on line 258

  2. babyqrl84
    Member
    Posted 11 years ago #

    I also get this script in my comments:
    Parse error: parse error in /home/sandy/public_html/wp-comments-popup.php on line 120

  3. babyqrl84
    Member
    Posted 11 years ago #

    i dont understand lines, so here's what I have:
    <?php
    /* Don't remove these lines. */
    $blog = 1;
    require ('wp-blog-header.php');
    add_filter('comment_text', 'popuplinks');
    foreach ($posts as $post) { start_wp();
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title><?php echo $blogname ?> - Comments on "<?php the_title() ?>"</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style type="text/css" media="screen">
    @import url( wp-layout.css );
    body { margin: 3px; }
    </style>
    </head>
    <body id="commentspopup">
    <h1 id="header">"><?php echo $blogname ?></h1>
    <h2 id="comments">Comments</h2>
    /wp-commentsrss2.php?p=<?php echo $post->ID; ?>">RSS feed for comments on this post.
    <?php if ('open' == $post->ping_status) { ?>
    The URI to TrackBack this entry is: <?php trackback_url() ?>
    <?php } ?>
    <?php
    // this line is WordPress' motor, do not delete it.
    $comment_author = (isset($HTTP_COOKIE_VARS['comment_author_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_'.$cookiehash]) : '';
    $comment_author_email = (isset($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash]) : '';
    $comment_author_url = (isset($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash]) : '';
    $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");
    $commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $tableposts WHERE ID = $id");
    if (!empty($commentstatus->post_password) && $HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $commentstatus->post_password) { // and it doesn't match the cookie
    echo(get_the_password_form());
    } else { ?>
    <?php if ($comments) { ?>
    <ol id="commentlist">
    <?php foreach ($comments as $comment) { ?>
    <li id="comment-<?php comment_ID() ?>">
    <?php comment_text() ?>
    <cite><?php comment_type(); ?> by <?php comment_author_link() ?> — <?php comment_date() ?> @ "><?php comment_time() ?></cite>

  4. <?php } // end for each comment ?>

<?php } else { // this is displayed if there are no comments so far ?>
No comments yet.
<?php } ?>
<?php if ('open' == $commentstatus->comment_status) { ?>
<h2>Leave a Comment</h2>
Line and paragraph breaks automatic, website trumps email, HTML allowed: <?php echo allowed_tags(); ?>
<form name="commentform" action="<?php echo $siteurl; ?>/wp-comments-post.php" method="post" id="commentform">
<label for="author">Your name:</label>
<input type="text" name="author" id="author"
class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
<input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($_SERVER["REQUEST_URI"]); ?>" />
<label for="email">Your email:</label>
<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="28" tabindex="2" />
<label for="url">Your URL:</label>
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" />
Click on a smilie to add it to your comment!
<script language="JavaScript" type="text/javascript">
function bbinsert(formObj, strIns, strInsClose )
{ theSelection = false;
if (document.selection)
{
formObj.comment.focus();
theSelection = document.selection.createRange().text;
document.selection.createRange().text = strIns + theSelection+strInsClose;
formObj.comment.focus();
theSelection = false;
return;
}
formObj.comment.value += strIns + strInsClose;
formObj.comment.focus();
return;
}
</script>
<?php
foreach($wpsmiliestrans as $smiley => $img)
{
print '<img src="'.$smilies_directory.'/'.$img.'" alt="'.$smiley.'"
class="middle" onClick="bbinsert(document.commentform,\'\', \''.str_replace("'","\'",$smiley).'\')" /> ';
}
?>
<label for="comment">Your Comment:</label>
<textarea name="comment" id="comment" cols="40" rows="10" tabindex="4"></textarea>
<input class="button" type="submit" value="Say it!" />
</form>
<?php } else { // comments are closed ?>
Sorry, comments are closed at this time.
<?php } ?>
<div>Go back.</div>
<?php // if you delete this the sky will fall on your head
}
?>
I added the clickable smilies hack today.

  • Mark (podz)
    Support Maven
    Posted 11 years ago #

    If that is the whole file, then indeed, the sky is falling in on your head :)
    You need this at the bottom, right under the ?> that is at the bottom of your post.
    Or, chuck me an email to podz@ukbodyart.org, and I'll send you mine I just added that hack to mine, so see my page, and if that's what you want, I'll mail it to you.
    <!-- // this is just the end of the motor - don't touch that line either :) -->
    <?php //} ?>
    <p class="credit"><?php timer_stop(1); ?> <cite>Powered by WordPress</cite>
    <?php // Seen at http://www.mijnkopthee.nl/log2/archive/2003/05/28/esc(18) ?>
    <script type="text/javascript">
    <!--
    document.onkeypress = function esc(e) {
    if(typeof(e) == "undefined") { e=event; }
    if (e.keyCode == 27) { self.close(); }
    }
    // -->
    </script>
    </body>
    </html>

  • Mark (podz)
    Support Maven
    Posted 11 years ago #

    Ack.. I'll encode it
    <!-- // this is just the end of the motor - don't touch that line either :) -->
    <?php //} ?>
    <p class="credit"><?php timer_stop(1); ?> <cite>Powered by WordPress</cite>
    <?php // Seen at http://www.mijnkopthee.nl/log2/archive/2003/05/28/esc(18) ?>
    <script type="text/javascript">
    <!--
    document.onkeypress = function esc(e) {
    if(typeof(e) == "undefined") { e=event; }
    if (e.keyCode == 27) { self.close(); }
    }
    // -->
    </script>
    </body>
    </html>

  • babyqrl84
    Member
    Posted 11 years ago #

    Now I have an error on line 142 of the template

  • babyqrl84
    Member
    Posted 11 years ago #

    Would it have anything to do with those backslashes?

  • babyqrl84
    Member
    Posted 11 years ago #

    it worked after i re-put in the script again

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags

    No tags yet.