Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#337 2009-06-19 15:03:22

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

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

alexandra wrote:

Maybe your german DB runs UTF-8 while mine is using character set latin1? Could this cause the problem?

Maybe. It was UTF-8. Honestly don’t know the answer to this one.

for skipfield etc. do you insert only english month abbr like jun for june?

Sadly yes. The PHP function that does the magic behind the scenes parses only English dates and times


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

#338 2009-06-19 15:09:44

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

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

‘ello ‘ello ‘ello. What’s all this then? Does this mean that smd_calendar could potentially be freed of the drudgery of timezone hacks and server offset/DST weirdness from the next version? Time will tell, and I’ll post findings here as I experiment with this unexpected but hopefully fabulous news from Mr Wetzlmayr.

If anybody (saccade?) running bleeding edge SVN can send me any bits and pieces on how the current plugin version behaves under these changes, I can see which bits I need to re-engineer so I can leave TXP to do the timezone stuff and I can present a clean plugin interface without fear of dates shifting every 6 months or days of the week being one day “out” between midnight and 3am every day, etc, etc.


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

#339 2009-06-19 15:44:08

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

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

Hi Bloke,

I’m hoping to upgrade my development site to the latest SVN soon. Will definitely report findings.

Only problem is that SVN and MLP don’t play nice at the moment :P

Offline

#340 2009-06-25 10:14:06

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

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

If you use the hack to display individual days events when clicking links in the mini calendar it doesn’t work with expired events.

So even though i’ve set the Textpattern to publish expired articles it still doesn’t display. I think it’s because the “to” and “from” are only looking for articles with posted and expired times within that and not articles with repeat dates exceeding those.

<txp:smd_if field="urlvar:date" operator="defined">
<h1><txp:smd_cal_now now="{smd_if_date}" format="%d %B %Y" /></h1>

<table id="event_listings">
	<tr>
		<th>&nbsp;</th>
		<th>Event Name</th>
		<th>Event Location</th>
		<th>Event Type</th>
	</tr>        
<txp:smd_article_event section="courses"  expired="1" time="any" stepfield="custom_1" omitfield="custom_2" extrafield="custom_3" sort="Posted asc" from='<txp:smd_cal_now now="{smd_if_date}" format="%d %B %Y" />' to='<txp:smd_cal_now now="{smd_if_date}" offset="1 day" format="%d %B %Y" />'>

<txp:if_different>
	<tr><th class="event_month" colspan="5"><txp:posted format="%H:%M" /> &ndash; <txp:expires format="%H:%M" /></th></tr>
</txp:if_different>

<tr <txp:zem_nth step=2 of=2>class="odd"</txp:zem_nth>>
	<td><txp:permlink><txp:article_image thumbnail="1" class="event_thumb" /></txp:permlink></td>
	<td><p><strong><a href="<txp:permlink />"><txp:title /></a></strong></p>
		<txp:excerpt />
	</td>
	<td>Location</td>
	<td><txp:category1 title="1" link="1" this_section="1" /></td>
</tr>
</txp:smd_article_event>
</table>

Last edited by FireFusion (2009-06-25 10:14:33)

Offline

#341 2009-06-25 10:32:49

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

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

For another problem i’m having I wonder if it’s because the formating of “?month” is naturally right for TXP to understand.

I entered the following in my stepfield

10 ?month,25 ?month

To repeat an event on the 10th and 25th of every month. I wonder if it’s because ?month is outputting a funny formatted date like “24 days ago”

Last edited by FireFusion (2009-06-25 10:38:52)

Offline

#342 2009-06-30 07:49:51

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

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

Getting the following error in testing mode…

Tag error:  <txp:smd_if_cal flag="multi, multiprev"> ->  Warning: in_array() [function.in-array]: Wrong datatype for second argument  on line 1218

Offline

#343 2009-07-07 21:44:11

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

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

Hi Stef,

any news on an update (Now that 4.2.0 is in feature lock)?

One of my events is one day out with txp 4.2.0 no matter what i do. I was wondering if it’s a result of the new time system or a bug.

If you click on the event Mahayana Precepts on the 13th you’ll see that the info box displays the correct date of the 14th but yet it is shown on the 13th :P

Last edited by FireFusion (2009-07-08 08:14:48)

Offline

#344 2009-07-08 08:28:47

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

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

FireFusion wrote:

any news on an update (Now that 4.2.0 is in feature lock)?

Nope. Had a crappy few weeks. Coding is not on my radar at the moment, sorry.


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

#345 2009-07-22 00:06:05

wolle
Member
Registered: 2006-05-04
Posts: 19
Website

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

I have a problem while I do my first steps with smd_calendar (V 0.42b / 0.32):

I put a

<txp:smd_cal_info type=“s” />

in a article-form, which I call from

<txp:smd_article_event section=“mwtermine” form=“mw_terminartikel” time=“future” allspanned=“1” limit=“5” sort=“Posted asc” stepfield=“custom_8” />

This works! – I get the section as the output.

If I change it to

<txp:smd_cal_info type=“day” />

I get no output – nothing.

The same with month, year, callid … – no output.
Only author and section are working.

Can anybody help me?

Thanks, Wolfgang

Offline

#346 2009-07-22 11:05:20

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

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

wolle wrote:

I put a <txp:smd_cal_info type="s" /> in a article-form, which I call from <txp:smd_article_event... [snip]

I think the fact you got the section displayed is just a lucky side effect of the way the tag works. At the moment, the smd_cal_info tag only works reliably inside an smd_calendar form/container. The smd_article_event tag works like article_custom so you should be able to use existing TXP tags to access the information you require. For example, to get the day of the event you would use:

<txp:posted format="%d" />

and the section:

<txp:section />

and so on. The reason you only get author and section out when using smd_cal_info is because article_custom sets those values up.

Sorry it’s not quite the answer you were looking for. I’ll see if I can make it more obvious in the documentation and/or fix the plugin so that cal_info works (or explicitly doesn’t work) inside smd_article_event.


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

#347 2009-07-24 13:33:16

peterj
Member
From: Melbourne, Australia
Registered: 2005-06-02
Posts: 99

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

Another lovely piece of work Bloke. And after smd_if opened all manner of new txp possibilities..

Could anyone give me a short cut tip. I am displaying various galleries’ and museums’ exhibitions in the calandar and they tend to go for up to 3 months, closed on Sat/Sun, or Sun/Mon. I am using omit field to exclude each date so that string gets quite long and I usually fluff it by missing out a space or a comma.

Just crossing fingers that someone might have dreamt up a workaround to enable omission of days of the week, ie omitfield = Sunday,Monday
Alternatively, is there a way of using stepfield to do same? ie stepfield = Tuesday,Wednesday,Thursday,Friday,Saturday

Many thanks,
Peter

Offline

#348 2009-07-24 15:43:03

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

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

peterj wrote:

Another lovely piece of work Bloke.

Thanks :-)

they tend to go for up to 3 months, closed on Sat/Sun, or Sun/Mon. I am using omit field to exclude each date so that string gets quite long and I usually fluff it by missing out a space or a comma.

Eeek! Not to mention the fact that custom fields are limited to 255 characters in length… you need a solution to that quick smart. And, since it’s a pretty small alteration, I’ve managed to squeeze it (undocumented) into smd_calendar 0.42c

You can now use an additional syntax in your article’s nominated skipfield or omitfield: {Sat:Sun}. That will omit/skip the given days in your spanned event. It doesn’t have to be a contiguous range, for example you could specify {Mon:Wed:Fri} to omit Mondays, Wednesdays and Fridays from your spanned event.

Caveats are that the day names you use must:

  • Be the English 3-character names
  • Begin with a single capital letter
  • Be separated by colons (spaces are optional between the day names)

See how you get on with that. Hope it hasn’t broken anything else… *gulp*

Last edited by Bloke (2009-08-09 09:42:20)


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