How do you like the idea?

94.7% 18
5.3% 1

19 Date 2009-06-29 01:49

Forums / Cotonti / Core Labs / Archive / Poll: Page validation enhancement

12>>>

A small tweak that could be ultimate in most cases

Trustmaster
#1 2009-06-29 01:49
As you know users cannot edit their pages by default. Seditio has an ugly eyoop plugin which is almost a copy of normal page module. We have a hook that can affect that editing permission and it was supposed that there will be a plugin to manage it.

At first I thought to implement this simple plugin, but then I thought why not have this default behavior for page editing:
  • Registered user can edit a page if he owns it and has write permission in its category.
  • When he edits a page and clicks "Submit", the changes are saved and the page is sent to validation queue again.
  • Users can edit their pages in validation queue.
  • Category administrators have 2 buttons instead of just "Submit" when adding/editing a page: Submit (to validation queue) and Publish (directly bypassing the queue).
It is pretty simple and should work for most sites.
May the Source be with you!
gamer24.7
#2 2009-06-29 02:10
How are users going to edit a page once it is in validation que?
You would need access to the admin panel, don't you?
[b][color=#000000]Click [/color][url=http://www.design-studio.netau.net][color=#EF2929][u]Here[/u][/color][/url] [color=#F57900]For All You Design [/color][color=#756745]Related Needs.[/color][/b]
Dayver
#3 2009-06-29 03:04
fully agree ... agree on all counts

# gamer24.7 : How are users going to edit a page once it is in validation que?
You would need access to the admin panel, don't you?

No, no need access to the admin panel .... it is possible to realize a simply link "Edit" which will be visible only to the appropriate users
Pavlo Tkachenko aka Dayver
gamer24.7
#4 2009-06-29 03:28
Yep this is a good idea.

Though some features can be enableed and disabled through admin panel.
[b][color=#000000]Click [/color][url=http://www.design-studio.netau.net][color=#EF2929][u]Here[/u][/color][/url] [color=#F57900]For All You Design [/color][color=#756745]Related Needs.[/color][/b]
Kilandor
#5 2009-06-29 05:08
Actually I had this debate with Wiki plugin. Putting it back into validation queue is bad. Then it makes it unavailable.

I think you need to do it like this.

First you need an option to use a "Validation Queue" like system or disable it and edits go directly through.

For validation queue, you need to have a sort of "copy" system, where it saves a sorta copy of the changes, which can be approved then update the live page.

Of course obviously you need to disallow major changes, such as changing type, (html etc) changing owner except to admins.

And yea I can agree with this in core, as i'd say most sites out there can use it, but just default it to off.
tensh
#6 2009-06-29 14:34
The pages can be visible in future's enhanced user control panel - the place where the user sees all his contributions, buddies and short summary of site's activity.
I think the user CP is such a standard part of any site that it should have a bit bigger attention paid to it: maybe being not a plugin, but an extendable module. Of course user CP is one thing, but user profile (the part that is seen outside) is another thing.

As for pages, validations, etc.
I don't know if it's already present (can't remember), but if either user or admin is in the process of editing a page, there should be a "lock" of this page from other editing. And then all possible solutions come...

Maybe a nice "Draft system"?
The user can create Drafts if only he has the rights to do so. In the process of creating a page, the user can save the page as Draft (and so it's not placed in Validation Queue) or Submit it for Validation. (the user can create a page from his CP and submit it in the category where he's allowed to). Admin would have the third option of bypassing the Validation Queue. The maximum number of stored drafts can be determined in settings (global or maybe per-category?) The drafts are visible in their CP (thus user CP needed).

The Draft can be then edited and Submitted for Validation or Stored as draft again. The user can copy drafts or delete them. User can also copy an already submitted and validated page as draft. The copied drafts become the page versions and can be compared.

Every process of editing of an already approved and published page results in either creating a temporary Draft or in locking this page for editing by any other user (depends on how complicated you want it to be). If the temporary Draft is chosen, then other users can also edit the same page, but their changes will be also saved as Drafts. The Drafts (or more: versions of the page) can be then compared.

This is much more complicated and didn't cover it all I suppose... so I'm more for page locked for editing when somebody else edits the page.

----

Also, what I really miss is the ability for user to create categories. Template logic blocks can determine the looks of the category "create page"... Also, the admin should be able to determine whether user is allowed to make only one category, or maybe more, and whether the categories can have children. In this way e.g. creating a blog plugin would be obsolete.
Trustmaster
#7 2009-06-29 19:41
I like this Drafts thing. It reminds me of Wiki though.

But both drafts and validation copies sound quite a lot of work to me. But if no simple solution is acceptable we'll have to implement it. However, what we have now (no ability to edit pages at all) is much worse IMO.
May the Source be with you!
tensh
#8 2009-06-29 20:50
The Draft system is a prelude to a Workflow system... in which a draft can pass through various usergroups, where changes are made. But it's a system for some kind of advanced, organized news portals which Cotonti doesn't neccessarily need... (one Team writes an article, other team corrects it, another adds pictures...)

I'm all for the Draft system being as simple as possible. Or maybe we can bring up something unique for Cotonti? I'll spend a while to think it over.
This post was edited by tensh (2009-06-29 20:57, 14 years ago)
GHengeveld
#9 2009-06-30 06:28
My vote goes to implementing a wiki system. This is by far the best way to handle things. I'm actually missing this feature right now, because I often have clients complaining they made a mistake and they have no way to undo it.

I think it's not that hard to implement. The only thing you need is an extra table which stores old revisions of the pages (say we name it 'sed_pages_old'. When a page gets updated, the old one is copied to sed_pages_old, before being replaced by the new version (in sed_pages). I guess there should be a limit in revisions though, to keep the db from cluttering. Of course a differential system would be better, but will also take more time to implement.
tensh
#10 2009-06-30 16:36
Didn't Kilandor make a wiki plugin?
http://www.seditioforge.com/plugins/pages-lists/seditio-wiki-i39.html
It was a great one, and it had a differential system. The only problem was deleting the "versions" after uninstalling plugin, they were somewhere in database but hidden.
Something similar could be in the core/module, but it must be carefully thought over, with versioning limits and editing locks.
Trustmaster
#11 2009-06-30 17:14
Good point. But is there anything we can make by 0.0.6?
May the Source be with you!
tensh
#12 2009-06-30 19:59
In my opinion, the temporary solution mentioned in the first post is all OK + editing lock.

Editing lock (simple)
- new rows in Table sed_pages - page_lock, page_lock_user
- when user hits "edit", the variable "1" is written in page_lock and username is written in page_lock_user.
- The page is locked for editing until the variables are erased, just when user hits "submit". Another user gets message "The page is being edited by user <Username>" if he encounters lock.

It's best made as a plugin maybe? Not everybody might want the lock. Also, there might be a situation in which user locks the page continuously (because he's mean or sth) - that's why it would be nice to just disable the plugin.

Another hypothetical situation is when user hits "edit" but then just leaves the edit screen. The button "cancel edit" would be needed, and a javascript message when somebody wants to leave/close page, that the page is still being edited and whether he wants to save changes or not. Just in case, the global admin tool for locking/unlocking all pages would be nice. Or some kind of "lock timeout" in a form of a check where user is at the moment (based on sed_online -> online_location)...?

... did I miss something...?
This post was edited by tensh (2009-06-30 20:06, 14 years ago)
Kilandor
#13 2009-07-01 06:50
Edit locking is a bad idea I think. If you want something like that it needs to be plugin, alone with the draft thing. I think.

As for my wiki on uninstall, yes it has a table thats not removed (back then there was no way to easily)

A wiki system might not be bad to a point, though for simple page editing and such I think its a bit overkill.

But you could use it for a basis of letting users edit, letting the editied copy be stored, and have an admin validate it, (If they choose that option)
Trustmaster
#14 2009-07-01 21:33
The problem about edit locking is deadlocks it may cause when somebody locks a page and goes away: it requires either a lock collector (by timeout) or interactive "is online" check.

What's bad about turning the pages into wiki by default is that it is not everybody who needs it. Some people would say "don't waste my resources on that".

Anyways all ideas are fine for plugs, future and stuff. For 0.0.6 I'm gonna do the thing I've described in the first post to make page editing at least available.
May the Source be with you!
SunChase
#15 2009-07-03 06:12
Trustmaster your idea sounds great.But you can go further.If the admin sees mistakes in a page,that was send by some user for validation it would be great if there was a button like "send back to user" which would send the page back to the user(to some special page) with the admins advices and explanations on what to fix and ect.

I had a problem of this sort when i was writing something big on a page.But the moderators found some mistakes and told me to write all of the page again.It would have been much easier if there was a way just to send the page back for fixing
[url=http://ka13.orgfree.com]KA13[/url] - The essence of creativity

12>>>