FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » Message autosave hack
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
icon12.gif  Message autosave hack [message #32198] Wed, 14 June 2006 09:54
gladiator is currently offline  gladiator   China
Messages: 61
Registered: June 2002
Location: Beijing
Karma:
Member
Feature:
Save user's half-written post every 10 seconds automatically on server(like gmail's draft autosaving), so 40 minutes(or even 2 hours) work won't lost because of a browser crash or session timeout.
Tested under firefox1.5/ie6/konqueror3.5/safari1.2. (safari won't show the "last saved at xx:xx:xx" thing, but the draft itself will be saved properly)
Note: Only the lastest draft body will be saved, this hack is for autosave draft only, not to implement a complete draft function.

To install:
1. untar the attachement, mv(or ftp upload) the directory 'draftsave' into your fudforum's web_root directory(i.e. /path/to/your/webroot/forum/).
2. install adodb, edit the file config.php under draftsave, change $charset, $sAdodbPath, $TabUsers, $TabSes to match your situation.
3. Goto admin panel, use Template Editor to edit the template post.tmpl and usercp.tmpl, as in file post.tmpl_POST_PAGE and usercp.tmpl_usercp. You can delete these two file after install.
4. The file cleardrafts.sh can be used as a cron job, to auto remove the outdated drafts.

Draft is saved under fudforum's data dir/tmp/drafts/.

Any suggestion is appreciated. You can contact me through lr2100 <at> gmail <dot> com.

[Updated on: Wed, 14 June 2006 17:34]

Report message to a moderator

[Message index]
 
Read Message icon12.gif
Previous Topic: Getting images out of a message.
Next Topic: Fetch search-results via API ?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 21:36:55 GMT 2024

Total time taken to generate the page: 0.04034 seconds