Forums / Developer / XHTML-Tags & EMails

XHTML-Tags & EMails

Author Message

Pascal von Büren

Friday 29 April 2005 6:15:47 am

Hi there,

I'm currently trying to develop an extension that allows sending a specific node by plain email.
Everything works fine but some <i>distracting</i> XHTML-Tags occuring in the mail's body.

I'm using <b>attribute_view_gui</b> to show the node's attributes, so i can't use <b>wash</b>, which was my first thought. Specifying <b>view=plain</b> as parameter doesnt' show any difference either.

My current workaroung uses strip_tags() on php-Level of my module, but a solution using templates definitly would be prefered.

Has anyone done such a thing before and could provide me with a hint?

Thanks for any kind of help,

Pascal

Xavier Dutoit

Sunday 01 May 2005 7:59:15 am

Hi,

Why aren't you using either tipafriend or informationcollector ? Might be easier than developing a new extension, isn't it ?

About your "distracting" xhtml tags, could you give us more infos ? It might be simply a matter of changing the template used by attribute_view_gui.

X+

http://www.sydesy.com

Pascal von Büren

Monday 02 May 2005 12:31:06 am

Hi Xavier,

I'm trying to extend <b>tipafriend</b> to send all information available to the sent node, not only a link refering to it, so it'd be an extended tipafriend-solution.

The problem is, that I can't use plain templates with attribute_view_gui, sent mails always have the standart templates for all attributes, so especially with Textarea, all the paragraphs, html-entities and so are displayed in the mail's body.

Looking at the notification template, i tried the following code to select plain templates:

{attribute_view_gui view=plain attribute=$attribute}

Maybe it's just the <b>view</b>-parameter that should be changed?

Thanks,

Pascal

Xavier Dutoit

Monday 02 May 2005 6:30:30 am

Hi,

Modify the tipafriend template, so you can send as many information as you want.

X+

http://www.sydesy.com

Daniel Beyer

Friday 01 July 2005 7:37:56 am

Hi Pascal,

instead of using

{attribute_view_gui view=plain attribute=$attribute}

just use this:

{include uri=concat("design:content/datatype/view/plain/",$attribute.contentclass_attribute.data_type_string,".tpl") attribute=$attribute}

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

eZ debug

Timing: Jan 19 2025 00:34:11
Script start
Timing: Jan 19 2025 00:34:11
Module start 'content'
Timing: Jan 19 2025 00:34:11
Module end 'content'
Timing: Jan 19 2025 00:34:11
Script end

Main resources:

Total runtime0.1604 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 587.6094180.8438
Module start 'content' 0.00710.0061 768.453197.9609
Module end 'content' 0.01330.1470 866.4141526.5000
Script end 0.1603  1,392.9141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00382.3697200.0002
Check MTime0.00140.8607200.0001
Mysql Total
Database connection0.00080.515210.0008
Mysqli_queries0.115471.98271410.0008
Looping result0.00140.84451390.0000
Template Total0.146591.410.1465
Template load0.00090.560510.0009
Template processing0.145690.802710.1456
Override
Cache load0.00060.362310.0006
Sytem overhead
Fetch class attribute can translate value0.00080.503310.0008
XML
Image XML parsing0.00020.121010.0002
General
dbfile0.00171.0501200.0001
String conversion0.00000.006130.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs