Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#865 2015-03-10 13:14:31

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

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

Can recurring events have and end time for each occurrence?

Is there a way to set a recurrence for every weekday? (Monday – Friday)

Last edited by MattD (2015-03-10 13:33:24)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#866 2015-03-10 14:43:53

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

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

MattD wrote #288921:

Can recurring events have and end time for each occurrence?

Yes, set the article’s expiry date, either using the built-in field, or nominate a custom field to handle article expiry (see datefields).

Is there a way to set a recurrence for every weekday? (Monday – Friday)

Yes of sorts. I’ve partially implemented a shorthand syntax for date ranges, but I don’t think it works on stepfields. But you can use it in omitfields, by setting up your article like this:

  1. Publish date: start of event
  2. Expiry date: end of event
  3. Recur custom field (stepfield): 1 day
  4. Omit custom field (omitfield): {Sat:Sun}

That’ll schedule the event every day between article start and expiry, except Saturdays and Sundays.

There are probably alternatives, but I can’t think of any neater ones off the top of my head.


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

#867 2015-03-10 15:21:06

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

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

Bloke wrote #288925:

Yes, set the article’s expiry date, either using the built-in field, or nominate a custom field to handle article expiry (see datefields).

I think I’m ok since I really only need the end time but the expiry date ends the recurrence of the event as well right?


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#868 2015-03-10 15:39:16

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

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

MattD wrote #288929:

the expiry date ends the recurrence of the event as well right?

Yes, it ends the entire event so the recurrence ends along with it. The downside being the article is no longer available to view on the site (unless you’ve got Publish expired articles set in prefs). That’s why I added datefields so you could “end” an event and still have the article available on the site, because article expiry is then a separate entity.

Interestingly enough, an event with a start and expiry and no recurrence is termed a spanned event because it spans a date range. So another way to do your scenario above without recurrence is to just use article publish and expiry (or configure some datefields), set the extreme start and end dates of your event (which will, by design, make it recur “every day”), then use omitfield in the same way as earlier to remove {Sat:Sun} from the mix. I like to provide more than one way to skin a nut, or crack a cat, or whatever.


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

#869 2015-03-19 05:58:17

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

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

Think this is my last issue…

Timezones seem to be affecting events displaying. Server TZ is “America/Chicago” and Time Zone is America/Los_Angeles. Event’s with a posted date before 1:00 AM using below code do not display with a url containing the date of the article posted date such as 2015-03-23.

<txp:variable name="article-date"><txp:rah_function call="gps, htmlspecialchars" name="date" /></txp:variable>
<txp:smd_article_event 
	stepfield="custom_3" 
	section="events" 
	from='<txp:variable name="article-date"/> 00:00:00'
	to='<txp:variable name="article-date"/> 23:59:59' 
	form="event-article" omitfield="custom_5"/>

My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#870 2015-09-16 18:37:39

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 251
Website

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

Hello, I can’t manage to print anything in my little cells, here is the code

<txp:smd_calendar class="bigcalendar" 
    firstday="1" 
    section="appuntamenti" 
    datefields="custom_1" // tried also data_evento but no
    wraptag="div"
    dayformat="Dom,Lun,Mar,Mer,Gio,Ven,Sab"
monthformat="Gennaio,Febbraio,Marzo,Aprile,Maggio,Giugno,Luglio,Agosto,Settembre,Ottobre,Novembre,Dicembre">
      1 // does not print 
</txp:smd_calendar>

Thanks!!!

Offline

#871 2015-09-16 20:46:37

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

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

Manaus wrote #294917:

I can’t manage to print anything in my little cells, here is the code

There’s nothing wrong with your code, so it’ll be some configuration thing that’s tripping it up. Here’s a quick checklist. Apologies if you tried some or all of them already:

  • Is your calendar tag in a Form? No problem if so. But if it’s in an article, remember to escape Textile around the tag, or turn off Textile processing altogether for that article.
  • Are there Live articles in section “appuntamenti”?
  • Do those articles have valid Posted dates in the format YYYY-MM-DD in custom_1?
  • Do the articles have an Expiry set which might occur before the Posted date?

If it’s not any of those then please can you supply some more info, maybe some of the detail from your article(s) in that section — such as the values in custom_1 — so I might be able to help you figure out what’s going 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

#872 2015-09-17 09:10:29

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 251
Website

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

Thanks Bloke,

  • No it’s in a page
  • Yes there are, but the vast majority is basic
  • I’m using glz_custom_fields 1.4.0beta, the field is a date picker called Data_evento (printing the content with txp:custom_field returns a regular Posted data format)
  • Expiry date: few of them

Offline

#873 2015-09-17 09:44:42

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

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

Manaus wrote #294929:

the field is a date picker called Data_evento

My money’s on this being the problem. smd_calendar uses a PHP function to parse the dates. If for some reason it cannot understand the date it drops back to using the article’s Posted date (you might like to scroll the calendar to the article’s Posted date and see if the cell contents is appearing there instead).

Unfortunately the PHP function only parses English dates so if the format isn’t one it expects, it has a tantrum. Perhaps it isn’t figuring out the date format properly? Can you try temporarily disabling glz_cf and manually enter a date in the format I gave above, then see if your content appears on that date? Or edit the field contents in PHPMyAdmin?


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

#874 2015-09-17 10:23:37

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 251
Website

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

Thanks Bloke
Your suggestion of exploring mysql was successful, the needed custom field was shifted for some reason to custom_6. Yay!

Offline

#875 2016-06-21 19:44:03

mikulas
Member
From: Czech republic
Registered: 2012-03-15
Posts: 38

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

I have finished pages of the Czech kindergarten “with a little help” of excellent plugin smd_calendar. Everything works fine, but one behavior is strange. If I enter a one-day event for the first day of the month, no event on this day arise. If I write a one-day event for any other day of the month, everything is fine…
Does anyone have an explanation, or the same experience? Thanks in advance for your help.

Offline

#876 2016-06-21 21:42:42

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

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

mikulas wrote #299916:

If I enter a one-day event for the first day of the month, no event on this day arise. If I write a one-day event for any other day of the month, everything is fine

Very strange indeed. I tested this on my installation and it worked fine so something else must be at play here. We’re going to have to dive a bit deeper so I can see if I can replicate the problem.

Please would you furnish me with some info, a lot of which you can clip from your High Diagnostics:

  • PHP version.
  • Plugin version.
  • Your locale (timezone) as set in Admin->Preferences.
  • Whether your web host is in the same timezone as your locale is set (probably, but I’m just being curious).
  • The attributes you use for your smd_calendar / smd_article_event tag(s).
  • The contents of any relevant Forms that you use to populate calendar cells.
  • List of other public-side plugins you use.
  • How your event is set up:
    • Using a Posted datestamp or a custom field?
    • Does the event have an expiry?
    • If so, how is it defined? Expires datestamp or custom field?
    • Any other custom fields in use?

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

Offline

Board footer

Powered by FluxBB