]> git.mxchange.org Git - friendica-addons.git/blob - cal/cal.php
cal: added settings functions
[friendica-addons.git] / cal / cal.php
1 <?php
2 /********************************************************************
3  * Name: Calendar Export
4  * Description: This addon exports the public events of your users as calendar files
5  * Version: 0.1
6  * Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
7  * License: MIT
8  * ******************************************************************/
9
10
11 function cal_install()
12 {
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');
15 }
16 function cal_uninstall()
17 {
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');
20 }
21 function cal_module()
22 {
23 }
24 /*  pathes
25  *  /cal/$user/export/$format
26  */
27 function cal_content()
28 {
29     $a = get_app();
30     $o = "";
31     if ($a->argc == 1) {
32         $o = "<p>".t('Some text to explain what this does.')."</p>";
33     } elseif ($a->argc==4) {
34         $username = $a->argv[1];
35         $do = $a->argv[2];
36         $format = $a->argv[3];
37         $o = "<p>".$do." calendar for ".$username." as ".$format." file.</p>";
38     } else {
39         $o = "<p>".t('Wrong number of parameters')."</p>";
40     }
41     return $o;
42 }
43
44 function cal_addon_settings_post ( &$a, &$b  )
45 {
46     if (! local_user())
47         return;
48 }
49 function cal_addon_settings ( &$a, &$s  )
50 {
51     if (! local_user())
52         return;
53 }
54
55 ?>