aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/externalpages/actions/add.php54
-rw-r--r--mod/externalpages/actions/addfront.php48
-rw-r--r--mod/externalpages/index.php30
-rw-r--r--mod/externalpages/languages/en.php42
-rw-r--r--mod/externalpages/manifest.xml10
-rw-r--r--mod/externalpages/read.php35
-rw-r--r--mod/externalpages/start.php74
-rw-r--r--mod/externalpages/views/default/expages/analytics.php21
-rw-r--r--mod/externalpages/views/default/expages/css.php13
-rw-r--r--mod/externalpages/views/default/expages/footer_menu.php17
-rw-r--r--mod/externalpages/views/default/expages/forms/edit.php82
-rw-r--r--mod/externalpages/views/default/expages/forms/editfront.php75
-rw-r--r--mod/externalpages/views/default/expages/front_left.php23
-rw-r--r--mod/externalpages/views/default/expages/front_right.php36
-rw-r--r--mod/externalpages/views/default/expages/menu.php25
-rw-r--r--mod/externalpages/views/default/object/expages.php10
-rw-r--r--mod/sitepages/README.txt50
-rw-r--r--mod/sitepages/actions/edit_settings.php50
-rw-r--r--mod/sitepages/index.php45
-rw-r--r--mod/sitepages/languages/en.php82
-rw-r--r--mod/sitepages/manifest.xml19
-rw-r--r--mod/sitepages/sitepages_functions.php113
-rw-r--r--mod/sitepages/start.php223
-rw-r--r--mod/sitepages/views/default/admin/site/sitepages.php13
-rw-r--r--mod/sitepages/views/default/canvas/layouts/frontpage.php17
-rw-r--r--mod/sitepages/views/default/sitepages/css.php20
-rw-r--r--mod/sitepages/views/default/sitepages/custom_frontpage.php17
-rw-r--r--mod/sitepages/views/default/sitepages/forms/edit.php51
-rw-r--r--mod/sitepages/views/default/sitepages/forms/editfrontsimple.php87
-rw-r--r--mod/sitepages/views/default/sitepages/forms/editmeta.php40
-rw-r--r--mod/sitepages/views/default/sitepages/keywords/sitestats.php8
-rw-r--r--mod/sitepages/views/default/sitepages/keywords/userlist.php45
-rw-r--r--mod/sitepages/views/default/sitepages/members.php11
-rw-r--r--mod/sitepages/views/default/sitepages/menu.php24
-rw-r--r--mod/sitepages/views/default/sitepages/metatags.php35
-rw-r--r--mod/sitepages/views/default/sitepages/sidebar.php13
-rw-r--r--mod/sitepages/views/default/sitepages/welcome.php13
37 files changed, 595 insertions, 976 deletions
diff --git a/mod/externalpages/actions/add.php b/mod/externalpages/actions/add.php
new file mode 100644
index 000000000..fed637c55
--- /dev/null
+++ b/mod/externalpages/actions/add.php
@@ -0,0 +1,54 @@
+<?php
+
+ /**
+ * Elgg external pages: add/edit
+ *
+ * @package ElggExPages
+ */
+
+ // Make sure we're logged as admin
+ admin_gatekeeper();
+
+ // Get input data
+ $contents = get_input('expagescontent', '', false);
+ $type = get_input('content_type');
+ $previous_guid = get_input('expage_guid');
+
+ // Cache to the session
+ $_SESSION['expages_content'] = $contents;
+ $_SESSION['expagestype'] = $type;
+
+ //remove the old external page
+ if(get_entity($previous_guid)){
+ delete_entity($previous_guid);
+ }
+
+ // Initialise a new ElggObject
+ $expages = new ElggObject();
+ // Tell the system what type of external page it is
+ $expages->subtype = $type;
+ // Set its owner to the current user
+ $expages->owner_guid = get_loggedin_userid();
+ // For now, set its access to public
+ $expages->access_id = ACCESS_PUBLIC;
+ // Set its title and description appropriately
+ $expages->title = $type;
+ $expages->description = $contents;
+ // Before we can set metadata, save
+ if (!$expages->save()) {
+ register_error(elgg_echo("expages:error"));
+ forward(REFERER);
+ }
+
+ // Success message
+ system_message(elgg_echo("expages:posted"));
+ // add to river
+ add_to_river('river/expages/create','create',get_loggedin_userid(),$expages->guid);
+ // Remove the cache
+ unset($_SESSION['expages_content']); unset($_SESSION['expagestitle']);
+
+
+ // Forward back to the page
+ forward("pg/expages/index.php?type={$type}");
+
+?> \ No newline at end of file
diff --git a/mod/externalpages/actions/addfront.php b/mod/externalpages/actions/addfront.php
new file mode 100644
index 000000000..f0a457df9
--- /dev/null
+++ b/mod/externalpages/actions/addfront.php
@@ -0,0 +1,48 @@
+<?php
+
+ /**
+ * Elgg front pages: add/edit
+ * Here we use the title field for the lefthand side and the description for the righthand side
+ *
+ * @package ElggExPages
+ */
+
+ // Make sure we're logged as admin
+ admin_gatekeeper();
+
+ // Get input data
+ $contents_left = get_input('front_left', '', false);
+ $contents_right = get_input('front_right', '', false);
+ $previous_guid = get_input('front_guid');
+
+ //remove the old front page
+ if(get_entity($previous_guid)){
+ delete_entity($previous_guid);
+ }
+
+ // Initialise a new ElggObject
+ $frontpage = new ElggObject();
+ // Tell the system what type of external page it is
+ $frontpage->subtype = "front";
+ // Set its owner to the current user
+ $frontpage->owner_guid = get_loggedin_userid();
+ // For now, set its access to public
+ $frontpage->access_id = ACCESS_PUBLIC;
+ // Set its title and description appropriately
+ $frontpage->title = $contents_left;
+ $frontpage->description = $contents_right;
+
+ // Before we can set metadata, save
+ if (!$frontpage->save()) {
+ register_error(elgg_echo("expages:error"));
+ forward("pg/expages/index.php?type=front");
+ }
+
+ // Success message
+ system_message(elgg_echo("expages:posted"));
+
+
+ // Forward back to the page
+ forward("pg/expages/index.php?type=front");
+
+?>
diff --git a/mod/externalpages/index.php b/mod/externalpages/index.php
new file mode 100644
index 000000000..78a0bb1a3
--- /dev/null
+++ b/mod/externalpages/index.php
@@ -0,0 +1,30 @@
+<?php
+ /**
+ * Elgg External pages
+ *
+ * @package ElggExpages
+ */
+
+ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+
+ admin_gatekeeper();
+ set_context('admin');
+ $type = get_input('type'); //the type of page e.g about, terms etc
+ if(!$type)
+ $type = "front"; //default to the frontpage
+
+ //display the title
+ $title = elgg_view_title(elgg_echo('expages'));
+
+ // Display the correct form
+ if($type == "front")
+ $edit = elgg_view('expages/forms/editfront');
+ else
+ $edit = elgg_view('expages/forms/edit', array('type' => $type));
+
+ // Display the menu
+ $body = elgg_view('page_elements/contentwrapper',array('body' => elgg_view('expages/menu', array('type' => $type)).$edit));
+
+ // Display
+ page_draw(elgg_echo('expages'),elgg_view_layout("two_column_left_sidebar", '', $title . $body));
+?> \ No newline at end of file
diff --git a/mod/externalpages/languages/en.php b/mod/externalpages/languages/en.php
new file mode 100644
index 000000000..8d80ee9f2
--- /dev/null
+++ b/mod/externalpages/languages/en.php
@@ -0,0 +1,42 @@
+<?php
+
+ $english = array(
+
+ /**
+ * Menu items and titles
+ */
+
+ 'expages' => "External pages",
+ 'expages:frontpage' => "Frontpage",
+ 'expages:about' => "About",
+ 'expages:terms' => "Terms",
+ 'expages:privacy' => "Privacy",
+ 'expages:analytics' => "Analytics",
+ 'expages:contact' => "Contact",
+ 'expages:nopreview' => "No preview yet available",
+ 'expages:preview' => "Preview",
+ 'expages:notset' => "This page has not been set up yet.",
+ 'expages:lefthand' => "The lefthand information pane",
+ 'expages:righthand' => "The righthand information pane",
+ 'expages:addcontent' => "You can add content here via your admin tools. Look for the external pages link under admin.",
+ 'item:object:front' => 'Front page items',
+
+ /**
+ * Status messages
+ */
+
+ 'expages:posted' => "Your page was successfully updated.",
+ 'expages:deleted' => "Your page post was successfully deleted.",
+
+ /**
+ * Error messages
+ */
+
+ 'expages:deleteerror' => "There was a problem deleting the old page",
+ 'expages:error' => "There has been an error, please try again and if the problem persists, contact the administrator",
+
+ );
+
+ add_translation("en",$english);
+
+?> \ No newline at end of file
diff --git a/mod/externalpages/manifest.xml b/mod/externalpages/manifest.xml
new file mode 100644
index 000000000..3793d7803
--- /dev/null
+++ b/mod/externalpages/manifest.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin_manifest>
+ <field key="author" value="Curverider" />
+ <field key="version" value="1.7" />
+ <field key="description" value="This is a very simple plugin that lets site admin populate an about page, terms, privacy and contact. You can also edit the frontpage text." />
+ <field key="website" value="http://www.elgg.org/" />
+ <field key="copyright" value="(C) Curverider 2008-2010" />
+ <field key="licence" value="GNU Public License version 2" />
+ <field key="elgg_version" value="2010030101" />
+</plugin_manifest>
diff --git a/mod/externalpages/read.php b/mod/externalpages/read.php
new file mode 100644
index 000000000..3faceb083
--- /dev/null
+++ b/mod/externalpages/read.php
@@ -0,0 +1,35 @@
+<?php
+
+ /**
+ * Elgg read external page
+ *
+ * @package ElggExpages
+ */
+
+ // Load Elgg engine
+ define('externalpage',true);
+ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+
+ // set some variables
+ $type = get_input('expages');
+
+ // Set the title appropriately
+ $area1 = elgg_view_title(elgg_echo("expages:". strtolower($type)));
+
+ //get contents
+ $contents = elgg_get_entities(array('type' => 'object', 'subtype' => $type, 'limit' => 1));
+
+ if($contents){
+ foreach($contents as $c){
+ $area1 .= elgg_view('page_elements/contentwrapper',array('body' => $c->description));
+ }
+ }else
+ $area1 .= elgg_view('page_elements/contentwrapper',array('body' => elgg_echo("expages:notset")));
+
+ // Display through the correct canvas area
+ $body = elgg_view_layout("one_column", $area1);
+
+ // Display page
+ page_draw($title,$body);
+
+?> \ No newline at end of file
diff --git a/mod/externalpages/start.php b/mod/externalpages/start.php
new file mode 100644
index 000000000..33bd7e189
--- /dev/null
+++ b/mod/externalpages/start.php
@@ -0,0 +1,74 @@
+<?php
+ /**
+ * Elgg Simple editing of external pages frontpage/about/term/contact and privacy
+ *
+ * @package ElggExPages
+ */
+
+ function expages_init() {
+
+ global $CONFIG;
+
+ // Register a page handler, so we can have nice URLs
+ register_page_handler('expages','expages_page_handler');
+
+ // Register a URL handler for external pages
+ register_entity_url_handler('expages_url','object','expages');
+
+ // extend views
+ elgg_extend_view('footer/links', 'expages/footer_menu');
+ elgg_extend_view('index/righthandside', 'expages/front_right');
+ elgg_extend_view('index/lefthandside', 'expages/front_left');
+
+ }
+
+ /**
+ * Page setup. Adds admin controls to the admin panel.
+ *
+ */
+ function expages_pagesetup()
+ {
+ if (get_context() == 'admin' && isadminloggedin()) {
+ global $CONFIG;
+ add_submenu_item(elgg_echo('expages'), $CONFIG->wwwroot . 'pg/expages/');
+ }
+ }
+
+ function expages_url($expage) {
+
+ global $CONFIG;
+ return $CONFIG->url . "pg/expages/";
+
+ }
+
+
+ function expages_page_handler($page)
+ {
+ global $CONFIG;
+
+ if ($page[0])
+ {
+ switch ($page[0])
+ {
+ case "read": set_input('expages',$page[1]);
+ include(dirname(__FILE__) . "/read.php");
+ break;
+ default : include($CONFIG->pluginspath . "externalpages/index.php");
+ }
+ }
+ else
+ include($CONFIG->pluginspath . "externalpages/index.php");
+ }
+
+ // Initialise log browser
+ register_elgg_event_handler('init','system','expages_init');
+ register_elgg_event_handler('pagesetup','system','expages_pagesetup');
+
+ // Register actions
+ global $CONFIG;
+ register_action("expages/add",false,$CONFIG->pluginspath . "externalpages/actions/add.php");
+ register_action("expages/addfront",false,$CONFIG->pluginspath . "externalpages/actions/addfront.php");
+ register_action("expages/edit",false,$CONFIG->pluginspath . "externalpages/actions/edit.php");
+ register_action("expages/delete",false,$CONFIG->pluginspath . "externalpages/actions/delete.php");
+
+?> \ No newline at end of file
diff --git a/mod/externalpages/views/default/expages/analytics.php b/mod/externalpages/views/default/expages/analytics.php
new file mode 100644
index 000000000..40f7b6a8d
--- /dev/null
+++ b/mod/externalpages/views/default/expages/analytics.php
@@ -0,0 +1,21 @@
+<?php
+
+ /**
+ * Elgg Analytics view
+ *
+ * @package ElggExpages
+ *
+ */
+
+
+ //get analytics content
+ $contents = elgg_get_entities(array('type' => 'object', 'subtype' => 'analytics', 'limit' => 1));
+
+ if($contents){
+ foreach($contents as $c){
+ echo $c->description;
+ }
+ }
+
+?>
+
diff --git a/mod/externalpages/views/default/expages/css.php b/mod/externalpages/views/default/expages/css.php
new file mode 100644
index 000000000..609f77f69
--- /dev/null
+++ b/mod/externalpages/views/default/expages/css.php
@@ -0,0 +1,13 @@
+<?php
+
+ /**
+ * Elgg externalpages CSS
+ *
+ * @package externalpages
+ */
+
+?>
+
+/* IE6 */
+* html #front_left_tbl { width:676px !important; }
+* html #front_right_tbl { width:676px !important; } \ No newline at end of file
diff --git a/mod/externalpages/views/default/expages/footer_menu.php b/mod/externalpages/views/default/expages/footer_menu.php
new file mode 100644
index 000000000..a2e1616d2
--- /dev/null
+++ b/mod/externalpages/views/default/expages/footer_menu.php
@@ -0,0 +1,17 @@
+<?php
+
+ /**
+ * Elgg External pages footer menu
+ *
+ * @package ElggExpages
+ *
+ */
+
+
+?>
+
+<div class="footer_toolbar_links">|
+<a href="<?php echo $vars['url']; ?>pg/expages/read/About/"><?php echo elgg_echo('expages:about'); ?></a> |
+<a href="<?php echo $vars['url']; ?>pg/expages/read/Terms/"><?php echo elgg_echo('expages:terms'); ?></a> |
+<a href="<?php echo $vars['url']; ?>pg/expages/read/Privacy/"><?php echo elgg_echo('expages:privacy'); ?></a> |
+</div> \ No newline at end of file
diff --git a/mod/externalpages/views/default/expages/forms/edit.php b/mod/externalpages/views/default/expages/forms/edit.php
new file mode 100644
index 000000000..1cdec4198
--- /dev/null
+++ b/mod/externalpages/views/default/expages/forms/edit.php
@@ -0,0 +1,82 @@
+<?php
+
+ /**
+ * Elgg External pages edit
+ *
+ * @package ElggExpages
+ *
+ */
+
+ //get the page type
+ $type = $vars['type'];
+
+ //action
+ $action = "expages/add";
+
+ //grab the required entity
+ $page_contents = elgg_get_entities(array('type' => 'object', 'subtype' => $type, 'limit' => 1));
+
+ if($page_contents){
+ foreach($page_contents as $pc){
+ $description = $pc->description;
+ $guid = $pc->guid;
+ }
+ }else {
+ $description = "";
+ }
+
+ // set the required form variables
+ $input_area = elgg_view('input/longtext', array('internalname' => 'expagescontent', 'value' => $description));
+ $submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
+ $hidden_value = elgg_view('input/hidden', array('internalname' => 'content_type', 'value' => $type));
+ $hidden_guid = elgg_view('input/hidden', array('internalname' => 'expage_guid', 'value' => $guid));
+
+ //type
+ $type = $vars['type'];
+ //set the url
+ $url = $vars['url'] . "pg/expages/index.php?type=";
+
+ if($type == 'about') {
+ $external_page_title = elgg_echo('expages:about');
+ }
+ else if($type == 'terms') {
+ $external_page_title = elgg_echo('expages:terms');
+ }
+ else if($type == 'privacy') {
+ $external_page_title = elgg_echo('expages:privacy');
+ }
+ //preview link
+ // echo "<div class=\"page_preview\"><a href=\"#preview\">" . elgg_echo('expages:preview') . "</a></div>";
+
+ //construct the form
+ $form_body = <<<EOT
+
+ <h3 class='settings'>$external_page_title</h3>
+ <p class='longtext_editarea'>$input_area</p>
+ $hidden_value
+ $hidden_guid
+ <br />
+ $submit_input
+
+EOT;
+?>
+<?php
+ //display the form
+ echo elgg_view('input/form', array('action' => "{$vars['url']}action/$action", 'body' => $form_body));
+?>
+
+<!-- preview page contents -->
+<!--
+<div class="expage_preview">
+<a name="preview"></a>
+<h2>Preview</h2>
+<?php
+/*
+ if($description)
+ echo $description;
+ else
+ echo elgg_echo('expages:nopreview');
+*/
+?>
+</div>
+--> \ No newline at end of file
diff --git a/mod/externalpages/views/default/expages/forms/editfront.php b/mod/externalpages/views/default/expages/forms/editfront.php
new file mode 100644
index 000000000..3e7e8c83b
--- /dev/null
+++ b/mod/externalpages/views/default/expages/forms/editfront.php
@@ -0,0 +1,75 @@
+<?php
+
+ /**
+ * Elgg edit frontpage
+ *
+ * @package ElggExpages
+ *
+ */
+
+ //action
+ $action = "expages/addfront";
+
+ //grab the required entity
+ $page_contents = elgg_get_entities(array('type' => 'object', 'subtype' => 'front', 'limit' => 1));
+
+ if($page_contents){
+ foreach($page_contents as $pc){
+ $description_right = $pc->description;
+ $description_left = $pc->title;
+ $guid = $pc->guid;
+ }
+ }else {
+ $description = "";
+ }
+
+ // set the required form variables
+ $input_area_left = elgg_view('input/longtext', array('internalname' => 'front_left', 'value' => $description_left));
+ $input_area_right = elgg_view('input/longtext', array('internalname' => 'front_right', 'value' => $description_right));
+ $submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
+ $hidden_guid = elgg_view('input/hidden', array('internalname' => 'front_guid', 'value' => $guid));
+ $lefthand = elgg_echo("expages:lefthand");
+ $righthand = elgg_echo("expages:righthand");
+
+ //preview link
+ // echo "<div class=\"page_preview\"><a href=\"#preview\">" . elgg_echo('expages:preview') . "</a></div>";
+
+ //construct the form
+ $form_body = <<<EOT
+
+ <h3 class='settings'>$lefthand</h3>
+ <p class='longtext_editarea'>$input_area_left</p><br />
+ <h3 class='settings'>$righthand</h3>
+ <p class='longtext_editarea'>$input_area_right</p>
+
+ $hidden_guid
+ <br />
+ $submit_input
+
+EOT;
+?>
+<?php
+ //display the form
+ echo elgg_view('input/form', array('action' => "{$vars['url']}action/$action", 'body' => $form_body));
+?>
+
+<!-- preview page contents -->
+<!--
+<div class="expage_preview">
+<a name="preview"></a>
+<h2>Preview</h2>
+<?php
+/*
+ if($description_left){
+ echo "The left column header space<br />";
+ echo $description_left;
+ }
+ if($description_right){
+ echo "The right column header space<br />";
+ echo $description_right;
+ }else
+ echo elgg_echo('expages:nopreview');
+ */
+?>
+</div>
+--> \ No newline at end of file
diff --git a/mod/externalpages/views/default/expages/front_left.php b/mod/externalpages/views/default/expages/front_left.php
new file mode 100644
index 000000000..14d999ead
--- /dev/null
+++ b/mod/externalpages/views/default/expages/front_left.php
@@ -0,0 +1,23 @@
+<?php
+
+ /**
+ * Elgg Frontpage left
+ *
+ * @package ElggExpages
+ *
+ */
+
+
+ //get frontpage right code
+ $contents = elgg_get_entities(array('type' => 'object', 'subtype' => 'front', 'limit' => 1));
+
+ if($contents){
+ foreach($contents as $c){
+ echo $c->title; // title is the left hand content
+ }
+ }else{
+ echo "<p>" . elgg_echo("expages:addcontent") . "</p>";
+ }
+
+?>
+
diff --git a/mod/externalpages/views/default/expages/front_right.php b/mod/externalpages/views/default/expages/front_right.php
new file mode 100644
index 000000000..ab999f890
--- /dev/null
+++ b/mod/externalpages/views/default/expages/front_right.php
@@ -0,0 +1,36 @@
+<?php
+
+ /**
+ * Elgg Frontpage right
+ *
+ * @package ElggExpages
+ *
+ */
+
+ //get frontpage right code
+ $contents = elgg_get_entities(array('type' => 'object', 'subtype' => 'front', 'limit' => 1));
+
+ // nothing to show so we return TRUE to indicate the view was valid
+ if ($contents == FALSE) {
+ return TRUE;
+ }
+
+ $show = '';
+ foreach($contents as $cont){
+ $show = $cont->description;
+ }
+
+ if($show != ''){
+ echo "<div id=\"index_welcome\">";
+
+ if($contents){
+ foreach($contents as $c){
+ echo $c->description;
+ }
+ }else{
+ echo elgg_echo("expages:addcontent");
+ }
+ echo "</div>";
+ }
+
+?> \ No newline at end of file
diff --git a/mod/externalpages/views/default/expages/menu.php b/mod/externalpages/views/default/expages/menu.php
new file mode 100644
index 000000000..d91418065
--- /dev/null
+++ b/mod/externalpages/views/default/expages/menu.php
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Elgg External pages menu
+ *
+ * @package ElggExpages
+ *
+ */
+
+ //type
+ $type = $vars['type'];
+
+ //set the url
+ $url = $vars['url'] . "pg/expages/index.php?type=";
+
+?>
+
+<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
diff --git a/mod/externalpages/views/default/object/expages.php b/mod/externalpages/views/default/object/expages.php
new file mode 100644
index 000000000..69ec7233e
--- /dev/null
+++ b/mod/externalpages/views/default/object/expages.php
@@ -0,0 +1,10 @@
+<?php
+
+ /**
+ * Elgg expages view
+ *
+ * @package ElggExPages
+ *
+ */
+
+?> \ No newline at end of file
diff --git a/mod/sitepages/README.txt b/mod/sitepages/README.txt
deleted file mode 100644
index 2c15bdd74..000000000
--- a/mod/sitepages/README.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-Site pages - Quickly generate static pages and customize the front page, CSS, and
-HTML metatags.
-
-CONTENTS:
- 1. Overview
- 2. Using ECML on the front pages
- 2.1 [loginbox]
- 2.2 [sitestats]
- 2.3 [userlist]
-
-
-1. OVERVIEW
-
- Site Pages provides a simple way to create static content for About, Terms,
- and Privacy pages, and also allows simple modifications of the logged in
- and logged out views, as well as CSS and meta description and tags for SEO.
-
-
-2. USING ECML ON THE FRONT PAGES
-
- Site Pages supports ECML on the front page and provides the following
- ECML keywords:
-
- [loginbox] -- A login box. Required on the logged out front page.
- [sitestats] -- Simple site statistics.
- [userlist] -- A list of users.
-
- To learn more about ECML, click the ECML icon below the input fields.
-
-
-2.1 [loginbox]
- The Login Box keyword displays a box to let users log in. This view
- is required on the logged out front page.
-
-
-2.2 [sitestats]
- The Site Stats keyword doesn't do anything yet.
-
-
-2.3 [userlist]
- The User List keyword displays a list of users and takes the following
- optional arguments (*default if not passed):
-
- list_type=*new|online|random -- Show new users, users active in the
- last 10 minutes, or a random selection.
-
- only_with_avatars=*true|false -- Only show users who have uploaded an
- avatar
-
- limit=*10 -- Show this many users.
diff --git a/mod/sitepages/actions/edit_settings.php b/mod/sitepages/actions/edit_settings.php
deleted file mode 100644
index 8f328eb76..000000000
--- a/mod/sitepages/actions/edit_settings.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- *
- */
-
-$page_type = get_input('page_type', 'frontsimple');
-if (!$sitepage = sitepages_get_sitepage_object($page_type)) {
- $sitepage = sitepages_create_sitepage_object($page_type);
-}
-
-switch ($page_type) {
- case 'about':
- case 'terms':
- case 'privacy':
- $content = get_input('sitepages_content', '', FALSE);
- if (empty($content)) {
- register_error(elgg_echo('sitepages:blank'));
- forward(REFERER);
- }
-
- //$sitepage->title = $page_type;
- $sitepage->description = $content;
- $sitepage->tags = string_to_tag_array(get_input('sitepages_tags'));
-
- break;
- case 'seo':
- $sitepage->title = get_input('metatags', '', FALSE);;
- $sitepage->description = get_input('description', '', FALSE);
-
- break;
- case 'frontsimple':
- default:
- $params = get_input('params', array());
- set_plugin_setting('ownfrontpage', $params['ownfrontpage'], 'sitepages');
-
- $sitepage->welcometitle = get_input('welcometitle', '', FALSE);
- $sitepage->welcomemessage = get_input('welcomemessage', '', FALSE);
- $sitepage->sidebartitle = get_input('sidebartitle', '', FALSE);
- $sitepage->sidebarmessage = get_input('sidebarmessage', '', FALSE);
-
- break;
-}
-
-if ($sitepage->save()) {
- system_message(elgg_echo('sitepages:posted'));
-} else {
- register_error(elgg_echo('sitepages:error'));
-}
-
-forward(REFERER);
diff --git a/mod/sitepages/index.php b/mod/sitepages/index.php
deleted file mode 100644
index 56463a8d8..000000000
--- a/mod/sitepages/index.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/**
- * Elgg index page
- *
- */
-
-/**
- * Start the Elgg engine
- */
-
-require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
-//Load the front page
-$content = elgg_view('sitepages/welcome');
-$content .= elgg_view_title(elgg_echo('content:latest'));
-
-elgg_set_context('search');
-$offset = (int)get_input('offset', 0);
-if(elgg_is_active_plugin('riverdashboard')){
- $items = elgg_view_river_items(0, 0, "", "", "", '', 10, 0, 0, true, false);
- $content .= elgg_view('riverdashboard/container', array('body' => $items . elgg_view('riverdashboard/js')));
-}else{
- $content .= elgg_list_registered_entities(array('limit' => 10, 'offset' => $offset, 'full_view' => FALSE, 'allowed_types' => array('object','group')));
-}
-elgg_set_context('main');
-
-global $autofeed;
-$autofeed = FALSE;
-
-$members = elgg_get_entities_from_metadata(array(
- 'metadata_names' => 'icontime',
- 'types' => 'user',
- 'owner_guid' => 0,
- 'limit' => 10
-));
-//include sidebar free text
-$sidebar = elgg_view('sitepages/sidebar');
-$sidebar .= elgg_view('sitepages/members', array('members' => $members));
-
-$params = array(
- 'content' => $content,
- 'sidebar' => $sidebar
-);
-$content = elgg_view_layout('frontpage', $params);
-echo elgg_view_page(null, $content);
diff --git a/mod/sitepages/languages/en.php b/mod/sitepages/languages/en.php
deleted file mode 100644
index e85c3f456..000000000
--- a/mod/sitepages/languages/en.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-/**
- * Language definitions for Site Pages
- *
- * @package SitePages
- */
-
-$english = array(
- /**
- * Menu items and titles
- */
- 'sitepages' => "Site pages",
- 'sitepages:front' => "Front Page",
- 'sitepages:about' => "About",
- 'sitepages:terms' => "Terms",
- 'sitepages:privacy' => "Privacy",
- 'sitepages:analytics' => "Analytics",
- 'sitepages:contact' => "Contact",
- 'sitepages:nopreview' => "No preview yet available",
- 'sitepages:preview' => "Preview",
- 'sitepages:notset' => "This page has not been set up yet.",
- 'sitepages:new' => "New page",
- 'sitepages:css' => "CSS",
- 'sitepages:seo' => "Metatags",
- 'sitepages:metadescription' => "Meta description for search engines",
- 'sitepages:metatags' => "Meta tags for search engines (use a comma)",
- 'sitepages:seocreated' => "Your search engine information has been added",
- 'sitepages:logged_in_front_content' => "Logged in front page content",
- 'sitepages:logged_out_front_content' => "Logged out front page content",
- 'sitepages:ownfront' => "Turn on the custom frontpage for this network.",
- 'sitepages:addcontent' => "You can add content here via your admin tools. Look for the external pages link under admin.",
- 'item:object:front' => 'Front page items',
-
- 'sitepages:error:no_login' => 'The logged out view for the front page must contain a [login_box] or your users can\'t login!',
-
- /**
- * Status messages
- */
- 'sitepages:posted' => "Your page was successfully posted.",
- 'sitepages:deleted' => "Your page was successfully deleted.",
-
- /**
- * Frontpage form
- **/
-
- 'sitepages:welcometitle' => 'Welcome title',
- 'sitepages:welcomemessage' => 'Welcome message.',
- 'sitepages:welcomeintro' => 'Use the following fields to construct a welcome title and message for your users.',
- 'sitepages:sidebarintro' => 'Use the following input boxes to set a title and some content for the sidebar freeform content area.',
- 'sitepages:sidebartitle' => 'Title',
- 'sitepages:sidebarmessage' => 'Message.',
- 'sitepages:warning' => 'We recommend that you keep this to less than 300 characters.',
- 'sitepagessimple:posted' => 'The frontpage has successfully updated.',
-
- /**
- * Error messages
- */
- 'sitepages:deleteerror' => "There was a problem deleting the old page",
- 'sitepages:error' => "There has been an error, please try again and if the problem persists, contact the administrator",
-
- /**
- * ECML
- */
- 'sitepages:ecml:keywords:loginbox:desc' => 'A standard login box.',
- 'sitepages:ecml:keywords:loginbox:usage' => '[loginbox] Useful for the logged out content area.',
-
- 'sitepages:ecml:keywords:sitestats:desc' => 'This does not exist yet.',
- 'sitepages:ecml:keywords:sitestats:usage' => 'This does not exist yet.',
-
- 'sitepages:ecml:keywords:userlist:desc' => "Lists users.",
- 'sitepages:ecml:keywords:userlist:usage' => "[userlist OPTIONS] Supports only_with_avatars=TRUE|FALSE, list_type=newest|online|random, limit",
-
- 'sitepages:ecml:keywords:entity:desc' => 'Displays a list of any Elgg entity.',
- 'sitepages:ecml:keywords:entity:usage' => '[entity] supports all options in elgg_get_entities()',
-
- 'sitepages:ecml:keywords:view:desc' => 'Displays any Elgg view.',
- 'sitepages:ecml:keywords:view:usage' => '[view src="valid/view" arg1=value1 arg2=value2]',
-
- 'sitepages:ecml:views:custom_frontpage' => "Custom Front Page",
-);
-
-add_translation('en', $english);
diff --git a/mod/sitepages/manifest.xml b/mod/sitepages/manifest.xml
deleted file mode 100644
index 86b6e92f7..000000000
--- a/mod/sitepages/manifest.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
- <name>Site Pages</name>
- <author>Curverider</author>
- <version>1.8</version>
- <description>Create about, terms and privacy pages. You can also edit the frontpage if you know a little html/css.</description>
- <requires>
- <type>plugin</type>
- <name>ecml2</name>
- </requires>
- <website>http://www.elgg.org/</website>
- <copyright>(C) Curverider 2008-2010</copyright>
- <license>GNU Public License version 2</license>
- <requires>
- <type>elgg_version</type>
- <version>2009030702</version>
- </requires>
- <admin_interface>advanced</admin_interface>
-</plugin_manifest>
diff --git a/mod/sitepages/sitepages_functions.php b/mod/sitepages/sitepages_functions.php
deleted file mode 100644
index 5a2fcd8ee..000000000
--- a/mod/sitepages/sitepages_functions.php
+++ /dev/null
@@ -1,113 +0,0 @@
-<?php
-/**
- * Helper functions for Site Pages.
- *
- * @package SitePages
- */
-
-
-/**
- * Returns a single object that holds information about
- * customizations for the $page_type site page. The object guid
- * is stored as private data on the site entity. This allows the pages
- * to still be searchable as standard entities.
- *
- * @param $type
- * @return mixed ElggSitePage on success, FALSE on fail
- */
-function sitepages_get_sitepage_object($page_type) {
-
- $page_guid = get_private_setting(elgg_get_site_entity()->guid, "sitepages:$page_type");
- $sitepage = get_entity($page_guid);
-
- if ($sitepage instanceof ElggSitePage || $sitepage->page_type == $page_type) {
- return $sitepage;
- }
-
- return FALSE;
-}
-
-/**
- * Creates a site page object.
- *
- * @param str $page_type
- * @return mixed ElggSitePage on success, FALSE on fail.
- */
-function sitepages_create_sitepage_object($page_type) {
-
- $sitepage = new ElggSitePage();
- $sitepage->page_type = $page_type;
- $sitepage->access_id = ACCESS_PUBLIC;
- $sitepage->save();
-
- $site = elgg_get_site_entity();
-
- if ($sitepage->save() && set_private_setting($site->getGUID(), "sitepages:$page_type", $sitepage->getGUID())) {
- return $sitepage;
- }
-
- return FALSE;
-}
-
-/**
- * Assembles html for edit sections of site pages.
- *
- * @param str $section
- * @return str html
- */
-function sitepages_get_edit_section_content($page_type, $entity=NULL) {
- $menu = elgg_view('sitepages/menu', array('page_type' => $page_type));
-
- switch ($page_type) {
- case 'front':
- $view = 'sitepages/forms/editfrontsimple';
- break;
-
- case 'seo':
- $view = 'sitepages/forms/editmeta';
- break;
-
- default:
- $view = 'sitepages/forms/edit';
- break;
-
- }
-
- $form .= elgg_view($view, array(
- 'page_type' => $page_type,
- 'entity' => $entity,
- ));
- return $menu . $form;
-}
-
-/**
- * Assembles html for displaying site pages
- *
- * @param string $page_type
- * @return string Formatted html
- */
-function sitepages_get_page_content($page_type) {
- $body = elgg_view_title(elgg_echo("sitepages:". strtolower($page_type)));
-
- $sitepage = sitepages_get_sitepage_object($page_type);
-
- if ($sitepage) {
- $body .= $sitepage->description;
- } else {
- $body .= elgg_echo('sitepages:notset');
- }
-
- $content = elgg_view_layout('one_sidebar', array('content' => $body));
- return $content;
-}
-
-/**
- * Utility object to store site page information.
- */
-class ElggSitePage extends ElggObject {
- public function initializeAttributes() {
- parent::initializeAttributes();
-
- $this->attributes['subtype'] = 'sitepages_page';
- }
-} \ No newline at end of file
diff --git a/mod/sitepages/start.php b/mod/sitepages/start.php
deleted file mode 100644
index 93b6c196e..000000000
--- a/mod/sitepages/start.php
+++ /dev/null
@@ -1,223 +0,0 @@
-<?php
-/**
- * Site Pages provides interfaces to create standard content-static pages
- * and to customize the front page layout and content.
- *
- * Formerly implemented as "external pages" and "custom index."
- *
- * @package SitePages
- *
- * @todo
- * Make sure this stuff doesn't show up in search.
- * DRY up actions and views
- * Use $entity->view to redirect to url of page.
- * The tool settings view is probably not needed as it can be added to the front page edit tab.
- * You can say pg/sitepages/read/any_page_i_want and it will let you.
- */
-
-/**
- * Start the site pages plugin.
- */
-function sitepages_init() {
- require_once(dirname(__FILE__) . '/sitepages_functions.php');
-
- // Extend CSS
- elgg_extend_view('css/screen', 'sitepages/css');
-
- elgg_add_admin_menu_item('sitepages', elgg_echo('sitepages'), 'site');
-
- sitepages_setup_footer_menu();
-
- // register our subtype
- run_function_once('sitepages_runonce');
-
- // Register a page handler, so we can have nice URLs
- register_page_handler('sitepages', 'sitepages_page_handler');
-
- // Register a URL handler for external pages
- register_entity_url_handler('sitepages_url', 'object', 'sitepages');
-
- elgg_extend_view('html_head/extend', 'sitepages/metatags');
-
- // Replace the default index page if user has requested and the site is not running walled garden
- if (elgg_get_plugin_setting('ownfrontpage', 'sitepages') == 'yes') {
- elgg_register_plugin_hook_handler('index', 'system', 'sitepages_custom_index');
- }
-
- // define our own ecml keywords and views
- elgg_register_plugin_hook_handler('get_keywords', 'ecml', 'sitepages_ecml_keyword_hook');
- elgg_register_plugin_hook_handler('get_views', 'ecml', 'sitepages_ecml_views_hook');
-
- // hook into the walled garden pages
- elgg_register_plugin_hook_handler('public_pages', 'walled_garden', 'sitepages_public_pages');
-
- $action_path = elgg_get_plugins_path() . 'sitepages/actions';
- elgg_register_action('settings/sitepages/save', "$action_path/edit_settings.php");
-
-}
-
-/**
- * Registers the sitepages subtype to the right class.
- *
- * @return bool
- */
-function sitepages_runonce() {
- return add_subtype('object', 'sitepages_page', 'ElggSitePage');
-}
-
-/**
- * Override the index if requested.
- *
- * @return TRUE on override
- */
-function sitepages_custom_index() {
- // context is checked by the extended metatags view to print out its custom CSS
- //$context = elgg_get_context();
- //elgg_set_context('sitepages:front');
-
- //if ($contents = elgg_view('sitepages/custom_frontpage')) {
- // echo elgg_view_page(FALSE, $contents);
-
- // elgg_set_context($context);
- // return TRUE to tell index.php we've got its content right here.
- // return TRUE;
- //}
-
- //elgg_set_context($context);
-
- // return NULL to pass this to next in chain, or back to standard index.php.
- //return NULL;
- if (!include_once(dirname(dirname(__FILE__))) . "/sitepages/index.php") {
- return false;
- }
- return true;
-}
-
-/**
- *
- * @param unknown_type $expage
- * @return unknown_type
- *
- * //@todo is this needed?
- */
-function sitepages_url($expage) {
- return 'pg/sitepages/';
-}
-
-/**
- * Serve out views for site pages.
- *
- * @param unknown_type $page
- * @return unknown_type
- */
-function sitepages_page_handler($page) {
-
- // for the owner block.
- if ($logged_in_guid = elgg_get_logged_in_user_guid()) {
- set_page_owner($logged_in_guid);
- }
-
- // sanity checking.
- // on bad params we'll forward so people will bookmark the correct URLs
- // @todo valid page names need to be pulled out into some sort of config var or admin option.
- $default_page = 'About';
-
- $action = isset($page[0]) ? $page[0] : FALSE;
- $page_type = isset($page[1]) ? $page[1] : FALSE;
-
- switch ($action) {
- case 'read':
- $title = elgg_echo('sitepages:' . strtolower($page_type));
- $content = sitepages_get_page_content($page_type);
-
- break;
-
- default:
- forward("pg/sitepages/read/$default_page");
- break;
- }
-
- echo elgg_view_page($title, $content);
-}
-
-/**
- * Setup the links to site pages
- */
-function sitepages_setup_footer_menu() {
- $pages = array('about', 'terms', 'privacy');
- foreach ($pages as $page) {
- $url = "pg/sitepages/read/$page";
- $item = new ElggMenuItem($page, elgg_echo("sitepages:$page"), $url);
- elgg_register_menu_item('footer', $item);
- }
-}
-
-/**
- * Register some default keywords.
- *
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $return_value
- * @param unknown_type $params
- * @return unknown_type
- */
-function sitepages_ecml_keyword_hook($hook, $entity_type, $return_value, $params) {
- $return_value['loginbox'] = array(
- 'view' => 'core/account/login_box',
- 'description' => elgg_echo('sitepages:ecml:keywords:loginbox:desc'),
- 'usage' => elgg_echo('sitepages:ecml:keywords:loginbox:usage'),
- 'restricted' => array('sitepages/custom_frontpage')
- );
-
- $return_value['userlist'] = array(
- 'view' => 'sitepages/keywords/userlist',
- 'description' => elgg_echo('sitepages:ecml:keywords:userlist:desc'),
- 'usage' => elgg_echo('sitepages:ecml:keywords:userlist:usage'),
- 'restricted' => array('sitepages/custom_frontpage')
- );
-
-// $return_value['sitestats'] = array(
-// 'view' => 'sitepages/keywords/sitestats',
-// 'description' => elgg_echo('sitepages:ecml:keywords:sitestats:desc'),
-// 'usage' => elgg_echo('sitepages:ecml:keywords:sitestats:usage'),
-// 'restricted' => array('sitepages/custom_frontpage')
-// );
-
- $return_value['entities'] = array(
- 'description' => elgg_echo('sitepages:ecml:keywords:entity:desc'),
- 'usage' => elgg_echo('sitepages:ecml:keywords:entity:usage'),
- 'restricted' => array('sitepages/custom_frontpage')
- );
-
- $return_value['view'] = array(
- 'description' => elgg_echo('sitepages:ecml:keywords:view:desc'),
- 'usage' => elgg_echo('sitepages:ecml:keywords:view:usage'),
- 'restricted' => array('sitepages/custom_frontpage')
- );
-
- return $return_value;
-}
-
-/**
- * Register the frontpage with ECML.
- *
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $return_value
- * @param unknown_type $params
- */
-function sitepages_ecml_views_hook($hook, $entity_type, $return_value, $params) {
- $return_value['sitepages/custom_frontpage'] = elgg_echo('sitepages:ecml:views:custom_frontpage');
-
- return $return_value;
-}
-
-function sitepages_public_pages($hook, $type, $return_value, $params) {
- $return_value[] = 'pg/sitepages/read/About';
- $return_value[] = 'pg/sitepages/read/Terms';
- $return_value[] = 'pg/sitepages/read/Privacy';
-
- return $return_value;
-}
-
-elgg_register_event_handler('init', 'system', 'sitepages_init');
diff --git a/mod/sitepages/views/default/admin/site/sitepages.php b/mod/sitepages/views/default/admin/site/sitepages.php
deleted file mode 100644
index c323eb875..000000000
--- a/mod/sitepages/views/default/admin/site/sitepages.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-/**
- * Settings Site Pages
- *
- * @package SitePages
- */
-
-$page_type = 'front';
-if (isset($vars['page'][2])) {
- $page_type = $vars['page'][2];
-}
-
-echo sitepages_get_edit_section_content($page_type, $vars['entity']);
diff --git a/mod/sitepages/views/default/canvas/layouts/frontpage.php b/mod/sitepages/views/default/canvas/layouts/frontpage.php
deleted file mode 100644
index bef8b8396..000000000
--- a/mod/sitepages/views/default/canvas/layouts/frontpage.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-
-?>
-<div id="elgg-content" class="clearfix">
- <div id="elgg-sidebar" class="frontpage">
- <?php
- if (isset($vars['area2'])) echo $vars['area2'];
- if (isset($vars['area3'])) echo $vars['area3'];
- ?>
- </div>
-
- <div id="elgg-page-contents" class="frontpage clearfix">
- <?php
- if (isset($vars['area1'])) echo $vars['area1'];
- ?>
- </div>
-</div>
diff --git a/mod/sitepages/views/default/sitepages/css.php b/mod/sitepages/views/default/sitepages/css.php
deleted file mode 100644
index 0034e2fba..000000000
--- a/mod/sitepages/views/default/sitepages/css.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-/**
- * Sitepages CSS
- */
-?>
-#elgg-sidebar.frontpage {
- margin-top:0;
-}
-#elgg-sidebar.frontpage .sitepages_sidebar_object {
- margin-bottom: 30px;
-}
-#elgg-sidebar.frontpage .sitepages_sidebar_object h3 {
- margin-top:12px;
-}
-#elgg-page-contents.frontpage .sitepages_welcome {
- margin-bottom: 20px;
-}
-#elgg-page-contents.frontpage .sitepages_message {
- margin-top: 10px;
-} \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/custom_frontpage.php b/mod/sitepages/views/default/sitepages/custom_frontpage.php
deleted file mode 100644
index 95310e1e5..000000000
--- a/mod/sitepages/views/default/sitepages/custom_frontpage.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * Custom front page.
- * This is in a view so we can parse it for keywords.
- *
- * @package SitePages
- */
-
-$sitepage = sitepages_get_sitepage_object('front');
-
-if ($sitepage) {
- if (elgg_get_logged_in_user_guid()) {
- echo $sitepage->logged_in_content;
- } else {
- echo $sitepage->logged_out_content;
- }
-} \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/forms/edit.php b/mod/sitepages/views/default/sitepages/forms/edit.php
deleted file mode 100644
index 83373ad80..000000000
--- a/mod/sitepages/views/default/sitepages/forms/edit.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/**
- * Edit non front or SEO site pages.
- *
- * @package Elggsitepages
- *
- */
-
-$page_type = $vars['page_type'];
-
-if ($sitepages_object = sitepages_get_sitepage_object($page_type)) {
- $tags = $sitepages_object->tags;
- $description = $sitepages_object->description;
- $guid = $sitepages_object->getGUID();
-} else {
- $tags = array();
- $description = '';
- $guid = '';
-}
-
-// set the required form variables
-$input_area = elgg_view('input/longtext', array(
- 'internalname' => 'sitepages_content',
- 'value' => $description
-));
-$tag_input = elgg_view('input/tags', array(
- 'internalname' => 'sitepages_tags',
- 'value' => $tags
-));
-
-$hidden_value = elgg_view('input/hidden', array(
- 'internalname' => 'page_type',
- 'value' => $page_type
-));
-
-$tag_label = elgg_echo('tags');
-$external_page_title = elgg_echo("sitepages:$page_type");
-
-$form_body = <<<___EOT
-
-<p><label>$external_page_title
-$input_area</p></label>
-
-<p><label>$tag_label
-$tag_input</p></label>
-
-$hidden_value
-
-___EOT;
-
-echo $form_body;
diff --git a/mod/sitepages/views/default/sitepages/forms/editfrontsimple.php b/mod/sitepages/views/default/sitepages/forms/editfrontsimple.php
deleted file mode 100644
index c01c13f23..000000000
--- a/mod/sitepages/views/default/sitepages/forms/editfrontsimple.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-/**
- * Edit form for the custom front page
- *
- * @package SitePages
- */
-
-if($sitepages_object = sitepages_get_sitepage_object('frontsimple')){
- $welcometitle = $sitepages_object->welcometitle;
- $welcomemessage = $sitepages_object->welcomemessage;
- $sidebartitle = $sitepages_object->sidebartitle;
- $sidebarmessage = $sitepages_object->sidebarmessage;
-}else{
- $welcometitle = '';
- $welcomemessage = '';
- $sidebartitle = '';
- $sidebarmessage = '';
-}
-
-
-// set the required form variables
-$welcometitle_form = elgg_view('input/text', array(
- 'internalname' => 'welcometitle',
- 'value' => $welcometitle
-));
-$welcomemessage_form = elgg_view('input/longtext', array(
- 'internalname' => 'welcomemessage',
- 'value' => $welcomemessage,
- 'class' => 'elgg-input-textarea monospace'
-));
-$sidebartitle_form = elgg_view('input/text', array(
- 'internalname' => 'sidebartitle',
- 'value' => $sidebartitle
-));
-$sidebarmessage_form = elgg_view('input/longtext', array(
- 'internalname' => 'sidebarmessage',
- 'value' => $sidebarmessage,
- 'class' => 'elgg-input-textarea monospace'
-));;
-
-$page_type = elgg_view('input/hidden', array(
- 'internalname' => 'page_type',
- 'value' => 'frontsimple',
-));
-
-$welcomemessage_title = elgg_echo('sitepages:welcomemessage');
-$sidebarmessage_title = elgg_echo('sitepages:sidebarmessage');
-$welcometitle_title = elgg_echo('sitepages:welcometitle');
-$sidebartitle_title = elgg_echo('sitepages:sidebartitle');
-$welcome_intro = elgg_echo('sitepages:welcomeintro');
-$sidebar_intro = elgg_echo('sitepages:sidebarintro');
-
-$ownfrontpage_message = elgg_echo('sitepages:ownfront');
-$ownfrontpage = elgg_view('input/dropdown', array(
- 'internalname' => 'params[ownfrontpage]',
- 'value' => isset($vars['entity']->ownfrontpage) ? $vars['entity']->ownfrontpage : 'no',
- 'options_values' => array(
- 'yes' => elgg_echo('option:yes'),
- 'no' => elgg_echo('option:no'),
- ),
-));
-
-//construct the form
-$form_body = <<<___EOT
-
- <p>
- $ownfrontpage_message
- $ownfrontpage
- </p>
-
- <h2>$welcome_intro</h2>
- <p><label>$welcometitle_title
- $welcometitle_form</label></p>
- <p><label>$welcomemessage_title
- $welcomemessage_form</label></p>
-
- <h2>$sidebar_intro</h2>
- <p><label>$sidebartitle_title
- $sidebartitle_form</label></p>
- <p><label>$sidebarmessage_title
- $sidebarmessage_form</label></p>
-
- $page_type
-
-___EOT;
-
-echo $form_body;
diff --git a/mod/sitepages/views/default/sitepages/forms/editmeta.php b/mod/sitepages/views/default/sitepages/forms/editmeta.php
deleted file mode 100644
index 999624153..000000000
--- a/mod/sitepages/views/default/sitepages/forms/editmeta.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
- * Edit form for the custom meta tags and desc
- *
- * @package SitePages
- */
-
-if ($sitepages_object = sitepages_get_sitepage_object('seo')) {
- $meta_tags = $sitepages_object->title;
- $meta_description = $sitepages_object->description;
-} else {
- $meta_tags = '';
- $meta_description = '';
-}
-
-$description = elgg_echo('sitepages:metadescription');
-$input_description = elgg_view('input/plaintext', array(
- 'internalname' => 'description',
- 'value' => $meta_description
-));
-
-$metatags = elgg_echo('sitepages:metatags');
-$input_keywords = elgg_view('input/text', array(
- 'internalname' => 'metatags',
- 'value' => $meta_tags
-));
-
-$page_type = elgg_view('input/hidden', array(
- 'internalname' => 'page_type',
- 'value' => 'seo',
-));
-
-$form_body = <<<___EOT
-<p><label>$description $input_description</p></label>
-<p><label>$metatags $input_keywords</p></label>
-$page_type
-___EOT;
-
-//display the form
-echo $form_body; \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/keywords/sitestats.php b/mod/sitepages/views/default/sitepages/keywords/sitestats.php
deleted file mode 100644
index 689c2282a..000000000
--- a/mod/sitepages/views/default/sitepages/keywords/sitestats.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-/**
- * Site stats
- *
- * @package SitePages
- */
-
-echo "N/A"; \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/keywords/userlist.php b/mod/sitepages/views/default/sitepages/keywords/userlist.php
deleted file mode 100644
index 64c3d82ac..000000000
--- a/mod/sitepages/views/default/sitepages/keywords/userlist.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/**
- * Lists users
- *
- * @package SitePages
- */
-
-$db_prefix = elgg_get_config('dbprefix');
-
-$only_with_avatars = (isset($vars['only_with_avatars'])) ? $vars['only_with_avatars'] : TRUE;
-$list_type = (isset($vars['list_type'])) ? $vars['list_type'] : 'new';
-$limit = (isset($vars['limit'])) ? $vars['limit'] : 10;
-
-$options = array(
- 'type' => 'user',
- 'limit' => $limit
-);
-
-if ($only_with_avatars == TRUE) {
- $options['metadata_name_value_pairs'] = array('name' => 'icontime', 'operand' => '!=', 'value' => 0);
-}
-
-switch ($list_type) {
- case 'new':
- $options['order_by'] = 'e.time_created DESC';
- break;
-
- case 'online':
- // show people with a last action of < 10 minutes.
- $last_action = time() - 10 * 60;
- $options['joins'] = array("JOIN {$db_prefix}users_entity ue on ue.guid = e.guid");
- $options['wheres'] = array("ue.last_action > $last_action");
- break;
-
- case 'random':
- $options['order_by'] = 'RAND()';
- break;
-
- default:
- break;
-}
-
-$users = elgg_get_entities_from_metadata($options);
-
-echo elgg_view_entity_list($users, count($users), 0, $limit, FALSE, FALSE, FALSE); \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/members.php b/mod/sitepages/views/default/sitepages/members.php
deleted file mode 100644
index 9ca33064e..000000000
--- a/mod/sitepages/views/default/sitepages/members.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<div class="sidebar_container clearfix">
-<?php
- $newest_members = $vars['members'];
-?>
-<h3><?php echo elgg_echo('riverdashboard:recentmembers') ?></h3>
-<?php
- foreach($newest_members as $mem){
- echo "<div class='entity-listing-icon'>" . elgg_view("profile/icon",array('entity' => $mem, 'size' => 'small')) . "</div>";
- }
-?>
-</div> \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/menu.php b/mod/sitepages/views/default/sitepages/menu.php
deleted file mode 100644
index aed424af7..000000000
--- a/mod/sitepages/views/default/sitepages/menu.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-/**
- * Displays the tabbed menu for editing site pages.
- *
- * @package SitePages
- */
-
-$page_type = $vars['page_type'];
-$url = elgg_get_site_url()."pg/admin/plugin_settings/sitepages/";
-?>
-
-<div class="elgg-tabs margin-top">
-<ul>
-<?php
- // @todo let users be able to add static content pages.
- $pages = array('front', 'about', 'terms', 'privacy', 'seo');
-
- foreach ($pages as $page) {
- $selected = ($page_type == $page) ? 'class = "selected"' : '';
- echo "<li $selected><a href=\"$url$page\">" . elgg_echo("sitepages:$page") . "</a></li>";
- }
-?>
-</ul>
-</div> \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/metatags.php b/mod/sitepages/views/default/sitepages/metatags.php
deleted file mode 100644
index 6213dde52..000000000
--- a/mod/sitepages/views/default/sitepages/metatags.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * Add any additional defined metatags or CSS.
- *
- * @package SitePages
- */
-
-$meta_details = sitepages_get_sitepage_object('seo');
-
-if ($meta_details) {
- $metatags = $meta_details->title;
- $description = $meta_details->description;
-
- echo <<<___END
-
- <meta name="description" content="$description" />
- <meta name="keywords" content="$metatags" />
-
-___END;
-}
-
-// only show on the custom front page.
-if (elgg_get_context() == 'sitepages:front') {
- $custom_css = sitepages_get_sitepage_object('front');
-
- if ($custom_css && $custom_css->css) {
- echo <<<___END
-
- <style type="text/css">
- {$custom_css->css}
- </style>
-
-___END;
- }
-} \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/sidebar.php b/mod/sitepages/views/default/sitepages/sidebar.php
deleted file mode 100644
index 8326a3087..000000000
--- a/mod/sitepages/views/default/sitepages/sidebar.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-/**
- * Admin welcome message
- **/
-
-$sitepages_object = sitepages_get_sitepage_object('frontsimple');
-$sidebartitle = $sitepages_object->sidebartitle;
-$sidebarmessage = $sitepages_object->sidebarmessage;
-
-if($sidebarmessage){
- echo "<div class='sidebar_container clearfix'><h3>" . $sidebartitle . "</h3>";
- echo $sidebarmessage ."</div>";
-} \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/welcome.php b/mod/sitepages/views/default/sitepages/welcome.php
deleted file mode 100644
index 584dd1c0b..000000000
--- a/mod/sitepages/views/default/sitepages/welcome.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-/**
- * Admin welcome message
- **/
-
-$sitepages_object = sitepages_get_sitepage_object('frontsimple');
-$welcometitle = $sitepages_object->welcometitle;
-$welcomemessage = $sitepages_object->welcomemessage;
-
-if($welcomemessage){
- echo "<div class='sitepages_welcome clearfix'><h2>" . $welcometitle . "</h2>";
- echo "<div class='sitepages_message clearfix'>".$welcomemessage."</div></div>";
-} \ No newline at end of file