Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#421 2009-12-18 22:01:31

progre55
Member
Registered: 2006-05-02
Posts: 668

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

Bloke:

I know you have been swamped and out of commission but do you have any ETA when smd_calendar will be compatable with 4.2.

Thanks.

progre55

Offline

#422 2009-12-18 22:12:40

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

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

progre55 wrote:

do you have any ETA when smd_calendar will be compatable with 4.2.

It is comaptible with 4.2. The plugin just has the same issues it had under earlier TXP releases, i.e. fun with DST and time zones. Plus it’s not the most optimised plugin in the world (*cough* massive understatement).

I have made headway with it — new features, some adjustments to try and make it work better with time zones, though it still has issues because of stuff in PHP and TXP — but development stalled pending further testing and the necessity/desire to improve it. I currently don’t have any projects that require it so I was focusing on other plugins that I did have an immediate need for.

So, sorry no ETA. It’s far from dead, it still works, it’s just not everything it could be… yet.

And yes, that does irk me somewhat.

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


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

#423 2009-12-18 22:15:22

progre55
Member
Registered: 2006-05-02
Posts: 668

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

Thanks for the update. I will take it for a test drive in my next project …

progre55

Offline

#424 2009-12-31 18:24:17

zeusdidit
Member
Registered: 2007-10-16
Posts: 111

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

So I have this calendar using:
<txp:smd_calendar size=“small” section=“events” category=“church-events” time=“any” showspanned=“0” />

When I click it a date goes to (for example):
http://stedwardpb.com/?date=2009-12-10&s=events&c=church-events

But what do I need to I show the results from the calendar?

This is what I currently have on the ‘events’ article page which works fine when I click a list item:
<txp:if_individual_article>
<txp:article form=“event-form” listform=“events-form” pgonly=“0” sort=“Posted asc” />
<txp:else/>
<txp:article_custom category=“church-events” form=“events-form” limit=“30” pgonly=“0” section=“events” sort=“Posted asc” time=“any” month=“2010” />
</txp:if_individual_article>

This is the ‘event-form’ for the single article event:
<div style=“float:right;margin:0 10px 10px 10px”><txp:article_image thumbnail=“0” /></div>
<h1><txp:title/></h1>
<txp:posted />
<txp:body />

The is the ‘events-form’ for article listings:
<div style=“float:right;margin:0 10px 10px 10px”><txp:article_image thumbnail=“0” /></div>
<h1><txp:title/></h1>
<txp:posted />
<txp:body />

What am I missing to get this calendar to get the results from the calendar…?

Offline

#425 2010-01-02 06:25:21

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

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

i have found that the date on the calendar is very hard to get to the top of its cell. i tried using cellform to make sure i’m doing everything from scratch. i am able to get it to the bottom using position:relative though. anyone else found this? i’m also wondering if there is a way to remove the table design from smd calendar and use css lists instead?

#daily table{
width:700px;
height:600px;
}
#daily td{
background-color:#DFDFDF;
border:1px white solid;
width:100px;
height:100px;
}
#daily h4{
position:relative;
left:10px;
top:33px;
}
#daily .cal_content{
float:left;
}
#daily .smd_cal_today  {
width:100px;
height:100px;	
}
 #daily .smd_cal_event  {
background-color:#AFAFAF;
width:100px;
height:100px;
}

also be sure to try the new datepicker plugin by matt davis. makes setting your dates a lot easier.

Offline

#426 2010-01-04 03:26:22

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

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

ok i have a few more questions.
1. how do i wrap the TDs in an <a> tag, so the cells are clickable and link to the event? in my case the first event cause i don’t have more than per day in this concept.
2. once you click on an event in the calendar, if your archive page has a calendar on it, it won’t show the active date you’ve selected. how do you i do that?

thanks stef, i’ve just been getting aquainted with some of your other new plugins lately, and i’m just amazed at how much you contribute to this CMS.

some of the documentation is a little hard to understand though – i think it’s because many of your big plugins like this one and gallery have some sort of “stef dawson” logic behind it. i guess if we can learn what the logic is behind your plugins, then learning a new one becomes easier?

Offline

#427 2010-01-04 14:01:57

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

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

mrtunes wrote:

i have found that the date on the calendar is very hard to get to the top of its cell.

Welcome to CSS :-) Does vertical-align still work?

remove the table design from smd calendar and use css lists instead

Not yet, but I’d like to allow you to ultimately set your calendar up how you want it. I don’t particularly like the forced TDs becaue it does cause a few niggles, but they were part of the mdp_calendar solution (in fact, part of the underlying calendar class that Marshall used) and it was far and away the best plugin to use as a base.

Part of the reason for the huuuuuuge delay in the next version is because I’m going through inner turmoil over whether to continue the plugin as it is (i.e. being based on mdp_calendar) or start again from scratch with lessons I’ve learned recently. Most notably:

  • The URL scheme needs serious work
  • I’ve ditched the mini calendar on my dev version but I need to emulate it with the large calendar by default
  • The DST/time zone thing still hurts
  • Relying on PHP’s strtotime() facility has caused many problems. Graeme suggested an alternative method which I’d like to adopt in those situations where you find that the dates the plugin generates are rubbish (e.g. recurring dates that don’t fall on the right days of the week if the first day of the month happens to be the same day as the event you’re trying to add later in the month!)
  • Spanned events only work on day boundaries. This means that, for example, TV listing web sites are not possible even though the underlying plugin could (in theory) be used for such a site to allow the creation of micro-schedules

And so on…

It requires significant effort whichever way I go and, as I’m not currently in need of a calendar, this one has been nudged down the priority list.

how do i wrap the TDs in an <a> tag, so the cells are clickable and link to the event?

You can’t at the moment. You can only put anchors inside the TDs and then use CSS to stretch it to the same dimensions. Regardless, I don’t think you can wrap a TD with an anchor without breaking the CSS validation. IIRC, an anchor is an inline element and a TD is a block-level element and, for reasons that evade me, you can’t wrap blocks with inline elements *shrug*. Someone correct me if I’m wrong here.

once you click on an event in the calendar, if your archive page has a calendar on it, it won’t show the active date you’ve selected

Hmmm, this requires a bit of trickery that’ll depend on your URL system and whether the date you clicked is a “real” article or a “fake” (recurring, spanned, etc) article. Remember that if you have an article listed today (04 Jan 2010) that recurs weekly and your visitor clicks next week’s date (11th) then you need to pass that date to the article and display that instead of the article’s real date.

If your archive page is using the year/month/day URL scheme you can probably read those values using adi_gps and/or smd_if (or perhaps even directly using the ? syntax in smd_calendar; can’t remember!) to set the start month and year, of the calendar — try embedding a <txp:variable> set from adi_gps in the smd_calendar attributes. To set the correct day, compare each cell (in your cellform) with the current ‘day’ from the URL and set a class accordingly.

If you’re not using y/m/d URLs then you’ll need to read the values from elsewhere, probably by passing them as URL vars when you click on them in your main calendar.

i’ve just been getting aquainted with some of your other new plugins lately, and i’m just amazed at how much you contribute to this CMS.

Aww shucks. Thanks. I’m doing everything I can to confuse you all ;-)

some of the documentation is a little hard to understand though

Yeah, my biggest problem. I’m trying to make it easier with each successive plugin — I’ve started grouping attributes together in the latest few plugin revisons so you can more easily find the attributes you need to achieve a particular effect. If you have any ideas on how I can improve them – without a “Requires: Degree in Astrophysics” warning at the start — then please let me know.

many of your big plugins like this one and gallery have some sort of “stef dawson” logic behind it

Hehehe yeah. Once you grasp the notion of the {replacement tag} thing — which I stole from the brilliant wet_for_each_image — then it becomes easier. It’s a little non-TXPish, but it makes the code more elegant because I don’t have to have a tonne of global variables floating around. Plus it gives more flexibility in designing your own Forms to do exactly what you want. The trade-off of course is that the plugins don’t do much for you unless you know what you want them to do!

Last edited by Bloke (2010-01-04 14:05:12)


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

#428 2010-01-04 21:52:43

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

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

hey thanks for a great, detailed response.

no problem about not being able to wrap a td in an anchor. i guess i should’ve tried this on a table outside of this one before even thinking it was doable. i can try to make the anchor match the width and height of the cell as you said.

my events are real, they are just occur one day. it’s essentially a diary on a calendar format. i just think the blog format of displaying a journal is a little tired and overdone.

your workaround using things like adi_gps made my head spin, so i don’t think i am going to go that route.

as for making your documentation easier to understand. the only thing i can imagine if it was some sort of “answer generator” kind of like how the txp tag builder works. you can fill out a form with dropdowns or text fields to help the user accomplish what they’re looking for. the help file is supposed to translate the options into english, but this is one way i can imagine it’s done intuitively – because in txp tag builder you kind of get some options about how you might answer this question – like “form” is dropdown. that’s all i can really think of but it’s not that great a suggestion i guess. maybe people need to help you write tutorials – i say people because sometimes it takes someone else to take a step back to explain it to us. all in all this is a lot of work but having big plugins like this really extend the cms a lot.

Offline

#429 2010-01-05 15:53:10

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

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

I’m doing everything I can to confuse you all ;-)

Well … :)
So far my favorite sentence of the new decade.
Happy New Year!


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#430 2010-01-05 21:31:12

zeusdidit
Member
Registered: 2007-10-16
Posts: 111

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

stef,
any chance you can help me diagnose how to display the articles using the calendar. see my note above…?

i’ve got 1 article, 2 forms, and a calendar for an ‘section’ event.
this may be something simple im missing.
please help.
thanks.

Offline

#431 2010-01-06 03:01:46

zeusdidit
Member
Registered: 2007-10-16
Posts: 111

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

it was simple. posting what i did wrong which was not adding this… a category.. thanks :)

<txp:if_individual_article>
<txp:article form=“event-form” sort=“Posted asc” section=“events” category=“church-events” />
<txp:else/>
<txp:if_category>

<txp:article form=“event-form” listform=“events-form” pgonly=“0” searchall=“0” sort=“Posted desc” time=“any” />

<txp:else/>
<txp:article_custom section=“events” category=“church-events” form=“events-form” limit=“30” pgonly=“0” sort=“Posted asc” time=“any” month=“2010” />
</txp:if_category>
</txp:if_individual_article>

Offline

#432 2010-01-06 21:28:38

zeusdidit
Member
Registered: 2007-10-16
Posts: 111

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

$100 (US) bucks to first person that can solve the problem with the site by Thursday Noon EST (US). Tomorrow.

I’ve got a calendar.
http://stedwardpb.com/?date=2010-03-24&s=events&c=church-events

But nothing shows up when the result is returned. I am wiped attempting to figure this one out with TXP unfortunately.

This TXP install uses:
4.2.0
Using “/title”
Has 2 Pages, events and another, though only events should return results I believe.

Email me directly please or post to the forum, whichever.

Offline

Board footer

Powered by FluxBB