WebCalendar

From Remeis-Wiki
Revision as of 10:27, 19 August 2024 by Stierhof (talk | contribs)
Jump to navigation Jump to search

This is a lose collection of information regarding the web calendar. Currently we use k5n's php implementation with some custom changes (which might be possible to do in a better way, but I have no clue so far).

Backing up database

The calendar user has no rights so you need to know the db admin login. Then you can do ``` mysqldump -uroot -p Calendar_I > Calendar_I.sql ```

Calendar_I is what was as of this writing. Check include/settings.php in the WebCalendar folder to see what is actually used right now.

Update script

After backing the data base unpack the new version into a new folder, set the apache address (remember it is in puppet), and go through the install script. Make sure that 'includes/' is read/writeable by www-data! (and also the parent folder).

PHP version

For PHP v7.4 only WebCalendar v1.9.8 seems to work. They are in the process of updating to PHP v8!

LDAP settings

After doing the initialization or updating of the database we need to connect to ldap. If you did not select LDAP autehtication during setup you can change that in 'includes/settings.php'. Adjust the settings in 'includes/auth-settings.php' such that:

$user_can_update_password = false;
$admin_can_add_user = false;
$admin_can_delete_user = false;
...
   $ldap_server = '<server address>';
...
   $set_lda-_version = true;
...
   $ldap_base_dn = 'ou=People,dc=sternwarte,dc=uni-erlangen,dc=de';
...
   $ldap_admin_group_name = 'cn=leitung,ou=local,ou=Group,dc=sternwarte,dc=uni-erlangen,dc=de';
...
   $ldap_user_filter = '(|(objectclass=remeisperson)(uid=webmaster))'; // only allow real people, but also webmaster

Customization

We do small changes to guide the users:

'includes/menu.php' change

<a class="nav-link" href="<?php echo $logout_url; ?>">Logout</a>

to

<a class="nav-link" href="<?php echo $logout_url; ?>"><?php if ($login == '__public__') echo \
'Login'; else echo 'Logout';?></a>

There are changes in 'includes/functions.php' regarding the __internal__ fake user. Check older WebCalendar files what was done. Same goes for 'includes/classes/WebCalendar.php', includes/translate.php', 'includes/user-ldap.php', 'edit_entry.php' and 'admin.php'.