Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#637 2011-03-26 17:18:33
Re: smd_calendar: complete schedule / event / calendar / diary
All
I have what I consider the final version of smd_calendar 0.50 done. Just need to review the docs so they match up with the code. Can’t do it today but maybe tomorrow or Monday I’ll get this out the door.
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
#638 2011-03-26 19:19:53
- woof
- Member
- Registered: 2004-08-01
- Posts: 128
Re: smd_calendar: complete schedule / event / calendar / diary
Thank you Stef!
Separately, here’s a thing that has cropped up. Perhaps someone here knows a way to achieve it (suggestions welcome), if not it might be considered as a possible feature in a future version?
With smd_article_event I want to output a “flag” (for example the message “Sold Out”) on select days in a multi-spanned event. Easy enough to do with a custom field or two for ALL days in the spanned time, but I’m not sure if it can be done for a set of specific days within the spanned time.
Offline
#639 2011-03-27 21:05:27
Re: smd_calendar: complete schedule / event / calendar / diary
Alright I’ve messed everyone around enough. Here’s v0.50. Sadly it’s not the massive rewrite I’d hoped, because I was patching this plugin in 5 different places in the wild (my own server, mrdale, Algaris, Jan DeWilde and Keith Smith, plus about 20 copies I’ve sent out in various states of disrepair to other willing beta-hamsters) and had to resync it all, consolidating all the various features and fixes into one that worked across all the servers I had access to around the world.
Many, many thanks to all those who pledged server space and logins for me to tinker on your sites and get this sucker in a slightly better shape. You’re all saintly.
Features:
<txp:smd_calendar/>
tag: Added subcats, headerform, caption, summary- Fixed five zillion timezone-related errors and bugs that:
- displayed the wrong day / month / year
- made day names jump forwards/backwards depending on time of day
- incorrectly calculated date offsets
- incorrectly rendered dates without time offsets
- didn’t handle expiry properly
- Permitted
evid
(among other items) to be displayed and handled correctly - Improved Windows support: all strftime() functions (e.g. as used in
<txp:smd_cal_now />
) that are available on *NIX are now available on Windoze, including %V, %e, %P, %r and %G. Yes, that’s better than even PHP can do :-) - Internal minical improvements
- Permitted
this
in your nominatedstepfield
- Added the following replacements inside
cellform
:{dayzeros}
: day padded with leading zero{weekdayabbr}
: abbreviated weekday (local lingo){weekdayfull}
: full weekday (local lingo){monthzeros}
: month padded with leading zero{monthnameabbr}
: abbreviated month name (local lingo){monthnamefull}
: full month name (local lingo)
- Headerform replacements (to be improved in future) :
{firstday}
: first day of week (0-6){daynames}
: list of day names (comma-separated){isoweekhead}
: your defined isoweek heading (see isoweek attribute){week}
: the ISO week number{month}
: numeric month number (no leading zeros){year}
: 4-digit year{isoyear}
: 4-digit ISO year
<txp:smd_article_event>
:- preserves original article and has tentative support for is_first/last_article under some special circumstances. To be improved in future
- added
time="today"
support
I hope the considerable wait is worth it and your calendars can flourish without random bugs.
From here I shall try and address any outstanding issues/questions and then press on with timefields and other goodies, as well as look at some of the half-imlemented things mentioend with the word ‘future’ in the above list.
As ever I’m here for kicking or praise if this does (not) do what you want.
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
#640 2011-03-27 21:40:35
Re: smd_calendar: complete schedule / event / calendar / diary
Thank you very much Bloke !
I use your plugin intensively, here. I’ve never found such a powerful calendar plugin on other CMS’s !
I’ll be glad to try the new shiny version on my local install, will report in case I see some issues.
Cheers!
Pascal
Offline
#641 2011-03-28 01:36:54
- lazlo
- Member
- Registered: 2004-02-24
- Posts: 110
Re: smd_calendar: complete schedule / event / calendar / diary
Hi Stef
Where do you custom fields show up in the Write Tab? Or in the db table? Do I have to create them myself?
I am testing 4.30 textpattern just upgraded to .50 smd_calendar and also using glz_custom_fields 1.2.4 and have many existing custom fields but not smd_calendars?
[Edit] I just installed a base install of textpattern 4.4 and installed .50 smd_calendar and stil can’t see the custom fields you reference in the docs
“Custom field to specify event frequency (1 week / 10 days / 3 months / etc)”
“Custom fields for in/exclusions (a list of dates on which that event is (re)scheduled/cancelled/omitted)”
what am I missing?
Les
Last edited by lazlo (2011-03-28 04:31:09)
Offline
#642 2011-03-28 05:34:49
Re: smd_calendar: complete schedule / event / calendar / diary
kick. it still doesn’t provide me with a pony. ;)
Big thanks bloker.
Offline
#643 2011-03-28 09:25:38
Re: smd_calendar: complete schedule / event / calendar / diary
lazlo wrote:
can’t see the custom fields you reference in the docs
You create them as normal in the Advanced Prefs screen and then tell the plugin which numbers they are via stepfield="custom_2"
, for example. If you are using glz_cf then you’d define them in Extensions->Custom Fields instead.
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
#644 2011-03-29 08:15:03
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 553
Re: smd_calendar: complete schedule / event / calendar / diary
I just wanted to say thank you so much for all your help with this plugin. I’m glad you managed to get something out of tinkering around on my Windows server.
The senior management have approved the calendar I was working on and it should go live at the end of April in time for the summer school term. If you’ve logged in recently you’ll notice that it looks quite a bit different from what it did before.
When I have a spare moment I’ll give the latest version a spin in my development area. I have to admit to being a little nervous about upgrading given all the custom edits and variables we used to get the calendar working.
Offline
#645 2011-03-29 08:43:36
Re: smd_calendar: complete schedule / event / calendar / diary
Algaris wrote:
I just wanted to say thank you so much for all your help with this plugin. I’m glad you managed to get something out of tinkering around on my Windows server.
No worries. The plugin’s much better as a result. I’m pleased with the improved Windows server support and the fact it actually offers more conversion modifiers in the plugin than PHP itself has under Windoze!
The senior management have approved the calendar I was working on and it should go live at the end of April in time for the summer school term.
Looking good. Though it doesn’t seem to remember the calendar month now as I move around the different parts of the school. Is that intentional?
I have to admit to being a little nervous about upgrading given all the custom edits and variables we used to get the calendar working.
The version on your server is identical to the released v0.50 as yours was the last site I was using to tweak the code. The only differences in the official version are a few documentation edits. In fact the docs might be completely overhauled at some point soon so, assuming no code fallout from this version, I’ll probably release 0.51 with just the new docs attached. You might as well wait.
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
#646 2011-03-29 09:26:13
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 553
Re: smd_calendar: complete schedule / event / calendar / diary
Bloke wrote:
Looking good. Though it doesn’t seem to remember the calendar month now as I move around the different parts of the school. Is that intentional?
Hmmm… Could you elaborate? I did move some variables into the sys_variables form, maybe that could have had an unforeseen side effect.
With my testing it appears to remember the date when I move between the Senior School and the Prep School sections and the Music & Drama and Sports categories. It also remembers the date when I switch between the week view and back again. Changing the month from the drop down menu also remembers the date.
So far the only bug I’ve encountered is when viewing the Music & Drama or Sports categories. If you select the week view it forgets the category being viewed and shows you all the events for the current week instead.
Last edited by Algaris (2011-03-29 09:35:16)
Offline
#647 2011-03-29 09:41:28
Re: smd_calendar: complete schedule / event / calendar / diary
Algaris wrote:
With my testing it appears to remember the date when I move between the Senior School and the Prep School sections and the Music & Drama and Sports categories. Changing the month from the drop down menu also remembers the date.
Yes, the individual dates on the left are all remembered. I meant changing the calendar month itself to, say, February and then switching from Prep to Senior or something. The calendar flips back to the current month (March). Except I can now see what’s happening and it makes sense so sorry for the alarm.
I now see that each time you change section the calendar itself takes on the month of the most recently viewed individual article (or week). Since I wasn’t picking an actual date to view, the 29th March was still in the event list and thus when I flipped from Prep to Senior the calendar dutifully flipped back to March to stay in sync with the individual article view. If I switch to February, pick a day to view and then switch from Senior to Prep the calendar remains in February.
In short, nothing to worry: about I was being dim, sorry.
Last edited by Bloke (2011-03-29 09:42:13)
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
#648 2011-03-29 10:14:44
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 553
Re: smd_calendar: complete schedule / event / calendar / diary
That’s a relief to know. You dim? Ha, I think not.
Just one bug to fix before it goes live then. Since it’s not a huge one I’m not too worried if it stays in for the time being. Must be the fact that I’m at the end of a long project but it’s making my head spin trying to work out what’s wrong. Even setting up two new variables and trying to pass them via the URL isn’t working =(
One question is it possible using CSS to style the currently selected/viewed date in the calendar. I sometimes find myself looking to the calendar rather than the events list to check what date I’m viewing.
Offline