summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-08-20 21:45:36 +0200
committerSem <sembrestels@riseup.net>2012-08-20 21:45:36 +0200
commit301f76dcb3a3d59b79e51413e35004313d7c1797 (patch)
treef7a2551bca12a5501550ffe79b08203f73bf2124
parent1356b18e0d032b5fb5f65150edac0e3311edbf7d (diff)
downloadsaravea_theme-301f76dcb3a3d59b79e51413e35004313d7c1797.tar.gz
saravea_theme-301f76dcb3a3d59b79e51413e35004313d7c1797.tar.bz2
Made page icons smaller.
-rw-r--r--_graphics/pages_icons/pages_small.gifbin0 -> 1723 bytes
-rw-r--r--_graphics/pages_icons/pages_tiny.gifbin0 -> 1232 bytes
-rw-r--r--start.php29
3 files changed, 29 insertions, 0 deletions
diff --git a/_graphics/pages_icons/pages_small.gif b/_graphics/pages_icons/pages_small.gif
new file mode 100644
index 0000000..902bff5
--- /dev/null
+++ b/_graphics/pages_icons/pages_small.gif
Binary files differ
diff --git a/_graphics/pages_icons/pages_tiny.gif b/_graphics/pages_icons/pages_tiny.gif
new file mode 100644
index 0000000..f7349fa
--- /dev/null
+++ b/_graphics/pages_icons/pages_tiny.gif
Binary files differ
diff --git a/start.php b/start.php
index c7dae0e..4ffdb47 100644
--- a/start.php
+++ b/start.php
@@ -12,6 +12,11 @@ function n1_theme_init() {
elgg_register_simplecache_view('n1_theme/landing');
elgg_register_css('n1:landing_page', elgg_get_simplecache_url('css', 'n1_theme/landing'));
+
+ if (elgg_is_active_plugin('pages')) {
+ // pages icon url override
+ elgg_register_plugin_hook_handler('entity:icon:url', 'object', 'n1_theme_pages_icon_url_override');
+ }
}
function n1_theme_topbar_menu($hook, $type, $returnvalue, $params){
@@ -22,3 +27,27 @@ function n1_theme_front_page($hook, $type, $returnvalue, $params) {
include(elgg_get_plugins_path() . 'n1_theme/index.php');
return true;
}
+
+/**
+ * Override the default entity icon for pages
+ *
+ * @return string Relative URL
+ */
+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;
+ }
+ }
+} \ No newline at end of file