summaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-10-05 03:01:00 +0200
committerSem <sembrestels@riseup.net>2012-10-05 03:01:00 +0200
commitcf5fa50ee4b12413cfb5ab4e7ca9c7070a9463c2 (patch)
tree267278be347daa6abd9569b6b4930e49e28fa355 /start.php
parentc3d5dfec626d2bb48edfe8fae79ff78d2ec64b0e (diff)
downloadsaravea_theme-cf5fa50ee4b12413cfb5ab4e7ca9c7070a9463c2.tar.gz
saravea_theme-cf5fa50ee4b12413cfb5ab4e7ca9c7070a9463c2.tar.bz2
Updated pages and pads icons.
Diffstat (limited to 'start.php')
-rw-r--r--start.php32
1 files changed, 19 insertions, 13 deletions
diff --git a/start.php b/start.php
index 21d4b91..60c2aa9 100644
--- a/start.php
+++ b/start.php
@@ -32,7 +32,7 @@ function n1_theme_front_page($hook, $type, $returnvalue, $params) {
}
/**
- * Override the default entity icon for pages
+ * Override the default entity icon for pages and pads
*
* @return string Relative URL
*/
@@ -40,17 +40,23 @@ function n1_theme_pages_icon_url_override($hook, $type, $returnvalue, $params) {
$entity = $params['entity'];
if (elgg_instanceof($entity, 'object', 'page_top') ||
elgg_instanceof($entity, 'object', 'page')) {
- switch ($params['size']) {
- case 'topbar':
- case 'tiny':
- return 'mod/n1_theme/_graphics/pages_icons/pages_tiny.gif';
- break;
- case 'small':
- return 'mod/n1_theme/_graphics/pages_icons/pages_small.gif';
- break;
- default:
- return 'mod/pages/images/pages_lrg.gif';
- break;
- }
+ $icon = 'pages';
+ } elseif (elgg_instanceof($entity, 'object', 'etherpad') ||
+ elgg_instanceof($entity, 'object', 'subpad')) {
+ $icon = 'pad';
+ } else {
+ return false;
+ }
+ switch ($params['size']) {
+ case 'topbar':
+ case 'tiny':
+ return "mod/n1_theme/_graphics/icons/{$icon}_tiny.gif";
+ break;
+ case 'small':
+ return "mod/n1_theme/_graphics/icons/{$icon}_small.gif";
+ break;
+ default:
+ return "mod/n1_theme/_graphics/icons/{$icon}_lrg.gif";
+ break;
}
}