diff options
author | Sem <sembrestels@riseup.net> | 2011-11-18 07:32:27 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2011-11-18 07:32:27 +0100 |
commit | e53d410129701ea1c9d19529afa493f11b5f5b70 (patch) | |
tree | d9963b24bf8932654b4a47e36602c75975e50dba /mod/externalpages | |
parent | 377da25d2965c64941f83baae119fc970ec60982 (diff) | |
parent | 08a962c98e2923724f8013d6eaae89101243752a (diff) | |
download | elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.gz elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.bz2 |
Merge github.com:Elgg/Elgg
Conflicts:
engine/lib/input.php
Diffstat (limited to 'mod/externalpages')
-rw-r--r-- | mod/externalpages/manifest.xml | 7 | ||||
-rw-r--r-- | mod/externalpages/start.php | 16 | ||||
-rw-r--r-- | mod/externalpages/views/default/admin/appearance/expages.php | 2 | ||||
-rw-r--r-- | mod/externalpages/views/default/expages/menu.php | 31 |
4 files changed, 20 insertions, 36 deletions
diff --git a/mod/externalpages/manifest.xml b/mod/externalpages/manifest.xml index 32528585d..f2aef09f3 100644 --- a/mod/externalpages/manifest.xml +++ b/mod/externalpages/manifest.xml @@ -7,10 +7,9 @@ <description>Create simple web pages for about, contact, privacy, and terms.</description> <website>http://www.elgg.org/</website> <copyright>See COPYRIGHT.txt</copyright> - <license>GNU Public License version 2</license> + <license>GNU General Public License version 2</license> <requires> - <type>elgg_version</type> - <version>2010030101</version> + <type>elgg_release</type> + <version>1.8</version> </requires> - <admin_interface>advanced</admin_interface> </plugin_manifest> 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; } /** diff --git a/mod/externalpages/views/default/admin/appearance/expages.php b/mod/externalpages/views/default/admin/appearance/expages.php index b30765089..6a5a521a5 100644 --- a/mod/externalpages/views/default/admin/appearance/expages.php +++ b/mod/externalpages/views/default/admin/appearance/expages.php @@ -7,4 +7,4 @@ $type = get_input('type', 'about'); echo elgg_view('expages/menu', array('type' => $type)); -echo elgg_view_form('expages/edit', array(), array('type' => $type)); +echo elgg_view_form('expages/edit', array('class' => 'elgg-form-settings'), array('type' => $type)); diff --git a/mod/externalpages/views/default/expages/menu.php b/mod/externalpages/views/default/expages/menu.php index 846db076f..6ed521629 100644 --- a/mod/externalpages/views/default/expages/menu.php +++ b/mod/externalpages/views/default/expages/menu.php @@ -20,33 +20,4 @@ foreach ($pages as $page) { ); } -echo elgg_view('navigation/tabs', array('tabs' => $tabs)); - -return true; - -/** - * Tab navigation - * - * @uses string $vars['type'] horizontal || vertical - Defaults to horizontal - * @uses string $vars['class'] Additional class to add to ul - * @uses array $vars['tabs'] A multi-dimensional array of tab entries in the format array( - * 'title' => string, // Title of link - * 'url' => string, // URL for the link - * 'class' => string // Class of the li element - * 'id' => string, // ID of the li element - * 'selected' => bool // if this li element is currently selected - * 'url_class' => string, // Class to pass to the link - * 'url_id' => string, // ID to pass to the link - * ) - */ - -?> - -<div id="elgg_horizontal_tabbed_nav"> -<ul> - <li <?php if($type == 'front') echo "class = 'selected'"; ?>><a href="<?php echo $url; ?>front"><?php echo elgg_echo('expages:frontpage'); ?></a></li> - <li <?php if($type == 'about') echo "class = 'selected'"; ?>><a href="<?php echo $url; ?>about"><?php echo elgg_echo('expages:about'); ?></a></li> - <li <?php if($type == 'terms') echo "class = 'selected'"; ?>><a href="<?php echo $url; ?>terms"><?php echo elgg_echo('expages:terms'); ?></a></li> - <li <?php if($type == 'privacy') echo "class = 'selected'"; ?>><a href="<?php echo $url; ?>privacy"><?php echo elgg_echo('expages:privacy'); ?></a></li> -</ul> -</div>
\ No newline at end of file +echo elgg_view('navigation/tabs', array('tabs' => $tabs, 'class' => 'elgg-form-settings')); |