+++ /dev/null
-<?php
-/**
- * Elgg Walled Garden
- *
- * @package WalledGarden
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
-// Get the Elgg engine
-require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
-//grab the login form
-$login = elgg_view("account/forms/login");
-
-//display the contents in our new canvas layout
-$body = elgg_view_layout('walled_garden',$login);
-
-page_draw_walledgarden($title, $body);
+++ /dev/null
-<?php
-/**
- * An English language translation file
- */
-
-$english = array(
- 'walledgarden' => 'Walled Garden',
-
- 'walledgarden:new_user:fail' => 'This site does not accept new user registration.',
-);
-
-add_translation('en', $english);
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest>
- <field key="author" value="Curverider" />
- <field key="version" value="1.7" />
- <field key="description" value="Walled garden support for Elgg" />
- <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" />
- <field key="admin_interface" value="advanced" />
-</plugin_manifest>
+++ /dev/null
-Make sure the walledgarden plugin is the last one in the plugin list to ensure it works as expected.
\ No newline at end of file
+++ /dev/null
-<?php
-
-/**
- * Walled garden support.
- */
-
-function walledgarden_init(){
- global $CONFIG;
-
- $CONFIG->disable_registration = true;
-
- // elgg_set_viewtype('default');
- elgg_extend_view('pageshells/pageshell', 'walledgarden/walledgarden');
- elgg_extend_view('css','walledgarden/css');
-
- // restrict external user creation
- register_plugin_hook('new_twitter_user', 'twitter_service', 'walledgarden_new_external_user');
- register_plugin_hook('new_facebook_user', 'facebook_service', 'walledgarden_new_external_user');
-
- if(!isloggedin())
- register_plugin_hook('index','system','walledgarden_index');
-}
-
-function walledgarden_pagesetup() {
-
- global $CONFIG;
- if (current_page_url() != $CONFIG->url
- && !defined('externalpage')
- && !isloggedin()) {
- forward();
- exit;
- }
-
-}
-
-function walledgarden_index() {
-
- if (!include_once(dirname(dirname(__FILE__))) . "/walledgarden/index.php") {
- return false;
- }
- return true;
-
-}
-
-function walledgarden_new_external_user($hook, $entity_type, $returnvalue, $params) {
- // do not allow new users to be created within the walled-garden
- register_error(elgg_echo('walledgarden:new_user:fail'));
- return FALSE;
-}
-
-/**
- * This is so the homepage can have its own pageshell
- **/
-
-function page_draw_walledgarden($title, $body, $sidebar = "") {
-
- // Draw the page
- $output = elgg_view('page_shells/walled_garden_index', array(
- 'title' => $title,
- 'body' => $body,
- 'sidebar' => $sidebar,
- 'sysmessages' => system_messages(null,"")
- )
- );
- $split_output = str_split($output, 1024);
-
- foreach($split_output as $chunk) {
- echo $chunk;
- }
-}
-
-register_elgg_event_handler('init','system','walledgarden_init');
-register_elgg_event_handler('pagesetup','system','walledgarden_pagesetup');
+++ /dev/null
-<?php\r
-/**\r
-* Walled Garden Login Form\r
-*/\r
- \r
-global $CONFIG;\r
-\r
-$form_body = "<label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login_textarea username')) . "</label>";\r
-$form_body .= "<br />";\r
-$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login_textarea')) . "</label><br />";\r
-$form_body .= elgg_view('input/hidden', array('internalname' => 'returntoreferer', 'value' => 'true'));\r
-$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login')));\r
-$form_body .= "<div class='remember_me'><label><input type='checkbox' name='persistent' checked value='true' />".elgg_echo('user:persistent')."</label></div>";\r
-$form_body .= "<p class='lost_password'><a class='forgotten_password_link' href=\"{$login_url}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>";\r
-\r
-$login_url = $vars['url'];\r
-if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {\r
- $login_url = str_replace("http", "https", $vars['url']);\r
-}\r
-?>\r
-<style type="text/css">\r
- body {background:white !important; text-align: center !important;}\r
-</style>\r
-<h2><?php echo elgg_echo('login'); ?></h2>\r
-<?php\r
- echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login"));\r
- echo elgg_view('login/extend'); // view for plugins to extend\r
-?>\r
-\r
-<div class="lostpassword_form margin_top hidden">\r
- <?php\r
- $lostpassword_form_body = "<p>" . elgg_echo('user:password:text') . "</p>";\r
- $lostpassword_form_body .= "<p class='margin_none'><label>". elgg_echo('username') . " "\r
- . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login_textarea lostusername')) . "</label></p>";\r
- $lostpassword_form_body .= elgg_view('input/captcha');\r
- $lostpassword_form_body .= "<p>" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "</p>";\r
- \r
- ?>\r
- <h2><?php echo elgg_echo('user:password:lost'); ?></h2>\r
- <?php\r
- echo elgg_view('input/form', array(\r
- 'action' => "{$vars['url']}action/user/requestnewpassword",\r
- 'body' => $lostpassword_form_body,\r
- 'class' => "margin_top"\r
- ));\r
- ?>\r
-</div>\r
-\r
-<script type="text/javascript"> \r
-$(document).ready(function() { \r
- $('input.username').focus();\r
- \r
- $('a.forgotten_password_link').click(function(e) {\r
- e.preventDefault();\r
- elgg_slide_toggle(this, '.walledgardenlogin', '.lostpassword_form');\r
- $('input.lostusername').focus();\r
- }); \r
-}); \r
-</script>
\ No newline at end of file
+++ /dev/null
-<?php\r
-/**\r
- * Elgg pageshell\r
- * The standard HTML page shell that everything else fits into\r
- *\r
- * @package Elgg\r
- * @subpackage Core\r
- * @author Curverider Ltd\r
- * @link http://elgg.org/\r
- *\r
- * @uses $vars['config'] The site configuration settings, imported\r
- * @uses $vars['title'] The page title\r
- * @uses $vars['body'] The main content of the page\r
- * @uses $vars['messages'] A 2d array of various message registers, passed from system_messages()\r
- */\r
-\r
-// Set the content type\r
-header("Content-type: text/html; charset=UTF-8");\r
-\r
-// Set title\r
-if (empty($vars['title'])) {\r
- $title = $vars['config']->sitename;\r
-} else if (empty($vars['config']->sitename)) {\r
- $title = $vars['title'];\r
-} else {\r
- $title = $vars['config']->sitename . ": " . $vars['title'];\r
-}\r
-echo elgg_view('page_elements/html_begin', $vars);\r
-echo "<div id='walledgarden_sysmessages'>".elgg_view('messages/list', array('object' => $vars['sysmessages']))."</div>";\r
- \r
-echo "<div id='walledgarden_container'><div id='walledgarden' class='clearfloat'>"; \r
- echo "<div class='walledgardenintro clearfloat'><h1>Welcome to:<br />" . $title . "</h1></div>";\r
- echo "<div class='walledgardenlogin clearfloat'>".$vars['body']."</div>";\r
-echo "</div>";\r
-echo "<div id='walledgarden_bottom'></div>";\r
-echo "</div>";\r
-echo elgg_view('page_elements/html_end', $vars);\r
-?>\r
-\r
+++ /dev/null
-<?php
-/**
-* Elgg WalledGarden CSS
-*/
-?>
-#walledgarden_container {
- margin:100px auto 0 auto;
- position:relative;
- padding:0;
- width:563px;
- background: url(<?php echo $vars['url']; ?>mod/walledgarden/graphics/background_extend.gif) repeat-y left top;
- text-align: left;
-}
-#walledgarden {
- position: relative;
- padding:0;
- width:563px;
- min-height:230px;
- background: url(<?php echo $vars['url']; ?>mod/walledgarden/graphics/background_top.gif) no-repeat left top;
-}
-#walledgarden_bottom {
- margin:0 auto;
- background: url(<?php echo $vars['url']; ?>mod/walledgarden/graphics/background_bottom.gif) no-repeat left bottom;
- width:563px;
- height:54px;
- position: relative;
-}
-.walledgardenintro {
- float:left;
- min-height:200px;
- width:223px;
- padding:15px;
- margin:19px 0 0 23px;
-}
-.walledgardenlogin {
- float:left;
- min-height:200px;
- width:223px;
- padding:15px 15px 0 15px;
- margin:19px 0 0 11px;
-}
-.walledgardenintro h1 {
- color:#666666;
- margin-top:80px;
- line-height: 1.1em;
-}
-.walledgardenlogin h2 {
- color:#666666;
- border-bottom:1px solid #CCCCCC;
- margin-bottom:5px;
- padding-bottom:5px;
-}
-.walledgardenlogin form input.login_textarea {
- margin:0 0 10px 0;
- width:210px;
-}
-.walledgardenlogin form label {
- color:#666666;
-}
-.walledgardenlogin .remember_me label {
- font-size:1em;
- font-weight:normal;
-}
-.walledgardenlogin .remember_me {
- display:block;
- float:right;
- margin-left:0;
- margin-top:-34px;
- text-align:right;
- width:100%;
-}
-.walledgardenlogin .lost_password {
- margin-bottom: 10px;
-}
-.walledgardenlogin a.forgotten_password_link {
- color:#999999;
-}
-#walledgarden_sysmessages #elgg_system_message {
- width: 523px;
- right:0;
- margin:10px auto 0 auto;
- position: relative;
-}
\ No newline at end of file
+++ /dev/null
-<?php
- /**
- * Walled garden support.
- *
- * @package ElggWalledGarden
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- */
-
- // Forward!
- if (!defined('externalpage'))
- gatekeeper();
-?>
\ No newline at end of file