Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#265 2009-05-08 10:26:46

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

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

Hi Bloke,

i’ve sent a login. Thanks for taking a look and considering my requests. It’s much appreciated.

Also the code to filter events that month by a category isn’t working either….

<a href="?c=<txp:category1
         />&<txp:smd_cal_info type="s, year,
         month, calid" html="1" join_prefix=""
         />" title="Display only <txp:category1 title="1" />">(C)</a>

The URL goes to www.mysite.org/calendar/?c=chanted-prayers&s=calendar&#38;y=2009&#38;m=05 but doesn’t change event listings. :(

Offline

#266 2009-05-11 19:36:46

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

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

Hi Bloke,

I’m playing with this amazing plugin. Thanks for it, Bloke.
Wondering if there is a reason not to have a wraptag attribute to wrap the event list on a particular cell. I mean, a teammate for eventwraptag.
In fact, to translate it to TXP “standards”.

wraptag = a tag that wraps the list of events on a cell.
break = eventwraptag.

Although, thinking about it a little more, wraptag and break should be “reserved” for wrapping/breaking the whole output generated by smd_calendar. In other words, for wrapping/breaking the table. Even more: break probably doesn’t make sense and shouldn’t be added.

So, back to the request: similar to wraptag / break attributes for the list of events inside a cell. Plugin already has the eventwraptag (this will be equal to a break attribute). Now we need the eventlistwraptag :D (a better name will be welcomed).

(or am I missing something?)

Last edited by maniqui (2009-05-11 19:37:18)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#267 2009-05-11 19:44:24

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

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

^^ Probably cellform is my friend for achieving the above, although having a eventlistwraptag as attribute will help the plugin to keep its Guinnes record of “Plugin with most attributes ever” ;)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#268 2009-05-11 20:30:12

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

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

BTW, if on a cellform, you are having troubles assigning replacement variables (i.e. {events}) to a txp:variable, use single quotes (') around the value for value attribute.
In other words:

<txp:variable name="has_events" value="{events}" /> -> won’t work.

<txp:variable name="has_events" value='{events}' /> -> will work.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#269 2009-05-12 21:41:34

woof
Member
Registered: 2004-08-01
Posts: 128

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

I have a requirement that I thought either the maintain or nameval attributes would solve but I’ve drawn a blank. I’d be grateful for any pointers anyone might have

I’m trying to keep an anchor in the url when navigating the calendar with the prev/next links
e.g. currently when I’m here:
/section/article?m=6&y=2009#calendar
and I click “next” I get
/section/article?m=7&y=2009
instead of what I’m looking for:
/section/article?m=7&y=2009#calendar

maintain="#calendar" doesn’t seem to work

any suggestions? thanks

Offline

#270 2009-05-12 21:50:37

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

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

woof wrote:

I’m trying to keep an anchor in the url when navigating the calendar with the prev/next links

Hmmm, not sure that’s possible right now, sorry. But it’s a valid request. I’ll see if I can work it into the plugin.


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

#271 2009-05-19 21:32:41

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

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

Still playing with this magic plugin. Have a lot of comments, questions and requests ;)

But now, I’m just coming to report a… bug?

If you are following Example 6, then, inside the smd_article_event, you have this attribute (slightly modified code, added explicit format):

to='<txp:smd_cal_now now="?month-?year" offset="1 month" format="01-%m-%Y" />'

The rendered value for to is 01-02-1970, and that’s wrong.
If you change the now attribute so the thing becomes this:

to='<txp:smd_cal_now now="01-?month-?year" offset="1 month" format="01-%m-%Y" />'

Now, it works as expected. :)

BTW, if you are using another language (!= en), or if you are using some “weird” format on Basic Prefs for date, I suggest you to explicitly set the format attribute.

Finally, this plugin is pure magic: it even let you use negative values for the offset attribute. like this: <txp:smd_cal_now now="01-?month-?year" format="%d-%m-%Y" offset="2 month -1 day" />.
This way, you will get the latest day of previous month (it could be 30, or 31, or 28/29), so for example, you can tell smd_article_event to list evens from 1st May to 30th June, and not to 1st July.

Last edited by maniqui (2009-05-20 13:54:17)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#272 2009-05-19 23:24:50

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

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

More things to report.
Possible bug: the small calendar is displaying recurring events with an expiry date as multi-day (spanned) events.

I noticed this after taking a look at a small calendar… and noticing that every sell in the calendar (every cell in the calendar after the very first recurring event with an expiry date) was being linked to its correspondent date.

Looks like a bug, right?
Bloke, please, tell me if you need more info.

Last edited by maniqui (2009-05-20 13:54:35)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#273 2009-05-20 13:03:42

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

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

maniqui

Thanks for the reports on your progress. I’m not ignoring you, honest!

RE: wraptag, I deliberately left it out for the reason you stated: the calendar is a table, it will always be a table (ever tried coding a calendar with divs/floats?!) and as you know, tables have at least three attributes: wraptag (table) break1 (tr) and break2 (td) — and possibly th as well. So it gets very messy. I chose to focus the plugin on the cell content rather than the cell make-up itself. Even cellform formats the content; everything is assumed to be inside a <td>. I can look into your request for wrapping event list content better.

Interesting thing about the single quotes around {events}, thanks for pointing it out. I would mention that in the docs if I had space! I guess the reason is that {events} (and other such replacement tags) are usually made up of HTML tags like <a href="link">... </a> so the variable tag sees the double quotes in the anchor as the end of the variable’s value and it causes a problem. Equally, if you also had single quotes in your link e.g. <a href="link">I'm an article</a> then you’d really be stuffed :-(

I think Example 6 is wrong: well spotted, thanks. It should probably have the day in it, but having said that it depends on what you expect the definition of “1 month” is! For example, is 6th Feb -> 6th March one month, even though feb is shorter? Or is 1 month really always 30 or 31 days? Hmmmm. I’ll see if the example really is wrong or the ?month/?year thing is not working properly.

the small calendar is displaying recurring events with an expiry date as multi-day (spanned) events.

I’ll check that out. May well be a bug: I don’t use the small calendar much so it hasn’t been tested as rigorously.

Thanks for giving the plugin a good run for its money :-) I’ll try and make time to fix all the outstanding issues (that is, issues that have been mentioned since the last release, not that the issues themselves stand out from the crowd!) early next month after I have finished the latest glut of site housekeeping / plugin development.

Incidentally, have you played at combining smd_calendar with smd_horizon? You can do some mental navigation; for example keeping your calendar focused on any given month, showing events from particular categories and stepping through events in those categories one by one to see the full event details — even for future events!

Last edited by Bloke (2009-05-20 13:05:18)


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

#274 2009-05-20 15:01:37

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

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

Hi Bloke,
thanks for your replied, and sorry (everybody) for some of my posts, which were full of typos or unclosed sentences, hehe.

Bloke wrote:

(ever tried coding a calendar with divs/floats?!)

No, never, although once I was sold on the idea of “a calendar is a list (ordered list), not a table”. Thankfully, I left those [über|wrong]-semantic über-OCD ideas behind. Others didn’t.

I’ll check that out. May well be a bug: I don’t use the small calendar much so it hasn’t been tested as rigorously.

What do you think about deprecating the small calendar and replacing it by a large calendar tuned to look/work as an small calendar? (as mrdale has done here)
Although I haven’t tested it yet, I think the small calendar is fully replicable using the large callendar + forms.

Incidentally, have you played at combining smd_calendar with smd_horizon?

Not yet (and didnt test smd_horizon standalone either). Still wrapping my head around smd_calendar.
As I said somewhere else, we all have to be careful when using smd_calendar + tags-in-tags. Wouldn’t like to create some kind of perturbation on the space-time continuum.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#275 2009-05-20 19:39:32

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

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

maniqui

Blmey! Someone persevered with a table-less calendar. They’ve got more patience than me; I tried it and gave up after half a day of testing in smd_calendar and just stuck with a table! The attributes were a nightmare to get right.

What do you think about deprecating the small calendar and replacing it by a large calendar tuned to look/work as an small calendar? (as mrdale has done

Yeah, that rotiecellars site was a real hack-fest in the calendar department. It took an evening of back and forth emails and instant message ‘how about this’ testing before we got it to work properly.

I have considered dropping the minical. It’s a real pain for any serious event work, and is only in there as a leftover legacy from the plugin’s mdp_calendar roots. The fact that it can only link to ?date= events (which are then internally translated into a standard TXP ?month= URL) was fine in mdp_calendar but is a big drawback given the power of the rest of the attributes in this plugin.

But it does fill a hole and if I dropped it — even if it was implemented internally as a fake full-size calendar — I’d probably miss something and would break existing minical sites. Perhaps it could be a long-term goal of the plugin post-4.0.9 when I get some more plugin space. Will chew it over some more.


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

#276 2009-05-22 14:30:06

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

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

Hi Bloke,
thanks for your reply.

I’ve this question: what’s the difference between skipfield and omitfield? Could there be any problem if both are used? (ie. if the skipped/omitted date is filled in on both)

A few more things/bugs to report:

  • on small calendar: omitted/canceled events are being displayed.
  • on a smd_article_event list, an extra date (for a recurring event) isn’t being displayed (fyi, the event doesn’t have an expiry date).

Thanks.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB