Pagelayout ICalendar

Author Message

anne martinet

Thursday 25 February 2010 2:54:00 am

Hi everyone,

I want a new pagelayout for iCalendar.

In my web page, I have a link : <a href="layout/set/ical/{$node.url_alias}"> Lien iCalendar </a>

And my pagelayout iCal it's for exemple :

BEGIN:VCALENDAR
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20091028T090000Z
DTEND:20091028T093000Z
TRANSP:TRANSPARENT
UID:evt_12345@solucom.fr
DTSTAMP:20091028T142520Z
SUMMARY:titre de l'événement
DESCRIPTION:description courte de l'événement en
  question.\nPossiblement sur\nPlusieurs lignes\n\n
URL:http://www.solucom.fr/evenements/12345
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR

And when I clic in the link, I want open a file .ics.

How can I say in my pagelayout iCal that it's format file .ics ????

What the best way to do that?

Thanks in advanced,

Anne.

anne martinet

Friday 26 February 2010 7:26:42 am

I found it !!

:)

  • Solucom/extension/Solucom/settings/layout.ini.append.php :
<?php /* #?ini charset="utf-8"?[ical] PageLayout=ical_pagelayout.tpl 

*/ ?>
  • Solucom/extension/solucom/design/solucom/templates/ical_pagelayout.tpl
{*?template charset=utf-8?*}  BEGIN:VCALENDAR  METHOD:PUBLISH  BEGIN:VEVENT  DTSTART:20091028T090000Z  DTEND:20091028T093000Z  TRANSP:TRANSPARENT  UID:evt_12345@solucom.fr  DTSTAMP:20091028T142520Z  SUMMARY:titre de l'événement  DESCRIPTION:description courte de l'événement en  question.\nPossiblement sur\nPlusieurs lignes\n\n  URL:http://www.solucom.fr/evenements/12345  CLASS:PUBLIC  END:VEVENT  END:VCALENDAR
  • In pagelayout :
<a href="layout/set/ical/content/view/full/2/nom_fichier.ics"} >Lien</a>
  • Solucom/settings/override/site.ini.append.php
HTTPHeaderSettings]  # Enable/disable custom HTTP header data.  CustomHeader=enabled  # Only apply custom headers for anonymous users  OnlyForAnonymous=disabled  # Header list. Contains all HTTP which should override standard ones.  HeaderList[]=Content-Type  Content-Type[]  Content-Type[/layout/set/ical]=text/calendar; qs=0.9
  • Solucom/kernel/classes/ezhttpheader.php [ligne 139]
//@list( $headerValue, $depth, $level ) = explode( ';', $value ); 

@list( $headerValue, $depth, $level ) = explode( '@@', $value );

:)

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 15:01:51
Script start
Timing: Jan 18 2025 15:01:51
Module start 'layout'
Timing: Jan 18 2025 15:01:51
Module start 'content'
Timing: Jan 18 2025 15:01:52
Module end 'content'
Timing: Jan 18 2025 15:01:52
Script end

Main resources:

Total runtime1.4356 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 587.8125152.6094
Module start 'layout' 0.00560.0032 740.421939.4141
Module start 'content' 0.00881.4254 779.8359436.2109
Module end 'content' 1.43420.0014 1,216.04698.1875
Script end 1.4356  1,224.2344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.2681160.0002
Check MTime0.00160.1148160.0001
Mysql Total
Database connection0.00080.057010.0008
Mysqli_queries1.386996.6014520.0267
Looping result0.00070.0509500.0000
Template Total1.403997.820.7019
Template load0.00250.176320.0013
Template processing1.401397.609720.7007
Template load and register function0.00010.008410.0001
states
state_id_array0.00070.046410.0007
state_identifier_array0.00200.142520.0010
Override
Cache load0.00200.1373320.0001
Sytem overhead
Fetch class attribute can translate value0.00070.046710.0007
Fetch class attribute name0.00140.094220.0007
XML
Image XML parsing0.00030.021510.0003
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00120.0850100.0001
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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
5content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
5content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs