fix ticketing system error on bootstrap of new install
[freeside.git] / fs_selfservice / fri / README.txt
1 Developed by Dan Littlejohn of Littlejohn Consulting.
2   www.littlejohnconsulting.com
3
4 Released under the GPL.
5
6 Send bug reports, requests to dan@littlejohnconsulting.com
7
8 +++
9
10 Misc notes
11
12 ARI Project Page
13   www.littlejohnconsulting.com?q=ari
14
15 Coding standard
16  * class - CamelCase (ie ClassName)
17  * method camelCase (ie methodName)
18  * variable underscore (ie variable_name)
19  * constant UNDERSCORE (ie CONSTANT_NAME)
20
21 Requirements
22   PHP4 (but PHP5 is not yet supported)
23   PHP PEAR
24   asterisk 1.2 or later
25   apache or apache2
26   asterisk manager - at a mininum need command access
27
28 security
29   for security all the files in ./recordings/include should be locked down in the web browser
30     so they cannot be viewed.
31
32 voicemail email links - For those who would like to include a link to ARI in the voicemail email and set the correct login (mailbox) you can do so as:
33
34   http://< ip address >/recordings/index.php?login=< login >
35  
36     replace 
37       < ip address > with the server dns or ip
38       < login > with the login or mailbox
39
40 +++
41
42 Module API
43
44 odules can be added or removed from ARI.
45
46 API
47
48 must include these methods.
49
50 rank - weights were the module menu item will appear in the navigation window
51 init - initialize the module.  Database access should first appear here and not in the constructor
52 navMenu - side navigation menu item
53 display - main module page content
54
55 example
56
57 <?php
58
59 /**
60  * @file
61  * Functions for the interface to the help page
62  */
63
64 /**
65   * Class for new_module
66   */
67 class NewModule {
68
69   /*
70    * rank (for prioritizing modules)
71    */
72   function rank() {
73
74     $rank = 50;
75     return $rank;
76   }
77
78   /*
79    * init
80    */
81   function init() {
82   }
83
84   /*
85    * Adds menu item to nav menu
86    *
87    * @param $args
88    *   Common arguments
89    */
90   function navMenu($args) {
91
92     // put if statement in return string, because do not know $logout until page is built
93     $ret .= "
94       <?php if ($logout !='') { ?>
95         <p><small><small><a href='" . $_SERVER['PHP_SELF'] . "?m=NewModule&f=display'>" . _("new_module") . "</a></small></small></p>
96       <?php } ?>";
97
98     return $ret;
99   }
100
101   /*
102    * Displays stats page
103    *
104    * @param $args
105    *   Common arguments
106    */
107   function display($args) {
108
109     // build page content
110     $ret .= checkErrorMessage();
111
112     $ret .= $display->displayHeaderText("new_module");
113     $ret .= $display->displayLine();
114
115     return $ret;
116   }
117
118 }
119
120
121 ?>
122
123