meeting-room-booking-system / mrbs-code

MRBS application code
Other
117 stars 58 forks source link

$times_along_top #2113

Open jberanek opened 6 years ago

jberanek commented 6 years ago

The $times_along_top = FALSE/TRUE; setting in config.php is a global parameter. I really need to change this in week view (set to false even in TRUE in all other views). How can I override this in week.php file?

Reported by: *anonymous

Original Ticket: mrbs/support-requests/1402

jberanek commented 6 years ago

Just add

$times_along_top = false;

to week.php just after the three require statements (ie at line 9).

Original comment by: campbell-m

jberanek commented 6 years ago

Thanks! I have got some requests if this is possible to set per Area. Could this be implemented in a future release?

Original comment by: *anonymous

jberanek commented 6 years ago

Could maybe put it in a future release. But in the meantime, you could do something quite simple by just changing the line above to

if (in_array($area, array(1, 3, 4)))  // 1,3 and 4 are examples
{
  $times_along_top = false;
}

where the array contains the ids of the relevant areas.

Original comment by: campbell-m

jberanek commented 6 years ago

Thanks! This works very well except it resets when the page auto refresh. If I then do a manually F5 it turns correct again. Any idea how I can force this setting even if I use autorefresh on the page (week.php).

Original comment by: *anonymous

jberanek commented 6 years ago

Which release of MRBS are you using?

Original comment by: campbell-m

jberanek commented 6 years ago

1.7.0

Original comment by: *anonymous

jberanek commented 6 years ago

And here is the site: https://www.monstad-konsulenttjenester.no/mrbs_demo/week.php?year=2018&month=1&day=5&area=1&room=3&kiosk_mode=1

I have added a kiosk_mode as an URL argument to hide some unwanted elements from the view. As you see the view is correct the first 10 seconds before it auto refresh.

Original comment by: *anonymous

jberanek commented 6 years ago

It's the kiosk mode that's causing the problem. It works fine for me in standard MRBS.

Original comment by: campbell-m

jberanek commented 6 years ago

hm, I have to check if I have excluded something with my if statements. Sorry about that.

Original comment by: *anonymous

jberanek commented 6 years ago

Strange, I just changed into this in start of week.php

$kiosk_mode=get_form_var('kiosk_mode'); //if ($kiosk_mode) //{ $times_along_top = FALSE; //}

and now it works. Thanks anyway!

Original comment by: *anonymous

jberanek commented 6 years ago

can you share with us how you did this, I need something like this

Original comment by: *anonymous