Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#457 2010-02-01 13:13:17

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

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

Hi all,

I’ve been trying to download the latest version of this plug-in but it keeps truncating the code (compressed version too). I’m using Firefox and Safari on OS X, can anyone help?

Thanks.

Offline

#458 2010-02-01 13:22:10

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

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

decoderltd wrote:

it keeps truncating the code (compressed version too).

Does the cheeky direct download do the same?


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

#459 2010-02-01 14:21:56

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

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

Thanks Stef,

The Cheeky Direct Download worked perfectly.

Last edited by decoderltd (2010-02-01 14:23:01)

Offline

#460 2010-02-09 09:42:28

kchau2
New Member
Registered: 2010-02-09
Posts: 7

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

Sorry if this has already been answered but is there a way to get the current date highlighted?

Edit: Problem solved! Silly me

Last edited by kchau2 (2010-02-09 09:49:11)

Offline

#461 2010-02-10 20:11:55

taggart
New Member
Registered: 2010-02-10
Posts: 2

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

Hello,

I do hope I didn’t miss anything in the previous answering my question.

Does the Textpattern Advanced Pref ‘Publish expired articles’ take precedence over whatever expired is set to in <txp:smd_article_event …>? Because with my installation it appears to.
I have set ‘Publish expired articles’ to “yes” and now <txp:smd_article_event expired="0" …> does no longer exclude expired articles.

I’m no programmer but I was curious, so I looked at the plugin’s code. Within the smd_article_event-function I found the line

$expired = ($expired) ? $expired : $prefs['publish_expired_articles'];

and thought, this has something to do with it. So I added

/* INSERTION*/
		echo ("\n<!-- ### Expired before ". $expired ." ### -->");
/* END OF INSERTION*/
	$expired = ($expired) ? $expired : $prefs['publish_expired_articles'];
/* INSERTION*/
		echo ("\n<!-- ### Expired after ". $expired ." ### -->");
/* END OF INSERTION*/

around it, which results in

<!-- ### Expired before 0 ### -->
<!-- ### Expired after 1 ### -->

telling my unlearned eyes: this is the culprit. But is this intended behaviour or is something wrong with my setup?

Id be very thankful for any thoughts.

Kind regards

Taggart

Offline

#462 2010-02-10 20:23:44

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

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

taggart wrote:

Does the Textpattern Advanced Pref ‘Publish expired articles’ take precedence over whatever expired is set to in <txp:smd_article_event …>?

It’s not supposed to but you found a bug. Stupidity on my part, d’oh. Thanks to your excellent diagnostics I can tell you how to fix it temporarily too until the next version comes along:

$expired = ($expired) ? $expired : $prefs['publish_expired_articles'];

is wrong. It should be:

$expired = ($expired != '') ? $expired : $prefs['publish_expired_articles'];

That should also be fixed in the smd_calendar tag, around line 140 in your code. Note that the line after it is OK though, even though it uses the same logic, because by that time the value will be either 0 or 1.

Sorry about that, and thanks for spotting it.


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

#463 2010-02-10 21:25:17

taggart
New Member
Registered: 2010-02-10
Posts: 2

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

Bloke wrote:

Thanks to your excellent diagnostics I can tell you how to fix it temporarily too until the next version comes along:

Wow, Stef, that was a quick reply! Thank you very much, the new line works just as it should.

Do keep up the great work!

Regards

Taggart

Offline

#464 2010-02-13 15:10:22

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

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

Hello,

I have some problems with smd_calendar – maybe the problem sits in front of my computer. :-)
Here is my first: I’m in Germany and we have a month with „Umlaut“: März. When I use txp:smd_cal_now, txp:smd_article_event or txp:smd_calendar I get a symbol with questionmark instead of the „ä“. See it under www.cunde.de/mwtermine/?m=3&y=2010&s=mwtermine

Can someone help me?

Thanks Stef for your great work!

Offline

#465 2010-02-13 15:25:11

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

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

wolle wrote:

we have a month with „Umlaut“: März.

I don’t see a question mark on my (English) browser. I see a weird character instead:

Note it’s also in the article title and the posted date. Are they generated by TXP tags or smd_calendar? If it’s TXP then it’s probably an encoding issue or a browser thing rather than the plugin.

Not sure what to suggest really. afaik, the calendar plugin can output i18n/l10n stuff as long as the character set is installed in TXP/the browser/the machine you are using. Perhaps someone else with more grounding in character sets and browsers can help track this one down.

Last edited by Bloke (2010-02-13 15:25: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

Online

#466 2010-02-13 15:48:25

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

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

Wow Stef, thanks for your quick answer!

I don’t see a question mark on my (English) browser. I see a weird character instead:

Yes, it is different on different machines here too.

Are they generated by TXP tags or smd_calendar?

They are all generated by smd_calendar.

The title by:

<txp:smd_cal_now now=”?day-?month-?year” format=”%B %G” />

the posted date an description by:

<txp:smd_article_event section=“mwtermine” form=“mw_terminartikel” time=“any” allspanned=“1” limit=“5” sort=“Posted asc” stepfield=“custom_8” extrafield=“custom_9” from=’<txp:smd_cal_now now=“01-?month-?year” />’ to=’<txp:smd_cal_now now=”?month-?year” offset=“1 month” />’ type=“standard, recur, multi, extra” expired=“1” />

with the form /mw_terminartikel/ :

<h4><a href=”<txp:permlink />?d=<txp:posted format=”%d” />&m=<txp:posted format=”%m” />&y=<txp:posted format=”%G” />” title=”<txp:title />”><txp:if_custom_field name=“Kurztitel”><txp:custom_field name=“Kurztitel” /><txp:else /><txp:title /></txp:if_custom_field></a></h4>
<p class=“datum”><txp:posted format=”%A, der %e. %B %Y” /><txp:if_custom_field name=“Kurzinhalt”> – <txp:custom_field name=“Kurzinhalt” /></txp:if_custom_field></p>
<txp:excerpt />

Thanks for your help!

Offline

#467 2010-02-13 16:05:41

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

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

wolle

What happens if you supply the lang argument to the smd_cal_now and txp:posted tags? e.g. :

<txp:posted format="%A, der %e. %B %Y" lang="de" />

? Does that fix things?


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

#468 2010-02-13 16:49:33

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

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

My hero! :-)

<txp:posted format="%A, der %e. %B %Y" lang="de" />

This inside the articleform, used by <txp:smd_article_event form="..." /> corrects the character-problem of this posted-tag and of the <txp:smd_calendar ... /> but not the output of the @<txp:smd_cal_now … />.

Changing the last one to <txp:smd_cal_now now=”?day-?month-?year” format=”%B %G” lang="de" /> corrects it too.

It is a little bit confusing for me, that <txp:smd_calendar ... /> reacts with its encoding on a parameter in the articleform for <txp:smd_article_event form="..." /> .

You brightened my day, Stef. :-)
Many thanks for your help!

Offline

Board footer

Powered by FluxBB