The month name shown on top of a calendar or a list is 1 month ahead.
latest version of cmsms and modules, CGCalendar 1.14.1 and CGExtensions 1.38.11, php 5.3.28
http://www.tibetaans-instituut.org/cms/yeunten-ling-huy
[SOLVED]CGCalender: month name shown on top is 1 month ahead
-
staartmees
- Power Poster

- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
[SOLVED]CGCalender: month name shown on top is 1 month ahead
Last edited by staartmees on Tue Jun 10, 2014 9:00 am, edited 1 time in total.
Re: CGCalender: month name shown on top is 1 month ahead
Try set in config.php
Code: Select all
$config['timezone'] = 'Europe/Amsterdam';
$config['set_db_timezone'] = 'Europe/Amsterdam';- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: CGCalender: month name shown on top is 1 month ahead
If Rolf's change doesn't work, post your CGCalendar template(s) for that page you linked.
-
staartmees
- Power Poster

- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
Re: CGCalender: month name shown on top is 1 month ahead
sorry Rolf, no change.
my template:
Same problem when I use a standard template
So the problem is located in the month navigation
I 'solved' the problem by changing
my template:
Code: Select all
<div class="calendar-list">
<div style="text-align:center;">
<h3>{if $day > 0}{$day} {/if}{$month_names[$month]} {$year}</h3>
{if isset($navigation)}
{if isset($navigation.prev)}<span class="calendar-prev"><a href="{$navigation.prev}">Vorige maand</a></span>{/if} - {if isset($navigation.next)}<span class="calendar-next"><a href={$navigation.next}">Volgende maand</a></span>{/if}
{/if}
<br />
</div>
<br /><br /><br />
{foreach from=$events key=key item=event}
<div class="calendar-event">
<br /><br />
<h3>{$event.event_title}</h3>
{if $event.event_date_start == $event.event_date_end || $event.event_date_end == 0}
<div class="calendar-date-from">{$event.event_date_start|date_format:"%A %e %B %Y"}</div>
{else}
{if $event.event_date_start|date_format:"%d%m%Y" == $event.event_date_end|date_format:"%d%m%Y"}
<div class="calendar-date-from">{$event.event_date_start|date_format:"%A %e %B %Y van %H:%M"} tot {$event.event_date_end|date_format:"%H:%M"}</div>
{else}
<div class="calendar-date-from">van {$event.event_date_start|date_format:"%A %e %B %Y %H:%M"} tot {$event.event_date_end|date_format:"%A %e %B %Y %H:%M"}</div>
{/if}
{/if}
{if $event.event_summary !="" && ($detail != 1 || ($event.event_details =="" || $event.event_details == "<br />"))}
<div class="calendar-summary"><span class="calendar-summary-title">{$lang.summary}: </span>{$event.event_summary}</div>
{/if}
{if $event.event_details !="" && $event.event_details != "<br />"}
<div class="calendar-details">
<br /><br />
{$event.event_details|truncate:300:" ...":false}
<br /><br />
>> <a href="{$event.url}">Lees verder </a> ...</div>
{/if}
</div>
<br clear="right">
<br /><br />
{/foreach}
{if $return_url != ""}
<div class="calendar-returnlink">{$return_url}</div>
{/if}
</div>
<br /><br />
<div style="text-align:center;">
{if isset($navigation)}
{if isset($navigation.prev)}<span class="calendar-prev"><a href="{$navigation.prev}">Vorige maand</a></span>{/if} - {if isset($navigation.next)}<span class="calendar-next"><a href={$navigation.next}">Volgende maand</a></span>{/if}
{/if}
<br />
</div>
So the problem is located in the month navigation
Code: Select all
{$month_names[$month]}Code: Select all
{$month_names[$month]} into {$month_names[$month-1]} Re: [SOLVED]CGCalender: month name shown on top is 1 month a
I can confirm this at my site http://www.zeijen.nu/agenda. So looks like a bug, already reported it to Calguy.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: [SOLVED]CGCalender: month name shown on top is 1 month a
Here is bug report:
http://dev.cmsmadesimple.org/bug/view/10059
I'm getting this issue too now. CMSMS 1.11.10 & CGCalendar 1.14.3.
Templates have to be updated.
Smarty date format page shows %B as "full month name according to the current locale".
So you can drop the month_name stuff and replace with something like
Looks like you still need month_name stuff in some templates (e.g. the main monthly view with next and previous links) where staartmees's solution works well.
http://dev.cmsmadesimple.org/bug/view/10059
I'm getting this issue too now. CMSMS 1.11.10 & CGCalendar 1.14.3.
Templates have to be updated.
Smarty date format page shows %B as "full month name according to the current locale".
So you can drop the month_name stuff and replace with something like
Code: Select all
{$event.event_date_start|date_format:"%B"}Re: [SOLVED]CGCalender: month name shown on top is 1 month a
Changeinto
grtz. Rolf
Code: Select all
{$month_names[$month]}Code: Select all
{$date|date_format:'%B'}- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -


