Make eZ Flow event calendar start week on Sunday

Author Message

Mark Langkau

Monday 12 May 2008 7:59:44 pm

I'm using eZ Publish 4.0 and eZ Flow 1.3. How do I make the event calendar month view begin the week on Sunday rather than Monday?

Thanks,
Mark

André R.

Tuesday 13 May 2008 1:15:34 am

You need to modify (override) the template in use.
In 4.0 the template used is:
extension/ez<flow|webin>/design/ez<flow|webin>/templates/full/event_view_calendar.tpl

In 3.9 / 3.10 it is in:
extension/ez<flow|webin>/design/ez<flow|webin>/overrides/templates/full/event_view_calendar.tpl

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Mark Langkau

Tuesday 13 May 2008 7:16:20 am

Thanks for your quick reply. I found the file in the ezwebin path. I have changed the "calendar_heading_days" from:

<tr class="calendar_heading_days">
    <th class="first_col">{"Mon"|i18n("design/ezwebin/full/event_view_calendar")}</th>
    <th>{"Tue"|i18n("design/ezwebin/full/event_view_calendar")}</th>
    <th>{"Wed"|i18n("design/ezwebin/full/event_view_calendar")}</th>
    <th>{"Thu"|i18n("design/ezwebin/full/event_view_calendar")}</th>
    <th>{"Fri"|i18n("design/ezwebin/full/event_view_calendar")}</th>
    <th>{"Sat"|i18n("design/ezwebin/full/event_view_calendar")}</th>
    <th class="last_col">{"Sun"|i18n("design/ezwebin/full/event_view_calendar")}</th>
</tr>

to:

<tr class="calendar_heading_days">
    <th class="first_col">{"Sun"|i18n("design/ezwebin/full/event_view_calendar")}</th>
    <th>{"Mon"|i18n("design/ezwebin/full/event_view_calendar")}</th>
    <th>{"Tue"|i18n("design/ezwebin/full/event_view_calendar")}</th>
    <th>{"Wed"|i18n("design/ezwebin/full/event_view_calendar")}</th>
    <th>{"Thu"|i18n("design/ezwebin/full/event_view_calendar")}</th>
    <th>{"Fri"|i18n("design/ezwebin/full/event_view_calendar")}</th>
    <th class="last_col">{"Sat"|i18n("design/ezwebin/full/event_view_calendar")}</th>
</tr>

This obviously changes only the column heading. Now I'm not sure where to change the actual value of the first day of the week to be Sunday rather than Monday. Is that set in this same file?

Thanks,
Mark

André R.

Tuesday 13 May 2008 7:33:05 am

> Is that set in this same file?
Yes, but it's pretty much coded into the template code there, so you have to just modify a lot of the code. I'ts a long time since I wrote it, but I think '$dayofweek' is quite important here, 0 is sunday and so on.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Mark Langkau

Tuesday 13 May 2008 12:05:26 pm

So there's no magic .ini file where I can tweak the setting, eh? hehe

It's a nice bit of code, and I thank you for it. My users here expect the week to start on Sunday, so I have some work to do. If I figure it out, I'll share it here.

Thanks,
Mark

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 01:24:49
Script start
Timing: Jan 19 2025 01:24:49
Module start 'layout'
Timing: Jan 19 2025 01:24:49
Module start 'content'
Timing: Jan 19 2025 01:24:49
Module end 'content'
Timing: Jan 19 2025 01:24:49
Script end

Main resources:

Total runtime0.7337 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 590.4297152.6406
Module start 'layout' 0.00790.0037 743.070339.4766
Module start 'content' 0.01170.7207 782.5469566.8984
Module end 'content' 0.73240.0012 1,349.445316.1250
Script end 0.7336  1,365.5703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.5518160.0003
Check MTime0.00160.2192160.0001
Mysql Total
Database connection0.00150.207910.0015
Mysqli_queries0.672891.7072630.0107
Looping result0.00080.1056610.0000
Template Total0.698695.220.3493
Template load0.00260.356420.0013
Template processing0.696094.861620.3480
Template load and register function0.00030.037610.0003
states
state_id_array0.00080.109110.0008
state_identifier_array0.00060.087820.0003
Override
Cache load0.00210.2923300.0001
Sytem overhead
Fetch class attribute can translate value0.00130.175820.0006
Fetch class attribute name0.00150.203260.0002
XML
Image XML parsing0.00130.174620.0006
class_abstraction
Instantiating content class attribute0.00000.002070.0000
General
dbfile0.00120.1575170.0001
String conversion0.00000.001540.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs