Forums / Developer / Extending ezapprove2

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