Forums / Developer / Subscription/notification

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>

eZ debug

Timing: Jan 19 2025 04:38:29
Script start
Timing: Jan 19 2025 04:38:29
Module start 'content'
Timing: Jan 19 2025 04:38:30
Module end 'content'
Timing: Jan 19 2025 04:38:30
Script end

Main resources:

Total runtime1.4885 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 590.0859180.8359
Module start 'content' 0.00561.3370 770.9219564.3203
Module end 'content' 1.34260.1458 1,335.2422336.7500
Script end 1.4884  1,671.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2347210.0002
Check MTime0.00140.0933210.0001
Mysql Total
Database connection0.00070.044110.0007
Mysqli_queries1.392093.51841940.0072
Looping result0.00210.13961920.0000
Template Total1.447397.220.7236
Template load0.00170.115020.0009
Template processing1.445697.117020.7228
Template load and register function0.00020.013010.0002
states
state_id_array0.00130.087610.0013
state_identifier_array0.00220.148020.0011
Override
Cache load0.00160.1094870.0000
Sytem overhead
Fetch class attribute can translate value0.00120.082630.0004
Fetch class attribute name0.00150.102240.0004
XML
Image XML parsing0.00090.060230.0003
class_abstraction
Instantiating content class attribute0.00000.000540.0000
General
dbfile0.00330.2224270.0001
String conversion0.00000.000430.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs