@@ -24,9 +24,9 @@ |
||
24 | 24 | |
25 | 25 | <div class="mrgn-tp-sm"> |
26 | 26 | <?php |
27 | - //EW - change to display new badge |
|
28 | - echo elgg_view_entity_icon(elgg_get_logged_in_user_entity(), 'medium', array('use_hover' => false, 'class' => 'pro-avatar', 'force_size' => true,)); |
|
29 | - ?> |
|
27 | + //EW - change to display new badge |
|
28 | + echo elgg_view_entity_icon(elgg_get_logged_in_user_entity(), 'medium', array('use_hover' => false, 'class' => 'pro-avatar', 'force_size' => true,)); |
|
29 | + ?> |
|
30 | 30 | </div> |
31 | 31 | </div> |
32 | 32 |
@@ -21,31 +21,31 @@ |
||
21 | 21 | echo '<li class="hidden wb-invisible"></li>'; |
22 | 22 | |
23 | 23 | if (isset($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) { |
24 | - $num=0; |
|
25 | - foreach ($vars['object'] as $type => $list ) { |
|
26 | - if($num==0){ |
|
24 | + $num=0; |
|
25 | + foreach ($vars['object'] as $type => $list ) { |
|
26 | + if($num==0){ |
|
27 | 27 | |
28 | - if($type=='error') |
|
29 | - { |
|
30 | - echo '<li data-dismiss="alert" class="fade in alert alert-'.$type.' clearfix" >'; //elgg-system-messages custom-message |
|
31 | - }else |
|
32 | - { |
|
33 | - echo '<li data-dismiss="alert" class="fade in elgg-system-messages clearfix custom-message alert alert-'.$type.' ">'; |
|
34 | - } |
|
35 | - echo '<ul class="list-unstyled" >'; |
|
36 | - echo '<a href="#" class="close" tabindex="0" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></a>'; |
|
37 | - } |
|
28 | + if($type=='error') |
|
29 | + { |
|
30 | + echo '<li data-dismiss="alert" class="fade in alert alert-'.$type.' clearfix" >'; //elgg-system-messages custom-message |
|
31 | + }else |
|
32 | + { |
|
33 | + echo '<li data-dismiss="alert" class="fade in elgg-system-messages clearfix custom-message alert alert-'.$type.' ">'; |
|
34 | + } |
|
35 | + echo '<ul class="list-unstyled" >'; |
|
36 | + echo '<a href="#" class="close" tabindex="0" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></a>'; |
|
37 | + } |
|
38 | 38 | foreach ($list as $message) { |
39 | - $num=$num+1; |
|
39 | + $num=$num+1; |
|
40 | 40 | echo '<li class="col-sm-11">'; |
41 | 41 | echo '<span role="alert">'.elgg_autop($message) .'</span>'; |
42 | 42 | echo '</li>'; |
43 | 43 | } |
44 | 44 | } |
45 | - if($num>0){ |
|
46 | - echo '</ul>'; |
|
47 | - echo '</li>'; |
|
48 | - } |
|
45 | + if($num>0){ |
|
46 | + echo '</ul>'; |
|
47 | + echo '</li>'; |
|
48 | + } |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | echo '</ul>'; |
@@ -21,28 +21,28 @@ |
||
21 | 21 | echo '<li class="hidden wb-invisible"></li>'; |
22 | 22 | |
23 | 23 | if (isset($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) { |
24 | - $num=0; |
|
25 | - foreach ($vars['object'] as $type => $list ) { |
|
26 | - if($num==0){ |
|
24 | + $num = 0; |
|
25 | + foreach ($vars['object'] as $type => $list) { |
|
26 | + if ($num == 0) { |
|
27 | 27 | |
28 | - if($type=='error') |
|
28 | + if ($type == 'error') |
|
29 | 29 | { |
30 | - echo '<li data-dismiss="alert" class="fade in alert alert-'.$type.' clearfix" >'; //elgg-system-messages custom-message |
|
31 | - }else |
|
30 | + echo '<li data-dismiss="alert" class="fade in alert alert-' . $type . ' clearfix" >'; //elgg-system-messages custom-message |
|
31 | + } else |
|
32 | 32 | { |
33 | - echo '<li data-dismiss="alert" class="fade in elgg-system-messages clearfix custom-message alert alert-'.$type.' ">'; |
|
33 | + echo '<li data-dismiss="alert" class="fade in elgg-system-messages clearfix custom-message alert alert-' . $type . ' ">'; |
|
34 | 34 | } |
35 | 35 | echo '<ul class="list-unstyled" >'; |
36 | 36 | echo '<a href="#" class="close" tabindex="0" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></a>'; |
37 | 37 | } |
38 | 38 | foreach ($list as $message) { |
39 | - $num=$num+1; |
|
39 | + $num = $num + 1; |
|
40 | 40 | echo '<li class="col-sm-11">'; |
41 | - echo '<span role="alert">'.elgg_autop($message) .'</span>'; |
|
41 | + echo '<span role="alert">' . elgg_autop($message) . '</span>'; |
|
42 | 42 | echo '</li>'; |
43 | 43 | } |
44 | 44 | } |
45 | - if($num>0){ |
|
45 | + if ($num > 0) { |
|
46 | 46 | echo '</ul>'; |
47 | 47 | echo '</li>'; |
48 | 48 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | if($type=='error') |
29 | 29 | { |
30 | 30 | echo '<li data-dismiss="alert" class="fade in alert alert-'.$type.' clearfix" >'; //elgg-system-messages custom-message |
31 | - }else |
|
31 | + } else |
|
32 | 32 | { |
33 | 33 | echo '<li data-dismiss="alert" class="fade in elgg-system-messages clearfix custom-message alert alert-'.$type.' ">'; |
34 | 34 | } |
@@ -47,25 +47,25 @@ discard block |
||
47 | 47 | // check if this is a (user or group) profile |
48 | 48 | if ($elgg_entity instanceof ElggUser || $elgg_entity instanceof ElggGroup) { |
49 | 49 | |
50 | - // check if this is a user or a group (TODO: displays the title twice if either language is not present) |
|
51 | - $page_title = ($elgg_entity instanceof ElggUser) ? $elgg_entity->name : gc_explode_translation($elgg_entity->name, 'en').' / '.gc_explode_translation($elgg_entity->name, 'fr'); |
|
50 | + // check if this is a user or a group (TODO: displays the title twice if either language is not present) |
|
51 | + $page_title = ($elgg_entity instanceof ElggUser) ? $elgg_entity->name : gc_explode_translation($elgg_entity->name, 'en').' / '.gc_explode_translation($elgg_entity->name, 'fr'); |
|
52 | 52 | |
53 | 53 | } else { |
54 | 54 | |
55 | - $page_title = gc_explode_translation($elgg_entity->title, 'en').' / '.gc_explode_translation($elgg_entity->title, 'fr'); |
|
56 | - // if there is no title (meaning only a slash is present) because there is no way to retrieve the entity |
|
57 | - if (trim($page_title) === '/') { |
|
58 | - $current_url = explode('/', $_SERVER['REQUEST_URI']); |
|
59 | - $page_entity = get_entity($current_url[count($current_url) - 1]); |
|
55 | + $page_title = gc_explode_translation($elgg_entity->title, 'en').' / '.gc_explode_translation($elgg_entity->title, 'fr'); |
|
56 | + // if there is no title (meaning only a slash is present) because there is no way to retrieve the entity |
|
57 | + if (trim($page_title) === '/') { |
|
58 | + $current_url = explode('/', $_SERVER['REQUEST_URI']); |
|
59 | + $page_entity = get_entity($current_url[count($current_url) - 1]); |
|
60 | 60 | |
61 | - // if the entity is still not found |
|
62 | - if (!($page_entity instanceof ElggEntity)) |
|
63 | - $page_entity = get_entity($current_url[count($current_url) - 2]); |
|
61 | + // if the entity is still not found |
|
62 | + if (!($page_entity instanceof ElggEntity)) |
|
63 | + $page_entity = get_entity($current_url[count($current_url) - 2]); |
|
64 | 64 | |
65 | - $page_title = (gc_explode_translation($page_entity->title, 'en') !== gc_explode_translation($page_entity->title, 'fr')) |
|
66 | - ? gc_explode_translation($page_entity->title, 'en').' / '.gc_explode_translation($page_entity->title, 'fr') |
|
67 | - : gc_explode_translation($page_entity->title, 'en'); |
|
68 | - } |
|
65 | + $page_title = (gc_explode_translation($page_entity->title, 'en') !== gc_explode_translation($page_entity->title, 'fr')) |
|
66 | + ? gc_explode_translation($page_entity->title, 'en').' / '.gc_explode_translation($page_entity->title, 'fr') |
|
67 | + : gc_explode_translation($page_entity->title, 'en'); |
|
68 | + } |
|
69 | 69 | |
70 | 70 | } |
71 | 71 | |
@@ -75,13 +75,13 @@ discard block |
||
75 | 75 | $page_entity = get_entity($current_url[count($current_url) - 1]); |
76 | 76 | |
77 | 77 | if ($elgg_entity instanceof ElggUser || $elgg_entity instanceof ElggGroup) { |
78 | - $page_title = ($elgg_entity instanceof ElggUser) ? $vars['title'] : gc_explode_translation($elgg_entity->name, $gc_language) . " : {$vars['title']}"; |
|
78 | + $page_title = ($elgg_entity instanceof ElggUser) ? $vars['title'] : gc_explode_translation($elgg_entity->name, $gc_language) . " : {$vars['title']}"; |
|
79 | 79 | } else { |
80 | 80 | |
81 | - if (!($page_entity instanceof ElggEntity)) |
|
82 | - $page_entity = get_entity($current_url[count($current_url) - 2]); |
|
83 | - // wire post does not have any title! |
|
84 | - $page_title = gc_explode_translation($page_entity->title, $gc_language); |
|
81 | + if (!($page_entity instanceof ElggEntity)) |
|
82 | + $page_entity = get_entity($current_url[count($current_url) - 2]); |
|
83 | + // wire post does not have any title! |
|
84 | + $page_title = gc_explode_translation($page_entity->title, $gc_language); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | } |
@@ -153,14 +153,14 @@ discard block |
||
153 | 153 | if ($my_page_entity) { |
154 | 154 | |
155 | 155 | if (elgg_instanceof($my_page_entity, 'group')) { |
156 | - $desc = elgg_strip_tags(elgg_get_excerpt(gc_explode_translation($my_page_entity->description,get_current_language()))); |
|
157 | - $briefdesc = gc_explode_translation($my_page_entity->briefdescription,get_current_language()); |
|
156 | + $desc = elgg_strip_tags(elgg_get_excerpt(gc_explode_translation($my_page_entity->description,get_current_language()))); |
|
157 | + $briefdesc = gc_explode_translation($my_page_entity->briefdescription,get_current_language()); |
|
158 | 158 | } else if (elgg_instanceof($my_page_entity, 'user')) { |
159 | - $desc = elgg_echo('profile:title', array(gc_explode_translation($my_page_entity->name,get_current_language()))); |
|
160 | - $briefdesc = elgg_echo('profile:title', array(gc_explode_translation($my_page_entity->name,get_current_language()))); |
|
159 | + $desc = elgg_echo('profile:title', array(gc_explode_translation($my_page_entity->name,get_current_language()))); |
|
160 | + $briefdesc = elgg_echo('profile:title', array(gc_explode_translation($my_page_entity->name,get_current_language()))); |
|
161 | 161 | } else { |
162 | - $desc = gc_explode_translation($my_page_entity->title,get_current_language()); |
|
163 | - $briefdesc = gc_explode_translation($my_page_entity->title,get_current_language()); |
|
162 | + $desc = gc_explode_translation($my_page_entity->title,get_current_language()); |
|
163 | + $briefdesc = gc_explode_translation($my_page_entity->title,get_current_language()); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | $pubDate = date ("Y-m-d", elgg_get_excerpt($my_page_entity->time_created)); |
@@ -48,11 +48,11 @@ discard block |
||
48 | 48 | if ($elgg_entity instanceof ElggUser || $elgg_entity instanceof ElggGroup) { |
49 | 49 | |
50 | 50 | // check if this is a user or a group (TODO: displays the title twice if either language is not present) |
51 | - $page_title = ($elgg_entity instanceof ElggUser) ? $elgg_entity->name : gc_explode_translation($elgg_entity->name, 'en').' / '.gc_explode_translation($elgg_entity->name, 'fr'); |
|
51 | + $page_title = ($elgg_entity instanceof ElggUser) ? $elgg_entity->name : gc_explode_translation($elgg_entity->name, 'en') . ' / ' . gc_explode_translation($elgg_entity->name, 'fr'); |
|
52 | 52 | |
53 | 53 | } else { |
54 | 54 | |
55 | - $page_title = gc_explode_translation($elgg_entity->title, 'en').' / '.gc_explode_translation($elgg_entity->title, 'fr'); |
|
55 | + $page_title = gc_explode_translation($elgg_entity->title, 'en') . ' / ' . gc_explode_translation($elgg_entity->title, 'fr'); |
|
56 | 56 | // if there is no title (meaning only a slash is present) because there is no way to retrieve the entity |
57 | 57 | if (trim($page_title) === '/') { |
58 | 58 | $current_url = explode('/', $_SERVER['REQUEST_URI']); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $page_entity = get_entity($current_url[count($current_url) - 2]); |
64 | 64 | |
65 | 65 | $page_title = (gc_explode_translation($page_entity->title, 'en') !== gc_explode_translation($page_entity->title, 'fr')) |
66 | - ? gc_explode_translation($page_entity->title, 'en').' / '.gc_explode_translation($page_entity->title, 'fr') |
|
66 | + ? gc_explode_translation($page_entity->title, 'en') . ' / ' . gc_explode_translation($page_entity->title, 'fr') |
|
67 | 67 | : gc_explode_translation($page_entity->title, 'en'); |
68 | 68 | } |
69 | 69 | |
@@ -153,18 +153,18 @@ discard block |
||
153 | 153 | if ($my_page_entity) { |
154 | 154 | |
155 | 155 | if (elgg_instanceof($my_page_entity, 'group')) { |
156 | - $desc = elgg_strip_tags(elgg_get_excerpt(gc_explode_translation($my_page_entity->description,get_current_language()))); |
|
157 | - $briefdesc = gc_explode_translation($my_page_entity->briefdescription,get_current_language()); |
|
156 | + $desc = elgg_strip_tags(elgg_get_excerpt(gc_explode_translation($my_page_entity->description, get_current_language()))); |
|
157 | + $briefdesc = gc_explode_translation($my_page_entity->briefdescription, get_current_language()); |
|
158 | 158 | } else if (elgg_instanceof($my_page_entity, 'user')) { |
159 | - $desc = elgg_echo('profile:title', array(gc_explode_translation($my_page_entity->name,get_current_language()))); |
|
160 | - $briefdesc = elgg_echo('profile:title', array(gc_explode_translation($my_page_entity->name,get_current_language()))); |
|
159 | + $desc = elgg_echo('profile:title', array(gc_explode_translation($my_page_entity->name, get_current_language()))); |
|
160 | + $briefdesc = elgg_echo('profile:title', array(gc_explode_translation($my_page_entity->name, get_current_language()))); |
|
161 | 161 | } else { |
162 | - $desc = gc_explode_translation($my_page_entity->title,get_current_language()); |
|
163 | - $briefdesc = gc_explode_translation($my_page_entity->title,get_current_language()); |
|
162 | + $desc = gc_explode_translation($my_page_entity->title, get_current_language()); |
|
163 | + $briefdesc = gc_explode_translation($my_page_entity->title, get_current_language()); |
|
164 | 164 | } |
165 | 165 | |
166 | - $pubDate = date ("Y-m-d", elgg_get_excerpt($my_page_entity->time_created)); |
|
167 | - $lastModDate = date ("Y-m-d", elgg_get_excerpt($my_page_entity->time_updated)); |
|
166 | + $pubDate = date("Y-m-d", elgg_get_excerpt($my_page_entity->time_created)); |
|
167 | + $lastModDate = date("Y-m-d", elgg_get_excerpt($my_page_entity->time_updated)); |
|
168 | 168 | |
169 | 169 | $datemeta = '<meta name="dcterms.issued" title="W3CDTF" content="' . $pubDate . '"/>'; |
170 | 170 | $datemeta .= '<meta name="dcterms.modified" title="W3CDTF" content="' . $lastModDate . '" />'; |
@@ -182,23 +182,23 @@ discard block |
||
182 | 182 | |
183 | 183 | // cyu - prevent crawler to index unsaved draft |
184 | 184 | if ($my_page_entity instanceof ElggObject) { |
185 | - if ($my_page_entity->getSubtype() === 'blog' && strcmp($my_page_entity->status,'unsaved_draft') == 0) |
|
185 | + if ($my_page_entity->getSubtype() === 'blog' && strcmp($my_page_entity->status, 'unsaved_draft') == 0) |
|
186 | 186 | echo '<meta name="robots" content="noindex, follow">'; |
187 | 187 | } |
188 | 188 | |
189 | 189 | // determine whether to index page depending on the url |
190 | 190 | $no_index_array = array( |
191 | - 'activity/','activity/all','activity/owner','activity/friends','activity_tabs/mydept','activity_tabs/otherdept', |
|
192 | - 'blog/all','blog/owner/','blog/group','blog/friends', |
|
193 | - 'bookmarks/all','bookmarks/owner','bookmarks/friends','bookmarks/group', |
|
191 | + 'activity/', 'activity/all', 'activity/owner', 'activity/friends', 'activity_tabs/mydept', 'activity_tabs/otherdept', |
|
192 | + 'blog/all', 'blog/owner/', 'blog/group', 'blog/friends', |
|
193 | + 'bookmarks/all', 'bookmarks/owner', 'bookmarks/friends', 'bookmarks/group', |
|
194 | 194 | 'event_calendar/list', |
195 | - 'file/all','file/owner','file/friends', 'file/group', |
|
196 | - 'photos/all','photos/owner','photos/friends', |
|
197 | - 'members','members/popular','/members/online','members/department', |
|
198 | - 'polls/all','polls/owner','polls/friends/', |
|
199 | - 'groups/all','groups/owner','groups/invitation', |
|
195 | + 'file/all', 'file/owner', 'file/friends', 'file/group', |
|
196 | + 'photos/all', 'photos/owner', 'photos/friends', |
|
197 | + 'members', 'members/popular', '/members/online', 'members/department', |
|
198 | + 'polls/all', 'polls/owner', 'polls/friends/', |
|
199 | + 'groups/all', 'groups/owner', 'groups/invitation', |
|
200 | 200 | 'photos/siteimagesowner', 'photos/siteimagesall', |
201 | - 'thewire/all','thewire/owner','thewire/friends', |
|
201 | + 'thewire/all', 'thewire/owner', 'thewire/friends', |
|
202 | 202 | 'file_tools/list', 'newsfeed/', 'groups/', 'discussion/owner', 'ideas/group', 'photos/group', 'pages/all', 'missions/main', |
203 | 203 | 'pages/history', 'splash/', '/mod', 'login/', 'file/all' |
204 | 204 | ); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | |
236 | 236 | // the wire posts do not have any title, we'll have the page title as the wire post |
237 | 237 | if ($page_entity instanceof ElggEntity && $page_entity->getSubtype() === 'thewire') { |
238 | - $page_title = elgg_echo('thewire:head:title', 'en').' / '.elgg_echo('thewire:head:title', 'fr'); |
|
238 | + $page_title = elgg_echo('thewire:head:title', 'en') . ' / ' . elgg_echo('thewire:head:title', 'fr'); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | // Meta tags for the page |
@@ -59,8 +59,9 @@ discard block |
||
59 | 59 | $page_entity = get_entity($current_url[count($current_url) - 1]); |
60 | 60 | |
61 | 61 | // if the entity is still not found |
62 | - if (!($page_entity instanceof ElggEntity)) |
|
63 | - $page_entity = get_entity($current_url[count($current_url) - 2]); |
|
62 | + if (!($page_entity instanceof ElggEntity)) { |
|
63 | + $page_entity = get_entity($current_url[count($current_url) - 2]); |
|
64 | + } |
|
64 | 65 | |
65 | 66 | $page_title = (gc_explode_translation($page_entity->title, 'en') !== gc_explode_translation($page_entity->title, 'fr')) |
66 | 67 | ? gc_explode_translation($page_entity->title, 'en').' / '.gc_explode_translation($page_entity->title, 'fr') |
@@ -78,8 +79,9 @@ discard block |
||
78 | 79 | $page_title = ($elgg_entity instanceof ElggUser) ? $vars['title'] : gc_explode_translation($elgg_entity->name, $gc_language) . " : {$vars['title']}"; |
79 | 80 | } else { |
80 | 81 | |
81 | - if (!($page_entity instanceof ElggEntity)) |
|
82 | - $page_entity = get_entity($current_url[count($current_url) - 2]); |
|
82 | + if (!($page_entity instanceof ElggEntity)) { |
|
83 | + $page_entity = get_entity($current_url[count($current_url) - 2]); |
|
84 | + } |
|
83 | 85 | // wire post does not have any title! |
84 | 86 | $page_title = gc_explode_translation($page_entity->title, $gc_language); |
85 | 87 | } |
@@ -177,14 +179,17 @@ discard block |
||
177 | 179 | } |
178 | 180 | |
179 | 181 | $creator = gc_explode_translation(elgg_get_page_owner_entity()->name, get_current_language()); |
180 | -if (!$creator) $creator = 'GCconnex'; |
|
182 | +if (!$creator) { |
|
183 | + $creator = 'GCconnex'; |
|
184 | +} |
|
181 | 185 | |
182 | 186 | |
183 | 187 | // cyu - prevent crawler to index unsaved draft |
184 | 188 | if ($my_page_entity instanceof ElggObject) { |
185 | - if ($my_page_entity->getSubtype() === 'blog' && strcmp($my_page_entity->status,'unsaved_draft') == 0) |
|
186 | - echo '<meta name="robots" content="noindex, follow">'; |
|
187 | -} |
|
189 | + if ($my_page_entity->getSubtype() === 'blog' && strcmp($my_page_entity->status,'unsaved_draft') == 0) { |
|
190 | + echo '<meta name="robots" content="noindex, follow">'; |
|
191 | + } |
|
192 | + } |
|
188 | 193 | |
189 | 194 | // determine whether to index page depending on the url |
190 | 195 | $no_index_array = array( |
@@ -224,14 +229,16 @@ discard block |
||
224 | 229 | |
225 | 230 | // group profile url with the group name - noindex |
226 | 231 | preg_match("/groups\/profile\/[\d]*\/.*\/?/", $_SERVER['REQUEST_URI'], $output_array); |
227 | -if (sizeof($output_array) > 0) |
|
232 | +if (sizeof($output_array) > 0) { |
|
228 | 233 | echo '<meta name="robots" content="noindex, follow">'; |
234 | +} |
|
229 | 235 | |
230 | 236 | |
231 | 237 | // if user profile url has a slash at the end, do not index |
232 | 238 | preg_match("/\/profile\/.*\//", $_SERVER['REQUEST_URI'], $output_array); |
233 | -if (sizeof($output_array) > 0) |
|
239 | +if (sizeof($output_array) > 0) { |
|
234 | 240 | echo '<meta name="robots" content="noindex, follow">'; |
241 | +} |
|
235 | 242 | |
236 | 243 | // the wire posts do not have any title, we'll have the page title as the wire post |
237 | 244 | if ($page_entity instanceof ElggEntity && $page_entity->getSubtype() === 'thewire') { |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | <nav role="navigation" id="wb-sm" data-trgt="mb-pnl" class="wb-menu visible-md visible-lg" typeof="SiteNavigationElement"> |
16 | 16 | <div class="container nvbar"> <!-- container for screen reader text and list --> |
17 | - <h2><?php echo elgg_echo('wet:topicmenu');?></h2> |
|
17 | + <h2><?php echo elgg_echo('wet:topicmenu'); ?></h2> |
|
18 | 18 | <div class="row"> |
19 | 19 | |
20 | 20 | <?php echo elgg_view_menu('site'); ?> |
@@ -12,14 +12,14 @@ |
||
12 | 12 | $site_url = elgg_get_site_url(); |
13 | 13 | //check lang of current user and change Canada graphic based on language |
14 | 14 | if( _elgg_services()->session->get('language') == 'en'){ |
15 | - $graphic_lang = 'en'; |
|
15 | + $graphic_lang = 'en'; |
|
16 | 16 | }else{ |
17 | - $graphic_lang = 'fr'; |
|
17 | + $graphic_lang = 'fr'; |
|
18 | 18 | } |
19 | 19 | //If GCconnex theme is not active, display the site name as a link in the top left |
20 | 20 | $site_name = elgg_view('output/url', array( |
21 | - 'href'=>elgg_get_site_url(), |
|
22 | - 'text'=>elgg_get_config('sitename'), |
|
21 | + 'href'=>elgg_get_site_url(), |
|
22 | + 'text'=>elgg_get_config('sitename'), |
|
23 | 23 | |
24 | 24 | )); |
25 | 25 |
@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | |
12 | 12 | $site_url = elgg_get_site_url(); |
13 | 13 | //check lang of current user and change Canada graphic based on language |
14 | -if( _elgg_services()->session->get('language') == 'en'){ |
|
14 | +if (_elgg_services()->session->get('language') == 'en') { |
|
15 | 15 | $graphic_lang = 'en'; |
16 | -}else{ |
|
16 | +} else { |
|
17 | 17 | $graphic_lang = 'fr'; |
18 | 18 | } |
19 | 19 | //If GCconnex theme is not active, display the site name as a link in the top left |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | |
34 | 34 | <section class="wb-mb-links col-xs-4 col-sm-3 visible-sm visible-xs" id="wb-glb-mn"> |
35 | 35 | <ul class="list-inline text-right chvrn"> |
36 | - <li><a href="#mb-pnl" title="<?php echo elgg_echo('wet:search');?>" aria-controls="mb-pnl" class="overlay-lnk" role="button"> |
|
36 | + <li><a href="#mb-pnl" title="<?php echo elgg_echo('wet:search'); ?>" aria-controls="mb-pnl" class="overlay-lnk" role="button"> |
|
37 | 37 | <span class="glyphicon glyphicon-search"> |
38 | 38 | <span class="glyphicon glyphicon-th-list"> |
39 | 39 | <span class="wb-inv"> |
40 | - <?php echo elgg_echo('wet:search');?> |
|
40 | + <?php echo elgg_echo('wet:search'); ?> |
|
41 | 41 | </span> |
42 | 42 | </span> |
43 | 43 | </span> |
@@ -13,7 +13,7 @@ |
||
13 | 13 | //check lang of current user and change Canada graphic based on language |
14 | 14 | if( _elgg_services()->session->get('language') == 'en'){ |
15 | 15 | $graphic_lang = 'en'; |
16 | -}else{ |
|
16 | +} else{ |
|
17 | 17 | $graphic_lang = 'fr'; |
18 | 18 | } |
19 | 19 | //If GCconnex theme is not active, display the site name as a link in the top left |
@@ -36,26 +36,26 @@ |
||
36 | 36 | unset($vars['internalid']); |
37 | 37 | |
38 | 38 | //check how many comments topic has |
39 | - $num_replies = elgg_get_entities(array( |
|
40 | - 'type' => 'object', |
|
41 | - 'subtype' => 'comment', |
|
42 | - 'container_guid' => $vars['entity']->guid, |
|
43 | - 'count' => true, |
|
44 | - 'distinct' => false, |
|
45 | - )); |
|
39 | + $num_replies = elgg_get_entities(array( |
|
40 | + 'type' => 'object', |
|
41 | + 'subtype' => 'comment', |
|
42 | + 'container_guid' => $vars['entity']->guid, |
|
43 | + 'count' => true, |
|
44 | + 'distinct' => false, |
|
45 | + )); |
|
46 | 46 | |
47 | - //Nick - keep the heading so users know comments are supposed to be here! |
|
48 | - //Nick Update - if this is in a group the comments will be an h3 |
|
49 | - if($page_owner instanceof ElggGroup){ |
|
50 | - echo '<h3 class="panel-title mrgn-bttm-md mrgn-tp-md h2">' . elgg_echo('comments') . '</h3>'; |
|
51 | - }else{ |
|
52 | - echo '<h2 class="panel-title mrgn-bttm-md mrgn-tp-md">' . elgg_echo('comments') . '</h2>'; |
|
53 | - } |
|
47 | + //Nick - keep the heading so users know comments are supposed to be here! |
|
48 | + //Nick Update - if this is in a group the comments will be an h3 |
|
49 | + if($page_owner instanceof ElggGroup){ |
|
50 | + echo '<h3 class="panel-title mrgn-bttm-md mrgn-tp-md h2">' . elgg_echo('comments') . '</h3>'; |
|
51 | + }else{ |
|
52 | + echo '<h2 class="panel-title mrgn-bttm-md mrgn-tp-md">' . elgg_echo('comments') . '</h2>'; |
|
53 | + } |
|
54 | 54 | |
55 | 55 | |
56 | - if($num_replies == 0){ |
|
57 | - echo '<div>'.elgg_echo('generic_comment:none').'</div>'; |
|
58 | - } |
|
56 | + if($num_replies == 0){ |
|
57 | + echo '<div>'.elgg_echo('generic_comment:none').'</div>'; |
|
58 | + } |
|
59 | 59 | |
60 | 60 | $content = elgg_list_entities(array( |
61 | 61 | 'type' => 'object', |
@@ -46,15 +46,15 @@ |
||
46 | 46 | |
47 | 47 | //Nick - keep the heading so users know comments are supposed to be here! |
48 | 48 | //Nick Update - if this is in a group the comments will be an h3 |
49 | - if($page_owner instanceof ElggGroup){ |
|
49 | + if ($page_owner instanceof ElggGroup) { |
|
50 | 50 | echo '<h3 class="panel-title mrgn-bttm-md mrgn-tp-md h2">' . elgg_echo('comments') . '</h3>'; |
51 | - }else{ |
|
51 | + } else { |
|
52 | 52 | echo '<h2 class="panel-title mrgn-bttm-md mrgn-tp-md">' . elgg_echo('comments') . '</h2>'; |
53 | 53 | } |
54 | 54 | |
55 | 55 | |
56 | - if($num_replies == 0){ |
|
57 | - echo '<div>'.elgg_echo('generic_comment:none').'</div>'; |
|
56 | + if ($num_replies == 0) { |
|
57 | + echo '<div>' . elgg_echo('generic_comment:none') . '</div>'; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | $content = elgg_list_entities(array( |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | //Nick Update - if this is in a group the comments will be an h3 |
49 | 49 | if($page_owner instanceof ElggGroup){ |
50 | 50 | echo '<h3 class="panel-title mrgn-bttm-md mrgn-tp-md h2">' . elgg_echo('comments') . '</h3>'; |
51 | - }else{ |
|
51 | + } else{ |
|
52 | 52 | echo '<h2 class="panel-title mrgn-bttm-md mrgn-tp-md">' . elgg_echo('comments') . '</h2>'; |
53 | 53 | } |
54 | 54 | |
@@ -69,8 +69,9 @@ discard block |
||
69 | 69 | 'url_fragment' => $attr['id'], |
70 | 70 | )); |
71 | 71 | |
72 | -if ($show_add_form) |
|
72 | +if ($show_add_form) { |
|
73 | 73 | $content .= elgg_view_form('comment/save', array(), $vars); |
74 | +} |
|
74 | 75 | |
75 | 76 | |
76 | 77 | echo elgg_format_element('div', $attr, $content); |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | |
24 | 24 | |
25 | 25 | elgg_register_menu_item('user_menu_subMenu', array( |
26 | - 'name' => 'profile_card', |
|
27 | - 'text' => elgg_view('page/elements/profile_card'), |
|
26 | + 'name' => 'profile_card', |
|
27 | + 'text' => elgg_view('page/elements/profile_card'), |
|
28 | 28 | )); |
29 | 29 | |
30 | 30 | $dropdown = elgg_view_menu('user_menu_subMenu', array('class' => 'dropdown-menu user-menu pull-right subMenu')); |
@@ -38,15 +38,15 @@ discard block |
||
38 | 38 | //admin link |
39 | 39 | //check to see if user is an admin |
40 | 40 | if(elgg_is_admin_logged_in()) { |
41 | - elgg_register_menu_item('user_menu', array( |
|
42 | - 'name' => 'Admin', |
|
43 | - 'href' => $site_url . 'admin', |
|
44 | - 'text' => '<i class="fa fa-wrench fa-lg mrgn-rght-sm"></i>' . '<span class="hidden-xs">Admin</span>', |
|
45 | - 'title' => 'Admin', |
|
46 | - 'item_class' => 'brdr-rght', |
|
47 | - 'class' => '', |
|
48 | - 'priority' => '0', |
|
49 | - )); |
|
41 | + elgg_register_menu_item('user_menu', array( |
|
42 | + 'name' => 'Admin', |
|
43 | + 'href' => $site_url . 'admin', |
|
44 | + 'text' => '<i class="fa fa-wrench fa-lg mrgn-rght-sm"></i>' . '<span class="hidden-xs">Admin</span>', |
|
45 | + 'title' => 'Admin', |
|
46 | + 'item_class' => 'brdr-rght', |
|
47 | + 'class' => '', |
|
48 | + 'priority' => '0', |
|
49 | + )); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | |
@@ -55,122 +55,122 @@ discard block |
||
55 | 55 | $breakup = explode('.', $email); |
56 | 56 | $initials = substr($breakup[0], 0, 1) . substr($breakup[1], 0, 1); |
57 | 57 | if ($user_avatar) { //show avatar if they have one |
58 | - $dropdown_avatar = '<span><img class="img-circle mrgn-rght-sm" src="'.$user_avatar.'"></span>'; |
|
58 | + $dropdown_avatar = '<span><img class="img-circle mrgn-rght-sm" src="'.$user_avatar.'"></span>'; |
|
59 | 59 | |
60 | - //EW - render to display badge instead |
|
61 | - $dropdown_avatar = elgg_view_entity_icon(elgg_get_logged_in_user_entity(), 'small', array('use_hover' => false, 'use_link' => false, 'class' => 'userMenuAvatar')); |
|
60 | + //EW - render to display badge instead |
|
61 | + $dropdown_avatar = elgg_view_entity_icon(elgg_get_logged_in_user_entity(), 'small', array('use_hover' => false, 'use_link' => false, 'class' => 'userMenuAvatar')); |
|
62 | 62 | } else { // show initials if the don't |
63 | - $dropdown_avatar = '<span class="init-badge">' . strtoupper($initials) . '</span>'; |
|
63 | + $dropdown_avatar = '<span class="init-badge">' . strtoupper($initials) . '</span>'; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | |
67 | 67 | //create user menu |
68 | 68 | elgg_register_menu_item('user_menu', array( |
69 | - 'name' => 'Profile', |
|
70 | - 'text' => $dropdown_avatar. '<span class="hidden-xs">' . $displayName . '</span><i class="fa fa-caret-down fa-lg mrgn-lft-sm"></i>' . $dropdown, |
|
71 | - 'title' => elgg_echo('userMenu:usermenuTitle'), |
|
72 | - 'item_class' => 'brdr-lft dropdown', |
|
73 | - 'data-toggle' => 'dropdown', |
|
74 | - 'class' => 'dropdown-toggle dropdownToggle dd-close', |
|
75 | - 'priority' => '3', |
|
76 | - 'aria-hidden' => 'true', |
|
77 | - 'tab-index'=>'0', //If the tab index is gone perhaps the screen reader will skip it? What about sighted people with out mouse, need to test, just an idea :3 |
|
78 | - //Google has some kind of tab loop when the the card is open, so when the user tabs they only tab through the options in the card |
|
79 | - )); |
|
69 | + 'name' => 'Profile', |
|
70 | + 'text' => $dropdown_avatar. '<span class="hidden-xs">' . $displayName . '</span><i class="fa fa-caret-down fa-lg mrgn-lft-sm"></i>' . $dropdown, |
|
71 | + 'title' => elgg_echo('userMenu:usermenuTitle'), |
|
72 | + 'item_class' => 'brdr-lft dropdown', |
|
73 | + 'data-toggle' => 'dropdown', |
|
74 | + 'class' => 'dropdown-toggle dropdownToggle dd-close', |
|
75 | + 'priority' => '3', |
|
76 | + 'aria-hidden' => 'true', |
|
77 | + 'tab-index'=>'0', //If the tab index is gone perhaps the screen reader will skip it? What about sighted people with out mouse, need to test, just an idea :3 |
|
78 | + //Google has some kind of tab loop when the the card is open, so when the user tabs they only tab through the options in the card |
|
79 | + )); |
|
80 | 80 | |
81 | 81 | |
82 | 82 | //screen reader links |
83 | 83 | elgg_register_menu_item('user_menu', array( |
84 | - 'name' => 'sr_profile', |
|
85 | - 'text' => elgg_echo('userMenu:profile'), |
|
86 | - 'href' => 'profile/'.elgg_get_logged_in_user_entity()->username, |
|
87 | - 'item_class' => 'wb-invisible sr_menu_item', |
|
88 | - 'tabindex' => '-1', |
|
84 | + 'name' => 'sr_profile', |
|
85 | + 'text' => elgg_echo('userMenu:profile'), |
|
86 | + 'href' => 'profile/'.elgg_get_logged_in_user_entity()->username, |
|
87 | + 'item_class' => 'wb-invisible sr_menu_item', |
|
88 | + 'tabindex' => '-1', |
|
89 | 89 | )); |
90 | 90 | |
91 | 91 | elgg_register_menu_item('user_menu', array( |
92 | - 'name' => 'sr_account', |
|
93 | - 'text' => elgg_echo('userMenu:account'), |
|
94 | - 'href' => 'settings/user/'.elgg_get_logged_in_user_entity()->username, |
|
95 | - 'item_class' => 'wb-invisible sr_menu_item', |
|
96 | - 'tabindex' => '-1', |
|
92 | + 'name' => 'sr_account', |
|
93 | + 'text' => elgg_echo('userMenu:account'), |
|
94 | + 'href' => 'settings/user/'.elgg_get_logged_in_user_entity()->username, |
|
95 | + 'item_class' => 'wb-invisible sr_menu_item', |
|
96 | + 'tabindex' => '-1', |
|
97 | 97 | )); |
98 | 98 | |
99 | 99 | elgg_register_menu_item('user_menu', array( |
100 | - 'name' => 'sr_logout', |
|
101 | - 'text' => elgg_echo('logout'), |
|
102 | - 'href' => 'action/logout', |
|
103 | - 'item_class' => 'wb-invisible sr_menu_item', |
|
104 | - 'tabindex' => '-1', |
|
100 | + 'name' => 'sr_logout', |
|
101 | + 'text' => elgg_echo('logout'), |
|
102 | + 'href' => 'action/logout', |
|
103 | + 'item_class' => 'wb-invisible sr_menu_item', |
|
104 | + 'tabindex' => '-1', |
|
105 | 105 | )); |
106 | 106 | |
107 | 107 | |
108 | 108 | //display new message badge on messages |
109 | 109 | if (elgg_is_active_plugin('messages')) { |
110 | - $unread = messages_count_unread_inbox(); |
|
110 | + $unread = messages_count_unread_inbox(); |
|
111 | 111 | |
112 | - $title = ' - ' . $unread . ' ' . elgg_echo('messages:unreadmessages'); |
|
112 | + $title = ' - ' . $unread . ' ' . elgg_echo('messages:unreadmessages'); |
|
113 | 113 | |
114 | - //display 9+ insted of huge numbers in notif badge |
|
115 | - if ($unread >= 10) { |
|
116 | - //$unread = '9+'; |
|
117 | - } |
|
114 | + //display 9+ insted of huge numbers in notif badge |
|
115 | + if ($unread >= 10) { |
|
116 | + //$unread = '9+'; |
|
117 | + } |
|
118 | 118 | |
119 | - $msgbadge = "<span aria-hidden='true' class='notif-badge'>" . $unread . "</span>"; |
|
119 | + $msgbadge = "<span aria-hidden='true' class='notif-badge'>" . $unread . "</span>"; |
|
120 | 120 | |
121 | - if ($unread == 0) { |
|
122 | - $msgbadge = ''; |
|
123 | - $title = ''; |
|
124 | - } |
|
121 | + if ($unread == 0) { |
|
122 | + $msgbadge = ''; |
|
123 | + $title = ''; |
|
124 | + } |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | // messages inbox menu item |
128 | 128 | //Nick - Removed the href and created my own in the text to hold hidden messages dropdown |
129 | 129 | elgg_register_menu_item('user_menu', array( |
130 | - 'name' => 'messages', |
|
131 | - 'text' => '<i class="fa fa-envelope mrgn-rght-sm mrgn-tp-sm fa-lg"></i><span class="hidden-xs" aria-hidden="true">' . elgg_echo('messages') . '</span>' . $msgbadge .'<span class="wb-inv">'.elgg_echo('userMenu:messages') . $title.' </span></a>'.$focus_dd .$ajax_dd_messages, |
|
132 | - 'title' => elgg_echo('userMenu:messages') . $title, |
|
133 | - 'item_class' => 'brdr-lft messagesLabel close-msg-dd', |
|
134 | - 'data-toggle' => '', |
|
135 | - 'id'=>'messagesLabel', |
|
136 | - 'class' => '', |
|
137 | - 'data-dd-type'=>'msg_dd', |
|
138 | - 'priority' => '2', |
|
139 | - 'href' => elgg_get_site_url().'messages/inbox/' . $user, |
|
130 | + 'name' => 'messages', |
|
131 | + 'text' => '<i class="fa fa-envelope mrgn-rght-sm mrgn-tp-sm fa-lg"></i><span class="hidden-xs" aria-hidden="true">' . elgg_echo('messages') . '</span>' . $msgbadge .'<span class="wb-inv">'.elgg_echo('userMenu:messages') . $title.' </span></a>'.$focus_dd .$ajax_dd_messages, |
|
132 | + 'title' => elgg_echo('userMenu:messages') . $title, |
|
133 | + 'item_class' => 'brdr-lft messagesLabel close-msg-dd', |
|
134 | + 'data-toggle' => '', |
|
135 | + 'id'=>'messagesLabel', |
|
136 | + 'class' => '', |
|
137 | + 'data-dd-type'=>'msg_dd', |
|
138 | + 'priority' => '2', |
|
139 | + 'href' => elgg_get_site_url().'messages/inbox/' . $user, |
|
140 | 140 | |
141 | - )); |
|
141 | + )); |
|
142 | 142 | |
143 | 143 | |
144 | 144 | //display new message badge on messages |
145 | 145 | if (elgg_is_active_plugin('messages')) { |
146 | - $unread = messages_count_unread_notifications(); |
|
146 | + $unread = messages_count_unread_notifications(); |
|
147 | 147 | |
148 | - $title = ' - ' . $unread . ' ' . elgg_echo('messages:unreadmessages'); |
|
148 | + $title = ' - ' . $unread . ' ' . elgg_echo('messages:unreadmessages'); |
|
149 | 149 | |
150 | - //display 9+ insted of huge numbers in notif badge |
|
151 | - if ($unread >= 10) { |
|
152 | - //$unread = '9+'; |
|
153 | - } |
|
150 | + //display 9+ insted of huge numbers in notif badge |
|
151 | + if ($unread >= 10) { |
|
152 | + //$unread = '9+'; |
|
153 | + } |
|
154 | 154 | |
155 | - $msgbadge = "<span aria-hidden='true' class='notif-badge'>" . $unread . "</span>"; |
|
155 | + $msgbadge = "<span aria-hidden='true' class='notif-badge'>" . $unread . "</span>"; |
|
156 | 156 | |
157 | - if ($unread == 0) { |
|
158 | - $msgbadge = ''; |
|
159 | - $title = ''; |
|
160 | - } |
|
157 | + if ($unread == 0) { |
|
158 | + $msgbadge = ''; |
|
159 | + $title = ''; |
|
160 | + } |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | // notifications inbox menu item |
164 | 164 | elgg_register_menu_item('user_menu', array( |
165 | - 'name' => 'notifications', |
|
166 | - 'text' =>'<i class="fa fa-bell mrgn-rght-sm mrgn-tp-sm fa-lg"></i><span class="hidden-xs" aria-hidden="true">' . elgg_echo('notifications:subscriptions:changesettings') . '</span>' . $msgbadge .'<span class="wb-inv">'.elgg_echo('userMenu:notifications') . $title.' </span></a>'.$focus_dd.'<div>'.$ajax_dd_notification.'</div>', |
|
167 | - 'title' => elgg_echo('userMenu:notifications') . $title, |
|
168 | - 'item_class' => 'brdr-lft messagesLabel close-notif-dd', |
|
169 | - 'class' => '', |
|
170 | - 'priority' => '2', |
|
171 | - 'data-dd-type'=>'notif_dd', |
|
172 | - 'href' => elgg_get_site_url()."messages/notifications/" . $user, |
|
173 | - )); |
|
165 | + 'name' => 'notifications', |
|
166 | + 'text' =>'<i class="fa fa-bell mrgn-rght-sm mrgn-tp-sm fa-lg"></i><span class="hidden-xs" aria-hidden="true">' . elgg_echo('notifications:subscriptions:changesettings') . '</span>' . $msgbadge .'<span class="wb-inv">'.elgg_echo('userMenu:notifications') . $title.' </span></a>'.$focus_dd.'<div>'.$ajax_dd_notification.'</div>', |
|
167 | + 'title' => elgg_echo('userMenu:notifications') . $title, |
|
168 | + 'item_class' => 'brdr-lft messagesLabel close-notif-dd', |
|
169 | + 'class' => '', |
|
170 | + 'priority' => '2', |
|
171 | + 'data-dd-type'=>'notif_dd', |
|
172 | + 'href' => elgg_get_site_url()."messages/notifications/" . $user, |
|
173 | + )); |
|
174 | 174 | |
175 | 175 | |
176 | 176 | /* |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | // cyu - remove the user menu when the gsa hits the page |
183 | 183 | if (elgg_is_active_plugin('gc_fedsearch_gsa') && ((!$gsa_usertest) && strcmp($gsa_agentstring,strtolower($_SERVER['HTTP_USER_AGENT'])) == 0) || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'gsa-crawler') !== false ) |
184 | 184 | { |
185 | - // do nothing |
|
185 | + // do nothing |
|
186 | 186 | } else { |
187 | 187 | echo elgg_view_menu('user_menu', array('sort_by' => 'priority', 'id' => 'userMenu', 'class' => 'list-inline visited-link')); |
188 | 188 | } |
@@ -29,15 +29,15 @@ discard block |
||
29 | 29 | |
30 | 30 | $dropdown = elgg_view_menu('user_menu_subMenu', array('class' => 'dropdown-menu user-menu pull-right subMenu')); |
31 | 31 | |
32 | -$ajax_dd_messages = '<div aria-hidden="true" id="msg_dd" class="dropdown-menu user-menu-message-dd message-dd-position subMenu">'. elgg_view('page/elements/messages_dd') . '</div>'; |
|
32 | +$ajax_dd_messages = '<div aria-hidden="true" id="msg_dd" class="dropdown-menu user-menu-message-dd message-dd-position subMenu">' . elgg_view('page/elements/messages_dd') . '</div>'; |
|
33 | 33 | |
34 | -$ajax_dd_notification = '<div aria-hidden="true" id="notif_dd" class="dropdown-menu user-menu-message-dd notif-dd-position subMenu">'. elgg_view('page/elements/notifications_dd') . '</div>'; |
|
34 | +$ajax_dd_notification = '<div aria-hidden="true" id="notif_dd" class="dropdown-menu user-menu-message-dd notif-dd-position subMenu">' . elgg_view('page/elements/notifications_dd') . '</div>'; |
|
35 | 35 | |
36 | -$focus_dd = '<a href="#" class="focus_dd_link" style="display:none;"><i class="fa fa-caret-down" aria-hidden="true"></i><span class="wb-inv">'.elgg_echo('wet:dd:expand').'</span></a>'; |
|
36 | +$focus_dd = '<a href="#" class="focus_dd_link" style="display:none;"><i class="fa fa-caret-down" aria-hidden="true"></i><span class="wb-inv">' . elgg_echo('wet:dd:expand') . '</span></a>'; |
|
37 | 37 | |
38 | 38 | //admin link |
39 | 39 | //check to see if user is an admin |
40 | -if(elgg_is_admin_logged_in()) { |
|
40 | +if (elgg_is_admin_logged_in()) { |
|
41 | 41 | elgg_register_menu_item('user_menu', array( |
42 | 42 | 'name' => 'Admin', |
43 | 43 | 'href' => $site_url . 'admin', |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $breakup = explode('.', $email); |
56 | 56 | $initials = substr($breakup[0], 0, 1) . substr($breakup[1], 0, 1); |
57 | 57 | if ($user_avatar) { //show avatar if they have one |
58 | - $dropdown_avatar = '<span><img class="img-circle mrgn-rght-sm" src="'.$user_avatar.'"></span>'; |
|
58 | + $dropdown_avatar = '<span><img class="img-circle mrgn-rght-sm" src="' . $user_avatar . '"></span>'; |
|
59 | 59 | |
60 | 60 | //EW - render to display badge instead |
61 | 61 | $dropdown_avatar = elgg_view_entity_icon(elgg_get_logged_in_user_entity(), 'small', array('use_hover' => false, 'use_link' => false, 'class' => 'userMenuAvatar')); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | //create user menu |
68 | 68 | elgg_register_menu_item('user_menu', array( |
69 | 69 | 'name' => 'Profile', |
70 | - 'text' => $dropdown_avatar. '<span class="hidden-xs">' . $displayName . '</span><i class="fa fa-caret-down fa-lg mrgn-lft-sm"></i>' . $dropdown, |
|
70 | + 'text' => $dropdown_avatar . '<span class="hidden-xs">' . $displayName . '</span><i class="fa fa-caret-down fa-lg mrgn-lft-sm"></i>' . $dropdown, |
|
71 | 71 | 'title' => elgg_echo('userMenu:usermenuTitle'), |
72 | 72 | 'item_class' => 'brdr-lft dropdown', |
73 | 73 | 'data-toggle' => 'dropdown', |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | elgg_register_menu_item('user_menu', array( |
84 | 84 | 'name' => 'sr_profile', |
85 | 85 | 'text' => elgg_echo('userMenu:profile'), |
86 | - 'href' => 'profile/'.elgg_get_logged_in_user_entity()->username, |
|
86 | + 'href' => 'profile/' . elgg_get_logged_in_user_entity()->username, |
|
87 | 87 | 'item_class' => 'wb-invisible sr_menu_item', |
88 | 88 | 'tabindex' => '-1', |
89 | 89 | )); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | elgg_register_menu_item('user_menu', array( |
92 | 92 | 'name' => 'sr_account', |
93 | 93 | 'text' => elgg_echo('userMenu:account'), |
94 | - 'href' => 'settings/user/'.elgg_get_logged_in_user_entity()->username, |
|
94 | + 'href' => 'settings/user/' . elgg_get_logged_in_user_entity()->username, |
|
95 | 95 | 'item_class' => 'wb-invisible sr_menu_item', |
96 | 96 | 'tabindex' => '-1', |
97 | 97 | )); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | //Nick - Removed the href and created my own in the text to hold hidden messages dropdown |
129 | 129 | elgg_register_menu_item('user_menu', array( |
130 | 130 | 'name' => 'messages', |
131 | - 'text' => '<i class="fa fa-envelope mrgn-rght-sm mrgn-tp-sm fa-lg"></i><span class="hidden-xs" aria-hidden="true">' . elgg_echo('messages') . '</span>' . $msgbadge .'<span class="wb-inv">'.elgg_echo('userMenu:messages') . $title.' </span></a>'.$focus_dd .$ajax_dd_messages, |
|
131 | + 'text' => '<i class="fa fa-envelope mrgn-rght-sm mrgn-tp-sm fa-lg"></i><span class="hidden-xs" aria-hidden="true">' . elgg_echo('messages') . '</span>' . $msgbadge . '<span class="wb-inv">' . elgg_echo('userMenu:messages') . $title . ' </span></a>' . $focus_dd . $ajax_dd_messages, |
|
132 | 132 | 'title' => elgg_echo('userMenu:messages') . $title, |
133 | 133 | 'item_class' => 'brdr-lft messagesLabel close-msg-dd', |
134 | 134 | 'data-toggle' => '', |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | 'class' => '', |
137 | 137 | 'data-dd-type'=>'msg_dd', |
138 | 138 | 'priority' => '2', |
139 | - 'href' => elgg_get_site_url().'messages/inbox/' . $user, |
|
139 | + 'href' => elgg_get_site_url() . 'messages/inbox/' . $user, |
|
140 | 140 | |
141 | 141 | )); |
142 | 142 | |
@@ -163,13 +163,13 @@ discard block |
||
163 | 163 | // notifications inbox menu item |
164 | 164 | elgg_register_menu_item('user_menu', array( |
165 | 165 | 'name' => 'notifications', |
166 | - 'text' =>'<i class="fa fa-bell mrgn-rght-sm mrgn-tp-sm fa-lg"></i><span class="hidden-xs" aria-hidden="true">' . elgg_echo('notifications:subscriptions:changesettings') . '</span>' . $msgbadge .'<span class="wb-inv">'.elgg_echo('userMenu:notifications') . $title.' </span></a>'.$focus_dd.'<div>'.$ajax_dd_notification.'</div>', |
|
166 | + 'text' =>'<i class="fa fa-bell mrgn-rght-sm mrgn-tp-sm fa-lg"></i><span class="hidden-xs" aria-hidden="true">' . elgg_echo('notifications:subscriptions:changesettings') . '</span>' . $msgbadge . '<span class="wb-inv">' . elgg_echo('userMenu:notifications') . $title . ' </span></a>' . $focus_dd . '<div>' . $ajax_dd_notification . '</div>', |
|
167 | 167 | 'title' => elgg_echo('userMenu:notifications') . $title, |
168 | 168 | 'item_class' => 'brdr-lft messagesLabel close-notif-dd', |
169 | 169 | 'class' => '', |
170 | 170 | 'priority' => '2', |
171 | 171 | 'data-dd-type'=>'notif_dd', |
172 | - 'href' => elgg_get_site_url()."messages/notifications/" . $user, |
|
172 | + 'href' => elgg_get_site_url() . "messages/notifications/" . $user, |
|
173 | 173 | )); |
174 | 174 | |
175 | 175 | |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | */ |
181 | 181 | |
182 | 182 | // cyu - remove the user menu when the gsa hits the page |
183 | -if (elgg_is_active_plugin('gc_fedsearch_gsa') && ((!$gsa_usertest) && strcmp($gsa_agentstring,strtolower($_SERVER['HTTP_USER_AGENT'])) == 0) || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'gsa-crawler') !== false ) |
|
183 | +if (elgg_is_active_plugin('gc_fedsearch_gsa') && ((!$gsa_usertest) && strcmp($gsa_agentstring, strtolower($_SERVER['HTTP_USER_AGENT'])) == 0) || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'gsa-crawler') !== false) |
|
184 | 184 | { |
185 | 185 | // do nothing |
186 | 186 | } else { |
@@ -27,27 +27,27 @@ discard block |
||
27 | 27 | if ($coll->owner_guid == elgg_get_logged_in_user_guid()) { |
28 | 28 | echo "<div class=\"friends_collections_controls\">"; |
29 | 29 | |
30 | - echo elgg_view('output/url', array( |
|
31 | - 'href' => 'collections/edit/' . elgg_get_logged_in_user_entity()->guid . '?collection=' . $coll->id, |
|
32 | - 'text' => '<i class="fa fa-edit fa-2x icon-unsel"><span class="wb-inv">' . elgg_echo('friends:collections:edit') . ' ' . $coll->name . '</span></i>', |
|
33 | - 'title' => elgg_echo('friends:collections:edit') . ': ' . $coll->name, |
|
34 | - 'class' => 'mrgn-rght-sm mrgn-tp-sm' |
|
35 | - )); |
|
30 | + echo elgg_view('output/url', array( |
|
31 | + 'href' => 'collections/edit/' . elgg_get_logged_in_user_entity()->guid . '?collection=' . $coll->id, |
|
32 | + 'text' => '<i class="fa fa-edit fa-2x icon-unsel"><span class="wb-inv">' . elgg_echo('friends:collections:edit') . ' ' . $coll->name . '</span></i>', |
|
33 | + 'title' => elgg_echo('friends:collections:edit') . ': ' . $coll->name, |
|
34 | + 'class' => 'mrgn-rght-sm mrgn-tp-sm' |
|
35 | + )); |
|
36 | 36 | |
37 | - echo elgg_view('output/url', array( |
|
37 | + echo elgg_view('output/url', array( |
|
38 | 38 | 'href' => 'action/friends/collections/delete?collection=' . $coll->id, |
39 | 39 | 'class' => 'delete_collection mrgn-rght-sm mrgn-tp-sm', |
40 | 40 | 'text' => '<span class="wb-invisible">' . elgg_echo("delete"). ' ' . $coll->name . '</span><i class="fa fa-trash-o fa-2x icon-unsel"></i>', |
41 | - 'title' => elgg_echo('delete') . ' ' . $coll->name, |
|
41 | + 'title' => elgg_echo('delete') . ' ' . $coll->name, |
|
42 | 42 | 'encode_text' => false, |
43 | 43 | 'confirm' => true, |
44 | 44 | )); |
45 | 45 | |
46 | - echo elgg_view('output/url', array( |
|
46 | + echo elgg_view('output/url', array( |
|
47 | 47 | 'href' => elgg_get_site_url() . 'messages/compose?collection=' . $coll->id, |
48 | 48 | 'class' => 'delete_collection', |
49 | 49 | 'text' => '<span class="wb-invisible">' . elgg_echo('collections_circle_send') . ' ' . $coll->name . '</span><i class="fa fa-envelope-o fa-2x icon-unsel"></i>', |
50 | - 'title' => elgg_echo('collections_circle_send') . ' ' . $coll->name, |
|
50 | + 'title' => elgg_echo('collections_circle_send') . ' ' . $coll->name, |
|
51 | 51 | 'encode_text' => false, |
52 | 52 | 'confirm' => true, |
53 | 53 | )); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | // individual collection panels |
60 | 60 | $friends = $vars['collection']->entities; |
61 | 61 | if ($friends) { |
62 | - /* |
|
62 | + /* |
|
63 | 63 | $content = elgg_view('core/friends/collectiontabs', array( |
64 | 64 | 'owner' => elgg_get_logged_in_user_entity(), |
65 | 65 | 'collection' => $vars['collection'], |
@@ -37,7 +37,7 @@ |
||
37 | 37 | echo elgg_view('output/url', array( |
38 | 38 | 'href' => 'action/friends/collections/delete?collection=' . $coll->id, |
39 | 39 | 'class' => 'delete_collection mrgn-rght-sm mrgn-tp-sm', |
40 | - 'text' => '<span class="wb-invisible">' . elgg_echo("delete"). ' ' . $coll->name . '</span><i class="fa fa-trash-o fa-2x icon-unsel"></i>', |
|
40 | + 'text' => '<span class="wb-invisible">' . elgg_echo("delete") . ' ' . $coll->name . '</span><i class="fa fa-trash-o fa-2x icon-unsel"></i>', |
|
41 | 41 | 'title' => elgg_echo('delete') . ' ' . $coll->name, |
42 | 42 | 'encode_text' => false, |
43 | 43 | 'confirm' => true, |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /*********************************************************************** |
|
2 | + /*********************************************************************** |
|
3 | 3 | * MODIFICATION LOG |
4 | 4 | * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
5 | 5 | * |
@@ -11,70 +11,70 @@ discard block |
||
11 | 11 | |
12 | 12 | |
13 | 13 | try{ |
14 | - $user_guid = elgg_get_logged_in_user_guid(); |
|
15 | - $site_url = elgg_get_site_url(); |
|
16 | - mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); |
|
14 | + $user_guid = elgg_get_logged_in_user_guid(); |
|
15 | + $site_url = elgg_get_site_url(); |
|
16 | + mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); |
|
17 | 17 | |
18 | - //connect to database , "3306" |
|
19 | - $db_config = new \Elgg\Database\Config($CONFIG); |
|
20 | - if ($db_config->isDatabaseSplit()) { |
|
21 | - $read_settings = $db_config->getConnectionConfig(\Elgg\Database\Config::READ); |
|
22 | - } else { |
|
23 | - $read_settings = $db_config->getConnectionConfig(\Elgg\Database\Config::READ_WRITE); |
|
24 | - } |
|
25 | - $connection = mysqli_connect($read_settings["host"], $read_settings["user"], $read_settings["password"], $read_settings["database"]); |
|
26 | - $result = mysqli_query($connection, "call GET_suggestedFriends({$user_guid}, 4);"); |
|
18 | + //connect to database , "3306" |
|
19 | + $db_config = new \Elgg\Database\Config($CONFIG); |
|
20 | + if ($db_config->isDatabaseSplit()) { |
|
21 | + $read_settings = $db_config->getConnectionConfig(\Elgg\Database\Config::READ); |
|
22 | + } else { |
|
23 | + $read_settings = $db_config->getConnectionConfig(\Elgg\Database\Config::READ_WRITE); |
|
24 | + } |
|
25 | + $connection = mysqli_connect($read_settings["host"], $read_settings["user"], $read_settings["password"], $read_settings["database"]); |
|
26 | + $result = mysqli_query($connection, "call GET_suggestedFriends({$user_guid}, 4);"); |
|
27 | 27 | |
28 | - /* |
|
28 | + /* |
|
29 | 29 | * echo '<div class="panel panel-custom elgg-module-aside"><div class="panel-heading"><h2 class="">'.elgg_echo('ps:profilestrength').'</h2></div><div class="panel-body clearfix">'.elgg_view('widgets/profile_completness/content').'</div></div>'; |
30 | 30 | * |
31 | 31 | * */ |
32 | 32 | |
33 | - if(intval($result->num_rows)>0){ |
|
34 | - $count=0; |
|
35 | - $htmloutput='<div class="panel clearfix panel-custom elgg-module-aside">'; |
|
33 | + if(intval($result->num_rows)>0){ |
|
34 | + $count=0; |
|
35 | + $htmloutput='<div class="panel clearfix panel-custom elgg-module-aside">'; |
|
36 | 36 | |
37 | - $htmloutput=$htmloutput.'<div class="panel-heading">'; |
|
38 | - $htmloutput=$htmloutput.'<h3 class="panel-title">'.elgg_echo('sf:suggcolleagues').'</h3>'; |
|
39 | - $htmloutput=$htmloutput.'</div><div class="panel-body clearfix">'; |
|
40 | - while ($row = $result->fetch_assoc()) { |
|
41 | - if($count==0 || $count==2) |
|
42 | - { |
|
43 | - $htmloutput=$htmloutput.'<div class="row mrgn-tp-sm">'; |
|
44 | - } |
|
45 | - $userGUID=$row['guid_two']; |
|
37 | + $htmloutput=$htmloutput.'<div class="panel-heading">'; |
|
38 | + $htmloutput=$htmloutput.'<h3 class="panel-title">'.elgg_echo('sf:suggcolleagues').'</h3>'; |
|
39 | + $htmloutput=$htmloutput.'</div><div class="panel-body clearfix">'; |
|
40 | + while ($row = $result->fetch_assoc()) { |
|
41 | + if($count==0 || $count==2) |
|
42 | + { |
|
43 | + $htmloutput=$htmloutput.'<div class="row mrgn-tp-sm">'; |
|
44 | + } |
|
45 | + $userGUID=$row['guid_two']; |
|
46 | 46 | if (elgg_get_user_validation_status($userGUID)){ |
47 | - $job=get_user($userGUID)->job; |
|
48 | - $htmloutput=$htmloutput.'<div class="col-xs-6 text-center">'; |
|
49 | - $htmloutput .= '<a href="'. $site_url. 'profile/'. get_user($row['guid_two'])->username.'" class="">'; |
|
50 | - $htmloutput=$htmloutput.'<img src="'.get_user($row['guid_two'])->getIcon('small') . '" class="avatar-profile-page img-responsive center-block img-circle " alt="'.elgg_echo('sf:alttext').' '.get_user($row['guid_two'])->getDisplayName().'">'; |
|
51 | - $htmloutput=$htmloutput.'<h4 class="h4 mrgn-tp-sm mrgn-bttm-0"><span class="text-primary">'.get_user($row['guid_two'])->getDisplayName().'</span></h4></a>'; |
|
52 | - $htmloutput=$htmloutput.'<p class="small mrgn-tp-0">'.$job.'</p>'; |
|
53 | - $htmloutput=$htmloutput.'<a href="'.elgg_add_action_tokens_to_url("action/friends/add?friend={$userGUID}"). '" class="btn btn-primary btn-sm mrgn-tp-sm">'.elgg_echo('friend:add').'</a>'; |
|
54 | - $htmloutput=$htmloutput.'</div>'; |
|
55 | - if($count==1 || $count==3) |
|
56 | - { |
|
57 | - $htmloutput=$htmloutput.'</div>'; |
|
58 | - } |
|
59 | - $count++; |
|
60 | - // $htmloutput=$htmloutput. $row['guid_two'].'-'; |
|
61 | - } |
|
62 | - } |
|
63 | - $htmloutput=$htmloutput.'</div></div>'; |
|
64 | - $htmloutput=$htmloutput.'<div class="clearfix"></div>'; |
|
65 | - //$htmloutput=$htmloutput.'</div>'; |
|
66 | - echo $htmloutput; |
|
67 | - } |
|
68 | - $connection->close(); |
|
47 | + $job=get_user($userGUID)->job; |
|
48 | + $htmloutput=$htmloutput.'<div class="col-xs-6 text-center">'; |
|
49 | + $htmloutput .= '<a href="'. $site_url. 'profile/'. get_user($row['guid_two'])->username.'" class="">'; |
|
50 | + $htmloutput=$htmloutput.'<img src="'.get_user($row['guid_two'])->getIcon('small') . '" class="avatar-profile-page img-responsive center-block img-circle " alt="'.elgg_echo('sf:alttext').' '.get_user($row['guid_two'])->getDisplayName().'">'; |
|
51 | + $htmloutput=$htmloutput.'<h4 class="h4 mrgn-tp-sm mrgn-bttm-0"><span class="text-primary">'.get_user($row['guid_two'])->getDisplayName().'</span></h4></a>'; |
|
52 | + $htmloutput=$htmloutput.'<p class="small mrgn-tp-0">'.$job.'</p>'; |
|
53 | + $htmloutput=$htmloutput.'<a href="'.elgg_add_action_tokens_to_url("action/friends/add?friend={$userGUID}"). '" class="btn btn-primary btn-sm mrgn-tp-sm">'.elgg_echo('friend:add').'</a>'; |
|
54 | + $htmloutput=$htmloutput.'</div>'; |
|
55 | + if($count==1 || $count==3) |
|
56 | + { |
|
57 | + $htmloutput=$htmloutput.'</div>'; |
|
58 | + } |
|
59 | + $count++; |
|
60 | + // $htmloutput=$htmloutput. $row['guid_two'].'-'; |
|
61 | + } |
|
62 | + } |
|
63 | + $htmloutput=$htmloutput.'</div></div>'; |
|
64 | + $htmloutput=$htmloutput.'<div class="clearfix"></div>'; |
|
65 | + //$htmloutput=$htmloutput.'</div>'; |
|
66 | + echo $htmloutput; |
|
67 | + } |
|
68 | + $connection->close(); |
|
69 | 69 | } |
70 | 70 | catch (Exception $e) |
71 | 71 | { |
72 | - $errMess=$e->getMessage(); |
|
73 | - $errStack=$e->getTraceAsString(); |
|
74 | - $errType=$e->getCode(); |
|
75 | - gc_err_logging($errMess,$errStack,'Suggested Friends Widget',$errType); |
|
72 | + $errMess=$e->getMessage(); |
|
73 | + $errStack=$e->getTraceAsString(); |
|
74 | + $errType=$e->getCode(); |
|
75 | + gc_err_logging($errMess,$errStack,'Suggested Friends Widget',$errType); |
|
76 | 76 | |
77 | - $connection->close(); |
|
78 | - echo "<div class='alert alert-danger'><h3>Oops!</h3>".elgg_echo('ps:psErr')."</div>"; |
|
77 | + $connection->close(); |
|
78 | + echo "<div class='alert alert-danger'><h3>Oops!</h3>".elgg_echo('ps:psErr')."</div>"; |
|
79 | 79 | } |
80 | 80 | ?> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | ***********************************************************************/ |
11 | 11 | |
12 | 12 | |
13 | -try{ |
|
13 | +try { |
|
14 | 14 | $user_guid = elgg_get_logged_in_user_guid(); |
15 | 15 | $site_url = elgg_get_site_url(); |
16 | 16 | mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); |
@@ -30,38 +30,38 @@ discard block |
||
30 | 30 | * |
31 | 31 | * */ |
32 | 32 | |
33 | - if(intval($result->num_rows)>0){ |
|
34 | - $count=0; |
|
35 | - $htmloutput='<div class="panel clearfix panel-custom elgg-module-aside">'; |
|
33 | + if (intval($result->num_rows) > 0) { |
|
34 | + $count = 0; |
|
35 | + $htmloutput = '<div class="panel clearfix panel-custom elgg-module-aside">'; |
|
36 | 36 | |
37 | - $htmloutput=$htmloutput.'<div class="panel-heading">'; |
|
38 | - $htmloutput=$htmloutput.'<h3 class="panel-title">'.elgg_echo('sf:suggcolleagues').'</h3>'; |
|
39 | - $htmloutput=$htmloutput.'</div><div class="panel-body clearfix">'; |
|
37 | + $htmloutput = $htmloutput . '<div class="panel-heading">'; |
|
38 | + $htmloutput = $htmloutput . '<h3 class="panel-title">' . elgg_echo('sf:suggcolleagues') . '</h3>'; |
|
39 | + $htmloutput = $htmloutput . '</div><div class="panel-body clearfix">'; |
|
40 | 40 | while ($row = $result->fetch_assoc()) { |
41 | - if($count==0 || $count==2) |
|
41 | + if ($count == 0 || $count == 2) |
|
42 | 42 | { |
43 | - $htmloutput=$htmloutput.'<div class="row mrgn-tp-sm">'; |
|
43 | + $htmloutput = $htmloutput . '<div class="row mrgn-tp-sm">'; |
|
44 | 44 | } |
45 | - $userGUID=$row['guid_two']; |
|
46 | - if (elgg_get_user_validation_status($userGUID)){ |
|
47 | - $job=get_user($userGUID)->job; |
|
48 | - $htmloutput=$htmloutput.'<div class="col-xs-6 text-center">'; |
|
49 | - $htmloutput .= '<a href="'. $site_url. 'profile/'. get_user($row['guid_two'])->username.'" class="">'; |
|
50 | - $htmloutput=$htmloutput.'<img src="'.get_user($row['guid_two'])->getIcon('small') . '" class="avatar-profile-page img-responsive center-block img-circle " alt="'.elgg_echo('sf:alttext').' '.get_user($row['guid_two'])->getDisplayName().'">'; |
|
51 | - $htmloutput=$htmloutput.'<h4 class="h4 mrgn-tp-sm mrgn-bttm-0"><span class="text-primary">'.get_user($row['guid_two'])->getDisplayName().'</span></h4></a>'; |
|
52 | - $htmloutput=$htmloutput.'<p class="small mrgn-tp-0">'.$job.'</p>'; |
|
53 | - $htmloutput=$htmloutput.'<a href="'.elgg_add_action_tokens_to_url("action/friends/add?friend={$userGUID}"). '" class="btn btn-primary btn-sm mrgn-tp-sm">'.elgg_echo('friend:add').'</a>'; |
|
54 | - $htmloutput=$htmloutput.'</div>'; |
|
55 | - if($count==1 || $count==3) |
|
45 | + $userGUID = $row['guid_two']; |
|
46 | + if (elgg_get_user_validation_status($userGUID)) { |
|
47 | + $job = get_user($userGUID)->job; |
|
48 | + $htmloutput = $htmloutput . '<div class="col-xs-6 text-center">'; |
|
49 | + $htmloutput .= '<a href="' . $site_url . 'profile/' . get_user($row['guid_two'])->username . '" class="">'; |
|
50 | + $htmloutput = $htmloutput . '<img src="' . get_user($row['guid_two'])->getIcon('small') . '" class="avatar-profile-page img-responsive center-block img-circle " alt="' . elgg_echo('sf:alttext') . ' ' . get_user($row['guid_two'])->getDisplayName() . '">'; |
|
51 | + $htmloutput = $htmloutput . '<h4 class="h4 mrgn-tp-sm mrgn-bttm-0"><span class="text-primary">' . get_user($row['guid_two'])->getDisplayName() . '</span></h4></a>'; |
|
52 | + $htmloutput = $htmloutput . '<p class="small mrgn-tp-0">' . $job . '</p>'; |
|
53 | + $htmloutput = $htmloutput . '<a href="' . elgg_add_action_tokens_to_url("action/friends/add?friend={$userGUID}") . '" class="btn btn-primary btn-sm mrgn-tp-sm">' . elgg_echo('friend:add') . '</a>'; |
|
54 | + $htmloutput = $htmloutput . '</div>'; |
|
55 | + if ($count == 1 || $count == 3) |
|
56 | 56 | { |
57 | - $htmloutput=$htmloutput.'</div>'; |
|
57 | + $htmloutput = $htmloutput . '</div>'; |
|
58 | 58 | } |
59 | 59 | $count++; |
60 | 60 | // $htmloutput=$htmloutput. $row['guid_two'].'-'; |
61 | 61 | } |
62 | 62 | } |
63 | - $htmloutput=$htmloutput.'</div></div>'; |
|
64 | - $htmloutput=$htmloutput.'<div class="clearfix"></div>'; |
|
63 | + $htmloutput = $htmloutput . '</div></div>'; |
|
64 | + $htmloutput = $htmloutput . '<div class="clearfix"></div>'; |
|
65 | 65 | //$htmloutput=$htmloutput.'</div>'; |
66 | 66 | echo $htmloutput; |
67 | 67 | } |
@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | } |
70 | 70 | catch (Exception $e) |
71 | 71 | { |
72 | - $errMess=$e->getMessage(); |
|
73 | - $errStack=$e->getTraceAsString(); |
|
74 | - $errType=$e->getCode(); |
|
75 | - gc_err_logging($errMess,$errStack,'Suggested Friends Widget',$errType); |
|
72 | + $errMess = $e->getMessage(); |
|
73 | + $errStack = $e->getTraceAsString(); |
|
74 | + $errType = $e->getCode(); |
|
75 | + gc_err_logging($errMess, $errStack, 'Suggested Friends Widget', $errType); |
|
76 | 76 | |
77 | 77 | $connection->close(); |
78 | - echo "<div class='alert alert-danger'><h3>Oops!</h3>".elgg_echo('ps:psErr')."</div>"; |
|
78 | + echo "<div class='alert alert-danger'><h3>Oops!</h3>" . elgg_echo('ps:psErr') . "</div>"; |
|
79 | 79 | } |
80 | 80 | ?> |
@@ -66,8 +66,7 @@ |
||
66 | 66 | echo $htmloutput; |
67 | 67 | } |
68 | 68 | $connection->close(); |
69 | -} |
|
70 | -catch (Exception $e) |
|
69 | +} catch (Exception $e) |
|
71 | 70 | { |
72 | 71 | $errMess=$e->getMessage(); |
73 | 72 | $errStack=$e->getTraceAsString(); |