Calendar plugin feature request

Creating and modifying plugins.
Post Reply
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Calendar plugin feature request

Post by carl_galloway »

Could I request a feature change to the calendar plugin so that in admin suite the user has the option of selecting not just the first day of the week, but also the day of the week they would like to highlight.

Printed calendars will often put a background color over every date that is a Sunday (signifying the day of rest), but often the first day of the week will be a monday (some tax authorities insist on this for vat/gst returns).

If we add another option in the plugin admin suite that says 'day of week to highlight', and chuck a span around any date that is a Sunday, then theme designers could add the extra style and either put a background or border or both around the highlighted day. This would mean that my western outlook, ie that Sunday is the day of rest, wouldn't offend our brothers and sisters from other cultures where perhaps the day of rest might be a Saturday, or where they may not have a day of rest.

Is this possible? View my own website and the calendar on it to see what I mean by highlighting the Sunday. You can see that at present Sunday is my first day of the week and is highlighted using 'td.FirstInRow', now if I change Monday to the first day of the week then sunday becomes the last column, meaning I would have to style 'td.LastInRow'. This can't be done without manually editing the stylesheet, which defeats the purpose of providing a theme through spartacus. Other users who want my theme might choose Saturday as the first day of the week, or might not want to highlight Sunday, for example in Israel Saturday would be highlighted, but the Monday might be the first day of the week.

Considering how flexible s9y is already, this would be a very nice touch if we could make it work.
Carl
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I immediately thought, "What a great idea idea!"

Then I started to have second thoughts.

I'm not a spiritual man, myself, so I'd want nothing highlighted. But, wait, I rest on the whole weekend! I'd like to highlight Saturdays and Sundays. That's just a multiple select, it's still possible.

Then I thought about collisions. If I highlight the current day one way, and the weekends another day, what happens when the current day is a weekday? Well, obviously the template author should consider that. And some templates won't supply any highlighting at all.

(Does the Jalali calendar even use 7-day weeks?)

Sounds to me like the functionality really ought to go in the templates. And maybe we could do something with the template configurator we've been considering.

I'd recommend modifying the plugin_calendar.tpl to add a serendipity_dayN to every day. Then you can style the days as you like, and modify the style depending on your configurator.
Judebert
---
Website | Wishlist | PayPal
Post Reply