aboutsummaryrefslogtreecommitdiff
path: root/mod/sitepages/start.php
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-24 10:27:53 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-24 10:27:53 +0000
commitfe236ea096f092f38ea4d3517fd25fd084d28c6f (patch)
tree4210535cd663daaef81aa9186ec2de5866ad33f2 /mod/sitepages/start.php
parent3b970491b7bc84e8f7408b5858e49b75ae7a7d6c (diff)
downloadelgg-fe236ea096f092f38ea4d3517fd25fd084d28c6f.tar.gz
elgg-fe236ea096f092f38ea4d3517fd25fd084d28c6f.tar.bz2
a simple version of the sitepages index - we will need to turn this into a basic and advance selection for admins.
git-svn-id: http://code.elgg.org/elgg/trunk@6153 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/sitepages/start.php')
-rw-r--r--mod/sitepages/start.php25
1 files changed, 15 insertions, 10 deletions
diff --git a/mod/sitepages/start.php b/mod/sitepages/start.php
index 2ce1d3312..457ed583c 100644
--- a/mod/sitepages/start.php
+++ b/mod/sitepages/start.php
@@ -39,7 +39,7 @@ function sitepages_init() {
elgg_extend_view('metatags', 'sitepages/metatags');
// Replace the default index page if user has requested and the site is not running walled garden
- if ((get_plugin_setting('ownfrontpage', 'sitepages') == 'yes') && (!is_plugin_enabled('walledgarden'))) {
+ if (get_plugin_setting('ownfrontpage', 'sitepages') == 'yes') {
register_plugin_hook('index', 'system', 'sitepages_custom_index');
}
@@ -52,6 +52,7 @@ function sitepages_init() {
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/addfrontsimple", FALSE, $CONFIG->pluginspath . "sitepages/actions/addfrontsimple.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");
@@ -74,21 +75,25 @@ function sitepages_runonce() {
*/
function sitepages_custom_index() {
// context is checked by the extended metatags view to print out its custom CSS
- $context = get_context();
- set_context('sitepages:front');
+ //$context = get_context();
+ //set_context('sitepages:front');
- if ($contents = elgg_view('sitepages/custom_frontpage')) {
- page_draw(FALSE, $contents);
+ //if ($contents = elgg_view('sitepages/custom_frontpage')) {
+ // page_draw(FALSE, $contents);
- set_context($context);
+ // set_context($context);
// return TRUE to tell index.php we've got its content right here.
- return TRUE;
- }
+ // return TRUE;
+ //}
- set_context($context);
+ //set_context($context);
// return NULL to pass this to next in chain, or back to standard index.php.
- return NULL;
+ //return NULL;
+ if (!include_once(dirname(dirname(__FILE__))) . "/sitepages/index.php") {
+ return false;
+ }
+ return true;
}
/**