datatype registers to ez-newsletter automatically

Author Message

Christian Rößler

Thursday 14 May 2009 5:21:44 am

A customer needs to be able to
- fill out a form (a class-representation with 'collects information' )
- register automatically when submitting the form ( after selecting the available newsletters )

After evaluating different kind of approaches (hooks, workflows), i am about to develop a custom datatype (name it newsletter-register) which will
- create a checkbox saying 'register to a newsletter'
- create list of available newsletters
- after submitting the form registering the user to a newsletter re-using the eznewsletter-logic plus using double-opt-in per default.

---------------

Questions:
How would you do it?
Is my approach dumb and do you have a better idea?
Due to the lack of knowledge (documentation) of custom events/workflows in interaction with 'content/action' module, i came up with the idea of the datatype.

would be great to get some input!

cheers,
christian

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

Sebastiaan van der Vliet

Thursday 14 May 2009 6:32:58 am

Hi Christian,

We have already developed a datatype for eZ Newsletter. Please contact me info@contactivity.com for a copy plus info.

Kind regards,
Sebastiaan

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

Björn Dieding@xrow.de

Thursday 14 May 2009 10:56:17 am

http://projects.ez.no/newsletteraddons

we also have a similar datatype...

If we use it again I would things a bit different. e.g. bind the subscription options not to the newsletter type . I would rather bind it to the subscription group.

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/

Björn Dieding@xrow.de

Thursday 14 May 2009 10:57:53 am

Sebastiaan,

if you also share your results / datatype it could be helpfull. Then we could concentrate in developing one together overtime.

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/

Christian Rößler

Wednesday 20 May 2009 4:45:53 am

Sebastiaan, Björn,

thanks a lot for your input. I appreciate!
Studying your solutions gave me a few hints on how to solve my particular problem.

When I'm finished programming (currently i do project-hopping) I'll post it as an ez-community-project - if this is ok for you.

I'll definitely let you know when this is complete - before creating the project.

The next part would be to improve/rewrite the ezNewsletter :)

Cheers,
Christian

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

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 20:54:22
Script start
Timing: Jan 18 2025 20:54:22
Module start 'layout'
Timing: Jan 18 2025 20:54:22
Module start 'content'
Timing: Jan 18 2025 20:54:23
Module end 'content'
Timing: Jan 18 2025 20:54:23
Script end

Main resources:

Total runtime0.7882 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.0469152.6406
Module start 'layout' 0.00580.0032 740.687539.4922
Module start 'content' 0.00890.7776 780.1797606.7891
Module end 'content' 0.78660.0016 1,386.968816.1250
Script end 0.7881  1,403.0938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4223160.0002
Check MTime0.00130.1636160.0001
Mysql Total
Database connection0.00090.112510.0009
Mysqli_queries0.716590.9034650.0110
Looping result0.00060.0794630.0000
Template Total0.757996.220.3789
Template load0.00220.278220.0011
Template processing0.755795.876020.3778
Template load and register function0.00030.032410.0003
states
state_id_array0.00110.135510.0011
state_identifier_array0.00080.096320.0004
Override
Cache load0.00200.2483420.0000
Sytem overhead
Fetch class attribute can translate value0.00090.108030.0003
Fetch class attribute name0.00090.111970.0001
XML
Image XML parsing0.00841.065830.0028
class_abstraction
Instantiating content class attribute0.00000.002180.0000
General
dbfile0.00801.0122230.0003
String conversion0.00000.000940.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
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/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: 6

Time used to render debug report: 0.0001 secs