Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#141 2009-02-20 13:34:54

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

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

Els/Rick:

Thanks for the response. I am hoping Bloke can chime in to give further comment.

Regarding the multiple categories, Rick I was thinking the same thing. Although creating so many sections is not something I would prefer to do, I think that will work, and because the properties will be fixed (ie not changing often) it should only be a one time hastle.

As I thought about it more, the bigger trick to this equation is the “blocking off” of dates. Els posted method, is only effective for a one shot deal. (ie the property is booked next week) The problem is that I need to show that the property is booked 2 weekends in March, three weeks in April, all of June etc. etc. …. I am going to play around a little with the skip field today, but my fear is that it will only allow me to put individual dates which would be almost unmanageable by the end user ….

I will let you guys know when I have a test up on my site to get further feedback and to update you if I discover any findings ….

progre55

Last edited by progre55 (2009-02-20 13:36:25)

Offline

#142 2009-02-20 15:40:48

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

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

Els/Rick/Bloke:

An update:

I can create the calendar as described earlier and mimic the functionality I want.

To do this, I am using one of the fields as the “extra field.”

I now have run into the following issues/question:

  • Can I have the plug in disregard the posted date of the article as being an event date? Reason: I want the current date to be a different color than the event date. Right now, the plug in thinks that the posted date is an event date so it overwrites that class (.today) with the event class (.event) — I know that this is how it is working because if I change the posted date (to a day other than today) I see a different color, but if I add today’s date into the “extra field” I see the event color.
  • As I had expected, the “extra field” works, but it would not be a viable solution because it requires the dates to be entered individually(2/12,2/13,2/14 etc. etc.) …. what I was hoping is that I could put into this field a span and singular dates (2/12 – 2/20, 3,1,3/3 etc.) … I looked at the other field options but did not think they addressed the issue I am coming across … I am hoping I am overlooking something or Bloke (or anyone) has a possible work around ….

Here is the code I am currently using (thanks to woof):

PAGE

<txp:smd_calendar form="cal_S_evform" spanform="cal_S_multis" 
     stepfield="custom_13" omitfield="custom_12" skipfield="custom_13" extrafield="custom_3" 
     classprefixes="" class="smallcal" emptyclass="empty" dayformat="{S,M,T,W,T,F,S}"  monthformat="ABBR" size="large" section="calendar_sample" firstday="1"  /> 

cal_S_evform Form:

<span class="calevent">
<txp:smd_if_cal flag="recur">
  <txp:permlink>(RECUR)</txp:permlink>
<txp:else />
  <txp:permlink><txp:title /></txp:permlink>
<txp:smd_if_cal flag="multifirst">
     <span class="right"></span>
   </txp:smd_if_cal>
   <txp:smd_if_cal flag="recurfirst">
      <span></span>
   </txp:smd_if_cal> 
</txp:smd_if_cal>
</span>

cal_S_multis Form:

<span class="calevent">
<txp:smd_if_cal flag="multi, multiprev"
     logic="or">
   <txp:permlink><txp:title /></txp:permlink>
</txp:smd_if_cal>
<txp:smd_if_cal flag="multilast">
  <txp:permlink title="<txp:title />">
      <span class="left"><txp:title /></span>
   </txp:permlink>
</txp:smd_if_cal>
</span>

Stylesheet:

#calendar {
	margin: 0px auto;
	padding: 0px;
	border:0;
	width: 250px;
         FONT: 8px Verdana,sans-serif; 
	COLOR: #000000;
	TEXT-DECORATION: none;
}
table.smallcal {border-collapse:collapse;border-spacing:0; font-size:10px; width: 100%;}
.smd_cal_navrow {height:25px;}
table.smallcal tr {text-align: left; vertical-align: top;}
table.smallcal th, table.smallcal td {padding: 1px;border:1px solid #FFF; background-color:#8D8D8D; color:#fff; font-weight: bold; text-align:center;font-size:11px; }
table.smallcal td {background-color:#ddd;color:#636F6F; height:25px;}
table.smallcal td.event{background-color:#CC3333}
table.smallcal td.event:hover{background-color:#CC3333}
table.smallcal td.event h4 {color: #fff;}
table.smallcal h4 {color: #999999; margin:0px;font-size:9px;}
table.smallcal .today h4 {color: #fff;}
table.smallcal .today {background-color:#000}
table.smallcal .calevent a {background: url(../images/event_icon.png) no-repeat 3px 0; text-indent: -999em; display:block;}

Thank again for any assistance.

pprogre55

Offline

#143 2009-02-20 17:44:03

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

progre55 wrote:

As I thought about it more, the bigger trick to this equation is the “blocking off” of dates. Els posted method, is only effective for a one shot deal. (ie the property is booked next week) The problem is that I need to show that the property is booked 2 weekends in March, three weeks in April, all of June etc. etc.

I am using an article per booking, which shows the availability exactly as you want it (I think). Is there a reason why you couldn’t do that? My setup is now like this:

  • each booking is an article in section ‘calendar’
  • category1 is for provisional/final (you probably won’t need that)
  • category2 is for the appartment-id

Last edited by els (2009-02-20 17:45:57)

Offline

#144 2009-02-20 18:05:00

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

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

Els:

Here is my set up:

  • Each Property is an Article
  • A Custom Field identifies the date the property is booked
  • The other custom fields contain Property Specs (type, price etc.)

I do not think your set up is viable, because with 100 properties and a large amount of bookings per property, it would become impossible to mnage. Plus, with the current set up, you can look at an individual property (article) and see all the details about that property from one screen.

Offline

#145 2009-02-20 18:22:15

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

progre55 wrote:

I do not think your set up is viable, because with 100 properties and a large amount of bookings per property, it would become impossible to mnage.

Would creating an article and just entering a posted date, expire date and category be much more work than entering those dates in an existing article?

Plus, with the current set up, you can look at an individual property (article) and see all the details about that property from one screen.

The way I’d go about that is use a sticky article for the property details, and use a custom field or category to tie the booking articles to the property article. Haven’t tried this yet (and don’t have the time now), but I think that should be doable.

Offline

#146 2009-02-20 19:01:18

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

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

Els:

I need to think about that one. Although I agree that it may not be that much more difficult and in fact, may even be a little easier when inputting the actual booking (if there was no way to span dates in the custom field), I think it may be difficult from my client point when it comes to management. Very unwieldy to have such a long laundry list under the articles tab.

Now I think I would go with your approach, if there was a way to create two tabs: the first tab would have the property articles and the second tab would have all the booking articles.

Any thoughts?

I have been using TXP for years, but have never had a reason to use the Sticky function, so I will ahve to take a closer look to understand the use and benefits.

progre55

Offline

#147 2009-02-20 20:42:04

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

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

The sections approach has the advantage of being able to segregate 2 or 3 articles to a section, for example, this giving you control with posted and expire dates to provide arbitrary dates displayed without skipfields or complex spans. Once the sections were established maintaining them wouldn’t be that complicated, and it would leave a lot of predefined and automated functions available as design tools.

Offline

#148 2009-02-20 20:43:52

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

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

Rick:

Just to clarify, are you referring to Els approach or the one that I outlined when you refer to the “section” approach ….

progre55

Offline

#149 2009-02-20 23:21:02

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

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

I’m still back here Given 100 properties, 100 sections with one article assigned to each would be possible. – seems you’ve moved on.

Last edited by rsilletti (2009-02-20 23:21:54)

Offline

#150 2009-02-21 04:16:10

hamato
New Member
Registered: 2009-02-21
Posts: 9

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

Guys, I’m sorry if this question is too basic, but I can’t figure out how to display only the active event, if there’s more then one event in the same day.

For example, I’m making a website for some TV station. There’s 10 TV shows (events) in the same day, each last for 1 or 2 hours, and they loop (recur) in 1 week period.

I need to display ONLY the article that is active at that very moment Something like: Now Playing.
Next, I need to show a title of the article that is coming next. Something like: Comming Next.

Can this be accomplished with smd_calendar? Does it have support for hours and minutes, or days only?

Last edited by hamato (2009-02-21 04:17:02)

Offline

Board footer

Powered by FluxBB