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.