• Andrew

    (@andrewkantor)


    (Sorry for the multiple posts, but it doesn’t seem to like the code markup!)

    I love the idea of this plugin, but, well, nothing happens when I install and activate it. I should say that nothing happens in my customized theme; it works if I switch to the WordPress Classic theme.

    Obviously I’m doing something wrong. Here’s the relevant section of my comments.php file:

    <?php if (comments_open()) : ?>


    <form action=”https://www.kantor.com/blog/wp-comments-post.php&#8221; method=”post” id =”commentform”>
    <h3>Weigh in</h3>

    <p><small>Yer name:</small>
    <input type=”text” name=”author” size=”21″ value=”<?php echo $comment_author; ?>” tabindex=”1″ /></p>

    <p><small>Yer e-mail (so I can respond privately — never ever shared):</small>
    <input type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” size=”40″ tabindex=”2″ /></p>

    <p><small>Yer Web site (if you like):</small>
    <input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”22″ tabindex=”3″ /></p>

    <p><small>What you have to say (Be civil, or it might be removed; comments with linksmight be held for moderation, just so you know):</small>
    <textarea name=”comment” cols=”50″ rows=”10″ tabindex=”4″></textarea>

    <input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”Submit Comment” />
    <input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” />
    </p>
    <?php do_action(‘comment_form’, $post->ID); ?>
    <?php live_preview(); ?>
    <?php endif; ?>
    ‘</form&gt

    Any help you can give would be most appreciated — thanks!

    Andrew

Viewing 6 replies - 16 through 21 (of 21 total)
  • FIXED!!!!

    When I did both of happygiraffe’s edits, the plugin didn’t work. As it turned out, all I needed to do was happygiraffe’s second edit:
    change line 153 from if (eml != ”) { to if (eml) {

    His edit for line 158 probably works on some operating systems but not others. To make the plugin OS-independent, I think the code should replace line 158 with these two lines:
    str_replace(“\r”, ” “, $previewFormat);
    str_replace(“\n”, ” “, $previewFormat);

    This will replace each possible return character separately. Also, note that instead of replacing the characters with the empty string, they’re replaced by a space. This is in case $previewFormat has two English words separated across two lines — it would be add for the str_replace to concatenate them.

    Thanks happygiraffe for fixing this plugin. There is only one thing that isn’t properly fixed and it’s the gravatar of members: it, on my blog, isn’t shown but instead there is default avatar. I think that it’s due to old code in getting avatar from gravatar.com. Is it possible to change it and putting gravatar function of WP 2.5?
    Thanks in advance.

    Version 1.9 contains the fixes in this thread. Thanks to happygiraffe for submitting your fixes and everyone else for testing and confirming them.

    Hi Bradt,

    Just upgraded to 1.9 and it does *not* appear to include the crucial fix:

    if (eml)

    I am using WP 2.5.1 and nothing happens without the fix above. I reapplied to 1.9 and now everything is fine.

    Like a1r, the plugin is not working for me, even with the fix…
    (WP-2.5.1,LCP-1.9)

    Trying to use it in WordPress 2.6. Maybe this is the issue. But in fact it is not working for me neither ??

    Any idea?

    Thanks,
    marc

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘live-comment-preview doesn’t work’ is closed to new replies.