posted on May, 27 2009 @ 12:17 PM
Firstly, I feel for ya man, I had this last week and it really pissed me off, it was nobodies fault (actually it was mine in a way
) but my
inspiration and effort had gone with the wind.. It stinks.
Theoretically it's completely possible and maybe even easy to implement a small piece of caching code, in a way that as soon as you press 'reply'
or 'post' your text would be saved. A bit like GMail's saving of concept mails, but then there would be just 1 entry - you probably don't need two
slots, unless you're sending two messages at a time. Codewise it would be like
$_SESSION['last_post'] = $_REQUEST['message']
This should be one of the earlier lines, below user authentication but above checking for duplicate thread names or a thread that doesn't exist
anymore. Since there is supposedly no danger in setting a text variable to $_SESSION, it could be as early as possible.
And then there would need to be a button in our MyATS somewhere to retrieve this saved message in $_SESSION['last_post'], which would be something
like
< button onclick='document.getElementsById("message").=< ? print(htmlspecialchars($_SESSION['last_post'])) ? >'>Restore your message!<
/button >
.. seems simple.. doesn't it :p ..
But until this happens, you're doomed to writing outside your browser, or keeping your fingers at ctrl-c ;D I just comfort myself by thinking my
post went to a better place.. ;]
*copies before posting* Good luck!
p.s. This code should actually work! .. When the spaces for HTML tags are removed and the code is placed in the PHP scripts of the ATS forum, of
course ;]
[edit on 27-5-2009 by scraze]
[edit on 27-5-2009 by scraze]