WordPress.org

Ready to get started?Download WordPress

Forums

Remember info option in comments (32 posts)

  1. Daisyhead
    Member
    Posted 10 years ago #

    Is there a hack, or could someone write one, for remembering info when people comment? MT has this feature built-in and it's very convenient to the people who comment on your blog. It's just a checkbox that people can check so that WP would remember their info so they do not have to input it, every time they comment.
    Just curious,
    Daisyhead

  2. OperaManiac
    Member
    Posted 10 years ago #

    it already happens by default!

  3. Daisyhead
    Member
    Posted 10 years ago #

    Not on my site it doesn't. You have to enter info every time you comment. Unless there's some kind of setting I'm missing??

  4. Daisyhead
    Member
    Posted 10 years ago #

    I just tried it on your site Sushubh and it worked, yet on my pop-up comments, it doesn't. Is there some kind of setting I have to tweak, or could I have removed some code that would do this??
    -Daisyhead

  5. rpeeck
    Member
    Posted 10 years ago #

    prolly cookie settings in the browser...

  6. Daisyhead
    Member
    Posted 10 years ago #

    No, because I tested it on Sushubh's site and it worked fine, yet on my site, it doesn't. So it's not my browser. And everyone who comments on my site is having the same problem. It can't be because EVERYONE has wrong cookie settings.

  7. OperaManiac
    Member
    Posted 10 years ago #

    i can confirm it did not remember my details.
    and i have no idea why, coz I have never used pop-up comments :)

  8. Daisyhead
    Member
    Posted 10 years ago #

    So it must be a pop-up vs. non pop-up issue. Anyone else have any ideas?

  9. Daisyhead
    Member
    Posted 10 years ago #

    I resolved this issue. I switched back from pop-up comments to inline. =)

  10. bain
    Member
    Posted 10 years ago #

    I have never had this problem using the pop-up comments ;[
    It's always remembered user info for me, and everyone else who comments.

  11. CeeJayCee
    Member
    Posted 10 years ago #

    I always get this on my blog. I think it's because I'm using the clean permalinks structure so the URL for each post is different.
    My brower (FireFox) seems to remember the details for other blogs not using Mod_ReWrite

  12. MooBob42
    Member
    Posted 9 years ago #

    Sorry to resurrect this thread, but has this been resolved? It seems like it would be easy to add a simple cookie mechanism to the page so that it would remember you.

  13. Anonymous
    Unregistered
    Posted 9 years ago #

    I've suddenly started having problems with this as well.
    My comments are inline, but my info is not saved.

  14. su
    Member
    Posted 9 years ago #

    i have always had this problem, does anyone know how to resolve this?

  15. cosmogrrl
    Member
    Posted 9 years ago #

    I could use help for this too - anyone? anyone? Bueller?

  16. indigojo_uk
    Member
    Posted 9 years ago #

    It would actually be useful for commenters to have the option not to have their details saved when they comment. For example, if I am commenting on a public computer in the Apple Store, anyone who happens to read that blog on that computer that day could find my email address. Any way of building a remember button in?

  17. indigojo_uk
    Member
    Posted 9 years ago #

    I've written the back:

    First, put the following in your comments.php, in the section where the comments form is. I put it in between the URL field and the actual comment field:

    <p>
    <input type="checkbox" name="remember" value="remember" tabindex="4" />
    <label for="remember">Remember details?</label>
    </p>

    I adjusted the tabindex for the next two fields to 5 and 6 where they had previously been 4 and 5.

    Next, in yourblog/wp-comments-post.php, you'll find the following code:

    setcookie('comment_author_' . COOKIEHASH, stripslashes($comment_author), time() + 30000000, COOKIEPATH);
    setcookie('comment_author_email_' . COOKIEHASH, stripslashes($comment_author_email), time() + 30000000, COOKIEPATH);
    setcookie('comment_author_url_' . COOKIEHASH, stripslashes($comment_author_url), time() + 30000000, COOKIEPATH);

    You need to put "if ($remember)" around this with brackets, so it reads:

    if( $remember ) {setcookie('comment_author_' . COOKIEHASH, stripslashes($comment_author), time() + 30000000, COOKIEPATH);
    setcookie('comment_author_email_' . COOKIEHASH, stripslashes($comment_author_email), time() + 30000000, COOKIEPATH);
    setcookie('comment_author_url_' . COOKIEHASH, stripslashes($comment_author_url), time() + 30000000, COOKIEPATH);
    }

    It's worked for me so far. Simple hack.

  18. pdi
    Member
    Posted 8 years ago #

    The checkbox code for comments.php works ok. The resulting checkbox, however, comes out fixed in size. This puts it some distance form its label. Adding size="" above doesn't seem to do anything. Any ideas?

  19. pdi
    Member
    Posted 8 years ago #

    Solution found. It's a css thing. Add class="checkbox" to the input tag and #commentform input.checkbox {width: 15px;} to style.css.

  20. Crickie
    Member
    Posted 8 years ago #

    Sorry to ressurect this again, but the same thing is happening to me. My wordpress site has never remembered mine or anyone else's info when commeting. I'm using inline comments. I've tried the if remember hack, i've tried plugins.. nothing works. What is going on here?

  21. Beel
    Member
    Posted 8 years ago #

    Switch temporarily to the unedited default theme ans see if the problem persists.

  22. Crickie
    Member
    Posted 8 years ago #

    Beel: Tested default, still not remembering.

  23. Beel
    Member
    Posted 8 years ago #

    Yep, I figured it wouldn't as I think the called function, "comments_template()" is responsible for setting the cookie. But worth a try. Now the problem is figuring out why the cookie is not being set.

    We need the help of a Cookie Monster...uh, Master... yeah that's it, Cookie Master.

  24. Crickie
    Member
    Posted 8 years ago #

    My comments template says:
    $comment_author = isset($_COOKIE['comment_author_'.COOKIEHASH]) ? trim(stripslashes($_COOKIE['comment_author_'.COOKIEHASH])) : '';
    $comment_author_email = isset($_COOKIE['comment_author_email_'.COOKIEHASH]) ? trim(stripslashes($_COOKIE['comment_author_email_'.COOKIEHASH])) : '';
    $comment_author_url = isset($_COOKIE['comment_author_url_'.COOKIEHASH]) ? trim(stripslashes($_COOKIE['comment_author_url_'.COOKIEHASH])) : '';

    Just like the 'hack'. ::shrug::

  25. GOBLUE14
    Member
    Posted 8 years ago #

    Same problem here. Anyone figure this one out yet?

    I'm on WP 2.0, have tried the hack mentioned above and got nothing. It's a Firefox issue for me, as IE remembers my information.

  26. Mysmasken
    Member
    Posted 7 years ago #

    I'd love to get a solution on this one!
    I'm on WP2 and I'd like to have the options for my visitors to have their names and info saves.
    I know how irritating it is visiting others blogs when it doesn't save my info and I have to type it every time.

  27. hk997
    Member
    Posted 7 years ago #

    i agree with you, it is very irritating when you have to re-type your information, i hope some body have the answer!

  28. basketball
    Member
    Posted 7 years ago #

    Still wondering if anyone has a solution to this?

  29. meretta
    Member
    Posted 7 years ago #

    I've put in the hack and it's still not remembering for me either, in IE or Firefox.

    Can anyone help?

  30. meretta
    Member
    Posted 7 years ago #

    BTW I use inline comments

Topic Closed

This topic has been closed to new replies.

About this Topic