Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Loosing text pre-post :( stupid back button

edited February 2008 in Vanilla 1.0 Help
I've had this happen a few times. I spend 5 to 10mins writing a post to just loose it all by accidentally hitting the back button. I've notice some other forums manage to keep that data so you can just hit forwards and its all back there. Is there a way to get Vanilla doing this? Its really getting annoying. Thanks.

Comments

  • Options
    You should find this quite useful.
  • Options
    That is good, thank you. But I have no idea how to modify it so it does what I want. I need it to show that message when I hit the back button in the browser (or more importantly when I hit the button on the mouse.)
  • Options
    Safari prompts you to cancel if you try to close a page with a form text field active.

    Also, hitting the back button after leaving a page with text in a form field gets you right back where you were, your text included.

    Just what you want and right out of the box.

    Somebody once said: "Use the right tools if you want quality results!"
  • Options
    The back-forwards behavior you're describing would work if Vanilla didn't invalidate the browser cache on every page load. It might be easier to find a js that checks for data and pops up a confirmation or even saves/restores the post to a temporary cookie.
  • Options
    Right.. So tell me how exactly I am suppose to get 100+ members to get a different web browser? Yes WallPhone, that would pretty much do what I want. But I really don't know what to look for or how to get it to work in Vanilla.
  • Options
    Quote: Phizinza
    pic Right.. So tell me how exactly I am suppose to get 100+ members to get a different web browser? pic
    Slowly, firmly and pointing out the benefits of the alternative.

    I now work in a 100% Windows-only, I.E. only environment and after 3 months Safari has 20% penetration, probably more but some of them hide it when they see me coming because they are too "proud" to admit they like Safari!

    And as a spin-off, there's now also Firefox awareness!

    It's education and information mate, the facts and the expreience will do the rest.

    Posted: Sunday, 3 February 2008 at 9:18AM

  • Options
    Obviously you don't know what car people are like... Far from willing to change anything on their computer most of them.
  • Options
    Well then let them whinge and suffer with the choices they make, a natural consequence in both computing and life in general!

    Posted: Friday, 8 February 2008 at 6:17AM

  • Options
    edited February 2008
    Haha, let's not make this a browser war :) Safari's still the new kid on the block and won't be widely adopted until it gets better DOM management and the linux platform may never even see it (my two-cents).

    Anyway, this problem is a result of a work-around used to make sure that each user gets a completely up-to-date page whenever they visit. The problem code causing this is appg/headers.php @ line 14-17. This is the problem and adding a browser feature is nice but a real solution involves fixing the code.

    Here's my proposal, since that file is called AFTER $Configuration['SELF_URL'] is defined appropriately, make the headers.php file test for this:if ($Configuration['SELF_URL'] == 'post.php') { // PREVENT PAGE CACHING on all pages but the comments page header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified header ('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 header ('Pragma: no-cache'); // HTTP/1.0 }This of course is untested and may have other implications, but I bet it will solve the problem. Anyone else care to chime in?
  • Options
    That would work for new discussions, but new comments on a discussion will still clear out.

    For those cases, might need to set the expires to an average of the time between comments to a discussion, and last modified to the time of the last comment. Gonna have to read up on the http spec of cache-control and pragma directives.
  • Options
    That would work for new discussions, but new comments on a discussion will still clear out.

    Oops! That's the last time I post untested code :) Clearly, this requires more research. On a somewhat related note, it would be nice to see a feature where Vanilla would notify a user before posting their comment if there are any new comments that might not've been read.
  • Options
    it would be nice to see a feature where Vanilla would notify a user before posting their comment if there are any new comments that might not've been read.
    I'd love to see such a feature. Pretty useful when people start chatting like if they were on a messenger.
This discussion has been closed.