Past Months In CGCalendar Do Not Show Same Format
Posted: Mon Oct 27, 2014 7:29 pm
When I attempt to go back a month or two in my calendar, the format of the calendar changes even though the page does not. Updating the page does not help. Is an old calendar locked in somehow?
Or is it that the calendar size is not set, but varies by text in the cells? If so, how can it become one set size?
I am using CMSMS 1.11.11 with LimeSurvey 2.05plus-build141003, PHPlist 3.0.8 (Stable) and Simple Machines Forum 2.0.8 thru Virtualmin 4.011 Pro on a standard LAMP server hosted on a OpenVZ VPS with:
Kernel and CPU = Linux 2.6.18-274.7.1.el5.028stab095.1 on i686
Memory 1.5 GB
CentOS 32 bit 6.5
Apache version 2.2.15
BIND version 9.8.2
MySQL version 5.1.73
PHP version 5.3.3
Perl version 5.010001
Postfix Mail Server version 2.6.6
Dovecot IMAP/POP3 Server Version 2.0.9
SpamAssassin version 3.3.1
ClamAV version 0.97.6
ProFTPd version 1.33
Webmin 1.710
etc.
and accessing it locally thru Firefox 32.0.2 on Fedora 20 with Xfce 4.10.1.
Here is the template:
Or is it that the calendar size is not set, but varies by text in the cells? If so, how can it become one set size?
I am using CMSMS 1.11.11 with LimeSurvey 2.05plus-build141003, PHPlist 3.0.8 (Stable) and Simple Machines Forum 2.0.8 thru Virtualmin 4.011 Pro on a standard LAMP server hosted on a OpenVZ VPS with:
Kernel and CPU = Linux 2.6.18-274.7.1.el5.028stab095.1 on i686
Memory 1.5 GB
CentOS 32 bit 6.5
Apache version 2.2.15
BIND version 9.8.2
MySQL version 5.1.73
PHP version 5.3.3
Perl version 5.010001
Postfix Mail Server version 2.6.6
Dovecot IMAP/POP3 Server Version 2.0.9
SpamAssassin version 3.3.1
ClamAV version 0.97.6
ProFTPd version 1.33
Webmin 1.710
etc.
and accessing it locally thru Firefox 32.0.2 on Fedora 20 with Xfce 4.10.1.
Here is the template:
Code: Select all
{strip}
<table class="calendar" id="cal-calendar">
<!-- added by user -->
<p><span style="color: green; font-size: 200%">
<!-- added by user -->
{$month_names[$month]}
</span></p>
<caption class="calendar-month">
<!-- edited by user to include style -->
<p><span class="calendar-prev">
<a href="{$navigation.prev}" style="color: blue; font-size: 100%; float:left;
padding-bottom: 2em">« Previous Month;</a>
</span>
<span class="calendar-next"><a href="{$navigation.next}"style="color: blue; font-size: 100%; float:right; padding-bottom: 2em">Next Month »</a>
</span>
</p>
</caption>
<tbody><tr>
{foreach from=$day_names item=day key=key}
<th abbr="{$day}">{$day_short_names[$key]}</th>
{/foreach}</tr>
<tr>
{* initial empty days *}
{if $first_of_month_weekday_number > 0}
<td colspan="{$first_of_month_weekday_number}"> </td>
{/if}
{* iterate over the days of this month *}
{assign var=weekday value=$first_of_month_weekday_number}
{foreach from=$days item=day key=key}
{if $weekday == 7}
{assign var=weekday value=0}
</tr>
<tr>
{/if}
<td {if isset($day.class)}class="{$day.class}"{/if}>
{if isset($day.events.0)}<a href="{$day.ni_url}">{$key}</a>{* by default use the non inline (replace content tag) version of the URL *}
<ul>
{foreach from=$day.events item=event}
<li><a href="{$event.url}">{$event.event_title}</a></li>
{/foreach}
</ul>
{else}{$key}{/if}
</td>
{math assign=weekday equation="x + 1" x=$weekday}
{/foreach}
{* remaining empty days *}
{if $weekday != 7}
<td colspan="{math equation="7-x" x=$weekday}"> </td>
{/if}
</tr>
</tbody></table>
{/strip}