Forums

Pop-up Comments (5 posts)

  1. esco4466
    Member
    Posted 4 months ago #

    I am using comments-popup.php I have had people visit my blog saying that they have commented and the comments don't show up. Sometimes they do sometimes they dont.

    here is the comments -popup php

    <?php
    /**
     * @package WordPress
     * @subpackage Classic_Theme
     */
    ?><!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_option('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_option('blog_charset'); ?>" />
    	<style type="text/css" media="screen">
    		@import url( <?php bloginfo('stylesheet_url'); ?> );
    		body { margin: 5px; background: #E0DDD4; }
    	</style>
    
    </head>
    <body id="commentspopup">
    
    <?php
    /* Don't remove these lines. */
    add_filter('comment_text', 'popuplinks');
    if ( have_posts() ) :
    while( have_posts()) : the_post();
    ?>
    
    <?php if ('open' == $post->ping_status)  ?>
    
    <center>
    <div id="header-popup">
    
    </div>
    </center>
    
    <?php
    // this line is WordPress' motor, do not delete it.
    $commenter = wp_get_current_commenter();
    extract($commenter);
    $comments = get_approved_comments($id);
    $commentstatus = get_post($id);
    if ( post_password_required($commentstatus) ) {  // and it doesn't match the cookie
    	echo(get_the_password_form());
    } else { ?>
    
    <?php if ($comments) { ?>
    
    <?php } else { // this is displayed if there are no comments so far ?>
    	<p>No comments yet.</p>
    <?php } ?>
    
    <?php if ('open' == $post->comment_status) { ?>
    <div class="popup-formleft">
    
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    <?php if ( $user_ID ) : ?>
    <p><?php printf(__('Logged in as %s.'), '<a href="'.get_option('siteurl').'/wp-admin/profile.php">'.$user_identity.'</a>'); ?> <a href="<?php echo wp_logout_url(); ?>" title="<?php echo attribute_escape(__('Log out of this account')); ?>"><?php _e('Log out &raquo;'); ?></a></p>
    
    <?php else : ?>
    
    	 <label for="author"><?php _e("{name}"); ?></label><br />
    
    	  <input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" /><br />
    
             <label for="email"><?php _e("{email}"); ?></label><br />
    
    	  <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="28" tabindex="2" /><br />
    
             <label for="url"><?php _e("<abbr title=\"Universal Resource Locator\">{url}</abbr>"); ?></label><br />
    
    	  <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" /><br />
    
             <p><a href="javascript:window.close()"><?php _e("{close window}"); ?></a></p>
    
    <?php endif; ?>
    </div>
    <div class="popup-formright">
    	<p>
    	  <label for="comment"><?php _e("{comments warm my heart}"); ?></label>
    	<br />
    	  <textarea name="comment" id="comment" cols="25" rows="6" tabindex="4"></textarea>
    	</p>
    
    	<p>
    	  <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    	  <input type="hidden" name="redirect_to" value="<?php echo attribute_escape($_SERVER["REQUEST_URI"]); ?>" />
    	  <input name="submit" type="submit" tabindex="5" value="<?php _e("{submit}"); ?>" onclick="self.close()" />
    	</p>
    	<?php do_action('comment_form', $post->ID); ?>
    
    </form>
    <?php } else { // comments are closed ?>
    <p><?php _e("Sorry, the comment form is closed at this time."); ?></p>
    <?php }
    } // end password check
    ?>
    
    </div>
    
    <?php // if you delete this the sky will fall on your head
    endwhile; //endwhile have_posts()
    else: //have_posts()
    ?>
    <p>Sorry, no posts matched your criteria.</p>
    <?php endif; ?>
    
    <!-- // this is just the end of the motor - don't touch that line either :) -->
    <?php //} ?>
    
    <?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>

    I would love for them to work and also for them to automatically (ajax style, javascript, whatever) show up in the comments box.

    any ideas? thanks so much, here is the site

  2. esco4466
    Member
    Posted 4 months ago #

  3. esco4466
    Member
    Posted 4 months ago #

    it might be that it doesn't work in Safari...

    any help?

  4. esco4466
    Member
    Posted 4 months ago #

    bump

  5. esco4466
    Member
    Posted 4 months ago #

    hello?

Reply

You must log in to post.

About this Topic