Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » How do I…?
  3. » schedule

#1 2010-08-26 13:09:45

mlarino
Member
Registered: 2007-06-29
Posts: 367

schedule

Hi,
I am create a website, wjere someone will publish “workers” with their availability schedule.

A worker can be available mondays from 9:00 to 14:00 and fridays from 12:00 to 19:00

In the website i will be creating a css schedule that will colored green on their available times.

But how will the textpattern administrator put the info to be displayed?

is their a plugin that can do this?
thanks!!

Offline

#2 2010-08-27 01:14:11

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: schedule

I think we’d need a little more information.
  • How many employees will there be?
  • Is this going to be a weekly schedule where you need to keep copies of past weeks?
  • Or one schedule that’s altered over and over again?
  • How much time will it span?
  • Will this be looking more like a school schedule or rather a timeline?

In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2010-08-27 06:03:28

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: schedule

Hi
Sorry if I didn’t explain it the right way.

-Each article is an employee.
-Each employee will have their own schedule of free time (at start there will be around 100 but it will grow fast to 200 300 employees).
-The schedule is only for information, and doesn’t have to keep track of past weeks.
-It will only show 1 week from Monday to Sunday, and with the times for each day (like a school schedule).

Mon Tue Wed Thr Fri Sat Sun
9:00-10:00
10:00-11:00
11:00-12:00
12:00-13:00
13:00-14:00

Etc……..

14:00-15:00

Offline

#4 2010-08-27 08:33:20

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: schedule

This is an example image.
schedule image
(yes its one schedule that’s altered over and over again)

Thanks!

Last edited by mlarino (2010-08-27 08:34:11)

Offline

#5 2010-08-27 11:00:41

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: schedule

mlarino wrote:

This is an example image.
schedule image

Ah, this makes it unequivocally. So, if the employees daily time isn’t interrupted it can be treated like a timeline. Looks like one.

You’ll want to enter just the start and end times in two custom fields and let a snippet with adi_calc do the maths for positioning and width (you’ll swap axes with hundred+ employees) of your green divs. You’ll need four custom fields and a more sophisticated formula if the times are no integers.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#6 2010-08-27 11:37:30

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: schedule

mmm, Maybe my example wasnt as good as i Thought hehehe

The website is for nannys, each girl will have their spare time to go to a house and take care of someones kids.
That is what the schedule is for, for the fmily to see if she is free to hire in the period of time they need her.

So it is not a continuous time, it could be anything really, one girl maybe wants to work only afternoons, maybe only has 2 free hours during the mornings and 4 hours in the afternoon.

So it all depends on the girl.

I was looking for a sort of plugin that could do something like that, because if I use Custom fields I would have to have too many (maybe the shortes way would be creating custom fields for the days M T W T F S S, and have select buttons in each with the times…) but seems a little too much doensnt it?

Offline

#7 2010-08-27 11:46:03

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: schedule

Did you take a look at smd_calendar ?

Offline

#8 2010-08-27 12:10:14

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: schedule

I looked into it, doesnt work.
My schedules are static, they wont chage depending on the dates the article was posted, its just like a school schedule where you know what times your classes are.
So that plugin doesnt help

but thanks !

Offline

#9 2010-08-27 12:24:53

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: schedule

Have a look at what THE BLUE DRAGON did with the write screen, especially posts #1, #12 and #14. These changes make it a lot easier to enter the values. If the number of custom fields doesn’t suffice (wasn’t it you who asked for glz limitations in the forum thread?) you’ll want to consider sed_packed_custom_fields or aam_split_custom_field, probably combined with rah_replace.

Last edited by uli (2010-08-27 13:50:47)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#10 2010-08-27 12:28:37

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

Re: schedule

mlarino wrote:

My schedules are static, they wont chage depending on the dates the article was posted

To be fair to smd_calendar (despite its many faults that are going to be addressed one day), using the article’s start and end dates is only one mode of operation.

You can tell the plugin using datefield or extrafield to ignore the posted/expires and use your own custom field. I know mrdale has done this on the walla walla YMCA site. He used glz_custom_fields to offer dropdowns that enabled people to choose the days/times an event took place when creating articles. That created step values in custom fields to specify intervals and availability of events. Those values are all passed to smd_calendar’s <txp:smd_article_event /> tag to display the lists.

You could use a similar system to allow workers to specify when they are available for work. But I admit it’s still not elegant because you’re dealing with days of the week and not necessarily dedicated days with fixed start and end points. You just set the posted date to ‘now’ and don’t bother with the expiry, then use the step/repeat/datefields/extrafields to configure availability.

So smd_calendar does ‘work’ it just needs some cunning out-of-the-box thinking to make it do your bidding. Uli’s advice about using sed_pcf and the other plugins is an excellent way to manage multiple items of data in custom fields.

Last edited by Bloke (2010-08-27 12:31: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

#11 2010-08-27 12:38:21

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: schedule

Thank you all!
I will look again into smd_calendar and those other plugins… :)
I just got back from my honneymoon, and its kind of hard to go back to code world and understand everything right away :)
I will read all the documentation 2 or 3 times hehe

Thanks!

Offline

#12 2010-08-27 13:01:15

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: schedule

mlarino wrote:

I just got back from my honneymoon, and its kind of hard to go back to code world and understand everything right away :)

Ah, these two brain hemispheres …
Good luck with both of them and their respective goals ;)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

  1. Index
  2. » How do I…?
  3. » schedule

Board footer

Powered by FluxBB