Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#529 2010-05-12 02:45:02

laptophobo
Member
Registered: 2010-03-01
Posts: 216
Website

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

Hi Stef,

As Markus pointed out correctly, my initial thoughts are to tinker with the CSS (since I know HTML very well, but Textpattern like I know women). That said, are there actual style sheets? And if so, how might I find them?

Thanks Stef,


Living the Location-Independent Life: www.NuNomad.com

Offline

#530 2010-05-13 23:22:47

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

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

Hi Stef, this is such a great plugin and I’m in the process of moving from zem_events to this plugin for a client’s site. Because this client will never remember to edit the article’s post date/time, I’m building custom fields with datepickers to handle that input. I’ve gotten stumped by one thing, though – is there any way to specify start time and end time with custom fields?

I can’t imagine I’m the first to ask, so I’m probably overlooking something blindingly obvious.

Offline

#531 2010-05-14 05:52:12

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

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

Hi Stef…

Timezones? I’ll give you a delicious fish!

Offline

#532 2010-05-17 23:10:39

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

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

alannie wrote:

is there any way to specify start time and end time with custom fields?

Anybody know the answer to this?

Offline

#533 2010-05-17 23:16:34

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

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

alannie wrote:

is there any way to specify start time and end time with custom fields?

Currently not possible, sorry. Times are taken from the posted / expiry dates for the article itself, which is a bit stupid but will be addressed when I eventually get the next version off the ground.

Speaking of which, the next rev is totally getting on my nerves. I’m determined to get it working but my determination keeps getting hampered as I wade through example after example and find it still doesn’t work as I’d like it to. I’m onto the 8th rewrite. Grrrrrrrr.


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

#534 2010-05-19 16:19:51

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

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

is there a way to do the following?

Have an even that occurs every tuesday and thursday at 4pm?

Something like: start date “first tuesday at 4pm” then stepfield=“tuesday, thursday, 1 week”?

Last edited by mrdale (2010-05-19 16:20:22)

Offline

#535 2010-05-19 16:37:07

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

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

mrdale wrote:

Have an even that occurs every tuesday and thursday at 4pm?

Good question. Ummmm, off the top of my head I wonder if putting 1 week, 1 week + 2 days might get the desired result? In theory, the ’1 week’ bit will recur every week from the start date & time (i.e. every tuesday at 4pm) then the second step will add two days to the weekly event which should make it figure out the thursday. He says, with a lot of things crossed.

If that doesn’t work, have a poke around Google or php.net for examples of people using the strtotime() function. Each comma-separated thing you enter in the stepfield is passed through strtotime() with the event’s start date as a base. Thus each thing is essentially “added” to the base date. If strtotime can figure out a numerical value from the thing you specify, you’re in business.

Hope that helps get you moving; in the absence of a proper version of the plugin that will get dates right, pre-empt your every whim and shave your best friend’s marsupial in the process.


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

#536 2010-05-19 21:04:30

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

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

Thanks Stef, I feel your pain. Know that I and many others appreciate all the work you put into this and hope you will keep at it!

Offline

#537 2010-05-20 16:35:42

pafruu
Member
From: New Brunswick, Canada
Registered: 2010-01-14
Posts: 65

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

pafruu wrote:

Hello again,

I’ve been able to make the calendar display in the way that I wanted while modifying the stylesheet. I also managed to have those event show up on the very first page of my site. The only problem that I am experiencing right now is when I enter a new event to the calendar. It shows up in the calendar no problem. But lets say I want to know more about that event and I decided to click on it. this is the message that I get:

Tag error: -> Textpattern Notice: Page template calendar does not contain a txp:article tag on line 514

Where should I have this <txp:article /> tagged placed on the page template itself? In the <txp:smd_calendar /> tag?

Help me ….please…. I beg of you….. I’ve been at it for 2 days nopw and I still can’t make it work.

oh yeah.. did I mention that I’m a Noob at textpattern?

thanks

I’m still noobing on this issue, can anyone help me??

You know what they say, third time is the charm so here is number three

Thanks in advance


I try, and I try, and I try…. and sometimes I achieve

Offline

#538 2010-05-20 16:57:48

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

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

pafruu wrote:

Tag error: -> Textpattern Notice: Page template calendar does not contain a txp:article tag on line 514
Where should I have this <txp:article /> tagged placed on the page template itself? In the <txp:smd_calendar /> tag?

Without testing this, I wonder if you have a page template named “calendar”? If so, that page template does need to have a <txp:article /> tag somewhere.

Offline

#539 2010-05-20 17:55:22

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

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

@pafruu

It’s not an error, and it should go away once you set your website to “Live” mode, instead of “Testing” mode (in “Admin -> Preferences -> Basic”).

If you need to keep your website in “Testing” mode, then you have two options. One, drop a dummy <!-- <txp:article pgonly="1" limit="1"></txp:article> --> somewhere on your “calendar” page template. Not very nice, as your page template will get a bit dirty. or “silence” this notice by commenting out line 514 on /textpattern/publish.php.

Like this:

// make sure the page has an article tag if necessary
		if (!$has_article_tag and $production_status != 'live' and (!empty($pretext['id']) or !empty($pretext['c']) or !empty($pretext['q']) or !empty($pretext['pg'])))
			//trigger_error(gTxt('missing_article_tag', array('{page}' => $pretext['page'])));
		restore_error_handler();

La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#540 2010-05-20 18:08:49

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

maniqui wrote:

It’s not an error, and it should go away once you set your website to “Live” mode, instead of “Testing” mode (in “Admin -> Preferences -> Basic”).

Yes, it’s an debugging notice. It reminds you that article is used to view individual articles.

or “silence” this notice by commenting out line 514 on /textpattern/publish.php.

// make sure the page has an article tag if necessary
if (!$has_article_tag and $production_status != 'live' and (!empty($pretext['id']) or !empty($pretext['c']) or !empty($pretext['q']) or !empty($pretext['pg'])))
//trigger_error(gTxt('missing_article_tag', array('{page}' => $pretext['page'])));
restore_error_handler();

Good one Julian, but there is an slight mistake in your example. Because it is one line if statement, by commenting out the line, you moved the next line inside the if block. If you need to comment out one liner conditional, that has no closing bracket, you need to comment out the if statement too, or close it. Otherwise the line below the commented line becomes the line that you just commented out. So, you need to comment out both lines, 513 and 514.

/*
		if (!$has_article_tag and $production_status != 'live' and (!empty($pretext['id']) or !empty($pretext['c']) or !empty($pretext['q']) or !empty($pretext['pg'])))
	 		trigger_error(gTxt('missing_article_tag', array('{page}' => $pretext['page'])));
*/

Btw, modifying core is never recommended :-)

Last edited by Gocom (2010-05-20 18:20:21)

Offline

Board footer

Powered by FluxBB