Forums / Install & configuration / Problem with contact_us (email sender)

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

eZ debug

Timing: Jan 19 2025 00:29:49
Script start
Timing: Jan 19 2025 00:29:49
Module start 'content'
Timing: Jan 19 2025 00:29:49
Module end 'content'
Timing: Jan 19 2025 00:29:49
Script end

Main resources:

Total runtime0.7990 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 587.8359180.8203
Module start 'content' 0.00630.6950 768.6563611.0938
Module end 'content' 0.70130.0976 1,379.7500337.3750
Script end 0.7989  1,717.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.4857210.0002
Check MTime0.00140.1784210.0001
Mysql Total
Database connection0.00090.108110.0009
Mysqli_queries0.729191.25012020.0036
Looping result0.00160.20082000.0000
Template Total0.772796.720.3863
Template load0.00220.276920.0011
Template processing0.770596.431120.3852
Template load and register function0.00010.017910.0001
states
state_id_array0.00070.091410.0007
state_identifier_array0.00100.125020.0005
Override
Cache load0.00190.2334370.0001
Sytem overhead
Fetch class attribute can translate value0.00090.114240.0002
Fetch class attribute name0.00090.112570.0001
XML
Image XML parsing0.00120.156340.0003
class_abstraction
Instantiating content class attribute0.00000.001780.0000
General
dbfile0.00280.3490340.0001
String conversion0.00000.000730.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
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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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