aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/groups/start.php2
-rw-r--r--mod/groups/views/default/groups/icon.php10
-rw-r--r--mod/profile/views/default/profile/icon.php10
3 files changed, 20 insertions, 2 deletions
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 38d1cc7d7..c23e749d9 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -59,6 +59,8 @@
// Add some widgets
add_widget_type('group_members_widget',elgg_echo('groups:widgets:members:title'), elgg_echo('groups:widgets:members:description'), 'groups');
add_widget_type('group_entities_widget',elgg_echo('groups:widgets:entities:title'), elgg_echo('groups:widgets:entities:description'), 'groups');
+
+ extend_view('profile/icon','groups/icon');
// For now, we'll hard code the groups profile items as follows:
// TODO make this user configurable
diff --git a/mod/groups/views/default/groups/icon.php b/mod/groups/views/default/groups/icon.php
index 5e8729942..e3a342e4b 100644
--- a/mod/groups/views/default/groups/icon.php
+++ b/mod/groups/views/default/groups/icon.php
@@ -14,6 +14,8 @@
*/
$group = $vars['entity'];
+
+ if ($group instanceof ElggGroup) {
// Get size
if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar')))
@@ -37,4 +39,10 @@
<div class="groupicon">
<a href="<?php echo $vars['entity']->getURL(); ?>" class="icon" ><img src="<?php echo $vars['url']; ?>mod/groups/graphics/icon.php?group_guid=<?php echo $group->getGUID(); ?>&size=<?php echo $vars['size']; ?>" border="0" <?php echo $align; ?> title="<?php echo $name; ?>" <?php echo $vars['js']; ?> /></a>
-</div> \ No newline at end of file
+</div>
+
+<?php
+
+ }
+
+?> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php
index c3a8b13c9..5e0b04856 100644
--- a/mod/profile/views/default/profile/icon.php
+++ b/mod/profile/views/default/profile/icon.php
@@ -17,6 +17,8 @@
if (empty($vars['entity']))
$vars['entity'] = $vars['user'];
+ if ($vars['entity'] instanceof ElggUser) {
+
$name = htmlentities($vars['entity']->name);
$username = $vars['entity']->username;
@@ -65,4 +67,10 @@
</div>
<a href="<?php echo $vars['entity']->getURL(); ?>" class="icon" ><img src="<?php echo $vars['url']; ?>pg/icon/<?php echo $username; ?>/<?php echo $vars['size']; ?>/<?php echo $icontime; ?>.jpg" border="0" <?php echo $align; ?> title="<?php echo $name; ?>" <?php echo $vars['js']; ?> /></a>
-</div> \ No newline at end of file
+</div>
+
+<?php
+
+ }
+
+?> \ No newline at end of file