| View previous topic :: View next topic |
| Author |
Message |
dutchmarktets
Joined: 06 Oct 2006 Posts: 38 Location: The Hague - Holland - Netherlands
|
Posted: Thu Dec 07, 2006 2:13 pm Post subject: starttime AND endtime instead of starttime and duration ? |
|
|
Hello,
Does anyone happen to know how to code in event_edit
starttime AND endtime
instead of
starttime AND duration ?
My clients have a hard time to calculate the duration as to arrive at the right endtime
I tried to replace
| Quote: |
". $_cal_form->timeselect("starttime") ."
". _DURATION_ .":
". $_cal_form->timeselect("duration") ."
|
with
| Quote: |
". $_cal_form->timeselect("starttime") ."
will end at:
". $_cal_form->timeselect("endtime") ."
|
(it seems the table code disappears in this posting)
but that seems not sufficient
The field endtime is already in the db structure, though
Thanks in advance for the solution _________________ George Philip
(somehow i misspelled my userid ;-)
http://www.sitegevonden.nl |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Thu Dec 07, 2006 2:23 pm Post subject: |
|
|
Right; since endtime is already in the db structure you can not use it. You can not change the way Thyme repeats or looks at starttime, endtime, and duration. What you would have to do is change the way you enter this. So in event_edit do something like ..
$_cal_form->timeselect('eventendtime')
.. then in include/events.php under _SAVE_ you'll have to subtract what they've entered for eventendtime from starttime and populate $_cal_event->duration appropriately. Does this make sense? |
|
| Back to top |
|
 |
dutchmarktets
Joined: 06 Oct 2006 Posts: 38 Location: The Hague - Holland - Netherlands
|
Posted: Sat Dec 09, 2006 5:49 am Post subject: |
|
|
I have no need to display any duration, just startt-time and end-time.
The problem is that the calendar has already been populated with loads of events, if I want to add a separate field for new-end-time now. The current end-time values are displayed in the calendars.
I need to figure out how I can have the new-start-time inherit the current end-time values. _________________ George Philip
(somehow i misspelled my userid ;-)
http://www.sitegevonden.nl |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Sun Dec 10, 2006 12:11 am Post subject: |
|
|
Thyme relies on this duration field. If it is incorrect, Thyme may not work correctly.
If you really want to do it your way I'll help I suppose. What format would you like this end-time field in? HH:MM? |
|
| Back to top |
|
 |
dutchmarktets
Joined: 06 Oct 2006 Posts: 38 Location: The Hague - Holland - Netherlands
|
Posted: Sun Dec 10, 2006 8:30 am Post subject: |
|
|
I guess the duration influences the way it would display events in the DAY-view only. As I am not using DAY-view, it would be okay for me not to use the duration.
I get quite some feedbacks from visitors who want to register their events and they are complaining about not being able to state both start-time and end-time. Hence my request.
The format of both start-time and end-time that I am using is HH:MM (24 hour format).
But I am rather stuck right now in how to tackle this challenge.
Thanks for help. _________________ George Philip
(somehow i misspelled my userid ;-)
http://www.sitegevonden.nl |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Sun Dec 10, 2006 3:22 pm Post subject: |
|
|
Hi,
Which part are you stuck at exactly? |
|
| Back to top |
|
 |
smeallum
Joined: 17 May 2006 Posts: 177
|
Posted: Wed Dec 20, 2006 6:01 pm Post subject: |
|
|
i am interested in this as well.
i am sure it´s going to be very awkward for people in my site having to calculate the duration. Imagine it in the context of concerts....venues...discotheques, etc... they normally know the official closing time, but having to calculate the duration for inserting the event?
| ian wrote: |
.. then in include/events.php under _SAVE_ you'll have to subtract what they've entered for eventendtime from starttime and populate $_cal_event->duration appropriately. Does this make sense? |
could you tell me what i would need to put there?
i also use 24hrs format HH:MM
Thanks a lot,
NiCo |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Sat Dec 23, 2006 4:49 pm Post subject: |
|
|
| Help me understand what is unclear about the posts above. This change will require writing code to calculate the duration of an event based on what was entered for the event end time. $_cal_event->duration should then be populated in HH:MM:00 format. .. or are you looking for me to write it for you? |
|
| Back to top |
|
 |
smeallum
Joined: 17 May 2006 Posts: 177
|
Posted: Sat Dec 23, 2006 5:05 pm Post subject: |
|
|
Sorry, i had misunderstood, i think i get what needs to be done now
Thanks,
NiCo |
|
| Back to top |
|
 |
|