"Drafts" - Postet den (1231 Views)
Retired Support Moderator
MarcelG
Innlegg: 2625
2625
Yesterday sr_erick posted this on oxle: http://oxle.com/topic.asp?tid=4996

The database has two tables, one for topics, one for posts. The topics table has the forum ID and the user ID, along with the title, description, posts, saved date, and a bit field to show if it was autosaved or not. The one for posts is the same...except it has a topic ID, not forum ID and it doesn't have a title or description field.
Ajax does all the saving, when the page is reloaded, the database is checked for a draft. It works pretty much the way you thought. None of it was really a challenge but I've learned lots about javascript since working on this new site code so it's getting quite a lot easier.
<
   
 Sidestørrelse 
Postet den
Average Member
cripto9t
Innlegg: 881
881
I'm working on a mod that I call User Space. Here's the description from the readme.
This mod adds a link in the forum menu that takes forum members to a private personal page
viewable only by the member and the forum administrator(s). The mod consists of "features" that
you add to it.
The default feature "User Posts" shows recent topics that the member has participated in. Other
features can be added later. Meaning that you don't have to add a feature if you don't want it.
Add on features:

User Drafts: Allows members to save posts as drafts to be posted later.
User Bookmarks: Allows members to bookmark topics, replies and outside urls for later reference.
Feature wish list:

User Friends: Will allow members to make a list forum friends e-mail, IMs, etc... so they won't have to look
through the forum members list.
User Ignore List: Will allow members to list forum members they want to ignore when reading posts. Posts of
members on the list will be hidden from member.

So you could have the User Space mod just using the Drafts feature if thats all you wanted.
Mine is not as elaborate a ericks. No autosave. No Ajax. I just added another table for drafts. Its a pretty easy addon, just 10-11 code changes and a few new files and icons.
Unless I find a major bug, I'm going to release it for testing and suggestions this weekend.
<
    _-/Cripto9t\-_
Postet den
Retired Support Moderator
MarcelG
Innlegg: 2625
2625
Sounds good! How much work do you think AJAX'ing it would cost, to add the autosave function?<
 
Du må legge inn en melding