Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-01-07 14:17:27

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

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

Please can we have the ability to make events lists come for a category rather then a section as some articles in a section I don’t want to be events.

Offline

#14 2009-01-07 14:35:22

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

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

FireFusion wrote:

Does it have the include dates feature yet?

You didn’t answer my last question so I figured you had realised it wasn’t necessary. It isn’t necessary as far as I’m concerned but feel free to educate me otherwise and I’ll look into it.

For when the date of an event has been moved.

Have you installed the plugin? You move an event by changing the Posted date of the article. It then automatically moves on the calendar. How you communicate this to people in any other manner (if they had subscribed to a topic, for example) is up to you and outside the scope of the plugin.

Please can we have the ability to make events lists come for a category rather then a section as some articles in a section I don’t want to be events.

Both the <txp:smd_calendar /> and <txp:smd_article_event /> tags take the category attribute. The section is, by default, empty meaning “all sections” so you can filter events on the calendar by category. Or author. Or status. Or section. Or all of them.

Further if you have a section that contains loads of events and — for some reason — you want to exclude a few of those, use an omitfield and put the Posted date of the article you want to miss out in its custom field. Conversely if you have a few events in a section then I’d suggest putting them in their own section, otherwise you’d have to tag all the non-events with their own Posted date which might get tedious. Or choose some other way of filtering them, e.g. by category or author.

EDIT: and remember you can use the maintain attribute and/or build your own cells if you want people to be able to filter events by clicking on links in the calendar. For example you could offer a category_list that allowed you to show only events from the clicked category. The maintain attribute would keep the month the visitor was browsing in view so the calendar does not automatically “switch back” to the current month, like mdp_calendar used to do.

Last edited by Bloke (2009-01-07 14:40:57)


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

Online

#15 2009-01-07 17:45:31

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

If this was addressed in the other thread and I overlooked that, just let me know. I have the calendar in a section ‘calendar’. So the section page is site.com/calendar/. When browsing the months ?s=calendar is added to the URL, so that it becomes like site.com/calendar/?m=2&y=2009&s=calendar. I take it this can’t be done any other way otherwise you wouldn’t have done it like this?

Offline

#16 2009-01-07 19:05:17

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

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

Els wrote:

When browsing the months ?s=calendar is added to the URL

Yes, it’s partly to do with this and partly because I need to redo the URL generating bit, which is a hangover from mdp_calendar and bugs the hell out of me.

In theory it’s only supposed to add ?s= to the URL if you add section to the maintain attribute. That automatically adds whatever things you choose to the URL as ? vars during the navigation. Maintaining section is not really necessary for most applications because the calendar will automatically stay in the section it is in. It’s only there in case you are doing some funky cell manipulation or want to hard-code the section attribute in the <txp:smd_calendar /> tag; usually to read events from a different section to the one the calendar actually resides in.

Either way, I really need to treat the section differently when the nav arrows are generated — and that’s on the ToDo list — but with the variety of permlink modes available (plus I’ve no idea if I need to make exceptions for gbp_permanent_link, as as I’ve never used it) it’s a tonne of extra code that I don’t know the impact of. Yet. So I kinda played safe and used a messy syntax, sorry.

Having said all that, if you haven’t set maintain to anything (i.e. it’s at its default of calid or you’re not using section) then my guess is it’s to do with your permlink mode. I’ve only tried it with section/title because that’s what I use, so if there’s a bug due to a different mode, let me know which you are using and I’ll investigate a bit more thoroughly. Thanks.


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

Online

#17 2009-01-07 19:10:25

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

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

BTW, there’s a new version out in the meantime to fix a typo in the {shortyear} replacement tag, and enhance the date functionality to include an isoyear which — as all good standards decree — must defy logic and common sense, and be different to the actual year in some cases. But it’s invaluable if you are making calendars by ISO week, so for completeness is now in the plugin.

v0.34 | zipped

Last edited by Bloke (2009-01-07 19:12:09)


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

Online

#18 2009-01-07 20:05:12

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

Bloke wrote:

Having said all that, if you haven’t set maintain to anything (i.e. it’s at its default of calid or you’re not using section) then my guess is it’s to do with your permlink mode. I’ve only tried it with section/title because that’s what I use, so if there’s a bug due to a different mode, let me know which you are using and I’ll investigate a bit more thoroughly. Thanks.

I haven’t set the maintain attribute (if I do it makes no difference) and permlink mode is section/title. I don’t mind, it just looks a bit odd. Don’t spend time on this for my sake.

Offline

#19 2009-01-07 20:14:28

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

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

Els wrote:

I haven’t set the maintain attribute (if I do it makes no difference) and permlink mode is section/title

Hmmm, pants. I’ll have to try and work out what’s going on because I can’t get it to do that on my install. But then I’ve got a zillion options to my calendar tag so maybe one of those is overriding something else and perhaps a simple tag with very few attributes is not working as it should. Would you mind posting (or mailing me) your calendar tag and/or any relevant forms please so I can have a go at replicating what you see and fixing it. Ta :-)

Last edited by Bloke (2009-01-07 20:15:25)


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

Online

#20 2009-01-08 10:54:32

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

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

Bloke wrote:

FireFusion wrote:

Does it have the include dates feature yet?

You didn’t answer my last question so I figured you had realised it wasn’t necessary. It isn’t necessary as far as I’m concerned but feel free to educate me otherwise and I’ll look into it.

For when the date of an event has been moved.

Have you installed the plugin? You move an event by changing the Posted date of the article. It then automatically moves on the calendar. How you communicate this to people in any other manner (if they had subscribed to a topic, for example) is up to you and outside the scope of the plug-in.

Hi Bloke. Sorry I missed your question and have not properly explained myself.

Say there is a recurring event (spanning over the whole year for example) but one or two of the dates for that event need to be changed. I’d like to add those changed dates without having to create a whole new article for each one. Is this already possible?

So if an event takes place on the first of every money except for February and March when it’s on the 2nd. I imagine doing it with custom fields like this…

Custom field Cancel: 1-feb-2009, 1-mar-2009
Custom field Include: 2-feb-2009, 2-mar-2009

Does that make sense?

Offline

#21 2009-01-08 11:33:36

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

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

FireFusion wrote:

I’d like to add those changed dates without having to create a whole new article for each one.

Gotcha. Right. Makes sense now. Sorry, I was being dim.

That’s perhaps a valid scenario if you imagine, I dunno, Slipknot are on tour and Joey Jordison hurts his ankle. The show can’t go on as planned so you’d have to cancel one or two events but might want to reschedule them at a later date at the same venue. As long as none of the other details change (gig start/end time, for example) then having an “extra dates” custom field might be useful.

Similarly, if Take That are touring and have sold out a particular venue, they might add an extra night so fans who missed the first lot can still see them. Again, as long as the rest of the details don’t change you can get away with scheduling an “extra date” or two.

Of course in both the above scenarios, if some detail of the event (other than the date) changes you’d have to create a brand new event, and there’s no way round that.

At the expense of yet another custom field, I think this is possible. Thanks for finally getting though to my thick head, I’ll see what I can do.

Last edited by Bloke (2009-01-08 11:35:27)


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

Online

#22 2009-01-08 14:34:14

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

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

Awesome. Thanks bloke!

Offline

#23 2009-01-08 14:47:58

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

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

It’s seems i’ll have a few sites event section to be redone with that brand new plugin :D


Nico

Offline

#24 2009-01-08 14:56:12

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

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

Guess zem_event is out and this is in :)

Offline

Board footer

Powered by FluxBB