phpScheduleIt
May 22, 2013, 04:19:40 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1] 2
  Print  
Author Topic: 45 Min Increments  (Read 19091 times)
Anonymous
Guest
« on: March 30, 2006, 11:54:25 AM »

This is a great app and I would love to use it for our court scheduling.  
Court time is booked in 45 min increments.  
I am new to all this, so could you please point me in the right direction to make the required mods.

Thanks.
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #1 on: March 30, 2006, 12:34:53 PM »

Change line 145 in templates/admin.template.php from:

Code:
$spans = array (30, 10, 15, 60, 120, 180, 240);


to

Code:
$spans = array (45, 30, 10, 15, 60, 120, 180, 240);
Logged
Diap
Guest
« Reply #2 on: March 31, 2006, 12:01:36 PM »

I changed the span and aded 45 min - that was easy. But when I look at the schedule - even though I changed it to 45, which you can now pick, it does not change the graphic view. Understood as, it looks like you book for one hour on the online calender and not 45 min. Is there a way to change the view, so that you can see. F.eks. that a reservation spans from 10.30 to 11.15 etc.

A great program and keep up the good work.

best,

diap
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #3 on: March 31, 2006, 12:53:29 PM »

It should be displaying 45 minute increments.  I'm not sure why that would be still appearing as 1 hour.  You're sure the schedule is set to use the 45 minute spans?
Logged
dweissnj
Newbie
*

Karma: 0
Posts: 1


« Reply #4 on: March 31, 2006, 03:57:53 PM »

Nick,
Look at my inplementation.  squash.playaconchalcondo.com  
admin  dweiss@gmail.com  
pass     5656kbu

in schedule.php  the table is incremented in hours, with extra boxes without titles for the additional time slots.
The reservation console has the correct start times and end times.  

The Min/Max is also fixed in :30 increments.  

Thanks for the help
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #5 on: March 31, 2006, 04:15:38 PM »

The login is failing with that.  If you want to send me an email with login credentials, I can take a look.
Logged
Diap
Newbie
*

Karma: 0
Posts: 9


« Reply #6 on: April 01, 2006, 03:03:31 PM »

Here is a bit more explanation on my problem.

I added 45 min to the timespan in line 145 and in line 415 of admin.template.php

Then I make a new schedule with a time span of 45 min. I set it to start at 8.00 and end at 14.00. After that I add a resource where I set the maximum and minimum reservation time to 45 min - since I only want people to be able to book in 45 min slots.

When I now go to the calender I can only see 1 hour slots from 8.00 to 14.00. When I click on of them. Lets say 12.00 (4 slots from 8 ) - then it tells me the sart time for the booking I selected is 11.00 and ends at 11.45. So it does calculate as if the timeslots where 45 min from 8.00. There are 4 timeslots (4 x 45 min = 3 hours), but does not show it and the time it shows does not match. So on the calender it looks like I made at reservation at 12.00 and not 11.00, but the actual reservation is made at 11.00 - 11.45.

 Do I need to change something else or is there a "bug" ? Hope you can help me out, since I REALLY would like to get this to work with the 45 min timespan and timeslots.

If my explanation is not good enough, try it out. I hope you are able to replicate it from my description.

Thanks very much...

Diap
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #7 on: April 03, 2006, 10:19:02 AM »

I'll try duplicating this and see what's going on.
Logged
Diap
Newbie
*

Karma: 0
Posts: 9


« Reply #8 on: April 13, 2006, 08:38:24 PM »

Out of curiousity and because I am trying to get your great program to work with 45 min timeslots and reservations. Any luck in recreating the "problem"? Anything I can do or is more informations needed etc. Feel free to email me.

Also I translated the program to Danish through the homepage. Any idea when a new language file will be uploaded?

Thanks for the good work and great program.

- diap
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #9 on: April 14, 2006, 01:58:46 AM »

Right now I don't have a good workaround for this bug.  This is actually pretty tough to change and probably will not show up until the version after 1.2.

Also, the best way to contribute a language pack is to translate the files included in your download and just email them over to me.  The new language files will be included in the 1.2 release.
Logged
Diap
Newbie
*

Karma: 0
Posts: 9


« Reply #10 on: April 27, 2006, 02:48:13 AM »

I have been playing a bit with the 45 min timespan, sinice all the reservations I need to make have to be 45 min.

What I have done is added the code so that I have 45 min as an option to chose when I make

1. I make a new shedule with 15 min time span (that takes care of the strange times)
2. I make a new resource and set the min/max reservation time to 45 min.
3. Now I can go to the calender and book.
4. When I book it suggest a time with 15 min difference. F. ex. 10.30 - 10.45, but since I set the min/max to 45 min I have to manually change the time to a span of 45 min for each booking. So that in this case I have to set the end time to 11.15 then it works.

My question is, is there a way to "hard code" or change a couple of lines of code so that I can add a shedule with 15 min timespan and when I have set the min/max to 45 min it adds it up itself, so that I or rather the user does not have to go in manually and change the time for each booking, but can just click ok?

As mentioned earlier all reservations have to be for 45 min so a "not so flexible solution" will work.

Thanks for the great work and program....

best,

- diap
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #11 on: April 27, 2006, 09:59:45 AM »

So you want the pull downs to increment in 45 minute blocks if it is currently in 15?
Logged
Diap
Newbie
*

Karma: 0
Posts: 9


« Reply #12 on: April 27, 2006, 02:55:40 PM »

Quote from: "Nick"
So you want the pull downs to increment in 45 minute blocks if it is currently in 15?


Yes.
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #13 on: April 27, 2006, 03:35:51 PM »

Add after line 386 of templates/reserve.template.php:

Code:

if ($interval == 15) { $interval = 45; }
Logged
Diap
Newbie
*

Karma: 0
Posts: 9


« Reply #14 on: April 27, 2006, 05:21:27 PM »

Quote from: "Nick"
Add after line 386 of templates/reserve.template.php:

Code:

if ($interval == 15) { $interval = 45; }


Thanks for the quick reply...almost works. Only this puts the the correct time sometimes in the starttime slot and sometime in the end time slot. If the start time is 12.45 the end time will be 9.00 and you still have to pick the correct time. Or the endtime will be 13.15 and the starttime 9.00.

What I wanted to do was to try to find a workaround for the 45 min problem. This will still work (with the 15 min setup) if there is a way to leave the starttime as it is so that if I pick 10.15 it will stand there and then I wanted the program by "default" just to add 45 min to the chosen startime. So the end time in this case would be 11.00 even though there are 15 min timeslots.

To make it short...is there a way to

Do one of two things in a setup with 15 min timeslot.

1. Take startime chosen from the main shedule.
2. Add 45 min by default
3. Show startime and endtime in new reservation window (Just as it does now)

or

1. Take endtime (since I have a 15 min setup it will automatically suggest endtime= startime +15 min)
2. Add 30 min extra to endtime by default
3. Show startime and endtime in new reservation (just as it does now)

If this gets too complicated or will take too much of your time feel free just to tell me off.

Thanks a lot again....

- diap
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!