RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / Add interval time
Posted:  13 Nov 2014 15:34
Hello everyone,
sorry for my english .... sad
I would need to add a time interval (eg 45 minutes) on SETTINGS -> DISPLAY -> TIME INTERVAL DAY IN THE VIEWS

can anyone help me? ohmy

Thanks to those who will do it biggrin
Posted:  14 Nov 2014 06:09
If you set it to 15 minutes will that not work for you?
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  15 Nov 2014 13:32
Thanks for the answer, thump_up
the solution to set for 15 minutes work, wink
but I need to add to the list of selection of time (10 - 15 - 20 - 30 - 60), a time interval of 45 minutes ... sad
someone has a solution ... wink
for example, I could edit files that are used to make the selection interval time, but i have no idea where to put my hands
Posted:  16 Nov 2014 11:36
Hi there,

Let us know what LuxCal version you are using.
Thereafter I will help you with the code changes.

Regards,
Roel
Posted:  16 Nov 2014 18:01
Hello Roel, thump_upthump_up
thanks for your kind availability biggrin
LuxCal version is 3.2.3

I am grateful for your help thump_up
thank you

hello
Posted:  16 Nov 2014 22:18   Last Edited By: Roel B.
Ok, here we go . . .

1.  In file pages/settings.php:
just after line 293:
    <option value='30'".($pSet['dwTimeSlot'] == "30" ? " selected='selected'" : '').">30</option>
insert:
    <option value='45'".($pSet['dwTimeSlot'] == "45" ? " selected='selected'" : '').">45</option>

2. In file views/dw_functions.php:
replace lines 159 and 160:
        $j = ($j + $set['dwTimeSlot'])%60;
        if ($j == 0) { $i++; }

by:
        $j = $j + $set['dwTimeSlot'];
        if ($j >= 60) { $i++; }
        $j = $j%60;

and replace lines 182 and 183:
        $j = ($j + $set['dwTimeSlot'])%60;
        if ($j == 0) { $i++; }

by:
        $j = $j + $set['dwTimeSlot'];
        if ($j >= 60) { $i++; }
        $j = $j%60;

and replace lines 238 and 239:
        mins = (parseInt(end.substr(4,2),10) + dwTimeSlot)%60;
        if (mins == 0) { hrs++; }

by:
        mins = parseInt(end.substr(4,2),10) + dwTimeSlot;
        if (mins >= 60) { hrs++; }
        mins = mins%60;


That's all.
Please let me know if this is what you wanted.
Cheers,
Roel
Posted:  17 Nov 2014 13:02
wuauuuuuuuuuuuuuuuuuuuuuubiggrinbiggrinbiggrinbiggrinbiggrinbiggrinbiggrinbiggrin

Perfect. thump_upthump_upthump_upthump_up
All I wanted to. thump_upthump_upthump_up
All working. thump_upthump_upthump_up
I must make a statue for you. biggrinbiggrinbiggrinbiggrin
You are great Roel. wink
I thank you very warmly, biggrin
I am obliged to you

Thank you thank you thank you thump_upthump_upthump_upthump_upthump_up
Posted:  17 Nov 2014 19:18   Last Edited By: Roel B.
Aren't you exaggerating "slightly".
I suggest to wait a bit with that statue. I'm not dead yet.

Thanks anyway,
Roel
Posted:  18 Nov 2014 21:48
Birds sometimes still manage to poop on you while you're still alive. ohmy
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  18 Nov 2014 22:18
smile
Posted:  22 Dec 2014 15:32
Sorry for my absence, wink
ahahahahah,biggrinbiggrinbiggrin
Roel you're right, but my statue will be no memorial, ohmyohmy
but to exalt and praise someone important and large in his works ... thump_upwinkbiggrinsmile

Roel, thanks again for your help, I need to ask another for help ...

My friend, who uses the calendar, would need to schedule with half hours, for example, the start time will be at 9:30 with intervals of 45 minutes (as well as the modified files above).

Currently in the calendar you can only enter integer times (for example, 6:00, 7:00, 8:00 or 21:00, 22:00, etc.) you can not enter the starting time to 7:30, 8: 30 for example

you can do this thing?

I would be grateful if you would be kind enough to once again be able to help me

Thank you very very very very much thump_up
Posted:  25 Dec 2014 13:41
Hi there,

It's not complicated, but quite a number of minor changes are needed to do this. Actually too many changes to post here.
If you have a bit of PHP experience, you could do it yourself wink
The variable names used for the start and end hour in week and day view are: dwStartHour and dwEndHour.
What you should do is . . .
1.  edit the pages/settings.php file and search for these names and then change the input field so that hours and minutes can be entered.
2. edit the file views/dw_functions.php and search for these names and modify the code so that it can cope with hours and minutes.

Hope this helps.
Roel