Subscription/notification

Author Message

K259

Thursday 04 March 2004 4:09:53 am

Are there any doc. on how the notification works, and how to eZ implement this? Did a search, but this url was the only doc. I found:

http://ez.no/ez_publish/documentation/reference/modules/notification

Bård wrote this july 23. 2003(topic eZ.no-notification):
"Yes, we will add documentation on how to do this. We should probably do a tutorial on how we implemented the notifications on ez.no".
(*http://www.ez.no/community/forum/suggestions/ezno_forum_notification*)

Does this documentation exist? Tried the search, but didn't find anything.

Best regards

Björn Dieding@xrow.de

Thursday 04 March 2004 5:31:26 pm

You wanna supply code? If not, just setup the cron (search for "cron") and it works veyr nicely.

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

K259

Friday 05 March 2004 1:57:09 am

NOTE: email-subscription on articles on a news site when they're published or contains specific words(registered by the user). The user register keywords, and his/her email-address. Then he/she get an email when a new article is published.

WISH: I want to implement a subscription-function on my news site directly(like the right-menu here: http://www.sfgate.com/newsletters/ ), without first implementing a "Subscribe button".

This is the code for the "subscribe button" (which I actually don't want to use):
<form action={"/notification/edit/"|ezurl} method="post" name="SubscribeForm">
{include uri="design:gui/button.tpl" name=Subscribe id_name=SubscribeToNodeButton value=Subscribe}
<input type="hidden" name="SubscribeNodeID" value="{$node.node_id}">
<input type="hidden" name="SubscribeNodeName" value="{$node.object.name}">
</form>

The action above takes the user to another template(the one below), where the user is able to fill inn a word(a word which we're going to do a check on. If an article contains this word, then we're going to send him/her an email with the url to the new published article which contains this word). The user fills in his/her e-mail address, and selects when the e-mail shall be sent (select list).

The QUESTION is: I want to implement the code below into a news-listing template, AND DROP THE BUTTON "SUBSCRIBE"(which takes me to another template), without the user have to click on a "subscribe button" to get to these fields listed below.

E.g. at the end of a news sites article listing I want these fields, and a Register-button, so the user only need ONE CLICK instead of two. BUT, the action below only gives me a blank page. I've included the hidden tag from above(SubscribeNodeID, which is 22), but I think I miss something. DOES ANYONE know if I'm missing any hidden tag..or is my ACTION wrong?

<form action={concat($module.functions.edit.uri,"/",$rule_type,"/",$rule_id)|ezurl} method="post" name="Edit">

<h3>Subscribe - News</h3>
<table>
<tr>
<td colspan="2">
<font size="-1">Send a message if the page {$subscribe_node_name} or one of the childobjects are changed, and it contains the following words:</font>
</td>
</tr>
<tr>
<td colspan="2">
<input type="text" name="keyword" value="" size="55">
</td>
</tr>
<tr>
<td colspan="2">
<font size="-1">(Let this field be empty if you want to get an email on all new article.)<br /><font>
</td>
</tr>
<tr>
<td>
<font size="-1">Email-address:</font>
</td>
<td>
<input type="text" name="SubscribeEmail" value="{$user_email}" size="40">
</td>
</tr>
<tr>
<td>
<font size="-1">Weekday/time:</font>
</td>
<td>
<select name="sendTime_week">
<option value="-1" {section show=eq($userlink_list.send_weekday,-1)}selected{/section}>Imediate</option>
<option value="1" {section show=eq($userlink_list.send_weekday,1)}selected{/section}>Monday</option>
<option value="2" {section show=eq($userlink_list.send_weekday,2)}selected{/section}>Tuesday</option>
</select>
 
<select name="sendTime_hour">
<option value="-1" {section show=eq($userlink_list.send_time,-1)}selected{/section}>Every hour</option>
<option value="1" {section show=eq($userlink_list.send_time,1)}selected{/section}>1:00</option>
<option value="2" {section show=eq($userlink_list.send_time,2)}selected{/section}>2:00</option>
<option value="11" {section show=eq($userlink_list.send_time,11)}selected{/section}>11:00</option>
<option value="12" {section show=eq($userlink_list.send_time,12)}selected{/section}>12:00</option>
<option value="13" {section show=eq($userlink_list.send_time,13)}selected{/section}>13:00</option>
<option value="14" {section show=eq($userlink_list.send_time,14)}selected{/section}>14:00</option>
<option value="15" {section show=eq($userlink_list.send_time,15)}selected{/section}>15:00</option>
</select>
</td>
</tr>
</table>
<br />
<table width="100%">
<tr>
<input type="hidden" name="sendMethod" value="email">
<input type="hidden" name="CurrentRuleID" value="{$rule_id}">
<input type="hidden" name="SubscribeNodeID" value="22">
<td>{include uri="design:gui/button.tpl" name=Store id_name=StoreRuleButton value=Register}</td>
<input type="button" value={"Discard"|i18n("design/standard/notification")} onClick="javascript: history.go(-1)">
<td width="99%"></td>
</tr>
</table>
</form>

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

Main resources:

Total runtime0.0209 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.1406151.2109
Module start 'layout' 0.00740.0036 739.351636.6484
Module start 'content' 0.01100.0082 776.000094.1406
Module end 'content' 0.01920.0017 870.140637.9922
Script end 0.0209  908.1328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002713.1038140.0002
Check MTime0.00125.9120140.0001
Mysql Total
Database connection0.00157.022010.0015
Mysqli_queries0.003918.545230.0013
Looping result0.00000.119710.0000
Template Total0.00136.310.0013
Template load0.00104.803310.0010
Template processing0.00031.478010.0003
Override
Cache load0.00062.820410.0006
General
dbfile0.003114.793880.0004
String conversion0.00000.044440.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.0002 secs