2 /********************************************************************
3 * Name: Calendar Export
4 * Description: This addon exports the public events of your users as calendar files
6 * Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
8 * ******************************************************************/
11 function cal_install()
13 register_hook('plugin_settings', 'addon/cal/cal.php', 'cal_addon_settings');
14 register_hook('plugin_settings_post', 'addon/cal/cal.php', 'cal_addon_settings_post');
16 function cal_uninstall()
18 unregister_hook('plugin_settings', 'addon/cal/cal.php', 'cal_addon_settings');
19 unregister_hook('plugin_settings_post', 'addon/cal/cal.php', 'cal_addon_settings_post');
25 * /cal/$user/export/$format
27 function cal_content()
32 $o = "<p>".t('Some text to explain what this does.')."</p>";
33 } elseif ($a->argc==4) {
34 $username = $a->argv[1];
36 $format = $a->argv[3];
37 $o = "<p>".$do." calendar for ".$username." as ".$format." file.</p>";
39 $o = "<p>".t('Wrong number of parameters')."</p>";
44 function cal_addon_settings_post ( &$a, &$b )
49 function cal_addon_settings ( &$a, &$s )