calendar help needed: time format and layout changes

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
lleighh
Forum Members
Forum Members
Posts: 59
Joined: Tue Apr 11, 2006 2:40 pm

calendar help needed: time format and layout changes

Post by lleighh »

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.
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm
Location: Florida

Re: calendar help needed: time format and layout changes

Post by carasmo »

What is the solution to this?
calguy1000
Support Guru
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

Post by calguy1000 »

there are some modifications in the calendar module svn to use a twelve hour clock.....

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.
reidjazz

Re: calendar help needed: time format and layout changes

Post by reidjazz »

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
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm
Location: Florida

Re: calendar help needed: time format and layout changes

Post by carasmo »

Yeah! Thank you!
heatherfeuer

Re: calendar help needed: time format and layout changes

Post by heatherfeuer »

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.
Post Reply

Return to “Modules/Add-Ons”