Problem with contact_us (email sender)

Author Message

Leonardo López

Wednesday 02 November 2005 6:05:23 am

Hello

Sorry if this was already discussed, but i havent found answer yet, a litle problem... when users send messages across the "contact_us" module, the email address of the sender is always the same (administrator email) how can i do to fix that?

(excuse my bad english)

Łukasz Serwatka

Tuesday 08 November 2005 11:52:11 pm

Hi Leonardo,

This is correct because, by default "Feedback form" is without "sender" text line attribute. You can add such new attribute to "Feedback form" class and add sender email.

Then in feedback_form.tpl add

{set-block scope=root variable=email_sender}{$object.data_map.sender.content}{/set-block}

Hope this will help.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

J-A Eberhard

Wednesday 09 November 2005 1:05:30 pm

Hi Lukasz,

Have been looking for this for quite a while.

Would it be possible to use the feedback_form class attribute email instead of a newly created sender?

Which template do you add your code snippet?
/full/feedback_form.tpl or
/collectedinfomail/feedback_form.tpl
Thanks

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Łukasz Serwatka

Thursday 10 November 2005 1:01:34 am

Hi J-A,

This is possible, you will have to set

{set-block scope=root variable=email_sender}{$collection.attributes[2].data_text|wash}{/set-block}

in

/override/templates/collectedinfomail/feedback_form.tpl

If will not work, then set correct index [n] for $collection.attributes array which is valid for email. This will work for standard feedback_form

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Leonardo López

Thursday 17 November 2005 6:29:32 am

Thanks a lot Lukasz!!!

I solve the problem modifying the archive "collectinformation.php" i just change the sender and put this line:
$sender=$user->attribute('email');
And it works good...

This archive is located in ../kernel/content

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

Main resources:

Total runtime0.6709 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.0041 589.1719152.6406
Module start 'layout' 0.00410.0020 741.812539.4766
Module start 'content' 0.00610.6634 781.2891606.0000
Module end 'content' 0.66950.0014 1,387.289112.1406
Script end 0.6708  1,399.4297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.4320160.0002
Check MTime0.00130.1920160.0001
Mysql Total
Database connection0.00060.085010.0006
Mysqli_queries0.616391.8642650.0095
Looping result0.00050.0793630.0000
Template Total0.646796.420.3233
Template load0.00240.350720.0012
Template processing0.644396.036620.3221
Template load and register function0.00020.035010.0002
states
state_id_array0.00130.199310.0013
state_identifier_array0.00060.088820.0003
Override
Cache load0.00190.2875370.0001
Sytem overhead
Fetch class attribute can translate value0.00070.110530.0002
Fetch class attribute name0.00180.270770.0003
XML
Image XML parsing0.00090.134930.0003
class_abstraction
Instantiating content class attribute0.00000.002280.0000
General
dbfile0.00080.1225230.0000
String conversion0.00000.000640.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
10content/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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs