WordPress.org

Ready to get started?Download WordPress

Forums

pop up error (1 post)

  1. giles
    Member
    Posted 9 years ago #

    Fatal error: Call to undefined function: add_filter() in /home/httpd/vhosts/digideep.com/subdomains/yup/httpdocs/test/news/wp-content/themes/classic/comments-popup.php on line 3

    why would i be getting that error ? It has worked I have modified some pages but not that one shouldn't it still work ?

    '<?php
    /* Don't remove these lines. */
    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 get_settings('blogname'); ?> - <?php echo sprintf(__("Comments on %s"), the_title('','',false)); ?></title>

    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
    <style type="text/css" media="screen">
    @import url( <?php bloginfo('stylesheet_url'); ?> );
    body { margin: 3px; }
    </style>

    </head>
    <body id="commentspopup">

    <h1 id="header">"><?php echo get_settings('blogname'); ?></h1>

    <h2 id="comments"><?php _e("Comments"); ?></h2>

    /wp-commentsrss2.php?p=<?php echo $post->ID; ?>"><?php _e("RSS feed for comments on this post."); ?>

    <?php if ('open' == $post->ping_status) { ?>
    <?php _e("The URI to TrackBack this entry is:"); ?> <?php trackback_url() ?>
    <?php } ?>

    <?php
    // this line is WordPress' motor, do not delete it.
    $comment_author = (isset($_COOKIE['comment_author_' . COOKIEHASH])) ? trim($_COOKIE['comment_author_'. COOKIEHASH]) : '';
    $comment_author_email = (isset($_COOKIE['comment_author_email_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_email_'. COOKIEHASH]) : '';
    $comment_author_url = (isset($_COOKIE['comment_author_url_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_url_'. COOKIEHASH]) : '';
    $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");
    $commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $wpdb->posts WHERE ID = $id");
    if (!empty($commentstatus->post_password) && $_COOKIE['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(__('Comment'), __('Trackback'), __('Pingback')); ?> <?php _e("by"); ?> <?php comment_author_link() ?> — <?php comment_date() ?> @ "><?php comment_time() ?></cite>

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

<?php } else { // this is displayed if there are no comments so far ?>
<?php _e("No comments yet."); ?>
<?php } ?>

<?php if ('open' == $commentstatus->comment_status) { ?>
<h2><?php _e("Leave a comment"); ?></h2>
<?php _e("Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed:"); ?> <?php echo allowed_tags(); ?>

<form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">

<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
<label for="author"><?php _e("Name"); ?></label>
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
<input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($_SERVER["REQUEST_URI"]); ?>" />

<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="28" tabindex="2" />
<label for="email"><?php _e("E-mail"); ?></label>

<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" />
<label for="url"><?php _e("URI"); ?></label>

<label for="comment"><?php _e("Your Comment"); ?></label>

<textarea name="comment" id="comment" cols="70" rows="4" tabindex="4"></textarea>

<input name="submit" type="submit" tabindex="5" value="<?php _e("Say It!"); ?>" />

<?php do_action('comment_form', $post->ID); ?>
</form>
<?php } else { // comments are closed ?>
<?php _e("Sorry, the comment form is closed at this time."); ?>
<?php }
} // end password check
?>

<div><?php _e("Close this window."); ?></div>

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

<!-- // this is just the end of the motor - don't touch that line either :) -->
<?php //} ?>
<p class="credit"><?php timer_stop(1); ?> <?php echo sprintf(__("<cite>Powered by WordPress</cite>"),__("Powered by WordPress, state-of-the-art semantic personal publishing platform.")); ?>
<?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>
'

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.