From cf5fa50ee4b12413cfb5ab4e7ca9c7070a9463c2 Mon Sep 17 00:00:00 2001 From: Sem Date: Fri, 5 Oct 2012 03:01:00 +0200 Subject: Updated pages and pads icons. --- _graphics/icons/pad_lrg.gif | Bin 0 -> 2060 bytes _graphics/icons/pad_small.gif | Bin 0 -> 1246 bytes _graphics/icons/pad_tiny.gif | Bin 0 -> 1033 bytes _graphics/icons/pages_lrg.gif | Bin 0 -> 1162 bytes _graphics/icons/pages_small.gif | Bin 0 -> 708 bytes _graphics/icons/pages_tiny.gif | Bin 0 -> 581 bytes _graphics/pages_icons/pages_small.gif | Bin 1723 -> 0 bytes _graphics/pages_icons/pages_tiny.gif | Bin 1232 -> 0 bytes start.php | 32 +++++++++++++++++++------------- 9 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 _graphics/icons/pad_lrg.gif create mode 100644 _graphics/icons/pad_small.gif create mode 100644 _graphics/icons/pad_tiny.gif create mode 100644 _graphics/icons/pages_lrg.gif create mode 100644 _graphics/icons/pages_small.gif create mode 100644 _graphics/icons/pages_tiny.gif delete mode 100644 _graphics/pages_icons/pages_small.gif delete mode 100644 _graphics/pages_icons/pages_tiny.gif diff --git a/_graphics/icons/pad_lrg.gif b/_graphics/icons/pad_lrg.gif new file mode 100644 index 0000000..213d9b0 Binary files /dev/null and b/_graphics/icons/pad_lrg.gif differ diff --git a/_graphics/icons/pad_small.gif b/_graphics/icons/pad_small.gif new file mode 100644 index 0000000..594a51b Binary files /dev/null and b/_graphics/icons/pad_small.gif differ diff --git a/_graphics/icons/pad_tiny.gif b/_graphics/icons/pad_tiny.gif new file mode 100644 index 0000000..29efe67 Binary files /dev/null and b/_graphics/icons/pad_tiny.gif differ diff --git a/_graphics/icons/pages_lrg.gif b/_graphics/icons/pages_lrg.gif new file mode 100644 index 0000000..838bdfd Binary files /dev/null and b/_graphics/icons/pages_lrg.gif differ diff --git a/_graphics/icons/pages_small.gif b/_graphics/icons/pages_small.gif new file mode 100644 index 0000000..58facea Binary files /dev/null and b/_graphics/icons/pages_small.gif differ diff --git a/_graphics/icons/pages_tiny.gif b/_graphics/icons/pages_tiny.gif new file mode 100644 index 0000000..216ef38 Binary files /dev/null and b/_graphics/icons/pages_tiny.gif differ diff --git a/_graphics/pages_icons/pages_small.gif b/_graphics/pages_icons/pages_small.gif deleted file mode 100644 index 902bff5..0000000 Binary files a/_graphics/pages_icons/pages_small.gif and /dev/null differ diff --git a/_graphics/pages_icons/pages_tiny.gif b/_graphics/pages_icons/pages_tiny.gif deleted file mode 100644 index f7349fa..0000000 Binary files a/_graphics/pages_icons/pages_tiny.gif and /dev/null differ 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; } } -- cgit v1.2.3