Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#385 2009-10-05 16:50:30

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

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

molly wrote:

The first Sunday is Nov. 1, but the articles are off by one week. The software seems to be missing the fact that November 1 is a Sunday.

The software in question is most likely to be PHP itself, I’m afraid :-(

Look at the PHP documentation for strtotime() which smd_calendar uses extensively and scroll down a little way to Changelog. It says:

In PHP 5 prior to 5.2.7, requesting a given occurrence of a given weekday in a month where that weekday was the first day of the month would incorrectly add one week to the returned timestamp. This has been corrected in 5.2.7 and later versions.

So unfortunately, the fix is to upgrade PHP to 5.2.7 or higher. Sorry about that. If I come across anything else in the meantime I’ll see if I can patch the plugin for versions < 5.2.7 or provide some other workaround.

Of course if you are running PHP greater than 5.2.7 and it’s happening I need to look hard at my code. Please let me know if this is the case, thanks.

Last edited by Bloke (2009-10-05 16:51:46)


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

#386 2009-10-05 16:59:38

molly
Member
From: Virginia
Registered: 2004-08-15
Posts: 44
Website

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

Thanks, Stef. I don’t know which version of php I have, but I’m looking into it.

Offline

#387 2009-10-05 17:44:27

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

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

molly wrote:

I don’t know which version of php I have…

The diagnostics tab will tell you.


My Plugins

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

Offline

#388 2009-10-05 17:55:54

molly
Member
From: Virginia
Registered: 2004-08-15
Posts: 44
Website

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

Oh thanks MattD. Stef, I have 4.0.8. I am still on Textdrive/Joyent shared hosting. I am totally lost when it comes to server stuff. Is upgrading php something I can do myself, or do I need a server admin to do it?

Last edited by molly (2009-10-05 17:56:10)

Offline

#389 2009-10-05 18:19:07

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

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

Bloke wrote:

Exactly the same way you do it with standard TXP articles. The txp:older and txp:newer tags will page through the results if you set smd_article_events to use paging="1" and use the limit attribute to only show N items per page. offset allows you to not start at the beginning in exactly the same way it works with standard articles.

Ah … basics … never done before … :%

1) Is it possible to do paging to the next (or prev) month instead of 10 events (limit) or so?
2) On next (or prev) page, the page doesn’t find the (rel path!) stylesheet … why is that?

Offline

#390 2009-10-05 19:02:36

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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

Molly, 4.0.8 may be your TXP version, not your PHP version.
Check the diagnostics tabs.

Regarding how to switch to PHP5, some hostings provide the option to enable it on their control panel, or even adding a line to the .htaccess file. You should contact your hosting to check if that’s possible.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#391 2009-10-05 19:35:53

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

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

RedFox wrote:

Is it possible to do paging to the next (or prev) month instead of 10 events (limit) or so?

Ooooh, now you’re asking. I don’t think so because it’s based on the TXP system of numerical limits. But there might be a way of doing it by faking the paging. You might have to make your own next/prev links based on adding ?pg=N to a link after you’ve found that you’ve reached the beginning of the next month / end of the previous month. It might not work, but it might be a way of simulating paging by month. I’m not sure if it’s actually possible to do in the plugin but it’s not a bad idea. I might take a look and see if I can manage it.

On next (or prev) page, the page doesn’t find the (rel path!) stylesheet … why is that?

It looks like the trailing slash on the next/prev links is causing the problem. agenda-list?pg=2 works but agenda-list/?pg=2 doesn’t. Can you alter those?


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

#392 2009-10-05 19:58:53

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

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

maniqui wrote:

Molly, 4.0.8 may be your TXP version, not your PHP version.
Check the diagnostics tabs.

Regarding how to switch to PHP5, some hostings provide the option to enable it on their control panel, or even adding a line to the .htaccess file. You should contact your hosting to check if that’s possible.

Molly, for example my diagnostics tab shows PHP version: 5.2.8 about 10 lines down.


My Plugins

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

Offline

#393 2009-10-05 20:17:35

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

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

Bloke wrote:

I might take a look and see if I can manage it.

:)

Offline

#394 2009-10-05 20:43:56

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

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

Bloke wrote:

It looks like the trailing slash on the next/prev links is causing the problem. agenda-list?pg=2 works but agenda-list/?pg=2 doesn’t. Can you alter those?

Oops … eh … no … or can I?

[edit]
With some support it’s working now > http://forum.textpattern.com/viewtopic.php?pid=218327 … :)

Last edited by RedFox (2009-10-27 13:11:48)

Offline

#395 2009-10-15 16:39:48

Josefin
Member
Registered: 2008-01-30
Posts: 18

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

Hi!
I still havent fixed that todays date won´t show, it just makes an empty box for todays date (and it’s not the css, it’s actually empty)
I use the miniclone calender. This is what my code looks like:

<txp:smd_calendar section=“nat_kalendarium” cellform=“miniclone” id=“nat_kalendarium”> <txp:permlink><txp:smd_cal_info type=“day” /></txp:permlink>
</txp:smd_calendar>

Why does not todays date show?

Also: If i put two events on the same day, the calender will break up, because it will show the date for each event. How do I only show one date but all events if you click it?

Offline

#396 2009-10-15 16:57:03

molly
Member
From: Virginia
Registered: 2004-08-15
Posts: 44
Website

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

molly wrote:

Hi Stef –

I have the latest version of your plugin (v 0.42c) running on this page:
http://www.beerrun.com/tasting-events-calendar

And I have 3 articles with a stepfield set up with “second sunday ?month ?year”, same goes for the third and fourth Sundays.

Something is wrong with November. The first Sunday is Nov. 1, but the articles are off by one week. The software seems to be missing the fact that November 1 is a Sunday.

What can I do about this? Thanks in advance!

Hi again Stef – I moved to a new server running php version 5.2.9. My “second sunday” entry is still appearing on the 3rd Sunday in November. Would be grateful for a fix! Thanks.

Last edited by molly (2009-10-15 16:59:50)

Offline

Board footer

Powered by FluxBB