I set up cmsms for a client recently. It has the calendar module ( http://www.mwbecoordinators.org/index.p ... t_calendar ) but the time format is in international (aka military) time. How can I change this?
They also want the dates listed bullet fashion instead of in a calendar grid. Can this be done?
Although I don't mind altering php, keep in mind I am not a coder ... just a web designer who knows HTML and tinkers with code sometimes.
calendar help needed: time format and layout changes
Re: calendar help needed: time format and layout changes
What is the solution to this?
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: calendar help needed: time format and layout changes
there are some modifications in the calendar module svn to use a twelve hour clock.....
not sure about the bullet list though.
not sure about the bullet list though.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: calendar help needed: time format and layout changes
The twelive-hour clock setting is for the pulldowns in the ADMIN area, not the html that gets generated via PHP.
What I had to do (and you may have to as well) is to replace the 24-hour php setting '%H' (which is in the event template of the calendar module by default) with '%I' (php setting for 12-hour time). I also added '%p' after the '%M' (minutes setting) to display 'am' or 'pm' automatically as appropriate.
For a complete detailed manual of php's strftime, go to http://us3.php.net/manual/en/function.strftime.php
reidjazz
What I had to do (and you may have to as well) is to replace the 24-hour php setting '%H' (which is in the event template of the calendar module by default) with '%I' (php setting for 12-hour time). I also added '%p' after the '%M' (minutes setting) to display 'am' or 'pm' automatically as appropriate.
For a complete detailed manual of php's strftime, go to http://us3.php.net/manual/en/function.strftime.php
reidjazz
Re: calendar help needed: time format and layout changes
Yeah! Thank you!
Re: calendar help needed: time format and layout changes
I had to do the same thing with my templates. I haven't had to try it, but I suspect that one could use the calendar stylesheet to format a bulleted date list in columnar fashion that should work with the calendar template with only minimal changes to the php code. The only part of the code you shouldn't mess with is the looping parts to set the days and dates.
What helped me when I was working with the calendar module was to pull out the templates and set them up in my favorite text editor formatted as much as possible to understand the flow. Once I was able to separate the code that's tied to the stylesheet from the code loops that calculate the dates and days, it was fairly easy to make the modifications I needed.
What helped me when I was working with the calendar module was to pull out the templates and set them up in my favorite text editor formatted as much as possible to understand the flow. Once I was able to separate the code that's tied to the stylesheet from the code loops that calculate the dates and days, it was fairly easy to make the modifications I needed.