• Is there anyway to make a page that is displayed after someone comments?

    Something that says, “Thanks… your comment has been sent. It may not appear… blah blah blah… yadda yadda yadda…”

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter noelgreen

    (@noelgreen)

    This not possible?

    of course its possible. youre obviously working on a ‘client’ site?

    This is actually of interest to me. I don’t get a lot of comments but I’d love to have an automated way to thank someone for taking the time to interact and make a comment.

    Even being automated it shows that the blog administrators care enough about the visitors and visitor interaction.

    Is doing this a simple or difficult fix to implement?

    I’m highly interested too. All my comments are moderated, and the way the Codex says is to just put an “all comments are moderated” notice up. However, I’d really like a customizable message that shows up after so that I can put in a personal touch.

    I was looking at the way the comment form works, and it seems to cause WP to put #comment-(number) into the URL even if the comment is in moderation.
    So there’s some code telling WP to do something differently after a comment is posted.

    Does anyone know what we can use to trigger a message to be displayed? Something simple like having the message hidden by CSS display:none and rewriting it to show up when that “comment submitted” code goes off. That way it would only work once, when the comment is submitted.
    Thanks for any help!

    If you are so interested… experiment: e.g. log out and try to leave a comment. If moderation is set – you’d see a message:
    Your comment is awaiting moderation.
    Find that line in your code (hint: comments.php template) and edit it away…

    I’m not handy with the kind of thing suggested by moshu, but thank you for the suggestion. If anyone follows moshu’s suggestion and gets a fix will you please post the fix here?

    I’d love to piggyback the change.

    I’m not handy with the kind of thing suggested by moshu

    There’s nothing difficult about it. Moshu told you what to look for and where to look for it.

    In comments.php look for “Your comment is awaiting moderation” and change it to whatever you want.

    “of course its possible. youre obviously working on a ‘client’ site?” this person leaves more comments than anyone and yet i havent seen him leave one comment that was helpfull

    Still working on this. Changing the line is all fine and dandy, but I think most posters wanted control over the appearance and layout, and so do I ??
    I’ve tried editing it up the way I think it should be, but I’m experiencing an error- it just doesn’t work, although the code looks pretty simple and I don’t see any mistakes that I could have made.
    If I get anywhere, or I see a plugin that takes care of this, I’ll post it here.

    Look in the folder where your blog files are and find \wp-content\themes\<your theme name>\comments.php

    (in my case, with the default WordPress theme this is \wp-blog\wp-content\themes\default\comments.php)

    You’ll find a line which reads “Your comment is awaiting moderation.” (line 32 in my case).

    Try editing that to read “Many thanks, your comment is awaiting moderation and will appear on the site soon. Regards, Mike.”

    With a little more tweaking I’m sure some nice formatting can be achieved.

    ATB

    Mike

    30 seconds on google revealed this code.

    From this site https://www.binarymoon.co.uk/2006/04/wordpress-tips-and-tricks/

    replace

    <?php if ($comment->comment_approved == '0') : ?>
    			<em>Your comment is awaiting moderation.</em> ?>

    with

    <?php if ( $comment->comment_approved == '0' ) { ?>
        <p class="alert">Thanks for your comment. It is currently in the moderation cue and will be visible for everyone to read as soon as I have verified it</p>
    <?php } ?>

    Change text to whatever you want,
    then in your style sheet create .alert and add in the style properties you want.

    I’ve been fiddling around with this. Try replacing it with this instead…

    <?php if ( $comment->comment_approved == '0' ) { ?>
    <script type="text/javascript">
    function disp_alert()
    {
    alert("This comment is awaiting moderation, thanks.");
    }
    </script>
    <input type="button" onclick="disp_alert()" value="Awaiting moderation" />
    <?php } ?>

    I’ve not tried javascript before so this is not quite right (but works) so maybe someone could tweak it further so it pops up a window without having to click the button!

    Thanks for the help. I’ve got the exact same check for comment approval, but it doesn’t seem to want to work. I’ll set up a default site on my test server, make sure it’s working, then do my (moderately extensive) modifications to the comment form one step at a time until it breaks ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Comment “Thank You” page’ is closed to new replies.