From eb3b211461906c405c7d016401cb3cd6d7d03b83 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 14:22:19 +0100 Subject: New plugin that shows community pages in the sidebar --- addon/pages/pages.php | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 addon/pages/pages.php (limited to 'addon/pages/pages.php') diff --git a/addon/pages/pages.php b/addon/pages/pages.php new file mode 100755 index 000000000..13e6c4b59 --- /dev/null +++ b/addon/pages/pages.php @@ -0,0 +1,39 @@ + + * + */ + +function pages_install() { + register_hook('page_end', 'addon/pages/pages.php', 'pages_page_end'); +} + +function pages_uninstall() { + unregister_hook('page_end', 'addon/pages/pages.php', 'pages_page_end'); +} + +function pages_page_end($a,&$b) { + if (($a->module != "network") OR ($a->user['uid'] == 0)) + return; + + $pages = '

'.t("Community").'

"; + if (sizeof($contacts) > 0) + $a->page['aside'] = $pages.$a->page['aside']; + +} + +?> -- cgit v1.2.3