RSS

LuxCal Forum

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

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / Exchange calendars
Posted:  11 Mar 2016 12:48
Hi,
I have more than one calendar configured, and different users in each.
My problem is that when I leave a calendar and want to get into another calendar with another user not let me choose it, I put the last default in between.

Other...
Can a non-administrator user have more than one calendar and switch between them?

Thanks and regards.
Posted:  11 Mar 2016 19:32
Hi there,

Calendars have an ID, the default ID for instance is "mycal".
If you have more than one calendar, you can switch calendars, via the URL link, by adding "?cal=cal2" or "?cal=cal3", etc. to the URL.

For normal users the calendar suppresses the option to switch calendars in the Options panel, because rights per calendar can be different. For instance, if you have given a user "post rights" in calendar 1 and "no rights" in calendar 2, and the user would be able to switch from calendar 1 to 2, he/she would suddenly get a log-in screen and would not be able to switch back to calendar 1. Or if a user has an account in calendar 1 but not in calendar 2, he/she would be logged out when switching from calendar 1 to 2. Etc, etc.

If you don't care about these things and want all users to be able to switch calendars via the Options panel, please let me know what LuxCal version you are using, and then I will post a small modification here to make that possible.
Roel
Posted:  11 Mar 2016 20:05
Hello, thank you very much for the reply.
My version is the last of the web the 4.4.0M you appreciate the change to switch from one to another.

Thanks and regards.
Posted:  12 Mar 2016 11:37   Last Edited By: Roel B.
Ok, here we go . . .

Edit the file common/header.php and change line 207 and 208 from
//    if ($dbSel) {
    if ($dbSel and $privs == 9) { //get calendar database IDs

to
    if ($dbSel) {
//    if ($dbSel and $privs == 9) { //get calendar database IDs


So, just move the double // to the start of the other line.
That's all.

If you want only users with 'write access' to have the calendar selection option, then just change line 208 from
    if ($dbSel and $privs == 9) { //get calendar database IDs
to
    if ($dbSel and $privs > 1) { //get calendar database IDs

Roel
Posted:  13 Mar 2016 12:26
Thank you very much, works perfect.
A greeting.