Forums / Cotonti / General / Question about draft articles

Is it possible to make draft like saves

ez
#1 2010-01-28 17:34
Within cotonti, it would be great if I can make a sort off DRAFT save of my item.
The users only have the "Put it in publish queue" option now.

In wordpress there is such an option (it saves a lot off drafts), but it would be VERY nice
If the users can save one draft item in cotonti.

So a draft version is NOT in the validation queue and it is not published.
I would be nice if the users can goto something like: "My drafts"

Is this possible, or is this an idea for development ????

Let me know please
==- I say: Keep it EZ -==
This post was edited by ez (2010-01-28 18:08, 14 years ago)
pieter
#2 2010-01-28 17:42
Very nice option. I would love this.
... can we help you ...
Trustmaster
#3 2010-01-28 21:27
Yea, we considered it when searching for a validation queue solution. Drafts concept was temporarily rejected because it involves major changes in DB structure. I'll consider it again when implementing core support for content i18n.

Or it could be a nice addition to Wiki plugin, btw.
May the Source be with you!
ez
#4 2010-01-28 22:01
Maybe there is a simple solution ??

I will have a look at it, and see if I can think off something simple :)

Im my first opinion.. It is just a status field extra in the db (that means Draft)
And an adjusted filter for the validation queue (filter out drafts)
and for the lists also filter out drafts

My client wants this, so maybe i have to make it for him (customizing)

Well I will have a look at it... It is a very nice option if I can make this..

cu
==- I say: Keep it EZ -==
tensh
#5 2010-01-29 20:58
A page has "page_key". If a "page_key" is 'system', then it's not displayed anywhere, for example. And old weblog plugin used "page_key" for marking weblog pages (it wrote "_weblog_page" in "page_key").

So you can make a plugin that will sign drafts as 'page_key' = 'draft'.
Additionally, create 2 additional page extra fields: 'page_masterid' (int) and 'page_hasdraft' (tinyint (1)), in which you'll fill in the id of a page on which the draft is based on, and you'll mark the page for which the draft was made.

This way one page can have multiple drafts which you'll call in plugin interface by page id.
1. Select pages that have page_hasdraft = 1
2. Foreach of the above, select pages that have 'page_key' = 'draft' and 'page_masterid' = 'id of the mother page'.

Hope that's clear... o_O

Added 4 minutes later:

Of course the logic behind drafts is more complex (like decide whether you can make drafts out of other drafts, or not), but I think it can be made as a plugin.
ez
#6 2010-01-30 03:00
thnx Tensh,

This system (cat) thing I know (i use it in some off my coding), so I could use this.

I like things to be simple, so I do not need master_id and stuff.. One draft is enough.

If I could make this in a clean plugin with no core hacking, I will release it for SURE, then everybody can benefit :)

If someone has any more ideas... Let me know.. (I could use good ideas)

greetings,

Leo (ez)
==- I say: Keep it EZ -==