Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#913 2023-10-23 00:43:28

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

Re: smd_calendar: complete schedule / event / calendar / diary

That’s odd. The docs state that stepfield can take a comma separated list of date frequencies in the format number interval. It does also mention using ?month ?year too but that only applies to events that can occur monthly.

Baffled. It should work with multiple frequencies.

Does it work with multiples if you do something like the example in the docs: 3 days, 1 week? And then build on that.

You could also try adding debug="2" (1,2,3, or 4) to throw out some info that might indicate what dates the stepfield is considering when you specify various combinations. That might lead you to an answer.

I’ll have to see if I can install this on a test site and play with it. Will try and do that tomorrow.


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

#914 2023-10-23 00:53:03

amordecosmos
Plugin Author
From: London (Hometown: Vancouver)
Registered: 2004-08-03
Posts: 106
Website

Re: smd_calendar: complete schedule / event / calendar / diary

It does work with multiple frequencies – it is indeed very cool. I have things like first and third Thursdays working, for example.

But ‘every’ is not one of the options.

Offline

#915 2023-10-23 01:08:51

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

Re: smd_calendar: complete schedule / event / calendar / diary

Drat! There must be an available frequency that works somehow.

Can’t think of one off the top of my head though. Hmmm.

Edit: if you can fit it in, does first Tuesday, second Tuesday, third Tuesday, fourth Tuesday, first Wednesday, second Wednesday, ... work? It’s wordy though :(

Might need ?month ?year adding to each one. That’s gonna take it perilously close to the varchar limit of the custom field.

Last edited by Bloke (2023-10-23 01:12:28)


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

#916 2023-10-23 02:07:14

amordecosmos
Plugin Author
From: London (Hometown: Vancouver)
Registered: 2004-08-03
Posts: 106
Website

Re: smd_calendar: complete schedule / event / calendar / diary

That doesn’t work either.

My workaround, which isn’t ideal, is my recurring field is ’1 day’ and the skipfield is ’1 mon,2 mon,3 mon,4 mon,5 mon,6 mon,7 mon,8 mon,9 mon,10 mon,11 mon,12 mon,13 mon,14 mon,15 mon,16 mon,17 mon,18 mon,19 mon,20 mon,21 mon,22 mon,23 mon,24 mon,25 mon’ which gives me six months of skipped Mondays.

This way I keep resetting the posted date every six months.

But yes I agree, there should be some secret Gnu parse date incantation that can do it.

Offline

#917 2023-10-23 15:01:18

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

Re: smd_calendar: complete schedule / event / calendar / diary

Got it! Knew there was a syntax that worked.

In your article:
  • Start of event range = Posted Date
  • End of event range= Expiry Date
  • omitfield value = {Mon}

The reason the omitfield doesn’t respond to every and first, second, etc is because it’s only set up to handle a simple list of dates. The (complicated) logic that applies to stepfield isn’t processed. With some careful thought I could probably add that feature.

However, date range expansion is supported. This allows you to specify a range of dates to exclude using the => arrow notation, and also to specify whole days of the week via {Mon:Wed:Fri} for example, to omit those days.

Hope that gets you going.

Last edited by Bloke (2023-10-23 15:05:36)


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

#918 2023-10-24 00:59:55

amordecosmos
Plugin Author
From: London (Hometown: Vancouver)
Registered: 2004-08-03
Posts: 106
Website

Re: smd_calendar: complete schedule / event / calendar / diary

I wish that worked, but it doesn’t. It continues to display every Monday.

Debug = “2” doesn’t show anything.

It works great! Thank you.

(It wasn’t working originally but after I closed/reopened Brave, there it was.)

Another Mighty TXP success.

Last edited by amordecosmos (2023-10-24 02:12:13)

Offline

Board footer

Powered by FluxBB