WordPress.org

Ready to get started?Download WordPress

Forums

[ANN] Live Comment Preview (Plugin) (20 posts)

  1. chuyskywalker
    Member
    Posted 9 years ago #

    Add live comment previews quickly and easily. Just install and activate the plugin - you're done!

    Live Comment Previews

    Only works with WordPress 1.5

  2. philpeeps
    Member
    Posted 9 years ago #

    this works when not logged in, but does not work when logged in....

    other than that, good work...

  3. philpeeps
    Member
    Posted 9 years ago #

    also, the commentPreview div is spelled commentPreivew

  4. trendsurfer
    Member
    Posted 9 years ago #

    Very cool....but as stated above, it doesn't work if logged in.

  5. Mark (podz)
    Support Maven
    Posted 9 years ago #

    I'm logged in and it works great !

    Suggested CSS:

    #commentPreivew {
    background-color: #f9b56e;
    margin: 10px 10px;
    padding: 10px 10px;
    }

    thank you :)

  6. Anonymous
    Unregistered
    Posted 9 years ago #

    Installed it. It does work with the default wp-comments.php file included in WordPress 1.5. It does not work with the comments.php file of the WordPress classic theme if a user is logged into WordPress (the appropriate fields are missing). Had to make several changes to my comments.php file:

    Added:

    <?php global $user_email, $user_url; ?>
    <input type="hidden" name="author" id="author" value="<?php echo $user_identity; ?>" />
    <input type="hidden" name=email" id="email" value="<?php echo $user_email; ?>" />
    <input type="hidden" name="url" id="url" value="<?php echo $user_url; ?>" />

    After:

    <?php if ( $user_ID ) : ?>

    Logged in as <a href="<?php echo get_option("siteurl"); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option("siteurl"); ?>/wp-login.php?action=logout" title="<?php _e("Log out of this account") ?>">Logout &raquo;</a>

  7. trendsurfer
    Member
    Posted 9 years ago #

    Thanks Mark, I added that code directly after the "if" statement but before the "Logged in as ..." It worked like a charm.

    I'm sort of surprised it worked right out of the box for Podz unless he's using a nightly which had the code added since the 1.5 release.

    Again, a very cool plugin....Thanks Chuyskywalker.

    And Podz, thanks for the CSS.

  8. chuyskywalker
    Member
    Posted 9 years ago #

    Welcome. Mark, thanks for the heads up.

    Thank you all for the feed back. I have updated it with several changes:

    Safer JS
    If any of the fields (with the obvious exception of the comment textarea) are missing, the script will gracefully degrade. Mainly, it will work on the default "clasic" template, and also when logged in.

    Cahceable JS
    The plugin now can echo out the JS a little differently (check your <head> tag to see) so that browser might cache the script instead of including it every single page load.

    I'm so lysdexic
    commentPreview fixed ;)

    Again, thanks for the (rather immediate) feed back.

  9. bobeaston
    Member
    Posted 9 years ago #

    Doesn't work for me. I'm trying with WP 1.5. I've hacked the "default" theme quite a bit but only for appearance. Have not changed any IDs. I tried adding <?php live_preview(); ?> just above "Leave a reply" in comments.php, but all that does is insert an empty div with the ID commentPreview, nothing else.

    Being logged in or logged out doesn't matter.

    What did I miss?

    http://access-matters.com

  10. The link to the js file is probably what causes it not to work for you!

    change the following in the code:

    function lcp_add_js($ret) {
    echo('<script src="' . get_settings('siteurl') . '/wp-content/plugins/live-comment-preview.php/commentPreview.js" type="text/javascript"></script>');
    return $ret;
    }

    to

    function lcp_add_js($ret) {
    echo('<script src="' . get_settings('siteurl') . '/wp-content/plugins/live-comment-preview.php?commentPreview.js" type="text/javascript"></script>');
    return $ret;
    }

    e.g. / to ?

    westi

  11. Pplproof
    Member
    Posted 9 years ago #

    To anyone who's having trouble getting this plugin to work correctly, here's a fix that worked for me; big thanks to westi for this one! Go to Plugins >> Plugin Editor and open up 'live-comment-preview.php' Scroll down to near the bottom, where you'll find these lines:

    function lcp_add_js($ret) {
    echo('<script src="' . get_settings('siteurl') . '/wp-content/plugins/live-comment-preview.php/commentPreview.js" type="text/javascript"></script>');
    return $ret;

    Simply modify 'live-comment-preview.php/commentPreview.js' to 'live-comment-preview.php?commentPreview.js' and save. Voila! It should work now with no problems. :)

  12. rach3ldr3w
    Member
    Posted 9 years ago #

    I'm using wordpress 1.5. (the strayhorn version), and I'm still having a problem of the live preview box not showing up... I've added all the codes listed here and the CSS, but it's still not showing up. :/ It is activted, too, lol.

    I'm using mozilla firefox if that helps any...

    any ideas??

  13. Yay! I was having a problem using my original theme, but I finally figured it out!:
    My template was missing
    <?php wp_head(); ?>
    in its header.
    Added the above code right before
    </head>
    and it worked!

  14. Moodygirl
    Member
    Posted 9 years ago #

    It worked as soon as I logged out! Thanks!

  15. Torvon
    Member
    Posted 9 years ago #

    I have downloaded the file (version 1.6), but it shows 1.0 in my WP plugin control panel ...

  16. neoflox
    Member
    Posted 9 years ago #

    Hi!
    I have installed this plugin, too and it works practically fine for me - but I can't move the preview to the place, I want it to be.
    The <?php live_preview(); ?> doesn't change anything. Is it a common 'bug' or am I too stupid?

  17. Nicki Faulk
    Member
    Posted 8 years ago #

    I've run into something that I hadn't seen posted here (or at least not that the search could find, heh).

    I have LiveCommentPreview 1.7 installed on WP 1.5 and it works fine and dandy with a small bug. When my textarea box is "filled" and starts to scroll, it keeps trying to scroll up as you type. (so it's "jumpy")

    A friend of mine reported it to me and I've confirmed it on several different computers. I can recreate it consistently in Firefox both logged in and anonymously, but cannot recreate in IE. So I'm wondering if this is something that can be fixed?

    I have a post if anyone wants to post a 'test' comment to see what I'm talking about: http://www.nitallica.org/?p=314

    The plugin is unedited. I've downloaded a copy off http://dev.wp-plugins.org/wiki/LiveCommentPreview and the two are identical with the exception of whitespaces. (I compared with CSDiff)

    My theme has the "do_action('comment_form', $post->ID);" bit so I didn't have to do anything custom to get LCP to work.

    If you need more information, please let me know.

    I'm interested in knowing if anyone else has run across this, and if so, how to fix it.

  18. griffman
    Member
    Posted 8 years ago #

    I've had two users ask how to disable this feature -- they don't use HTML and just find it annoying. Any chance of getting a simple little "Disable Live Preview" checkbox that they could toggle each time they comment (or something like that)?

    -rob.

  19. bolo972
    Member
    Posted 8 years ago #

    the plugin work with WP 2?

  20. todand
    Member
    Posted 8 years ago #

    I can't get this plugin to work with a 3rd party theme. The theme has no comments.php file associated with it. Should I create one? If so where would I add the LCP line?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.