Extending ezapprove2

Author Message

Oliver Frommel

Wednesday 05 September 2007 6:11:13 am

(I posted the same message to the comment section of the ezapprove2 extension. I just thought that it might be better to ask here. And i am getting notifications on the thread, too :)

We would like to extend it to make voluntary approvals possible. Now we have a setup
where an "author" (fewer privileges) can write an article that needs approval by an "editor" (more privs). Now we would like the "editor" to send an article he wrote for approval by
another "editor". Ideally both of them should be able to approve the article in the end.
As you might note this is less of a formal approval but just to cross check the articles on a voluntary basis. Right now this does not work because the articles of the "editor" get published right away, probably because he is in the group which is allowed to approve.

Where and how can we start to implement the desired behaviour?

There's also a hardcoded reference to a class id in the text which makes me a bit nervous, as I do not completely grasp the code yet.

best
Oliver

Kåre Køhler Høvik

Thursday 06 September 2007 12:41:51 am

Hi

In <i>extension/ezapprove2/eventtypes/event/ezxapprove2/ezxapprove2type.php</i>, look up the function : <i>eZXApprove2Type::execute()</i>

There's a variable in that function called <i>$userIsEditor</i>. To force all your editors to have their content reviewed, you'll need to add functionality to make sure that this variable is set to false for the users of group editor.

Best regards
Kåre Høvik

Kåre Høvik

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 18 2025 16:19:56
Script start
Timing: Jan 18 2025 16:19:56
Module start 'layout'
Timing: Jan 18 2025 16:19:56
Module start 'content'
Timing: Jan 18 2025 16:19:57
Module end 'content'
Timing: Jan 18 2025 16:19:57
Script end

Main resources:

Total runtime0.9176 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 587.8125152.6094
Module start 'layout' 0.00500.0025 740.421939.4141
Module start 'content' 0.00750.9086 779.8359523.6328
Module end 'content' 0.91610.0015 1,303.46888.1875
Script end 0.9176  1,311.6563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3386160.0002
Check MTime0.00130.1386160.0001
Mysql Total
Database connection0.00070.074010.0007
Mysqli_queries0.875695.4154540.0162
Looping result0.00040.0460520.0000
Template Total0.892297.220.4461
Template load0.00160.178520.0008
Template processing0.890697.053020.4453
Template load and register function0.00020.020610.0002
states
state_id_array0.00070.074610.0007
state_identifier_array0.00070.078620.0004
Override
Cache load0.00130.1470190.0001
Sytem overhead
Fetch class attribute can translate value0.00060.063820.0003
Fetch class attribute name0.00110.122730.0004
XML
Image XML parsing0.00060.061720.0003
class_abstraction
Instantiating content class attribute0.00000.000930.0000
General
dbfile0.00070.0769150.0000
String conversion0.00000.000840.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs