can I hide types of bookings and colors bottom left?
Brought to you by:
jberanek
Hi,
All our bookings are public but no access whatsoever for non-logged in user.
We want to switch to private bookings.
When non-logged in user visits, even though s/he sees a booking named "private," s/he can still see whether or not a room is available.
But, we don't want non-logged in visitor to see booking types and colors at bottom left. Is there any way to hide booking types and colors at bottom left when visitor is NOT logged in, but show them when user is logged in?
Thank you,
Meno
You could just stop non-logged in users from accessing the system altogether by setting
in your config file.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Support Requests"
Yes, I did that, but now we want users to be able to see if there is availability before they call to make a booking and theres details in the bookjng types that we'd rather them not see
There are two ways you could do this.
The first is to create a custom CSS file (see systemdefaults.inc.php for details of how to do this) and add the rule
However this isn't very secure as the details will still be there in the HTML and visible to anybody who does a View Source. So the second way, which is more secure, is to modify the function show_colour_key() in functions.inc (line 2052 in 1.5.0) and just add the line
as the first line of the function.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Support Requests"
we do want the "color_key" to show when users are logged in. We just don't want non-logged in users to see it. any way to achieve that?
Thanks,
Meno
Last edit: Anonymous 2017-01-15
I thought you had $auth['deny_public_access'] set? In which case users won't be able to access MRBS unless they are logged in.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Support Requests"
I apologize for not being clear. You are being very generous with your time.
Yes, currently we have enabled $auth['deny_public_access']
BUT: what we want is to disable the above option and make all bookings private to where a visitor that's not logged in can see the room names and times and whether a room is booked, but all s/he sees is "private" instead of the actual booking name. We want to hide the booking types and colors that appear at bottom left when a non-logged in user visits.
That way the visitor at least knows if a room is available and can call to book.
Thank you,
Meno
Oh, OK, I understand now. Add the following code to the beginning of show_colour_key() in functions.inc:
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Support Requests"
I have the same issue. I do not want to hide the color key, but I want to hide the colors of the booked periods in the generated table. I need only admin can see the background color of the cell non admin users should be e.g. grey only. I set entry.entry_type to PRIVATE, but it has no effect on the background color of the cells in day view.
This is a bug. I have raised a separate bug ticket and will fix it over the next few days.
Last edit: Campbell Morrison 2017-01-20
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Support Requests"
The solution would be somethng like tho change the entry type color to e.g. #888888 when the authentication level is 1. And it suold be placet to the script where the teble cell of the day view is generated. But I cannot find where it is...
If you have any idea please let me know. Thanks in advance
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Support Requests"
I am close to the solution.
In FUNCTIONS_TABLE.INC in row 127 current code is:
$column[$s][$n]["color"] = $row['type']
this shuold be changed thet it take effect only an ADMIN USER.
I tried this one but does not work. I have only bank scrren.
$user = getUserName();
if (authGetUserLevel($user) = 2)
{
$column[$s][$n]["color"] = $row['type'];
}
Please could you post comments about this bug on https://sourceforge.net/p/mrbs/bugs/372/, so that we don't get the two tickets confused.