aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin/index.php14
-rw-r--r--admin/plugins/index.php27
-rw-r--r--admin/site/index.php23
-rw-r--r--admin/user/index.php23
-rw-r--r--engine/lib/admin.php26
-rw-r--r--engine/lib/elgglib.php2
-rw-r--r--languages/en.php18
-rw-r--r--views/default/admin/main.php7
-rw-r--r--views/default/admin/main_opt/plugins.php19
-rw-r--r--views/default/admin/main_opt/site.php17
-rw-r--r--views/default/admin/main_opt/user.php17
-rw-r--r--views/default/admin/plugins.php18
-rw-r--r--views/default/admin/site.php18
-rw-r--r--views/default/admin/user.php18
14 files changed, 216 insertions, 31 deletions
diff --git a/admin/index.php b/admin/index.php
index 8a59e8f85..217d2de1e 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -15,19 +15,7 @@
require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
// Make sure only valid admin users can see this
- admin_gatekeeper();
-
-
-
-
-
-
- // Get menu list
-
- // render
-
-
-
+ admin_gatekeeper();
// Display main admin menu
page_draw(elgg_echo("admin"),elgg_view("admin/main"));
diff --git a/admin/plugins/index.php b/admin/plugins/index.php
new file mode 100644
index 000000000..4988a64ab
--- /dev/null
+++ b/admin/plugins/index.php
@@ -0,0 +1,27 @@
+<?php
+
+ /**
+ * Elgg administration plugin system index
+ * This is a special page that permits the configuration of plugins in a standard way.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ // Get the Elgg framework
+ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+
+ // Make sure only valid admin users can see this
+ admin_gatekeeper();
+
+ // get list of plugins, itterate through - permit enable/disable & further config.
+
+
+ // Display main admin menu
+ page_draw(elgg_echo("admin:plugins"),elgg_view("admin/plugins"));
+
+?> \ No newline at end of file
diff --git a/admin/site/index.php b/admin/site/index.php
new file mode 100644
index 000000000..15224b3b8
--- /dev/null
+++ b/admin/site/index.php
@@ -0,0 +1,23 @@
+<?php
+
+ /**
+ * Elgg administration site system index
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ // Get the Elgg framework
+ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+
+ // Make sure only valid admin users can see this
+ admin_gatekeeper();
+
+ // Display main admin menu
+ page_draw(elgg_echo("admin:site"),elgg_view("admin/site"));
+
+?> \ No newline at end of file
diff --git a/admin/user/index.php b/admin/user/index.php
new file mode 100644
index 000000000..c1201f652
--- /dev/null
+++ b/admin/user/index.php
@@ -0,0 +1,23 @@
+<?php
+
+ /**
+ * Elgg administration user system index
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ // Get the Elgg framework
+ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+
+ // Make sure only valid admin users can see this
+ admin_gatekeeper();
+
+ // Display main admin menu
+ page_draw(elgg_echo("admin:user"),elgg_view("admin/user"));
+
+?> \ No newline at end of file
diff --git a/engine/lib/admin.php b/engine/lib/admin.php
index 97b6d9eeb..7621af9e7 100644
--- a/engine/lib/admin.php
+++ b/engine/lib/admin.php
@@ -23,25 +23,21 @@
* nb. some pages already exist that you can extend), extend the main view to point to it, and add controls to your
* new view.
*
+ * At the moment this is essentially a wrapper around extend_view.
+ *
+ * @param string $new_admin_view The view associated with the control you're adding
* @param string $view The view to extend, by default this is 'admin/main'.
- * @param string $new_admin_view The view body associated with the page.
* @param int $priority Optional priority to govern the appearance in the list.
*/
- function extend_elgg_admin_page($view = 'admin/main', $new_admin_view, $priority = 500)
+ function extend_elgg_admin_page( $new_admin_view, $view = 'admin/main', $priority = 500)
{
-
+ return extend_view($view, $new_admin_view, $priority);
}
- /**
- * Return an array of registered elgg admin pages.
- *
- * @return array
- */
- function get_elgg_admin_pages()
- {
-
- }
+
+
+ // register admin action
function admin_init()
@@ -49,6 +45,12 @@
global $CONFIG;
// TODO: Register default pages
+
+
+ // Add plugin main menu option (last)
+ extend_elgg_admin_page('admin/main_opt/plugins', 'admin/main', 999);
+ extend_elgg_admin_page('admin/main_opt/site', 'admin/main');
+ extend_elgg_admin_page('admin/main_opt/user', 'admin/main');
}
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 092330328..e7e3abc12 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -278,7 +278,7 @@
* Extends a view by adding other views to be displayed at the same time.
*
* @param string $view The view to add to.
- * @param string $view_name The name of the view to extend with
+ * @param string $view_name The name of the view to extend
* @param int $priority The priority, from 0 to 1000, to add at (lowest numbers will be displayed first)
*/
function extend_view($view, $view_name, $priority = 501) {
diff --git a/languages/en.php b/languages/en.php
index c869edbe9..f3efede30 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -212,7 +212,23 @@
*/
'admin' => "Administration",
- 'admin:description' => "The admin panel allows you to control all aspects of the system, from user management to how plugins behave. Choose an option below to get started.",
+ 'admin:description' => "The admin panel allows you to control all aspects of the system, from user management to how plugins behave. Choose an option below to get started.",
+
+ 'admin:user' => "User Administration",
+ 'admin:user:description' => "This admin panel allows you to control user settings for your site. Choose an option below to get started.",
+ 'admin:user:opt:linktext' => "Configure users...",
+ 'admin:user:opt:description' => "Configure users and account information. ",
+
+ 'admin:site' => "Site Administration",
+ 'admin:site:description' => "This admin panel allows you to control global settings for your site. Choose an option below to get started.",
+ 'admin:site:opt:linktext' => "Configure site...",
+ 'admin:site:opt:description' => "Configure the site technical and non-technical settings. ",
+
+ 'admin:plugins' => "Tool Administration",
+ 'admin:plugins:description' => "This admin panel allows you to control and configure tools installed on your site.",
+ 'admin:plugins:opt:linktext' => "Configure tools...",
+ 'admin:plugins:opt:description' => "Configure the tools installed on the site. ",
+
/**
* Generic action words
diff --git a/views/default/admin/main.php b/views/default/admin/main.php
index 7a1358f03..84be45780 100644
--- a/views/default/admin/main.php
+++ b/views/default/admin/main.php
@@ -6,15 +6,14 @@
* @package Elgg
* @subpackage Core
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
+ * @author Marcus Povey
* @copyright Curverider Ltd 2008
* @link http://elgg.org/
- **/
+ */
// Description of what's going on
echo "<p>" . nl2br(elgg_echo("admin:description")) . "</p>";
- // Main menu items
- echo elgg_view("admin/mainmenu");
+
?> \ No newline at end of file
diff --git a/views/default/admin/main_opt/plugins.php b/views/default/admin/main_opt/plugins.php
new file mode 100644
index 000000000..f110007a8
--- /dev/null
+++ b/views/default/admin/main_opt/plugins.php
@@ -0,0 +1,19 @@
+<?php
+ /**
+ * Elgg plugin sub-component on the main menu.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ global $CONFIG;
+?>
+<div class="admin-menu-option">
+ <h2><?php echo elgg_echo('admin:plugins'); ?> </h2>
+ <p><?php echo elgg_echo('admin:plugins:opt:description'); ?><br />
+ <a href="<?php echo $CONFIG->wwwroot . "admin/plugins/"; ?>"><?php echo elgg_echo('admin:plugins:opt:linktext'); ?></a></p>
+</div> \ No newline at end of file
diff --git a/views/default/admin/main_opt/site.php b/views/default/admin/main_opt/site.php
new file mode 100644
index 000000000..40373e647
--- /dev/null
+++ b/views/default/admin/main_opt/site.php
@@ -0,0 +1,17 @@
+<?php
+ /**
+ * Elgg site sub-component on the main menu.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+?>
+<div class="admin-menu-option">
+ <h2><?php echo elgg_echo('admin:site'); ?> </h2>
+ <p><?php echo elgg_echo('admin:site:opt:description'); ?><br />
+ <a href="<?php echo $CONFIG->wwwroot . "admin/site/"; ?>"><?php echo elgg_echo('admin:site:opt:linktext'); ?></a></p>
+</div> \ No newline at end of file
diff --git a/views/default/admin/main_opt/user.php b/views/default/admin/main_opt/user.php
new file mode 100644
index 000000000..8505098fd
--- /dev/null
+++ b/views/default/admin/main_opt/user.php
@@ -0,0 +1,17 @@
+<?php
+ /**
+ * Elgg user sub-component on the main menu.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+?>
+<div class="admin-menu-option">
+ <h2><?php echo elgg_echo('admin:user'); ?> </h2>
+ <p><?php echo elgg_echo('admin:user:opt:description'); ?><br />
+ <a href="<?php echo $CONFIG->wwwroot . "admin/user/"; ?>"><?php echo elgg_echo('admin:user:opt:linktext'); ?></a></p>
+</div> \ No newline at end of file
diff --git a/views/default/admin/plugins.php b/views/default/admin/plugins.php
new file mode 100644
index 000000000..9461640d7
--- /dev/null
+++ b/views/default/admin/plugins.php
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Elgg administration plugin main screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ // Description of what's going on
+ echo "<p>" . nl2br(elgg_echo("admin:plugins:description")) . "</p>";
+
+
+?> \ No newline at end of file
diff --git a/views/default/admin/site.php b/views/default/admin/site.php
new file mode 100644
index 000000000..30fa901fd
--- /dev/null
+++ b/views/default/admin/site.php
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Elgg administration site main screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ **/
+
+ // Description of what's going on
+ echo "<p>" . nl2br(elgg_echo("admin:site:description")) . "</p>";
+
+
+?> \ No newline at end of file
diff --git a/views/default/admin/user.php b/views/default/admin/user.php
new file mode 100644
index 000000000..0f5a5daf6
--- /dev/null
+++ b/views/default/admin/user.php
@@ -0,0 +1,18 @@
+<?php
+
+ /**
+ * Elgg administration user main screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ **/
+
+ // Description of what's going on
+ echo "<p>" . nl2br(elgg_echo("admin:user:description")) . "</p>";
+
+
+?> \ No newline at end of file