Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-12-16 17:21:33

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

[request] Bounty: Update MDP Calendar

I’ll start a bounty of $250 for updates to MDP calendar that include the following features.

  1. Recurring events (daily, weekly, yearly)
  2. Date ranges (visual indicators on small and large calendars of date ranges based on a single article)
  3. Category style hooks
  4. Working DST/timezone

TXP People: Adding cash makes it happen, got some cash?
Plugin Devs: got some time?

Offline

#2 2008-12-16 18:32:35

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: [request] Bounty: Update MDP Calendar

mrdale wrote:

I’ll start a bounty of $250 for updates to MDP calendar that include the following features.

Spooky, I started work on it for a client site last week. I hadn’t planned on offering the features you mention, but I can try :-)

The core feature I needed was a way to make it work with a calendar of (ISO) weeks intead of days. I also want it to respect expired articles so they don’t appear on the calendar unless the TXP pref indicates otherwise. Let me take a look at the other stuff you mention (the DST thing might be fun given TXP’s stance on it, as noted in another thread you’ve commented on).


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2008-12-16 18:46:21

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [request] Bounty: Update MDP Calendar

Great news… although you’d better “um and ahr” a little bit more untill other people indicate that they need it and cough up some booty. And er… this is based on the ailing $USD

Last edited by mrdale (2008-12-16 18:46:52)

Offline

#4 2008-12-16 18:49:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: [request] Bounty: Update MDP Calendar

mrdale wrote:

Great news… although you’d better “um and ahr” a little bit more untill other people indicate that they need it and cough up some booty.

Oh there’ll be plenty ummin’ and arrin’, I can tell ya… drop me a line or shout here if you have any specifics about your request (like option names, how it should work, etc).

EDIT: USD?! Might as well offer magic beans ;-)

Last edited by Bloke (2008-12-16 18:50:10)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2008-12-16 19:06:13

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [request] Bounty: Update MDP Calendar

Bloke wrote:

EDIT: USD?! Might as well offer magic beans ;-)

What kind you want? Light hallucination or perhaps a white talking rabbit tree (no idea what it is)?

I would go with colourful speaking mexicana beans ;)

Offline

#6 2008-12-16 19:24:27

woof
Member
Registered: 2004-08-01
Posts: 128

Re: [request] Bounty: Update MDP Calendar

mrdale wrote:

TXP People: Adding cash makes it happen, got some cash?

I could use this soon – chalk me down for 150 euro

Offline

#7 2008-12-16 19:25:42

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [request] Bounty: Update MDP Calendar

Gocom: sounds like you know his way around a toad stool or two. :)

Bloke: Yeah I think the real trick is that it’s all based on articles.
  1. So article spans would need style hooks for eventStart, eventEnd and event.
  2. The mechanism for repeating events is gonna be a brain hurter, cuz it would work best if you’d only have one article. Custom fields?
  3. I already have a version of this that does accordians for the large calendar. That is collapses and reveals the excerpt of the event (article).
  4. Ditto on the category stuff.
  5. Where on the write page do you do and expiration? is that a crock(ery) thing?

Anyway. Sounds good.

Offline

#8 2008-12-16 20:00:22

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: [request] Bounty: Update MDP Calendar

mrdale wrote:

I think the real trick is that it’s all based on articles.

That’s what drew me to this plugin over the others. jmc_event_manager is cool. zem_event is great (will be even better when pepebe releases the update) but at its core you need to do stuff twice: have an article plus an event tied to that article. Bloody annoying when all you want is one article = one event.

So the idea is that it will display a calendar in a number of configurable ways (day/week primarily, possibly month?) and any article that falls within each ‘cell’ — and has not expired — is linked. If the cell happens to represent a week, you get a week’s worth of articles in that cell. Hence style hooks are vital. Currently (I think, only looked at it for the first time the other day) the links are of the title only. I’d like to extend that to custom fields and body/excerpt etc (or just a form/container), but haven’t thought it through yet.

Oh, I’d also roll in something akin to the cnm_month_select plugin so you can jump to any given month / week.

article spans would need style hooks for eventStart, eventEnd and event.

Here’s where it gets fun. Since in 4.0.7 articles now have ‘start’ and ‘end’ dates natively (under “More”), an article in your nominated section can — in theory — automatically represent an ‘event’. Thus a plugin option governs whether you want to show all events (the default), or just past or future events, and another option governs whether you want to show events that have passed their expiry. This option takes on the default of the new admin pref about allowing expired articles to show up.

The mechanism for repeating events is gonna be a brain hurter, cuz it would work best if you’d only have one article. Custom fields?

Yes, now that is a conundrum because the previous idea falls apart if you want a repeated event unless the calendar checks first to see if — as you say — the event has some repetition flag set, possibly a custom field. Then it will ignore the ‘has article expired’ check.

Also, the manner in which the repetition is specified is also interesting. Weekly = fine; Fortnightly = fine; Monthly= fine(ish); “first thursday of the month and every alternating Tuesday unless the date is divisible by 9” is more challenging to represent :-)

Unfortunately you also then get into all sorts of trouble if you want to cancel an event, but want the one the week after to go ahead. You’d need some way of “marking” a particular article as ‘don’t show this one’. OR multiple articles (messy). OR when you cancel an event (since it’s hopefully an exception), it’s just tough: the sequence is broken and you’ll have to do a Save As (via Mary’s plugin?) to copy the article to its new location and adjust the dates/repetition info accordingly. Not thought that thru either. Ideas welcome.

I already have a version of this that does accordians for the large calendar

Please send it over if you can. Ditto the category. I’d like to take a look.

The gmt/dst thing is also going to take some thought. Answers on a postcard to the usual address…

Last edited by Bloke (2008-12-16 20:02:37)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#9 2008-12-20 18:59:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: [request] Bounty: Update MDP Calendar

Just a teaser as I’ve put some hours into this today. The plugin smd_calendar now sports:

  • A full calendar by month (or mini-cal) with optional ISO week display
  • Navigation: next/prev month or optional dropdown of month / year. Permitted year range can be determined by first/last article or extended by +/- N years in either direction
  • One article = one event with the Posted date being the date it appears in the calendar. No other fields necessary; all native TXP stuff
  • Multiple events per day permitted
  • Filter events by category / section / author / status / time or expiry
  • Nominate a custom field to specify event frequency (1 week or 10 days or 3 months, etc). Multiple frequencies can be given if you can find a use for them
  • Nominate a custom field for omissions (a list of dates on which this event is not to appear)
  • Nominate a custom field for exclusions (a list of dates on which this event is cancelled). Option to either show cancelled events on the calendar so you can style them differently, or remove them completely
  • Show spanned events (ones that last more than a day) based on the article’s expiry. Any event that does NOT recur and has a future expiry can be treated this way
  • Future events and expired events may be displayed if you wish (overriding the default TXP behaviour, but you will see HTTP 410 when clicking expired articles if the pref is not changed)
  • Specify holidays on a per calendar basis (either recurring things like Christmas where you don’t give a year, or specific holidays that are for a particular year only). These have their own class and you can decide which type of events are to be cancelled due to such holidays. Define the list of holidays either directly in the plugin attribute or in a <txp:variable /> of your choice
  • Each event is passed to a form/container so you can style it your way, or use the built-in hyperlinked title. Spanned events can be sent to a separate form if you wish
  • Conditional tag to test for event flags (recurring, spanned, cancelled, holidays) and dates so you can build your own logic in your form/container
  • More classes than you can throw a stick at: table, row and cell-level classes for indicating different scenarios (spanned event, recurring event, cancelled event, etc); event-level classes may also be promoted to the cell level if you wish; custom classes based on an event’s category, section, author, etc, etc are available (or use a form to make up your own)
  • Tag to output various event or calendar characteristics (e.g. the month, year, calendar id, section and so on). These can be output individually or in combination, separated by a given character. An optional ‘html’ argument formats the desired items as a URL string that can be added to links so you can maintain, say, the section or category when changing month
  • Tag to output the date/time (formatted how you like) for making date-based decisions in other conditional tags or plugins

To do:

  • Try and make sure DST/Time zones are handled correctly but I’m not sure on this as it’s a bit of a minefield Mostly done (I think)
  • Offer a cell-level form so you can build your own entire cell Done.
  • Documentation getting there! Done.
  • Enhance conditional tag to test for various dates/times Done.
  • Tag for listing recurring events Done.
  • Anything else…?

Anyone who wants to saddle up and ride this pony, get your requests in.

Last edited by Bloke (2009-01-05 14:41:04)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#10 2008-12-20 20:06:27

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: [request] Bounty: Update MDP Calendar

“Nominate a custom field for exclusions”

Make one for inclusions and you’ll have the perfect plugin.

Offline

#11 2008-12-20 20:25:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: [request] Bounty: Update MDP Calendar

FireFusion wrote:

Make one for inclusions and you’ll have the perfect plugin.

?? I don’t get it. An event is automatically included by the very fact of you having written the article! Assuming that article is in the section that you’ve told the plugin is your ‘events’ section, of course.

Why would you want to go the extra step of specifying it should be included again? Please explain.

Last edited by Bloke (2008-12-20 20:28:02)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#12 2008-12-20 21:52:34

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: [request] Bounty: Update MDP Calendar

just seen this and feeling faint :-) Can’t donate as much as the heavyweights but perhaps 50 of hard European currency would help.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB