Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
smd_calendar: complete schedule / event / calendar / diary
People following the other thread may know I’ve mentioned (once or twice…) a new plugin. After nearly three weeks of graft and tweaking, here it is for public consumption at long last.
Download smd_calendar
With this beastie you can pretty much set up Textpattern to be a gig guide, event manager, diary/scheduling tool, calendar, and anything else you can turn your devious minds to. And there’s no hacking of TXP in site, nor any extra tables required; it all hangs together via the standard, humble Textpattern article. If you can Write it, the calendar will show it.
In short, if your implementation calls for a date/time-based widget, this plugin can probably do it.
It’s big, it’s endlessly customisable, but it can run with a bare minimum of attributes and will do something close to useful out of the box. Stick a <txp:smd_calendar />
tag on the page, write an article or two in the same section and they’ll appear on the calendar on the correct dates. Use the tag as a container to format the events with standard TXP tags like <txp:posted />
and <txp:expires />
. Then flick through the manual to see what else it can do :-)
This plugin bows its head in respect to its forefather mdp_calendar, the generous contributors and beta testers who have endured almost daily updates over Christmas/New Year to make it what it is, and the Textpattern devs and community for being awesome.
Now go and make time in your diary for investigating the plugin :-) And holler here if you find anything seriously cool. Or broken.
Revision history
————————
All available versions and changes are listed here. Each entry indexes the relevant post(s) in the threads to learn about the features.
Beta
- 21 Dec 08 | 0.1 | Initial release (sponsors only)
- 22 Dec 08 | 0.2 | Fixed a few W3C validation issues and added more data validity checks ; attempted to address date/timezone problems (and mostly failed, so wrote about it instead) ; enhanced
smd_if_cal
tag to check for dates andcalid
; addedescape
attribute to smd_cal_info tag - 23 Dec 08 | 0.21 | Changed
isoweeks
so any given text becomes the column heading ; addedweek
attribute to all relevant tags ; addedday
attribute tosmd_cal_info
; fixedmonth
andyear
attributes so calendar navigation overrides them - 26 Dec 08 | 0.22 | Enhanced
navclass
; addedlinkposted
(both thanks mrdale) - 28 Dec 08 | 0.23 | Corrected timezone offset faux pas ; added first/last weekday recurrence and
recurform
(all thanks mrdale) ; fixed minical ‘today’ being wrongly set - 01 Jan 09 | 0.3 | Added
cellform
,navid
,navarrow
, andmaintain
; added<txp:smd_article_event />
(thanks mrdale) and<txp:smd_cal_class />
; added thestandard
andrecurfirst
event flags ; made cell/event flag distinction better (e.g.event
andhols
flags now occur only at the cell level) ; added ability to specify adayformat
array, added a week select list and enhanced theisoweeks
attribute (thanks uli) ; fixed smd_if_cal’sflag
bumbling, and addedSMD_ANY
test ; fixed smd_cal_infoauthor
warning and addedjoin_prefix
; fixed dangling article after plugin terminates - 02 Jan 09 | 0.31 | Added
omitfield
and theomit
cell flag (thanks woof) - 04 Jan 09 | 0.32 | Added
now
andoffset
tosmd_cal_now
; fixed warning if no events match insmd_article_event
; fixed first/last timestamps (thanks mrdale)
Official public
- 06 Jan 09 | 0.33 | Fixed
smd_cal_class
typo ; changedsmd_if_cal
logic toor
by default (both thanks Els) ; fixed multi detection ; madeyearwidth
more intelligent - 07 Jan 09 | 0.34 | Fixed
{shortyear}
typo ; added{isoyear}
and{shortisoyear}
; addedisoyear
tosmd_if_cal
andsmd_cal_info
- 21 Jan 09 | 0.40 | Changed
section
tos
forsmd_cal_info
and enabled full field support ; improved permlink support (thanks Els) ; addedextrafield
andextrastrict
(thanks FireFusion) ; addedrealname
(thanks rsilletti) ; added separate{flag}
replacements ; addednameval
; added support for select list prefix and suffix (thanks Uli) ; fixed frontpage behaviour and addedshowall
(thanks rsilletti) ; fixed infinite loop when using?month
/?year
in recurring dates (thanks decoderltd) - 09 Feb 09 | 0.41 | Fixed doc truncation (thanks woof) ; spanned events are copyable and monthformat takes custom list of names (both thanks jakob) ; ?month/?year fixed (thanks decoderltd) ; paging toggle (thanks robhert) ; fixed trimming of classes, a rogue warning, abbr/full, and week dropdown to 53
- 13 Mar 09 | 0.42 | fixed remap (thanks Els) ;
datefields
added (thanks merz1 / progre55 /woof); added date ranges (thanks woof) ; addedallspanned
(thanks woof) ; empty classes and class name padding fixed (thanks jakob) - 27 Mar 11 | 0.50 | Fixed squillions of timezone bugs and added subcats, headerform, caption, summary to smd:calendar ; permitted
evid
(among others) to be displayed and handled correctly ; improved Windows support for formatting strings (thanks Algaris) ; improved minical ; permittedthis
instepfield
; added more replacements tocellform
; fixed smd_article_event trashing main article ; added time=“today” support - 30 May 11 | 0.51 | Switched header items to correct orientation (thanks Els) ; fixed missing entries for spanned events (thanks woof) ; fixed minical default rendering (thanks kevinpotts) ; improved URL structure and added MLP support (thanks Els and lonelytraveller) ; fixed posted dates in minical ; fixed extra dates when using
allspanned
in smd_article_event (thanks jakob) ; addeddate
support tomaintain
; added smd_event_info and smd_event_duration tags (thanks jakob) ; permitted smd_if_cal inside smd_article_event ; fixed spanned events when using datefields (thanks saccade) ; added custom field support to smd_article_event (thanks jakob) - 20 Jun 11 | 0.52 | Fixed class names to remove rogue space character (thanks pafruu, jakob, Els, et al for reminding me)
Last edited by Bloke (2011-06-20 22:09:14)
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
#2 2009-01-06 16:14:52
- kevinpotts
- Member
- From: Ghost Coast
- Registered: 2004-12-07
- Posts: 370
Re: smd_calendar: complete schedule / event / calendar / diary
Incredible.
Kevin
(graphicpush)
Offline
Re: smd_calendar: complete schedule / event / calendar / diary
Seconded.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#4 2009-01-06 17:28:45
- szac
- Member
- From: Detroit-ish
- Registered: 2004-09-18
- Posts: 50
Re: smd_calendar: complete schedule / event / calendar / diary
I’m so pumped about this… THANKS
Offline
#5 2009-01-06 22:16:09
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: smd_calendar: complete schedule / event / calendar / diary
This plugin will keep me off the streets for a while ;) It is simply amazing!
At the moment there is one thing I can’t figure out. Yes, I’ve Read The Fabulous Manual, several times, but I don’t think it impossible that I missed a couple of things ;)
I assume that the only way to get rid of the <h4>
tags around the day is to use cellform
. But in a cellform I can’t use article tags. And I can’t use both form
and cellform
, if I try that only the cellform content is displayed. What I’m trying to do is display the day, then some article content, and wrap the entire cell content in <a>
tags.
Edit: doh! Forget about that. I can’t believe that I’ve been looking at this for hours, and right after posting I suddenly get it: {day} {events}
in the cellform :)
Last edited by els (2009-01-06 22:37:24)
Offline
#6 2009-01-07 00:31:56
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: smd_calendar: complete schedule / event / calendar / diary
Outstanding, thanks. I’ll start investigating immediately.
Offline
Re: smd_calendar: complete schedule / event / calendar / diary
Is there a demo one can look at? It sounds like an awesome plugin. Thanks!
Offline
Re: smd_calendar: complete schedule / event / calendar / diary
Els wrote:
{day} {events}
in the cellform
Hi Els, glad you got it sorted. As you found out, the replacement variables are the only way to inject the contents in to the cell. It’s an unfortunate side-effect of the way the PHP calendar class that was built into mdp_calendar was implemented and was too costly (in terms of processing time) to circumvent. Besides, the class did all the hard work and I didn’t want to reinvent the biscuit :-)
But I wanted to offer the ability to build cells from scratch and the way it was written prevented me from doing that. So what I came up with was the cellform
concept which is processed after all the events have been assigned. The smd_calendar tag actually runs in two phases: first it gets all the matching articles and processes any form
, multiform
, recurform
or container, setting all the necessary event flags up. Then it generates the calendar and pops any details in, setting up the cell flags in the process.
Thus all the events are ‘pre-parsed’ by the time the calendar cells are to be drawn on the screen. This presented me with a problem and the only way I could think to get round it was to fall back on the ol’ faithful replacement tag technology. Hence {events}
puts in all the pre-parsed event info from the day. Bit of a kludge, but it works!
coopersita
No demo, sorry :-( Sadly my home page doesn’t run on TXP so I couldn’t offer it that way. But…
Quick start demo
- Install the plugin
- Make a section called something like
events
- In your page template for that section, add
<txp:smd_calendar section="events" />
- Go and create some articles in the
events
section, set the dates to whenever you want those events to occur - View yoursite.com/events
After that it’s customisation time and for that, it’s the manual I’m afraid. The documentation is long (sorry) but the key parts are the small sections at the top on the naming convention, standard / recurring / spanned events, holidays, etc. The rest is just reference material for the (many!) plugin attributes to take you to tweaksville and beyond.
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
Re: smd_calendar: complete schedule / event / calendar / diary
demo! demo!
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
Re: smd_calendar: complete schedule / event / calendar / diary
Well it is running here but it is only the most basic format as it is up to the theme user to decide what he/she wants to do with it.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: smd_calendar: complete schedule / event / calendar / diary
happy day
Offline
#12 2009-01-07 14:13:37
- FireFusion
- Member
- Registered: 2005-05-10
- Posts: 698
Re: smd_calendar: complete schedule / event / calendar / diary
Does it have the include dates feature yet?
For when the date of an event has been moved.
Last edited by FireFusion (2009-01-07 14:14:15)
Offline