Viewing 15 replies - 1 through 15 (of 19 total)
  • this works when not logged in, but does not work when logged in….

    other than that, good work…

    also, the commentPreview div is spelled commentPreivew

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

    I’m logged in and it works great !

    Suggested CSS:

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

    thank you πŸ™‚

    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>

    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.

    Thread Starter chuyskywalker

    (@chuyskywalker)

    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.

    Bob Easton

    (@bobeaston)

    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

    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

    pplproof

    (@pplproof)

    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. πŸ™‚

    rach3ldr3w

    (@rach3ldr3w)

    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??

    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!

    It worked as soon as I logged out! Thanks!

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

    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?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[ANN] Live Comment Preview (Plugin)’ is closed to new replies.