From: Michael Vogel Date: Sun, 11 Mar 2012 13:22:19 +0000 (+0100) Subject: New plugin that shows community pages in the sidebar X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=eb3b211461906c405c7d016401cb3cd6d7d03b83;p=friendica.git New plugin that shows community pages in the sidebar --- diff --git a/addon/pages/README b/addon/pages/README new file mode 100755 index 0000000000..6ec314b702 --- /dev/null +++ b/addon/pages/README @@ -0,0 +1,3 @@ +Pages + +Shows lists of community pages diff --git a/addon/pages/pages.php b/addon/pages/pages.php new file mode 100755 index 0000000000..13e6c4b593 --- /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']; + +} + +?>