RSS

LuxCal Forum

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

User:   Password:   Remember Me?   
LuxCal Forum / LuxCal / Comments and Suggestions / enable check mark for users lower than manage..
Posted:  07 Jan 2014 08:12
Hi, Roel,

Would it be possible to enable the "check mark" feature also for users who has only rights to view the calender or even the users who has rights to post/edit own or all rights?
It is just to indicate if a work is done without having the possibility to change the calender inputs.
__________________
Grtz,
on6bvk
Posted:  07 Jan 2014 11:25   Last Edited By: Roel B.
Hi on6bvk,

In the file views/month.php change line 26 from . . .
$mayCheck = ($privs > 3 or ($privs > 1 and $evt['uid'] == $_SESSION['uid'])) ? true : false;
into . . .
$mayCheck = true;

Now in Month view each user who can view the event can check/uncheck check marks.

If you want the same for Week and Day view, then you should apply the same change to the file views/dw_functions.php on line 107.
And if you want the same for Upcoming Events view, then you should apply the same change to the file views/upcoming.php on line 38.

Roel
Posted:  07 Jan 2014 18:49
Hi Roel,

Thank you very much! This does the job very right!
__________________
Grtz,
on6bvk
Posted:  07 Jan 2014 21:02   Last Edited By: Roel B.
Hi Roel,

I tested a little bit with the adjustment and I figured out that the check mark was even adjustable when no user was logged in.
So I experimented a bit and now I changed the following code from:
$mayCheck = ($privs > 3 or ($privs > 1 and $evt['uid'] == $_SESSION['uid'])) ? true : false;
into . . .
$mayCheck = ($privs > 3 or $privs > 2 or ($privs > 1 and $evt['uid'] == $_SESSION['uid'])) ? true : false;

This way a user with "post/edit all events" rights can do the check mark change also.

Please can you check if it is coded like it should?
__________________
Grtz,
on6bvk
Posted:  08 Jan 2014 19:07
Hi on6bvk,

It's correct, but it can be a bit shorter:
If you test on $privs > 2, then "> 3" is included, so the following code should do:

$mayCheck = ($privs > 2 or ($privs > 1 and $evt['uid'] == $_SESSION['uid'])) ? true : false;

Roel
Posted:  08 Jan 2014 19:24
Hi Roel,

Thanks for the correction.
Maybe this feature is something for the settings? What do you think about it?
__________________
Grtz,
on6bvk