Forums / Setup & design / TIp a friend

TIp a friend

Author Message

Bill Rust

Friday 09 February 2007 8:38:07 am

Ok, I've got the tip a friend feature running on my site (eZ 3.4.4) but I want the whole article to be emailed to the friend and not just the link. Am I right in assuming that the template I'm after is tipafriend.php? Any tips for getting it to do what I want it to do?

Many thanks

Softriva .com

Friday 09 February 2007 10:24:03 am

Here are your tpls
tipafriendmail.tpl tipafriend.tpl

located in
design/standard/templates/content

hope this helps

Bill Rust

Monday 12 February 2007 6:56:32 am

Great, I've found those templates so all I now need to do is figure out how, with my basic PHP skills, to get the whole article to be emailed!

Claudia Kosny

Monday 12 February 2007 12:14:55 pm

Hi Bill

I am not sure whether it the same for eZ 3.4.4,but on eZ 3.8.3 the variable $node_id is available in the template tipafriendmail.tpl and in the template itself the node_id is used to fetch the node object itself.
So the only thing you need to do is to add the html for the display of the node to the tipafriendmail template. No PHP is needed, just template language like for every other template. Just have a look at the other templates you use to display a node to get a good starting point.

Good luck

Claudia

Bill Rust

Monday 19 February 2007 5:22:59 am

Ok, many thanks for that Claudia, you now have me on the right track.

I still have a couple of problems however. All emails sent all include the paragraph.tpl file from design/standard/templates/content/datatype/view/ezxmltags/ This, of course, gets translated from a html paragraph break to <p> tag on the emails. How would I get around excluding the paragraph.tpl from the tipafriend section? Could I make the tipafriend section html friendly?


{$node.object.data_map.title.content|wash()}
{$content_object.published|l10n( date )})
{attribute_view_gui attribute=$content_version.data_map.thumbnail image_class=medium alignment=right}
{section show=$node.object.data_map.intro.content.is_empty|not}
{attribute_view_gui attribute=$node.object.data_map.intro}
{section show=$node.object.data_map.body.content.is_empty|not}
{attribute_view_gui attribute=$node.object.data_map.body}

Claudia Kosny

Monday 19 February 2007 1:25:49 pm

Hi Bill

I don't know whether this is possible. Apart from that I am not sure what you mean by html friendly - imho a <p> tag is very html friendly.

Claudia

eZ debug

Timing: Jan 19 2025 09:02:56
Script start
Timing: Jan 19 2025 09:02:56
Module start 'content'
Timing: Jan 19 2025 09:02:56
Module end 'content'
Timing: Jan 19 2025 09:02:56
Script end

Main resources:

Total runtime0.2173 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.0058 589.9609180.8516
Module start 'content' 0.00580.0064 770.812597.8359
Module end 'content' 0.01220.2051 868.6484525.8359
Script end 0.2172  1,394.4844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00351.6265200.0002
Check MTime0.00150.6799200.0001
Mysql Total
Database connection0.00070.333210.0007
Mysqli_queries0.166076.40221410.0012
Looping result0.00140.64491390.0000
Template Total0.204694.210.2046
Template load0.00100.470410.0010
Template processing0.203693.678710.2036
Override
Cache load0.00060.282210.0006
Sytem overhead
Fetch class attribute can translate value0.00080.390310.0008
XML
Image XML parsing0.00020.091610.0002
General
dbfile0.00733.3389200.0004
String conversion0.00000.002330.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.0002 secs