Forums / General / Can new trigger points be created?

Can new trigger points be created?

Author Message

Deane Barker

Tuesday 30 December 2008 1:39:00 pm

Is it possible to create new trigger points? I'd like to hook workflow events into the create, edit, move, and remove functions.

We're trying to get some audit trail functionality. Our client wants a log of all the actions that have been taken on content in their install.

I thought about using the notification system, but it doesn't seem to log a notification event for a removal of content.

Heath

Tuesday 30 December 2008 2:13:57 pm

Yes, <i>http://ezpedia.org/wiki/en/ez/trigger
http://ez.no/doc/ez_publish/technical_manual/3_8/concepts_and_basics/workflows#comment4540</i>

Simply review an existing module's use of the trigger / workflow system as a reference when creating your own.

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Heath

Tuesday 30 December 2008 9:22:10 pm

Deane,

<i> > Is it possible to create new trigger points? I'd like to hook workflow events into the create, edit, move, and remove functions.</i>

Yes. You can add ini settings and php code into a patched kernel or extension module to provide for the execution of additional triggers. [1-6]

<i> >We're trying to get some audit trail functionality. Our client wants a log of all the actions that have been taken on content in their install.</i>

Neat idea! Seems fairly reasonable request.

<i> > I thought about using the notification system, but it doesn't seem to log a notification event for a removal of content. </i>

Perhaps a question of which would be simpler to add. The notification trigger is simple enough to create yet not as useful to others as a patch to add a default content removal notification to admin user group users subscribed to that node (perhaps with instructions on how to restore the node if needed / trash system was used in removal)

hth,
Heath

[1] http://pubsvn.ez.no/nextgen/trunk/kernel/shop/operation_definition.php
[2] http://pubsvn.ez.no/nextgen/trunk/kernel/shop/ezshopoperationcollection.php
[3] http://pubsvn.ez.no/nextgen/trunk/kernel/shop/add.php
[4] eZOperationHandler::execute()
[5] http://pubsvn.ez.no/nextgen/trunk/settings/workflow.ini
[6] [OperationSettings] AvailableOperationList[]

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Greg McAvoy-Jensen

Tuesday 30 December 2008 9:39:19 pm

Deane,

You're probably already aware of eZ Publish's built-in audit trail feature, but in case it's useful for anyone, here's the documentation:

http://ez.no/doc/ez_publish/technical_manual/4_0/features/audit_trailing
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/configuration_files/audit_ini/auditsettings/auditfilenames

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Heath

Sunday 04 January 2009 5:30:05 am

Hello Deane,

I noticed another related thread of interest,
<i>http://ez.no/developer/forum/suggestions/requesting_remove_triggers
http://ez.no/developer/contribs/hacks/content_remove_workflow
http://ez.no/content/download/122670/659188/file/content_remove_workflow.zip</i>

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

eZ debug

Timing: Jan 18 2025 16:25:44
Script start
Timing: Jan 18 2025 16:25:44
Module start 'content'
Timing: Jan 18 2025 16:25:45
Module end 'content'
Timing: Jan 18 2025 16:25:45
Script end

Main resources:

Total runtime1.2975 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.7109180.8359
Module start 'content' 0.00541.0943 768.5469627.7031
Module end 'content' 1.09980.1977 1,396.2500341.3750
Script end 1.2974  1,737.6250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00460.3577210.0002
Check MTime0.00180.1398210.0001
Mysql Total
Database connection0.00070.050110.0007
Mysqli_queries1.203292.72822020.0060
Looping result0.00240.18732000.0000
Template Total1.264897.520.6324
Template load0.00210.163120.0011
Template processing1.262797.314220.6313
Template load and register function0.00010.007610.0001
states
state_id_array0.00100.073610.0010
state_identifier_array0.00190.142920.0009
Override
Cache load0.00180.1371460.0000
Sytem overhead
Fetch class attribute can translate value0.00160.120040.0004
Fetch class attribute name0.00190.143780.0002
XML
Image XML parsing0.00210.159640.0005
class_abstraction
Instantiating content class attribute0.00000.0017100.0000
General
dbfile0.00280.2147420.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs