aboutsummaryrefslogtreecommitdiff
path: root/mod/externalpages/start.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
committerSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
commite53d410129701ea1c9d19529afa493f11b5f5b70 (patch)
treed9963b24bf8932654b4a47e36602c75975e50dba /mod/externalpages/start.php
parent377da25d2965c64941f83baae119fc970ec60982 (diff)
parent08a962c98e2923724f8013d6eaae89101243752a (diff)
downloadelgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.gz
elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.bz2
Merge github.com:Elgg/Elgg
Conflicts: engine/lib/input.php
Diffstat (limited to 'mod/externalpages/start.php')
-rw-r--r--mod/externalpages/start.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/mod/externalpages/start.php b/mod/externalpages/start.php
index 1de4d5ec8..13235af53 100644
--- a/mod/externalpages/start.php
+++ b/mod/externalpages/start.php
@@ -12,6 +12,9 @@ function expages_init() {
elgg_register_page_handler('terms', 'expages_page_handler');
elgg_register_page_handler('privacy', 'expages_page_handler');
elgg_register_page_handler('expages', 'expages_page_handler');
+
+ // Register public external pages
+ elgg_register_plugin_hook_handler('public_pages', 'walled_garden', 'expages_public');
// add a menu item for the admin edit page
elgg_register_admin_menu_item('configure', 'expages', 'appearance');
@@ -25,6 +28,15 @@ function expages_init() {
}
/**
+ * Extend the public pages range
+ *
+ */
+function expages_public($hook, $handler, $return, $params){
+ $pages = array('about', 'terms', 'privacy');
+ return array_merge($pages, $return);
+}
+
+/**
* Setup the links to site pages
*/
function expages_setup_footer_menu() {
@@ -32,7 +44,7 @@ function expages_setup_footer_menu() {
foreach ($pages as $page) {
$url = "$page";
$item = new ElggMenuItem($page, elgg_echo("expages:$page"), $url);
- elgg_register_menu_item('footer', $item);
+ elgg_register_menu_item('walled_garden', $item);
}
}
@@ -41,6 +53,7 @@ function expages_setup_footer_menu() {
*
* @param array $page URL segements
* @param string $handler Handler identifier
+ * @return bool
*/
function expages_page_handler($page, $handler) {
if ($handler == 'expages') {
@@ -64,6 +77,7 @@ function expages_page_handler($page, $handler) {
$body = elgg_view_layout("one_sidebar", array('content' => $content));
echo elgg_view_page($title, $body);
+ return true;
}
/**