Multi-person article-edit before publishing?

Author Message

André Bischof

Monday 04 April 2005 5:20:20 am

Hello alltogether,

I have to allow editors to work on the same article, before it gets published. If they both work with drafts they don't see the content added by the other author.

Thus they would have to publish the article, but then the article can be seen by the users before its ready.

Is there a possibility that two (or more) persons can work on the same article without publishing it?

I played with workflows, but that didn't help either.

Kind regards,
André

Personal weblog and more: http://bischof.homelinux.net

Paul Borgermans

Monday 04 April 2005 6:47:26 am

Hi,

This is how I would implement this, just by using template code:

- add a boolean (checkbox) field to the article class to mark it for "public" display, for exampel "is_ready".
- in the article display (full/line) views add a check on both the boolean field and the current user groups to see if an editor is logged in and act accordingly in a {section show=....}

{* init $current user if necessary with let current_user=fetch(user,current_user)
and 
suppose the group (object id) of the editors group is 13 *}
{section show=or($current_user.groups|contains(13),$node.data_map.is_ready.content)}
{* display the article *}
{section-else}
{* do not display the article, but maybe show some kind of a message *}
{/section}

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Xavier Dutoit

Monday 04 April 2005 6:56:29 am

Hi,

I've had a similar problem but with content spread over several nodes.

What I did was to create a new section "under construct". When the user publish the content (no save draft button), it goes to the underconstruct section. On the template for this section, I've added a button "publish" that call a custom module to change the section to the standard one.

Obvioulsy, with access rights, you can define we can read/edit content in the under construct section.

X+

http://www.sydesy.com

André Bischof

Monday 04 April 2005 8:12:02 am

Hello Paul, Xavier,

thanks first for your quick answers!

But I don't understand your solutions. As far as I understand Paul, he keeps articles from getting visible - that's nice, 'cause my editors could no save (not save draft) and the next editor can modify the article. But what about all published articles which still exist? Wouldn't they become invisible?

Xavier, if I understand you right, it is necassary to write an custom module - this is far beyond my possibilities.

I think I try Pauls solution, maybe I can solve it with a mysql update over all existing articles or modify the template language (which is new for me too) to look after the checkbox only if it exists.

I'll try that first thing tomorrow!

Thanks and kind regards,
André

Personal weblog and more: http://bischof.homelinux.net

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 00:13:35
Script start
Timing: Jan 19 2025 00:13:35
Module start 'layout'
Timing: Jan 19 2025 00:13:35
Module start 'content'
Timing: Jan 19 2025 00:13:36
Module end 'content'
Timing: Jan 19 2025 00:13:36
Script end

Main resources:

Total runtime0.8163 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0094 588.0547152.6406
Module start 'layout' 0.00940.0030 740.695339.4766
Module start 'content' 0.01250.8021 780.1719593.4609
Module end 'content' 0.81460.0017 1,373.632812.1250
Script end 0.8163  1,385.7578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4049160.0002
Check MTime0.00130.1580160.0001
Mysql Total
Database connection0.00170.205310.0017
Mysqli_queries0.745691.3364620.0120
Looping result0.00060.0716600.0000
Template Total0.762693.420.3813
Template load0.00260.319920.0013
Template processing0.760093.100820.3800
Template load and register function0.00020.019010.0002
states
state_id_array0.00991.216210.0099
state_identifier_array0.00170.211520.0009
Override
Cache load0.00210.2533350.0001
Sytem overhead
Fetch class attribute can translate value0.00050.056830.0002
Fetch class attribute name0.00120.146660.0002
XML
Image XML parsing0.00110.137130.0004
class_abstraction
Instantiating content class attribute0.00000.001560.0000
General
dbfile0.00510.6233230.0002
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs