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

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 19 2025 03:38:26
Script start
Timing: Jan 19 2025 03:38:26
Module start 'layout'
Timing: Jan 19 2025 03:38:26
Module start 'content'
Timing: Jan 19 2025 03:38:27
Module end 'content'
Timing: Jan 19 2025 03:38:27
Script end

Main resources:

Total runtime1.5516 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 589.0313152.6094
Module start 'layout' 0.00460.0035 741.640639.4141
Module start 'content' 0.00811.5420 781.0547535.7344
Module end 'content' 1.55010.0014 1,316.789112.1953
Script end 1.5515  1,328.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.1977160.0002
Check MTime0.00130.0822160.0001
Mysql Total
Database connection0.00060.036310.0006
Mysqli_queries1.500196.6820680.0221
Looping result0.00070.0444660.0000
Template Total1.518497.920.7592
Template load0.00180.117720.0009
Template processing1.516697.744820.7583
Template load and register function0.00020.011410.0002
states
state_id_array0.00140.087310.0014
state_identifier_array0.00140.089320.0007
Override
Cache load0.00150.0973270.0001
Sytem overhead
Fetch class attribute can translate value0.00100.064430.0003
Fetch class attribute name0.00110.072260.0002
XML
Image XML parsing0.00040.022630.0001
class_abstraction
Instantiating content class attribute0.00000.000860.0000
General
dbfile0.00130.0849100.0001
String conversion0.00000.000540.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/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
1content/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: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs