From 1336b9e8ed9cc3f9b9b9c4427f1e0f8bccc96f7d Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 8 Mar 2010 15:51:52 +0000 Subject: Site pages will eventually replace the external pages and custom index plugins as well as introduce a new keywords system to enable dynamic content to be displayed without needing to know php or Elgg. This will be handy for frontpage layout/design. git-svn-id: http://code.elgg.org/elgg/trunk@5303 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/sitepages/start.php | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 mod/sitepages/start.php (limited to 'mod/sitepages/start.php') diff --git a/mod/sitepages/start.php b/mod/sitepages/start.php new file mode 100644 index 000000000..c6e119959 --- /dev/null +++ b/mod/sitepages/start.php @@ -0,0 +1,72 @@ +wwwroot . 'pg/sitepages/'); + } +} + +function sitepages_url($expage) { + global $CONFIG; + return $CONFIG->url . "pg/sitepages/"; +} + +function sitepages_page_handler($page) { + global $CONFIG; + if ($page[0]){ + switch ($page[0]){ + case "read": set_input('sitepages',$page[1]); + include(dirname(__FILE__) . "/read.php"); + break; + default : include($CONFIG->pluginspath . "sitepages/index.php"); + } + }else{ + include($CONFIG->pluginspath . "sitepages/index.php"); + } +} + +// Initialise log browser +register_elgg_event_handler('init','system','sitepages_init'); +register_elgg_event_handler('pagesetup','system','sitepages_pagesetup'); + +// Register actions +global $CONFIG; +register_action("sitepages/add",false,$CONFIG->pluginspath . "sitepages/actions/add.php"); +register_action("sitepages/addfront",false,$CONFIG->pluginspath . "sitepages/actions/addfront.php"); +register_action("sitepages/addmeta",false,$CONFIG->pluginspath . "sitepages/actions/addmeta.php"); +register_action("sitepages/edit",false,$CONFIG->pluginspath . "sitepages/actions/edit.php"); +register_action("sitepages/delete",false,$CONFIG->pluginspath . "sitepages/actions/delete.php"); \ No newline at end of file -- cgit v1.2.3