Setting up a node notification at user register

Author Message

Nathan Kelly

Monday 28 November 2005 7:14:46 pm

Hi all, the site I'm currently working on has a newsletter section, basically its just a folder[class] called "Newsletter".

I would like to have a checkbox on the user registration form that allows the user to specify wether or not they would like to subscribe to the newsletter. If they select the check box the newsletter node will be added to their notifications and they will be able to un-subscribe from the notification/settings area.

Is this possible? I fear the limitation will be that the user will not be created until [after] they have clicked the register button, therefore the notification can't be added until [after] the user exists.

This may need to be a two step process but I'm not sure where to start, can anyone give me some suggestions on how this might be achieved?

Cheers!

Pardon me while I burst into flames...

Alexandre Abric

Tuesday 29 November 2005 12:32:04 am

Hi,

Yes, this is possible. You need to develop a workflow on "post register".

Have a look at the contrib I made : http://ez.no/community/contribs/workflow/personal_folder

It comes with a "post activate" trigger and you will also find a patch for the "post register" trigger in the comments.

Nathan Kelly

Tuesday 29 November 2005 6:44:09 pm

Hi Lex, there seems to be a lot of patching to do for something so simple, is this the only way this can be done?

If so how much of your extension do I need to change or disregard to do it, I'm not very adept when it comes to PHP (in fact I'm useless) so your files don't make much sense to me.

I'll give it a try but I don't like my chances, thanks for the help.

Cheers!

Pardon me while I burst into flames...

Andrew Kelly

Wednesday 14 December 2005 4:37:19 am

Hi Nathan,

really like to discuss this topic with you, please contact me at
akelly at transparency dot org when you're available.

And by the way, is there a way to contact member directly rather than using the forums like this?

Andy

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 19 2025 00:25:43
Script start
Timing: Jan 19 2025 00:25:43
Module start 'layout'
Timing: Jan 19 2025 00:25:43
Module start 'content'
Timing: Jan 19 2025 00:25:44
Module end 'content'
Timing: Jan 19 2025 00:25:44
Script end

Main resources:

Total runtime1.0447 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.1797152.6406
Module start 'layout' 0.00550.0030 741.820339.4922
Module start 'content' 0.00851.0345 781.3125586.2578
Module end 'content' 1.04300.0016 1,367.570312.1250
Script end 1.0446  1,379.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3161160.0002
Check MTime0.00140.1331160.0001
Mysql Total
Database connection0.00090.081810.0009
Mysqli_queries0.983994.1873620.0159
Looping result0.00080.0804600.0000
Template Total1.008796.620.5044
Template load0.00210.197720.0010
Template processing1.006696.359220.5033
Template load and register function0.00010.009110.0001
states
state_id_array0.00130.119810.0013
state_identifier_array0.00080.072120.0004
Override
Cache load0.00160.1507270.0001
Sytem overhead
Fetch class attribute can translate value0.00130.128230.0004
Fetch class attribute name0.00170.160160.0003
XML
Image XML parsing0.00130.122030.0004
class_abstraction
Instantiating content class attribute0.00000.001370.0000
General
dbfile0.00110.1083220.0001
String conversion0.00000.000840.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs