add several subtree notifications from one single form

Author Message

Mickael Robin

Wednesday 17 September 2008 9:01:50 am

As explained in this topic ( http://ez.no/developer/forum/developer/notifications_based_on_fetch_result_instead_of_subtree ) I am trying to propose my users to add notifications to a collection of items which don't belong to the same subtree.

To be more specific, I try to propose to set up an <b>"e-mail alert" on the results of a mutli-criter filter</b> that I will manage thanks to a mix of attribute filter and view parameters.

Then, the most simple solution seems to propose to add notifications to the group of (parent) nodes that will result form my filtered fetch...

Unfortunately, <b>I do not manage to modify the "Add to notifications" process to add several notifications nodes from a single form.</b>

Natively, it seems that the POST form (1) posts a single node_id to the file kernel\content\action.php (2) which calls the file kernel\notification\addtonotification.php

(1)

<form method="post" action={'/content/action'|ezurl}>
<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
<input type="submit" name="ActionAddToNotification" value="Keep me updated" />
</form>

(2)

else if ( $http->hasPostVariable( "ActionAddToNotification" ) )
{
    $nodeID = $http->postVariable( 'ContentNodeID' );
    $module->redirectTo( 'notification/addtonotification/' . $nodeID . '/' );
    return;

So, I tried to replace the single value of the form with an array of values ; and to do a foreach loop in the addtonotification.php file but I just can't have this tweak running.

=> am I on the right tracks?
=> shall I use anoter form type to pass the array of values?
=> what is the best way to perform the foreach loop within the addtonotification.php file?

Thanks in advance for your help :-)

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 31 2025 01:24:44
Script start
Timing: Jan 31 2025 01:24:44
Module start 'layout'
Timing: Jan 31 2025 01:24:44
Module start 'content'
Timing: Jan 31 2025 01:24:44
Module end 'content'
Timing: Jan 31 2025 01:24:44
Script end

Main resources:

Total runtime0.0358 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.5078151.2422
Module start 'layout' 0.00560.0040 740.7500220.7344
Module start 'content' 0.00960.0242 961.4844997.8359
Module end 'content' 0.03380.0019 1,959.320329.9922
Script end 0.0357  1,989.3125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00298.2334140.0002
Check MTime0.00123.3871140.0001
Mysql Total
Database connection0.00102.735610.0010
Mysqli_queries0.00298.137330.0010
Looping result0.00000.047310.0000
Template Total0.00123.510.0012
Template load0.00102.729610.0010
Template processing0.00030.749610.0003
Override
Cache load0.00071.831910.0007
General
dbfile0.004312.009380.0005
String conversion0.00000.021340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs