Notifications

Author Message

John Mina

Thursday 07 April 2005 4:31:56 am

Hi all,
Through developong the website, i want to make a notification facility like that availble here in this forum,
The Current version i use for EZ publish is 3.3-3 .
Code I Used:

 <form action="/content/action/" method="post">
       <input class="button" name="ActionAddToNotification" value="Keep me updated" type="submit">

 </form>

If any help please let me know

Thanks

Ɓukasz Serwatka

Thursday 07 April 2005 5:16:16 am

Hi John,

You shoul add more input fields to your form, here is the working code:

<form method="post" action={"content/action/"|ezurl}>
<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
<input type="hidden" name="ContentObjectID" value="{$node.contentobject_id.}" />
<input class="button" type="submit" name="ActionAddToNotification" value="Keep me updated" />
<input type="hidden" name="NodeID" value="{$node.node_id}" />
<input type="hidden" name="ClassID" value="14" />
</form>

You will have to change ClassID to your class id.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Paul Borgermans

Thursday 07 April 2005 5:54:48 am

You only need to specify the node id for notifications to work:

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

If you do this in a pagelayout, be aware that the $node variable is not set (you will have to fetch it from the $module_result variable):
So for a pagelayout.tpl, do something like this:

{let node=fetch(content,node,hash(node_id,$module_result.node_id))}
{*...*}

 {section show=$node}
{*the above avoids the notification button appearing if not in node view mode*}
 <form method="post" action={"content/action/"|ezurl}>
 <input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
 <input class="button" type="submit" name="ActionAddToNotification" value="Keep me updated" />
 </form>
 {/section}
{*...*}
{/let}

hth

-paul

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

Albert Hornos

Monday 30 January 2006 1:44:19 am

Hi,
I've a problem. I've add the notification to the list but no mail is sent. Anyone know what cold be the reason?

Thanks!

Martin Lekvall

Monday 30 January 2006 2:49:43 am

Could be that you need to set up cronjobs to run.
(cronjobs/notification.php)

To start out, check this one out
http://ez.no/products/ez_publish_open_source_enterprise_cms/documentation/configuration/configuration/cron_jobs

/Martin

EzP 3.5.0, OE 2.0
RH-EL3 2.4, mySql 4.1.7, php 4.3.9, apache 1.3.33

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

Main resources:

Total runtime0.6626 sec
Peak memory usage4,096.0000 KB
Database Queries69

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0039 587.7891152.6094
Module start 'layout' 0.00390.0028 740.398439.3984
Module start 'content' 0.00670.6544 779.7969678.3906
Module end 'content' 0.66110.0015 1,458.187516.2031
Script end 0.6626  1,474.3906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4861160.0002
Check MTime0.00140.2172160.0001
Mysql Total
Database connection0.00050.072110.0005
Mysqli_queries0.607591.6872690.0088
Looping result0.00060.0862670.0000
Template Total0.635896.020.3179
Template load0.00210.316720.0010
Template processing0.633795.642420.3169
Template load and register function0.00010.019010.0001
states
state_id_array0.00120.180710.0012
state_identifier_array0.00110.172020.0006
Override
Cache load0.00180.2700350.0001
Sytem overhead
Fetch class attribute can translate value0.00050.077750.0001
Fetch class attribute name0.00100.156970.0001
XML
Image XML parsing0.00140.208250.0003
class_abstraction
Instantiating content class attribute0.00000.001870.0000
General
dbfile0.00170.2492250.0001
String conversion0.00000.001040.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/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: 28
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs