Firefox PHP

Suggestion: Draft messages

Posted by M@AATW 
Suggestion: Draft messages
March 03, 2007 02:48PM
I often find if I'm writing a long or detailed message that I need to leave it, go back to it, serch for an image on Google to insert etc....sometimes I write a message, and then think it would be good to post it later rather than at that point for some reason.

It would be good to be able to save a 'draft' of a message, and access drafts via a list, kind of 'my drafts' which would bring up a small page of links to the messages in a message box that you could then contine with, with buttons to either 'post' or 'update draft'.

This might be an idea that someone would like to run with? Any thoughts/opinions?
Re: Suggestion: Draft messages
March 03, 2007 08:10PM
Okey, here's some thoughts:

I think drafts could be implemented as a module, by introducing a new custom message status value which indicates a draft message (like -10, which is not used by phorum, nor will be used in the near future). Only approved messages (status = 2) are shown by Phorum. So messages with another status will be invisible. Things to arrange for:

POSTING EDITOR - Save draft message implementation

* An extra button (Save draft), added to the editor through a template hook (similar to what the Speller Pages and Topic Poll modules do);

* This button can send "savedraft" as the button name on posting the form.

* "savedraft" can be picked up by the "posting_init" hook. It would remember that "Save draft" was clicked and modify the post action to "post", so the rest will be handled als a regular post action.

* In the "pre_post" hook, the module would change the message data to save to the database, to set the status field to -10.


POSTING EDITOR - Editing and posting a draft message

Editing and posting a draft would be the same process as the standard message editing. One thing to take care of in the module, is that the button text is changed from "Save Changes" to "Post Message". The other thing is to set the status of the message to an appropriate status (either accepted or on hold in case the forum is moderated). If the user clicks on "Save draft" when editing a draft, then the logic from above would apply too.

LIST OF DRAFT MESSAGES

The last thing that is needed, is a list of draft messages. I think that for this feature, a custom database layer function has to be created, which can be used to find messages for a given user_id which have a status of -10. The list of draft messages can be displayed as a list of message editing links. I'm not sure what the most appropriate place would be for showing the draft messages. Easiest would be using the "after_header" or "before_footer" hooks on the index page. No template changes would be needed for implementing it that way. Another good place would be the user control center, but hacking in extra pages there would need some template changes.


I think that this is about the way in which draft messages could be implemented through a module.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Suggestion: Draft messages
March 04, 2010 07:37PM
Did anyone ever make a go at this idea for a module? If not, maybe I'll try and take a crack at it...

-phil.
Re: Suggestion: Draft messages
March 21, 2010 05:12AM
It's certainly a very good idea. I've always wanted a save draft button myself.
Re: Suggestion: Draft messages
December 07, 2011 02:03PM
Hello,

This feature would be great!
Is someone working on it?

Cactus : [www.cactuspro.com]
Re: Suggestion: Draft messages
December 09, 2012 12:14AM
I really should love this!
Especially as an auto-save-draft function (ajaxcall, like in wordpress)
Then i also wont be logged out after writing long stories and get an heart-attack when after submitting i have been logged out and my message is gone.......

<hr />
usually manuals are written by experts,
so.....that's the reason why i do not understand the manuals)
Re: Suggestion: Draft messages
January 23, 2013 09:08PM
I have had a request recently regarding a draft for the inbox and was wondering if anyone has worked on this. I've been away from this and other forums for quite some time so there is tons of unread stuff for me to go looking through.


Robert Angle
Phorum lover, nothing more.
Ruminations
Sorry, only registered users may post in this forum.

Click here to login