aboutsummaryrefslogtreecommitdiff
path: root/mod/sitepages
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-13 22:19:14 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-13 22:19:14 +0000
commitc1c2563fc1cd451afaf735350eb1c576740be2f4 (patch)
treec101b4050ee0fbc356699276590bd7138e7ddbdb /mod/sitepages
parentb42125b50f3fcd518ef058211a318ce5c6b66e1b (diff)
downloadelgg-c1c2563fc1cd451afaf735350eb1c576740be2f4.tar.gz
elgg-c1c2563fc1cd451afaf735350eb1c576740be2f4.tar.bz2
swapping sitepages for externalpages since the external pages is easier to integrate into 1.8 . sitepages needs more work before it is ready for release (plus we would need an upgrade script)
git-svn-id: http://code.elgg.org/elgg/trunk@8206 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/sitepages')
-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
21 files changed, 0 insertions, 976 deletions
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