Posted by webchick on May 26, 2009 at 12:36am
Jump to:
| Project: | DruBB |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | DruBB topic/reply post form |
Issue Summary
At the bottom of the topic/reply form (#472590: Meta-issue: Make posting form more like phpBB's) is a "Save" button which saves an unpublished copy of a post as a draft.
This is another thing that'll get a lot easier once forum replies are nodes.
Comments
#1
See http://drupal.org/project/draft
#2
I looked into the draft module and it won't work at all for comments, only nodes, so I'm thinking we just postpone this to work on nodecomments.
Or do we want to be able to do this on the original node even though it won't work on replies?
#3
I'd say let's get it working for the original node right now, since we can do that much. When we switch to nodecomment for the comments this problem should go away.
#4
OK, it's easy to add it in as a dependency and set up the basic variables in the install file, so that much is done and committed.
What still needs to be done is to make sure we have an easy way for the users to view and retrieve their drafts from within the forum section.
#5
Hmm, well there's a bit more work to do here. The default location for the draft list is 'draft/list'. You can override that by using Draft Views to put it somewhere else, but it still puts it at draft/list. If we want this to look like phpBB, it would show up on the user account page instead. We should be able to do that with a custom view.
A more difficult problem is that the taxonomy term is not getting saved in the draft, or at least it looks to me like it is not getting saved. So if I create a new topic and do save as draft at that point, I'll be missing the taxonomy term when I retrieve the draft. Can't tell if this is something that requires a patch in the Draft module or if there is a way to work around this. I spent some time trying to get this to work right and am not sure yet if it's working right.
#6
I think I have this fixed now. I had to change the taxonomy term in the new topic page to use #type 'hidden' instead of #type 'value' so there was a value in the form that could be used by the draft module's javascript. I also had to alter the way we test if a topic is new and the setting of the topic term so that it would work correctly both for regular posts and when you are retrieving a draft.
I added a new default view for drafts that shows up as a 'Drafts' tab on the user account page in addition to the default view that shows up at the 'drafts/list' location. I don't know if it will stay as a tab, but there is a whole different issue about how to incorporate all these changes into the user account page.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.