@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$body = '<p class="description">'.sprintf(elgg_echo('event_calendar:delete_confirm_description'),$vars['title']).'</p>'; |
|
3 | +$body = '<p class="description">' . sprintf(elgg_echo('event_calendar:delete_confirm_description'), $vars['title']) . '</p>'; |
|
4 | 4 | |
5 | -$body .= '<form action="'.$vars['url'].'action/event_calendar/manage" method="post" >'; |
|
5 | +$body .= '<form action="' . $vars['url'] . 'action/event_calendar/manage" method="post" >'; |
|
6 | 6 | $body .= elgg_view('input/securitytoken'); |
7 | -$body .= elgg_view('input/hidden',array('internalname'=>'event_action', 'value'=>'delete_event')); |
|
8 | -$body .= elgg_view('input/hidden',array('internalname'=>'event_id', 'value'=>$vars['event_id'])); |
|
9 | -$body .= elgg_view('input/submit', array('internalname'=>'submit','value'=>elgg_echo('event_calendar:submit'))); |
|
7 | +$body .= elgg_view('input/hidden', array('internalname'=>'event_action', 'value'=>'delete_event')); |
|
8 | +$body .= elgg_view('input/hidden', array('internalname'=>'event_id', 'value'=>$vars['event_id'])); |
|
9 | +$body .= elgg_view('input/submit', array('internalname'=>'submit', 'value'=>elgg_echo('event_calendar:submit'))); |
|
10 | 10 | $body .= '</form>'; |
11 | 11 | |
12 | 12 | echo elgg_view('page_elements/contentwrapper', array('body'=>$body)); |
@@ -11,12 +11,12 @@ |
||
11 | 11 | * |
12 | 12 | */ |
13 | 13 | |
14 | -elgg_extend_view('metatags','event_calendar/metatags'); |
|
14 | +elgg_extend_view('metatags', 'event_calendar/metatags'); |
|
15 | 15 | |
16 | -$body = elgg_view('event_calendar/forms/manage_event_content',$vars); |
|
16 | +$body = elgg_view('event_calendar/forms/manage_event_content', $vars); |
|
17 | 17 | |
18 | -$body .= elgg_view('input/submit', array('internalname'=>'submit','value'=>elgg_echo('event_calendar:submit'))); |
|
19 | -$form = elgg_view('input/form',array('action'=>$vars['url'].'action/event_calendar/manage','body'=>$body)); |
|
18 | +$body .= elgg_view('input/submit', array('internalname'=>'submit', 'value'=>elgg_echo('event_calendar:submit'))); |
|
19 | +$form = elgg_view('input/form', array('action'=>$vars['url'] . 'action/event_calendar/manage', 'body'=>$body)); |
|
20 | 20 | |
21 | -print elgg_view('page_elements/contentwrapper',array('body'=>$form)); |
|
21 | +print elgg_view('page_elements/contentwrapper', array('body'=>$form)); |
|
22 | 22 | ?> |
23 | 23 | \ No newline at end of file |
@@ -43,34 +43,34 @@ |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | if ($remove_group) { |
46 | - foreach($groups as $group) { |
|
46 | + foreach ($groups as $group) { |
|
47 | 47 | if (($group->guid != $event_container) && !in_array($group->guid, $remove_group_ids)) { |
48 | - $add_options[$group->guid] = gc_explode_translation($group->name,$lang); |
|
48 | + $add_options[$group->guid] = gc_explode_translation($group->name, $lang); |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | } else { |
52 | - foreach($groups as $group) { |
|
52 | + foreach ($groups as $group) { |
|
53 | 53 | if ($group->guid != $event_container && $group->canEdit()) { |
54 | - $add_options[$group->guid] = gc_explode_translation($group->name,$lang); |
|
54 | + $add_options[$group->guid] = gc_explode_translation($group->name, $lang); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
59 | 59 | if ($add_options || $remove_options) { |
60 | 60 | echo '<div class="mtl" >'; |
61 | - $event_bit = elgg_view('input/hidden', array("name" => "event_id","value" => $event_id)); |
|
61 | + $event_bit = elgg_view('input/hidden', array("name" => "event_id", "value" => $event_id)); |
|
62 | 62 | if ($add_options) { |
63 | - echo "<h4>".elgg_echo('event_calendar:add_to_group:add_group_title')."</h4>"; |
|
63 | + echo "<h4>" . elgg_echo('event_calendar:add_to_group:add_group_title') . "</h4>"; |
|
64 | 64 | $add_pulldown = elgg_view("input/dropdown", array("name" => "group_id", "options_values" => $add_options)); |
65 | - $submit_button = "<p>".elgg_view("input/submit", array("value" => elgg_echo('event_calendar:add_to_group:add_group_button')))."</p>"; |
|
66 | - echo elgg_view ('input/form', array("body" => $event_bit.$add_pulldown.$submit_button, "action" => elgg_get_site_url()."action/event_calendar/add_to_group")); |
|
65 | + $submit_button = "<p>" . elgg_view("input/submit", array("value" => elgg_echo('event_calendar:add_to_group:add_group_button'))) . "</p>"; |
|
66 | + echo elgg_view('input/form', array("body" => $event_bit . $add_pulldown . $submit_button, "action" => elgg_get_site_url() . "action/event_calendar/add_to_group")); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | if ($remove_options) { |
70 | - echo "<h4>".elgg_echo('event_calendar:add_to_group:remove_group_title')."</h4>"; |
|
70 | + echo "<h4>" . elgg_echo('event_calendar:add_to_group:remove_group_title') . "</h4>"; |
|
71 | 71 | $remove_pulldown = elgg_view("input/dropdown", array("name" => "group_id", "options_values" => $remove_options)); |
72 | - $submit_button = "<p>".elgg_view("input/submit", array("value" => elgg_echo('event_calendar:add_to_group:remove_group_button')))."</p>"; |
|
73 | - echo elgg_view ('input/form', array("body" => $event_bit.$remove_pulldown.$submit_button, "action" => elgg_get_site_url()."action/event_calendar/remove_from_group")); |
|
72 | + $submit_button = "<p>" . elgg_view("input/submit", array("value" => elgg_echo('event_calendar:add_to_group:remove_group_button'))) . "</p>"; |
|
73 | + echo elgg_view('input/form', array("body" => $event_bit . $remove_pulldown . $submit_button, "action" => elgg_get_site_url() . "action/event_calendar/remove_from_group")); |
|
74 | 74 | } |
75 | 75 | echo '</div>'; |
76 | 76 | } |
@@ -11,21 +11,21 @@ discard block |
||
11 | 11 | $event_calendar_more_required = get_plugin_setting('more_required', 'event_calendar'); |
12 | 12 | |
13 | 13 | if ($event_calendar_more_required == 'yes') { |
14 | - $required_fields = array('title','venue','start_date','start_time', |
|
15 | - 'brief_description','region','event_type','fees','contact','organiser', |
|
16 | - 'event_tags','spots'); |
|
14 | + $required_fields = array('title', 'venue', 'start_date', 'start_time', |
|
15 | + 'brief_description', 'region', 'event_type', 'fees', 'contact', 'organiser', |
|
16 | + 'event_tags', 'spots'); |
|
17 | 17 | } else { |
18 | - $required_fields = array('title','venue','start_date'); |
|
18 | + $required_fields = array('title', 'venue', 'start_date'); |
|
19 | 19 | } |
20 | -$all_fields = array('title','venue','start_time','start_date','end_time','end_date', |
|
21 | - 'brief_description','region','event_type','fees','contact','organiser','event_tags', |
|
22 | - 'long_description','spots'); |
|
20 | +$all_fields = array('title', 'venue', 'start_time', 'start_date', 'end_time', 'end_date', |
|
21 | + 'brief_description', 'region', 'event_type', 'fees', 'contact', 'organiser', 'event_tags', |
|
22 | + 'long_description', 'spots'); |
|
23 | 23 | $prefix = array(); |
24 | 24 | foreach ($all_fields as $fn) { |
25 | - if (in_array($fn,$required_fields)) { |
|
26 | - $prefix[$fn] = elgg_echo('event_calendar:required').' '; |
|
25 | + if (in_array($fn, $required_fields)) { |
|
26 | + $prefix[$fn] = elgg_echo('event_calendar:required') . ' '; |
|
27 | 27 | } else { |
28 | - $prefix[$fn] = elgg_echo('event_calendar:optional').' '; |
|
28 | + $prefix[$fn] = elgg_echo('event_calendar:optional') . ' '; |
|
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
@@ -40,9 +40,9 @@ discard block |
||
40 | 40 | } else { |
41 | 41 | // the values are from the database, |
42 | 42 | // so convert |
43 | - $start_date = date("l, F j, Y",$event->start_date); |
|
43 | + $start_date = date("l, F j, Y", $event->start_date); |
|
44 | 44 | if ($event->end_date) { |
45 | - $end_date = date("l, F j, Y",$event->end_date); |
|
45 | + $end_date = date("l, F j, Y", $event->end_date); |
|
46 | 46 | } else { |
47 | 47 | $end_date = ''; |
48 | 48 | } |
@@ -105,86 +105,86 @@ discard block |
||
105 | 105 | } |
106 | 106 | $body = ''; |
107 | 107 | |
108 | -$body .= elgg_view('input/hidden',array('internalname'=>'event_action', 'value'=>$event_action)); |
|
109 | -$body .= elgg_view('input/hidden',array('internalname'=>'event_id', 'value'=>$event_id)); |
|
110 | -$body .= elgg_view('input/hidden',array('internalname'=>'group_guid', 'value'=>$vars['group_guid'])); |
|
108 | +$body .= elgg_view('input/hidden', array('internalname'=>'event_action', 'value'=>$event_action)); |
|
109 | +$body .= elgg_view('input/hidden', array('internalname'=>'event_id', 'value'=>$event_id)); |
|
110 | +$body .= elgg_view('input/hidden', array('internalname'=>'group_guid', 'value'=>$vars['group_guid'])); |
|
111 | 111 | |
112 | -$body .= '<p><label>'.elgg_echo("event_calendar:title_label").'<br />'; |
|
113 | -$body .= elgg_view("input/text",array('internalname' => 'title','value'=>$title)); |
|
112 | +$body .= '<p><label>' . elgg_echo("event_calendar:title_label") . '<br />'; |
|
113 | +$body .= elgg_view("input/text", array('internalname' => 'title', 'value'=>$title)); |
|
114 | 114 | $body .= '</label></p>'; |
115 | -$body .= '<p class="description">'.$prefix['title'].elgg_echo('event_calendar:title_description').'</p>'; |
|
115 | +$body .= '<p class="description">' . $prefix['title'] . elgg_echo('event_calendar:title_description') . '</p>'; |
|
116 | 116 | |
117 | -$body .= '<p><label>'.elgg_echo("event_calendar:venue_label").'<br />'; |
|
118 | -$body .= elgg_view("input/text",array('internalname' => 'venue','value'=>$venue)); |
|
117 | +$body .= '<p><label>' . elgg_echo("event_calendar:venue_label") . '<br />'; |
|
118 | +$body .= elgg_view("input/text", array('internalname' => 'venue', 'value'=>$venue)); |
|
119 | 119 | $body .= '</label></p>'; |
120 | -$body .= '<p class="description">'.$prefix['venue'].elgg_echo('event_calendar:venue_description').'</p>'; |
|
120 | +$body .= '<p class="description">' . $prefix['venue'] . elgg_echo('event_calendar:venue_description') . '</p>'; |
|
121 | 121 | |
122 | 122 | if ($event_calendar_times != 'no') { |
123 | - $body .= '<p><label>'.elgg_echo("event_calendar:start_time_label").'</label><br />'; |
|
124 | - $body .= elgg_view("input/timepicker",array('internalname' => 'start_time','value'=>$start_time)); |
|
123 | + $body .= '<p><label>' . elgg_echo("event_calendar:start_time_label") . '</label><br />'; |
|
124 | + $body .= elgg_view("input/timepicker", array('internalname' => 'start_time', 'value'=>$start_time)); |
|
125 | 125 | $body .= '</p>'; |
126 | - $body .= '<p class="description">'.$prefix['start_time'].elgg_echo('event_calendar:start_time_description').'</p>'; |
|
126 | + $body .= '<p class="description">' . $prefix['start_time'] . elgg_echo('event_calendar:start_time_description') . '</p>'; |
|
127 | 127 | } |
128 | 128 | |
129 | -$body .= '<p><label>'.elgg_echo("event_calendar:start_date_label").'<br />'; |
|
130 | -$body .= elgg_view("input/datepicker_popup",array('internalname' => 'start_date','value'=>$start_date)); |
|
129 | +$body .= '<p><label>' . elgg_echo("event_calendar:start_date_label") . '<br />'; |
|
130 | +$body .= elgg_view("input/datepicker_popup", array('internalname' => 'start_date', 'value'=>$start_date)); |
|
131 | 131 | $body .= '</label></p>'; |
132 | -$body .= '<p class="description">'.$prefix['start_date'].elgg_echo('event_calendar:start_date_description').'</p>'; |
|
132 | +$body .= '<p class="description">' . $prefix['start_date'] . elgg_echo('event_calendar:start_date_description') . '</p>'; |
|
133 | 133 | |
134 | 134 | if ($event_calendar_hide_end != 'yes') { |
135 | 135 | if ($event_calendar_times != 'no') { |
136 | - $body .= '<p><label>'.elgg_echo("event_calendar:end_time_label").'</label><br />'; |
|
137 | - $body .= elgg_view("input/timepicker",array('internalname' => 'end_time','value'=>$end_time)); |
|
136 | + $body .= '<p><label>' . elgg_echo("event_calendar:end_time_label") . '</label><br />'; |
|
137 | + $body .= elgg_view("input/timepicker", array('internalname' => 'end_time', 'value'=>$end_time)); |
|
138 | 138 | $body .= '</p>'; |
139 | - $body .= '<p class="description">'.$prefix['end_time'].elgg_echo('event_calendar:end_time_description').'</p>'; |
|
139 | + $body .= '<p class="description">' . $prefix['end_time'] . elgg_echo('event_calendar:end_time_description') . '</p>'; |
|
140 | 140 | } |
141 | 141 | |
142 | - $body .= '<p><label>'.elgg_echo("event_calendar:end_date_label").'<br />'; |
|
143 | - $body .= elgg_view("input/datepicker_popup",array('internalname' => 'end_date','value'=>$end_date)); |
|
142 | + $body .= '<p><label>' . elgg_echo("event_calendar:end_date_label") . '<br />'; |
|
143 | + $body .= elgg_view("input/datepicker_popup", array('internalname' => 'end_date', 'value'=>$end_date)); |
|
144 | 144 | $body .= '</label></p>'; |
145 | - $body .= '<p class="description">'.$prefix['end_date'].elgg_echo('event_calendar:end_date_description').'</p>'; |
|
145 | + $body .= '<p class="description">' . $prefix['end_date'] . elgg_echo('event_calendar:end_date_description') . '</p>'; |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | if ($event_calendar_spots_display == 'yes') { |
149 | - $body .= '<p><label>'.elgg_echo("event_calendar:spots_label").'<br />'; |
|
150 | - $body .= elgg_view("input/text",array('internalname' => 'spots','value'=>$spots)); |
|
149 | + $body .= '<p><label>' . elgg_echo("event_calendar:spots_label") . '<br />'; |
|
150 | + $body .= elgg_view("input/text", array('internalname' => 'spots', 'value'=>$spots)); |
|
151 | 151 | $body .= '</label></p>'; |
152 | - $body .= '<p class="description">'.$prefix['spots'].elgg_echo('event_calendar:spots_description').'</p>'; |
|
152 | + $body .= '<p class="description">' . $prefix['spots'] . elgg_echo('event_calendar:spots_description') . '</p>'; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | if ($event_calendar_add_users == 'yes') { |
156 | - $body .= '<p><label>'.elgg_echo("event_calendar:add_user_label").'<br />'; |
|
157 | - $body .= elgg_view("input/adduser",array('internalname' => 'adduser','internalid' => 'do_adduser','width'=> 200, 'minChars'=>2)); |
|
156 | + $body .= '<p><label>' . elgg_echo("event_calendar:add_user_label") . '<br />'; |
|
157 | + $body .= elgg_view("input/adduser", array('internalname' => 'adduser', 'internalid' => 'do_adduser', 'width'=> 200, 'minChars'=>2)); |
|
158 | 158 | $body .= '</label></p><br /><br />'; |
159 | - $body .= '<p class="description">'.elgg_echo('event_calendar:add_user_description').'</p>'; |
|
159 | + $body .= '<p class="description">' . elgg_echo('event_calendar:add_user_description') . '</p>'; |
|
160 | 160 | } |
161 | 161 | |
162 | -$body .= '<p><label>'.elgg_echo("event_calendar:brief_description_label").'<br />'; |
|
163 | -$body .= elgg_view("input/text",array('internalname' => 'brief_description','value'=>$brief_description)); |
|
162 | +$body .= '<p><label>' . elgg_echo("event_calendar:brief_description_label") . '<br />'; |
|
163 | +$body .= elgg_view("input/text", array('internalname' => 'brief_description', 'value'=>$brief_description)); |
|
164 | 164 | $body .= '</label></p>'; |
165 | -$body .= '<p class="description">'.$prefix['brief_description'].elgg_echo('event_calendar:brief_description_description').'</p>'; |
|
165 | +$body .= '<p class="description">' . $prefix['brief_description'] . elgg_echo('event_calendar:brief_description_description') . '</p>'; |
|
166 | 166 | |
167 | 167 | if ($event_calendar_region_display == 'yes') { |
168 | 168 | $region_list = trim(elgg_get_plugin_setting('region_list', 'event_calendar')); |
169 | 169 | $region_list_handles = elgg_get_plugin_setting('region_list_handles', 'event_calendar'); |
170 | 170 | // make sure that we are using Unix line endings |
171 | - $region_list = str_replace("\r\n","\n",$region_list); |
|
172 | - $region_list = str_replace("\r","\n",$region_list); |
|
171 | + $region_list = str_replace("\r\n", "\n", $region_list); |
|
172 | + $region_list = str_replace("\r", "\n", $region_list); |
|
173 | 173 | if ($region_list) { |
174 | 174 | $options = array(); |
175 | 175 | $options[] = '-'; |
176 | - foreach(explode("\n",$region_list) as $region_item) { |
|
176 | + foreach (explode("\n", $region_list) as $region_item) { |
|
177 | 177 | $region_item = trim($region_item); |
178 | 178 | if ($region_list_handles == 'yes') { |
179 | - $options[$region_item] = elgg_echo('event_calendar:region:'.$region_item); |
|
179 | + $options[$region_item] = elgg_echo('event_calendar:region:' . $region_item); |
|
180 | 180 | } else { |
181 | 181 | $options[$region_item] = $region_item; |
182 | 182 | } |
183 | 183 | } |
184 | - $body .= '<p><label>'.elgg_echo("event_calendar:region_label").'<br />'; |
|
185 | - $body .= elgg_view("input/dropdown",array('internalname' => 'region','value'=>$region,'options_values'=>$options)); |
|
184 | + $body .= '<p><label>' . elgg_echo("event_calendar:region_label") . '<br />'; |
|
185 | + $body .= elgg_view("input/dropdown", array('internalname' => 'region', 'value'=>$region, 'options_values'=>$options)); |
|
186 | 186 | $body .= '</label></p>'; |
187 | - $body .= '<p class="description">'.$prefix['region'].elgg_echo('event_calendar:region_description').'</p>'; |
|
187 | + $body .= '<p class="description">' . $prefix['region'] . elgg_echo('event_calendar:region_description') . '</p>'; |
|
188 | 188 | } |
189 | 189 | } |
190 | 190 | |
@@ -192,61 +192,61 @@ discard block |
||
192 | 192 | $type_list = trim(elgg_get_plugin_setting('type_list', 'event_calendar')); |
193 | 193 | $type_list_handles = elgg_get_plugin_setting('type_list_handles', 'event_calendar'); |
194 | 194 | // make sure that we are using Unix line endings |
195 | - $type_list = str_replace("\r\n","\n",$type_list); |
|
196 | - $type_list = str_replace("\r","\n",$type_list); |
|
195 | + $type_list = str_replace("\r\n", "\n", $type_list); |
|
196 | + $type_list = str_replace("\r", "\n", $type_list); |
|
197 | 197 | if ($type_list) { |
198 | 198 | $options = array(); |
199 | 199 | $options[] = '-'; |
200 | - foreach(explode("\n",$type_list) as $type_item) { |
|
200 | + foreach (explode("\n", $type_list) as $type_item) { |
|
201 | 201 | $type_item = trim($type_item); |
202 | 202 | if ($type_list_handles == 'yes') { |
203 | - $options[$type_item] = elgg_echo('event_calendar:type:'.$type_item); |
|
203 | + $options[$type_item] = elgg_echo('event_calendar:type:' . $type_item); |
|
204 | 204 | } else { |
205 | 205 | $options[$type_item] = $type_item; |
206 | 206 | } |
207 | 207 | } |
208 | - $body .= '<p><label>'.elgg_echo("event_calendar:type_label").'<br />'; |
|
209 | - $body .= elgg_view("input/dropdown",array('internalname' => 'event_type','value'=>$event_type,'options_values'=>$options)); |
|
208 | + $body .= '<p><label>' . elgg_echo("event_calendar:type_label") . '<br />'; |
|
209 | + $body .= elgg_view("input/dropdown", array('internalname' => 'event_type', 'value'=>$event_type, 'options_values'=>$options)); |
|
210 | 210 | $body .= '</label></p>'; |
211 | - $body .= '<p class="description">'.$prefix['event_type'].elgg_echo('event_calendar:type_description').'</p>'; |
|
211 | + $body .= '<p class="description">' . $prefix['event_type'] . elgg_echo('event_calendar:type_description') . '</p>'; |
|
212 | 212 | } |
213 | 213 | } |
214 | 214 | |
215 | -$body .= '<p><label>'.elgg_echo("event_calendar:fees_label").'<br />'; |
|
216 | -$body .= elgg_view("input/text",array('internalname' => 'fees','value'=>$fees)); |
|
215 | +$body .= '<p><label>' . elgg_echo("event_calendar:fees_label") . '<br />'; |
|
216 | +$body .= elgg_view("input/text", array('internalname' => 'fees', 'value'=>$fees)); |
|
217 | 217 | $body .= '</label></p>'; |
218 | -$body .= '<p class="description">'.$prefix['fees'].elgg_echo('event_calendar:fees_description').'</p>'; |
|
218 | +$body .= '<p class="description">' . $prefix['fees'] . elgg_echo('event_calendar:fees_description') . '</p>'; |
|
219 | 219 | |
220 | -$body .= '<p><label>'.elgg_echo("event_calendar:contact_label").'<br />'; |
|
221 | -$body .= elgg_view("input/text",array('internalname' => 'contact','value'=>$contact)); |
|
220 | +$body .= '<p><label>' . elgg_echo("event_calendar:contact_label") . '<br />'; |
|
221 | +$body .= elgg_view("input/text", array('internalname' => 'contact', 'value'=>$contact)); |
|
222 | 222 | $body .= '</label></p>'; |
223 | -$body .= '<p class="description">'.$prefix['contact'].elgg_echo('event_calendar:contact_description').'</p>'; |
|
223 | +$body .= '<p class="description">' . $prefix['contact'] . elgg_echo('event_calendar:contact_description') . '</p>'; |
|
224 | 224 | |
225 | -$body .= '<p><label>'.elgg_echo("event_calendar:organiser_label").'<br />'; |
|
226 | -$body .= elgg_view("input/text",array('internalname' => 'organiser','value'=>$organiser)); |
|
225 | +$body .= '<p><label>' . elgg_echo("event_calendar:organiser_label") . '<br />'; |
|
226 | +$body .= elgg_view("input/text", array('internalname' => 'organiser', 'value'=>$organiser)); |
|
227 | 227 | $body .= '</label></p>'; |
228 | -$body .= '<p class="description">'.$prefix['organiser'].elgg_echo('event_calendar:organiser_description').'</p>'; |
|
228 | +$body .= '<p class="description">' . $prefix['organiser'] . elgg_echo('event_calendar:organiser_description') . '</p>'; |
|
229 | 229 | |
230 | -$body .= '<p><label>'.elgg_echo("event_calendar:event_tags_label").'<br />'; |
|
231 | -$body .= elgg_view("input/tags",array('internalname' => 'event_tags','value'=>$event_tags)); |
|
230 | +$body .= '<p><label>' . elgg_echo("event_calendar:event_tags_label") . '<br />'; |
|
231 | +$body .= elgg_view("input/tags", array('internalname' => 'event_tags', 'value'=>$event_tags)); |
|
232 | 232 | $body .= '</label></p>'; |
233 | -$body .= '<p class="description">'.$prefix['event_tags'].elgg_echo('event_calendar:event_tags_description').'</p>'; |
|
233 | +$body .= '<p class="description">' . $prefix['event_tags'] . elgg_echo('event_calendar:event_tags_description') . '</p>'; |
|
234 | 234 | |
235 | -$body .= '<p><label>'.elgg_echo("event_calendar:long_description_label").'<br />'; |
|
236 | -$body .= elgg_view("input/longtext",array('internalname' => 'long_description','value'=>$long_description)); |
|
235 | +$body .= '<p><label>' . elgg_echo("event_calendar:long_description_label") . '<br />'; |
|
236 | +$body .= elgg_view("input/longtext", array('internalname' => 'long_description', 'value'=>$long_description)); |
|
237 | 237 | $body .= '</label></p>'; |
238 | -$body .= '<p class="description">'.$prefix['long_description'].elgg_echo('event_calendar:long_description_description').'</p>'; |
|
238 | +$body .= '<p class="description">' . $prefix['long_description'] . elgg_echo('event_calendar:long_description_description') . '</p>'; |
|
239 | 239 | |
240 | -if($event_calendar_hide_access == 'yes') { |
|
240 | +if ($event_calendar_hide_access == 'yes') { |
|
241 | 241 | $event_calendar_default_access = get_plugin_setting('default_access', 'event_calendar'); |
242 | - if($event_calendar_default_access) { |
|
243 | - $body .= elgg_view("input/hidden",array('internalname' => 'access','value'=>$event_calendar_default_access)); |
|
242 | + if ($event_calendar_default_access) { |
|
243 | + $body .= elgg_view("input/hidden", array('internalname' => 'access', 'value'=>$event_calendar_default_access)); |
|
244 | 244 | } else { |
245 | - $body .= elgg_view("input/hidden",array('internalname' => 'access','value'=>ACCESS_PRIVATE)); |
|
245 | + $body .= elgg_view("input/hidden", array('internalname' => 'access', 'value'=>ACCESS_PRIVATE)); |
|
246 | 246 | } |
247 | 247 | } else { |
248 | - $body .= '<p><label>'.elgg_echo("access").'<br />'; |
|
249 | - $body .= elgg_view("input/access",array('internalname' => 'access','value'=>$access)); |
|
248 | + $body .= '<p><label>' . elgg_echo("access") . '<br />'; |
|
249 | + $body .= elgg_view("input/access", array('internalname' => 'access', 'value'=>$access)); |
|
250 | 250 | $body .= '</label></p>'; |
251 | 251 | } |
252 | 252 |
@@ -185,7 +185,7 @@ |
||
185 | 185 | dayNamesShort: locale.dayNamesShort, |
186 | 186 | buttonText: { |
187 | 187 | today: locale.currentText, |
188 | - <?php if ( elgg_echo("fr") == "French" ){ ?> // Only way to translate without bug |
|
188 | + <?php if (elgg_echo("fr") == "French") { ?> // Only way to translate without bug |
|
189 | 189 | month: elgg.echo('Month'), |
190 | 190 | week: elgg.echo('Week'), |
191 | 191 | day: elgg.echo('Day'), |
@@ -189,8 +189,7 @@ |
||
189 | 189 | month: elgg.echo('Month'), |
190 | 190 | week: elgg.echo('Week'), |
191 | 191 | day: elgg.echo('Day'), |
192 | - <?php } |
|
193 | -else { ?> |
|
192 | + <?php } else { ?> |
|
194 | 193 | |
195 | 194 | month: elgg.echo('Mois'), |
196 | 195 | week: elgg.echo('Semaine'), |
@@ -17,18 +17,18 @@ discard block |
||
17 | 17 | if ($poll) { |
18 | 18 | $choices = polls_get_choices($poll); |
19 | 19 | if ($choices) { |
20 | - foreach($choices as $choice) { |
|
21 | - $body .= '<div id="choice_container_'.$i.'" class="en">'; |
|
20 | + foreach ($choices as $choice) { |
|
21 | + $body .= '<div id="choice_container_' . $i . '" class="en">'; |
|
22 | 22 | |
23 | 23 | |
24 | 24 | $body .= elgg_view('input/text', |
25 | - array( 'name' => 'choice_text_'.$i, |
|
26 | - 'value' => gc_explode_translation($choice->text,'en'), |
|
25 | + array('name' => 'choice_text_' . $i, |
|
26 | + 'value' => gc_explode_translation($choice->text, 'en'), |
|
27 | 27 | 'class' => 'input-poll-choice' |
28 | 28 | ) |
29 | 29 | ); |
30 | 30 | |
31 | - $body .= '<a href="#" alt="'.elgg_echo('polls:delete_choice').'" title="'.elgg_echo('polls:delete_choice').' id="choice_delete_'.$i.'" onclick="javascript:polls_delete_choice('.$i.'); return false;">'; |
|
31 | + $body .= '<a href="#" alt="' . elgg_echo('polls:delete_choice') . '" title="' . elgg_echo('polls:delete_choice') . ' id="choice_delete_' . $i . '" onclick="javascript:polls_delete_choice(' . $i . '); return false;">'; |
|
32 | 32 | $body .= '<i class="fa fa-trash-o fa-lg icon-unsel"><span class="wb-inv">Delete This</span></i></a>'; |
33 | 33 | $body .= '</div>'; |
34 | 34 | |
@@ -53,16 +53,16 @@ discard block |
||
53 | 53 | |
54 | 54 | $choices = polls_get_choice_array($poll); |
55 | 55 | if ($choices) { |
56 | - foreach($choices as $choice) { |
|
57 | - $body .= '<div id="choice_container_2'.$s.'" class="fr">'; |
|
56 | + foreach ($choices as $choice) { |
|
57 | + $body .= '<div id="choice_container_2' . $s . '" class="fr">'; |
|
58 | 58 | //$body .= $choice; |
59 | 59 | $body .= elgg_view('input/text', |
60 | - array( 'name' => 'choice_text_f'.$s, |
|
61 | - 'value' => gc_explode_translation($choice,'fr'), |
|
60 | + array('name' => 'choice_text_f' . $s, |
|
61 | + 'value' => gc_explode_translation($choice, 'fr'), |
|
62 | 62 | 'class' => 'input-poll-choice2' |
63 | 63 | ) |
64 | 64 | ); |
65 | - $body .= '<a href="#" alt="'.elgg_echo('polls:delete_choice').'" title="'.elgg_echo('polls:delete_choice').' id="choice_delete_'.$s.'" onclick="javascript:polls_delete_choice2('.$s.'); return false;">'; |
|
65 | + $body .= '<a href="#" alt="' . elgg_echo('polls:delete_choice') . '" title="' . elgg_echo('polls:delete_choice') . ' id="choice_delete_' . $s . '" onclick="javascript:polls_delete_choice2(' . $s . '); return false;">'; |
|
66 | 66 | $body .= '<i class="fa fa-trash-o fa-lg icon-unsel"><span class="wb-inv">Delete This</span></i></a>'; |
67 | 67 | $body .= '</div>'; |
68 | 68 |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | } |
21 | 21 | } |
22 | 22 | if (isset($vars['entity'])) { |
23 | - $chartHeight = "data-flot='{ \"legend\": {\"show\":\"false\"}}'"; |
|
24 | - echo '<table class="wb-charts wb-charts-pie wb-charts-nolegend table mrgn-tp-md polls-table" '. $chartHeight .' >'; |
|
23 | + $chartHeight = "data-flot='{ \"legend\": {\"show\":\"false\"}}'"; |
|
24 | + echo '<table class="wb-charts wb-charts-pie wb-charts-nolegend table mrgn-tp-md polls-table" '. $chartHeight .' >'; |
|
25 | 25 | |
26 | 26 | //set img src |
27 | 27 | $img_src = $vars['url'] . "mod/polls/graphics/poll.gif"; |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | |
33 | 33 | //get the array of possible responses |
34 | 34 | |
35 | - $responses = polls_get_choices($vars['entity']); |
|
36 | - $responses3 = polls_get_choices3($vars['entity']); |
|
35 | + $responses = polls_get_choices($vars['entity']); |
|
36 | + $responses3 = polls_get_choices3($vars['entity']); |
|
37 | 37 | |
38 | - if ( count($responses3) >= count($responses) ) $responses = $responses3; // when we have an old poll with 'choice3's |
|
38 | + if ( count($responses3) >= count($responses) ) $responses = $responses3; // when we have an old poll with 'choice3's |
|
39 | 39 | |
40 | 40 | //get the array of user responses to the poll |
41 | 41 | $user_responses = $vars['entity']->getAnnotations('vote',9999,0,'desc'); |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | |
48 | 48 | //populate array |
49 | 49 | |
50 | - echo '<tr>'; |
|
51 | - echo '<td class="wb-inv"></td>'; |
|
50 | + echo '<tr>'; |
|
51 | + echo '<td class="wb-inv"></td>'; |
|
52 | 52 | foreach($responses as $response) |
53 | 53 | { |
54 | 54 | //get count per response |
@@ -67,27 +67,27 @@ discard block |
||
67 | 67 | |
68 | 68 | <th class="text-center"> |
69 | 69 | <?php |
70 | - $response1 = gc_explode_translation($response->text, $lang); |
|
70 | + $response1 = gc_explode_translation($response->text, $lang); |
|
71 | 71 | |
72 | - echo $response1; |
|
72 | + echo $response1; |
|
73 | 73 | |
74 | 74 | |
75 | - ?> |
|
75 | + ?> |
|
76 | 76 | </th> |
77 | 77 | |
78 | 78 | |
79 | 79 | <?php |
80 | 80 | } |
81 | - echo '</tr>'; |
|
82 | - echo '<tr>'; |
|
83 | - echo '<th class="wb-inv">'.$question.'</th>'; |
|
84 | - foreach($responses as $response) |
|
81 | + echo '</tr>'; |
|
82 | + echo '<tr>'; |
|
83 | + echo '<th class="wb-inv">'.$question.'</th>'; |
|
84 | + foreach($responses as $response) |
|
85 | 85 | { |
86 | 86 | |
87 | 87 | $response1 = gc_explode_translation($response->text, $lang); |
88 | - if(empty($response1)){ |
|
89 | - $response1 = $response->text; |
|
90 | - } |
|
88 | + if(empty($response1)){ |
|
89 | + $response1 = $response->text; |
|
90 | + } |
|
91 | 91 | |
92 | 92 | //get count per response |
93 | 93 | $response_count = polls_get_response_count_enfr($response, $user_responses); |
@@ -109,9 +109,9 @@ discard block |
||
109 | 109 | </td> |
110 | 110 | |
111 | 111 | <?php |
112 | - } |
|
113 | - echo '</tr>'; |
|
114 | - ?> |
|
112 | + } |
|
113 | + echo '</tr>'; |
|
114 | + ?> |
|
115 | 115 | |
116 | 116 | <p> |
117 | 117 | <?php echo elgg_echo('polls:totalvotes') . $user_responses_count; ?> |
@@ -14,19 +14,19 @@ discard block |
||
14 | 14 | */ |
15 | 15 | |
16 | 16 | $lang = get_current_language(); |
17 | -if($_GET['id']){ |
|
18 | - if($_GET['id'] != $lang ){ |
|
17 | +if ($_GET['id']) { |
|
18 | + if ($_GET['id'] != $lang) { |
|
19 | 19 | $lang = $_GET['id']; |
20 | 20 | } |
21 | 21 | } |
22 | 22 | if (isset($vars['entity'])) { |
23 | 23 | $chartHeight = "data-flot='{ \"legend\": {\"show\":\"false\"}}'"; |
24 | - echo '<table class="wb-charts wb-charts-pie wb-charts-nolegend table mrgn-tp-md polls-table" '. $chartHeight .' >'; |
|
24 | + echo '<table class="wb-charts wb-charts-pie wb-charts-nolegend table mrgn-tp-md polls-table" ' . $chartHeight . ' >'; |
|
25 | 25 | |
26 | 26 | //set img src |
27 | 27 | $img_src = $vars['url'] . "mod/polls/graphics/poll.gif"; |
28 | 28 | |
29 | - $question = gc_explode_translation($vars['entity']->title,$lang); |
|
29 | + $question = gc_explode_translation($vars['entity']->title, $lang); |
|
30 | 30 | |
31 | 31 | |
32 | 32 | |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | $responses = polls_get_choices($vars['entity']); |
36 | 36 | $responses3 = polls_get_choices3($vars['entity']); |
37 | 37 | |
38 | - if ( count($responses3) >= count($responses) ) $responses = $responses3; // when we have an old poll with 'choice3's |
|
38 | + if (count($responses3) >= count($responses)) $responses = $responses3; // when we have an old poll with 'choice3's |
|
39 | 39 | |
40 | 40 | //get the array of user responses to the poll |
41 | - $user_responses = $vars['entity']->getAnnotations('vote',9999,0,'desc'); |
|
41 | + $user_responses = $vars['entity']->getAnnotations('vote', 9999, 0, 'desc'); |
|
42 | 42 | |
43 | 43 | //get the count of responses |
44 | 44 | $user_responses_count = $vars['entity']->countAnnotations('vote'); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | echo '<tr>'; |
51 | 51 | echo '<td class="wb-inv"></td>'; |
52 | - foreach($responses as $response) |
|
52 | + foreach ($responses as $response) |
|
53 | 53 | { |
54 | 54 | //get count per response |
55 | 55 | |
@@ -80,12 +80,12 @@ discard block |
||
80 | 80 | } |
81 | 81 | echo '</tr>'; |
82 | 82 | echo '<tr>'; |
83 | - echo '<th class="wb-inv">'.$question.'</th>'; |
|
84 | - foreach($responses as $response) |
|
83 | + echo '<th class="wb-inv">' . $question . '</th>'; |
|
84 | + foreach ($responses as $response) |
|
85 | 85 | { |
86 | 86 | |
87 | 87 | $response1 = gc_explode_translation($response->text, $lang); |
88 | - if(empty($response1)){ |
|
88 | + if (empty($response1)) { |
|
89 | 89 | $response1 = $response->text; |
90 | 90 | } |
91 | 91 |
@@ -35,7 +35,10 @@ discard block |
||
35 | 35 | $responses = polls_get_choices($vars['entity']); |
36 | 36 | $responses3 = polls_get_choices3($vars['entity']); |
37 | 37 | |
38 | - if ( count($responses3) >= count($responses) ) $responses = $responses3; // when we have an old poll with 'choice3's |
|
38 | + if ( count($responses3) >= count($responses) ) { |
|
39 | + $responses = $responses3; |
|
40 | + } |
|
41 | + // when we have an old poll with 'choice3's |
|
39 | 42 | |
40 | 43 | //get the array of user responses to the poll |
41 | 44 | $user_responses = $vars['entity']->getAnnotations('vote',9999,0,'desc'); |
@@ -119,8 +122,7 @@ discard block |
||
119 | 122 | </table> |
120 | 123 | <?php |
121 | 124 | |
122 | -} |
|
123 | -else |
|
125 | +} else |
|
124 | 126 | { |
125 | 127 | register_error(elgg_echo("polls:blank")); |
126 | 128 | forward("mod/polls/all"); |
@@ -14,9 +14,9 @@ |
||
14 | 14 | |
15 | 15 | //get the array of possible responses |
16 | 16 | $responses = polls_get_choices($vars['entity']); |
17 | - $responses3 = polls_get_choices3($vars['entity']); |
|
17 | + $responses3 = polls_get_choices3($vars['entity']); |
|
18 | 18 | |
19 | - if ( count($responses3) >= count($responses) ) $responses = $responses3; // when we have an old poll with 'choice3's |
|
19 | + if ( count($responses3) >= count($responses) ) $responses = $responses3; // when we have an old poll with 'choice3's |
|
20 | 20 | |
21 | 21 | //get the array of user responses to the poll |
22 | 22 | $user_responses = $vars['entity']->getAnnotations('vote',9999,0,'desc'); |
@@ -16,10 +16,10 @@ discard block |
||
16 | 16 | $responses = polls_get_choices($vars['entity']); |
17 | 17 | $responses3 = polls_get_choices3($vars['entity']); |
18 | 18 | |
19 | - if ( count($responses3) >= count($responses) ) $responses = $responses3; // when we have an old poll with 'choice3's |
|
19 | + if (count($responses3) >= count($responses)) $responses = $responses3; // when we have an old poll with 'choice3's |
|
20 | 20 | |
21 | 21 | //get the array of user responses to the poll |
22 | - $user_responses = $vars['entity']->getAnnotations('vote',9999,0,'desc'); |
|
22 | + $user_responses = $vars['entity']->getAnnotations('vote', 9999, 0, 'desc'); |
|
23 | 23 | |
24 | 24 | //get the count of responses |
25 | 25 | $user_responses_count = $vars['entity']->countAnnotations('vote'); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | <?php |
33 | 33 | //populate array |
34 | - foreach($responses as $response) |
|
34 | + foreach ($responses as $response) |
|
35 | 35 | { |
36 | 36 | //get count per response |
37 | 37 | $response_count = polls_get_response_count_enfr($response, $user_responses); |
@@ -16,7 +16,10 @@ discard block |
||
16 | 16 | $responses = polls_get_choices($vars['entity']); |
17 | 17 | $responses3 = polls_get_choices3($vars['entity']); |
18 | 18 | |
19 | - if ( count($responses3) >= count($responses) ) $responses = $responses3; // when we have an old poll with 'choice3's |
|
19 | + if ( count($responses3) >= count($responses) ) { |
|
20 | + $responses = $responses3; |
|
21 | + } |
|
22 | + // when we have an old poll with 'choice3's |
|
20 | 23 | |
21 | 24 | //get the array of user responses to the poll |
22 | 25 | $user_responses = $vars['entity']->getAnnotations('vote',9999,0,'desc'); |
@@ -63,8 +66,7 @@ discard block |
||
63 | 66 | |
64 | 67 | <?php |
65 | 68 | |
66 | -} |
|
67 | -else |
|
69 | +} else |
|
68 | 70 | { |
69 | 71 | register_error(elgg_echo("polls:blank")); |
70 | 72 | forward("polls/all"); |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | $widget_instance = preg_replace('/[^a-z0-9-]/i', '-', "elgg-widget-instance-$handler"); |
54 | 54 | if ($can_edit) { |
55 | 55 | $widget_class = "elgg-state-draggable $widget_instance"; |
56 | - $aria_dnd = 'false'; //allows for accessible drag and drop aria control |
|
57 | - $aria_draggable = 'true'; |
|
58 | - $tabindex = '0'; |
|
56 | + $aria_dnd = 'false'; //allows for accessible drag and drop aria control |
|
57 | + $aria_draggable = 'true'; |
|
58 | + $tabindex = '0'; |
|
59 | 59 | } else { |
60 | 60 | $widget_class = "elgg-state-fixed $widget_instance"; |
61 | - $aria_dnd =''; |
|
62 | - $aria_dnd = ''; |
|
63 | - $tabindex = ''; |
|
61 | + $aria_dnd =''; |
|
62 | + $aria_dnd = ''; |
|
63 | + $tabindex = ''; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | $additional_class = elgg_extract('class', $vars, ''); |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | $widget_is_open = true; |
75 | 75 | |
76 | 76 | if (elgg_is_logged_in()) { |
77 | - $widget_is_collapsed = widget_manager_check_collapsed_state($widget->guid, "widget_state_collapsed"); |
|
78 | - $widget_is_open = widget_manager_check_collapsed_state($widget->guid, "widget_state_open"); |
|
77 | + $widget_is_collapsed = widget_manager_check_collapsed_state($widget->guid, "widget_state_collapsed"); |
|
78 | + $widget_is_open = widget_manager_check_collapsed_state($widget->guid, "widget_state_open"); |
|
79 | 79 | } |
80 | 80 | /* |
81 | 81 | if (($widget->widget_manager_collapse_state === "closed" || $widget_is_collapsed) && !$widget_is_open) { |
@@ -85,11 +85,11 @@ discard block |
||
85 | 85 | // set collapsed |
86 | 86 | //it's not even taking this file :| |
87 | 87 | if ( $widget_is_collapsed && !$widget_is_open ){ // using the same relationship names, etc as in widget manager 5.0 |
88 | - // $minimized = 'style="display:none;"'; |
|
88 | + // $minimized = 'style="display:none;"'; |
|
89 | 89 | $widget_body_class .= " wet-hidden"; |
90 | - $widget_head_class ="wet-collapsed"; |
|
90 | + $widget_head_class ="wet-collapsed"; |
|
91 | 91 | }else{ |
92 | - $widget_head_class = "wet-open"; |
|
92 | + $widget_head_class = "wet-open"; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | $widget_header = <<<HEADER |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | 'class' => $widget_class, |
110 | 110 | 'id' => $widget_id, |
111 | 111 | 'header' => $widget_header, |
112 | - 'aria-grabbed' => $aria_dnd, |
|
113 | - 'draggable' => $aria_draggable, |
|
114 | - 'tabindex' => $tabindex, |
|
112 | + 'aria-grabbed' => $aria_dnd, |
|
113 | + 'draggable' => $aria_draggable, |
|
114 | + 'tabindex' => $tabindex, |
|
115 | 115 | )); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $tabindex = '0'; |
59 | 59 | } else { |
60 | 60 | $widget_class = "elgg-state-fixed $widget_instance"; |
61 | - $aria_dnd =''; |
|
61 | + $aria_dnd = ''; |
|
62 | 62 | $aria_dnd = ''; |
63 | 63 | $tabindex = ''; |
64 | 64 | } |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | }*/ |
85 | 85 | // set collapsed |
86 | 86 | //it's not even taking this file :| |
87 | -if ( $widget_is_collapsed && !$widget_is_open ){ // using the same relationship names, etc as in widget manager 5.0 |
|
87 | +if ($widget_is_collapsed && !$widget_is_open) { // using the same relationship names, etc as in widget manager 5.0 |
|
88 | 88 | // $minimized = 'style="display:none;"'; |
89 | 89 | $widget_body_class .= " wet-hidden"; |
90 | - $widget_head_class ="wet-collapsed"; |
|
91 | -}else{ |
|
90 | + $widget_head_class = "wet-collapsed"; |
|
91 | +} else { |
|
92 | 92 | $widget_head_class = "wet-open"; |
93 | 93 | } |
94 | 94 |
@@ -88,7 +88,7 @@ |
||
88 | 88 | // $minimized = 'style="display:none;"'; |
89 | 89 | $widget_body_class .= " wet-hidden"; |
90 | 90 | $widget_head_class ="wet-collapsed"; |
91 | -}else{ |
|
91 | +} else{ |
|
92 | 92 | $widget_head_class = "wet-open"; |
93 | 93 | } |
94 | 94 |