All I have is << >> with no month named. Shows the correct calendar for the present month but does not indicate something like <<March 2014>>
Otherwise, calendar fully functional.
I could really use some help on this one, please.
CGcalendar: No Name of Month Displayed
-
- Power Poster
- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
Re: CGcalendar: No Name of Month Displayed
do you use a standard template out of the box?
All CG-modules need php 5.3.x.
cmsms version?
All CG-modules need php 5.3.x.
cmsms version?
Re: CGcalendar: No Name of Month Displayed
I, too, had problems with the CGCalendar not displaying the name of the month and I looked to the forum here yesterday for a solution, but found none after an exhaustive 2.5 hour search.
This morning I decided to compare the templates of the CGCalendar on my brand new site, with a CGCalendar on a site I had upgraded. The main calendar templates were DIFFERENT!
This is what is missing:
{$month_names[$month]} {$year}
The entire code - as it appears in my upgraded site before calling up the first row of the table is:
<table class="calendar" id="cal-calendar">
<caption class="calendar-month">
<span class="calendar-prev"><a href="{$navigation.prev}">«</a></span> {$month_names[$month]} {$year}
<span class="calendar-next"><a href="{$navigation.next}">»</a></span>
</caption>
Once I added the missing code, the name of the month now shows. Hope someone finds this useful.
This morning I decided to compare the templates of the CGCalendar on my brand new site, with a CGCalendar on a site I had upgraded. The main calendar templates were DIFFERENT!
This is what is missing:
{$month_names[$month]} {$year}
The entire code - as it appears in my upgraded site before calling up the first row of the table is:
<table class="calendar" id="cal-calendar">
<caption class="calendar-month">
<span class="calendar-prev"><a href="{$navigation.prev}">«</a></span> {$month_names[$month]} {$year}
<span class="calendar-next"><a href="{$navigation.next}">»</a></span>
</caption>
Once I added the missing code, the name of the month now shows. Hope someone finds this useful.
Re: CGcalendar: No Name of Month Displayed
What file should I put this in?fiddler wrote: This is what is missing:
{$month_names[$month]} {$year}
Re: CGcalendar: No Name of Month Displayed
Open up your CG Calendar program in the CMS admin panel.
Over on the right, next to an image of a pair of scissors you'll see the link "Templates". The Calendar Templates tab has a Sample as default. Bring up that template (if that is the template you use as your main template) and add code on the 3rd/4th line accordingly.
Over on the right, next to an image of a pair of scissors you'll see the link "Templates". The Calendar Templates tab has a Sample as default. Bring up that template (if that is the template you use as your main template) and add code on the 3rd/4th line accordingly.
Re: CGcalendar: No Name of Month Displayed
Thank you, worked like a champ.
Re: CGcalendar: No Name of Month Displayed
No this item cannot be closed yet as all these calendar templates seem to have this problem.
On my site "september" is not shown where it should be and "october" is shown as "november". And "november" is displayed where it indeed should be "november".
The solution given in this thread looks simple but for those who are not into programming like me it is not so obvious.
Quote from the module's changelog:
<p>The 1.14.x series stops using the hardcoded month and day names in the lang file and began using locale specified date names. If you are encountering an 'off by one' problem in the CGCalendar display templates you will want to fix up your frontend templates. Restoring frontend templates to factory defaults should solve the issue. Essentially, you should not use the {$month_names} or {$day_names} array (they are one based). And instead should use the {$event.event_date_start} and {$event.event_date_end} smarty variables, and the date_format modifier to format dates appropriately.</p>
To me this is not clear.
Can the author of this module give the right templates?
Thanks for a great module.
On my site "september" is not shown where it should be and "october" is shown as "november". And "november" is displayed where it indeed should be "november".
The solution given in this thread looks simple but for those who are not into programming like me it is not so obvious.
Quote from the module's changelog:
<p>The 1.14.x series stops using the hardcoded month and day names in the lang file and began using locale specified date names. If you are encountering an 'off by one' problem in the CGCalendar display templates you will want to fix up your frontend templates. Restoring frontend templates to factory defaults should solve the issue. Essentially, you should not use the {$month_names} or {$day_names} array (they are one based). And instead should use the {$event.event_date_start} and {$event.event_date_end} smarty variables, and the date_format modifier to format dates appropriately.</p>
To me this is not clear.
Can the author of this module give the right templates?
Thanks for a great module.
Re: CGcalendar: No Name of Month Displayed
Actually it's all in that quote:
Use the system's locale to get month names: have a look at http://php.net/manual/en/function.strftime.php
%B is probably what you're looking for.
The developer gives you the right templates: 'Restoring frontend templates to factory defaults should solve the issue'
Create a new temporary template and look how it's done in there.
Use the system's locale to get month names: have a look at http://php.net/manual/en/function.strftime.php
%B is probably what you're looking for.
The developer gives you the right templates: 'Restoring frontend templates to factory defaults should solve the issue'
Create a new temporary template and look how it's done in there.