Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Preview: Event Calendar Module


Go to End
Reply


293 Posts   43124 Views

Avatar
dreamstudio

Community Member, 48 Posts

31 March 2009 at 6:54pm

Couple of things im having trouble with

Got the event module into the site and reworked the css and templates to match my design, however the fonts for content and text / links isnt the same and cant see where in the CSS it needs changing, I have looked at calendar.css but nothing stands out

Also on the configuration for the module, I have set the number of future dates to 0 or 1 or anything but it just seems to display the next 4 even though the event is weekly. Is there another way to change how many it shows?

finally... when it shows "see also" and then lists the next 3 dates for it, is there a way to change how many it shows for this ie just one

Avatar
UncleCheese

Forum Moderator, 4094 Posts

1 April 2009 at 2:38am

Not sure about the CSS question. You'll have to be a little more specific. There are no font-family properties declared in calendar.css -- just sizes and weights. You can always override styles using the !important flag to trump any inheritance. Firebug is also useful in showing an elements inherited properties.

The future dates field is for the "see also" section. If your event has many dates, it will list them all there. If it's a recurring event, however, it needs a place to stop. That's what that field is for. Entering 3 in the future dates field will limit the see also section to show the next 3 recurring dates. There is no way to limit the number of recurring events that show in your main calendar view. It will show all the events, recurring or not, that fall in the selected date range.

Avatar
UncleCheese

Forum Moderator, 4094 Posts

2 April 2009 at 4:55am

Just working on the localisation features. Can anyone confirm that this translation is correct?

M-D-Y: Oct. 6-8, 2009

D-M-Y: 6-8 Oct. 2009

Something doesn't look right. Do I need a comma after the Oct?

Avatar
banal

Community Member, 901 Posts

2 April 2009 at 5:01am

I'd probably write
6.-8. Oct., 2009

Quite a lot of punctuation though

Avatar
UncleCheese

Forum Moderator, 4094 Posts

2 April 2009 at 5:14am

Okay, and for a span across multiple months:

M-D-Y: Oct. 30 - Nov. 1, 2008

D-M-Y: 30 Oct. - 1 Nov, 2008

Correct?

Avatar
banal

Community Member, 901 Posts

2 April 2009 at 5:38am

Usually one writes a period after the number (at least in German. This actually has the same meaning as the "st", "nd", "th" suffixes in the English language).
Therefore I'd write:
30. Oct. – 1. Nov., 2008

Maybe you could simply setup sprintf templates in the translation array?
Then you could use something like:

$template = _t("CalendarModule.MultiMonthTemplate","%s. %2d - %s. %2d, %4d");
$formattedDate = sprintf($template, strftime('%b', $startDate), date('d', $startDate), strftime('%b', $endDate), date('d', $endDate), date('Y', $endDate);

This is most likely not the fastest approach, but now every language/locale could have its own template.

Avatar
banal

Community Member, 901 Posts

2 April 2009 at 6:33am

Edited: 02/04/2009 9:24am

Bleh. Disgregard what I wrote there. The sprintf parameters would require re-organization as well.
But I think some sort of locale aware template for the date-string would still be the best choice.

Edit: Something like this would be awesome: http://doc.qtsoftware.com/4.5/qstring.html#arg
This has nothing to do with Dates and PHP though, just with translations and place-holders

Avatar
UncleCheese

Forum Moderator, 4094 Posts

2 April 2009 at 8:35am

Okay, guys, I just checked in a bunch of localization features. Next will be the translations.

This is largely untested, but I'm working with the maxim "Publish early and often" to hopefully get some feedback.

In your _config.php, you can now set:

CalendarDateTime::set_param('date_format','dmy');

Some new ways of tapping into the date templates:

CalendarDateTime::set_param('month_format_character', '%B'); // default is %b
CalendarDateTime::set_param('year_format_character', '%y'); // default is %Y
CalendarDateTime::set_param('month_header_format_character', '%b');
// etc..

Where _header_ parameters are for dates drawn in the calendar header (magically generated based on the date range you choose), and the standard format_character parameters are for all other magically drawn dates.

Note: The format characters are based on the [url=http://www.php.net/strftime]strftime()[/url] PHP function -- not date() (thank you, Banal).

And as always, you can always tap into $StartDate.Format(xyz) and $EndDate.Format(xyz)

Let me know how it works for you. Like I said, only VERY lightly tested.

Go to Top