diff options
-rw-r--r-- | engine/lib/entities.php | 14 | ||||
-rw-r--r-- | mod/profile/icon.php | 5 | ||||
-rw-r--r-- | mod/profile/views/default/icon/user/default/large.php | 3 | ||||
-rw-r--r-- | mod/profile/views/default/icon/user/default/master.php | 3 | ||||
-rw-r--r-- | mod/profile/views/default/icon/user/default/medium.php | 3 | ||||
-rw-r--r-- | mod/profile/views/default/icon/user/default/small.php | 3 | ||||
-rw-r--r-- | mod/profile/views/default/icon/user/default/tiny.php | 3 | ||||
-rw-r--r-- | mod/profile/views/default/icon/user/default/topbar.php | 3 |
8 files changed, 29 insertions, 8 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 3adf4b8ee..ba376917b 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1873,9 +1873,17 @@ // Fail, so use default if (!$url) {
- $test = elgg_view("icon/entity/default/{$size}",array('entity' => $entity));
- if (!empty($test)) return $test;
- + $type = $entity->getType();
+ $subtype = $entity->getSubtype();
+
+ if (!empty($subtype)) {
+ $overrideurl = elgg_view("icon/{$type}/{$subtype}/{$size}",array('entity' => $entity));
+ if (!empty($overrideurl)) return $overrideurl;
+ }
+
+ $overrideurl = elgg_view("icon/{$type}/default/{$size}",array('entity' => $entity));
+ if (!empty($overrideurl)) return $overrideurl;
+ $url = $CONFIG->url . "_graphics/icons/default/$size.png";
} diff --git a/mod/profile/icon.php b/mod/profile/icon.php index d99febd8c..33a5cde7f 100644 --- a/mod/profile/icon.php +++ b/mod/profile/icon.php @@ -39,11 +39,6 @@ if (!$success) {
global $CONFIG;
- $test = elgg_view("icon/user/default/{$size}",array('entity' => $entity));
- if (!empty($test)) {
- header("Location: {$test}");
- exit;
- }
$contents = @file_get_contents($CONFIG->pluginspath . "profile/graphics/default{$size}.jpg");
}
diff --git a/mod/profile/views/default/icon/user/default/large.php b/mod/profile/views/default/icon/user/default/large.php new file mode 100644 index 000000000..5146612ca --- /dev/null +++ b/mod/profile/views/default/icon/user/default/large.php @@ -0,0 +1,3 @@ +<?php
+ echo $vars['url'] . "mod/profile/graphics/defaultlarge.jpg";
+?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/master.php b/mod/profile/views/default/icon/user/default/master.php new file mode 100644 index 000000000..207ef0c03 --- /dev/null +++ b/mod/profile/views/default/icon/user/default/master.php @@ -0,0 +1,3 @@ +<?php
+ echo $vars['url'] . "mod/profile/graphics/defaultmaster.jpg";
+?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/medium.php b/mod/profile/views/default/icon/user/default/medium.php new file mode 100644 index 000000000..06afe6089 --- /dev/null +++ b/mod/profile/views/default/icon/user/default/medium.php @@ -0,0 +1,3 @@ +<?php
+ echo $vars['url'] . "mod/profile/graphics/defaultmedium.jpg";
+?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/small.php b/mod/profile/views/default/icon/user/default/small.php new file mode 100644 index 000000000..cae46665a --- /dev/null +++ b/mod/profile/views/default/icon/user/default/small.php @@ -0,0 +1,3 @@ +<?php
+ echo $vars['url'] . "mod/profile/graphics/defaultsmall.jpg";
+?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/tiny.php b/mod/profile/views/default/icon/user/default/tiny.php new file mode 100644 index 000000000..dfe3875ca --- /dev/null +++ b/mod/profile/views/default/icon/user/default/tiny.php @@ -0,0 +1,3 @@ +<?php
+ echo $vars['url'] . "mod/profile/graphics/defaulttiny.jpg";
+?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/topbar.php b/mod/profile/views/default/icon/user/default/topbar.php new file mode 100644 index 000000000..921921400 --- /dev/null +++ b/mod/profile/views/default/icon/user/default/topbar.php @@ -0,0 +1,3 @@ +<?php
+ echo $vars['url'] . "mod/profile/graphics/defaulttopbar.jpg";
+?>
\ No newline at end of file |