diff options
author | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-25 17:06:31 +0000 |
---|---|---|
committer | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-25 17:06:31 +0000 |
commit | b50eaba25354fa03663e6b30cb5e7da5e255cbb2 (patch) | |
tree | a309740c57333dfabfb343b976689cb40666dba3 | |
parent | 567c41286ef9dd28877caee66843be8e42d8d11e (diff) | |
download | elgg-b50eaba25354fa03663e6b30cb5e7da5e255cbb2.tar.gz elgg-b50eaba25354fa03663e6b30cb5e7da5e255cbb2.tar.bz2 |
Walled Garden login page is no longer tied to the default page shell.
git-svn-id: http://code.elgg.org/elgg/trunk@6209 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | _graphics/walled_garden_background_bottom.gif | bin | 0 -> 2940 bytes | |||
-rw-r--r-- | _graphics/walled_garden_background_extend.gif | bin | 0 -> 199 bytes | |||
-rw-r--r-- | _graphics/walled_garden_background_top.gif | bin | 0 -> 10169 bytes | |||
-rw-r--r-- | engine/lib/elgglib.php | 11 | ||||
-rw-r--r-- | views/default/account/forms/login_walled_garden.php | 59 | ||||
-rw-r--r-- | views/default/css.php | 83 | ||||
-rw-r--r-- | views/default/page_shells/walled_garden.php | 30 |
7 files changed, 177 insertions, 6 deletions
diff --git a/_graphics/walled_garden_background_bottom.gif b/_graphics/walled_garden_background_bottom.gif Binary files differnew file mode 100644 index 000000000..7e25fbedc --- /dev/null +++ b/_graphics/walled_garden_background_bottom.gif diff --git a/_graphics/walled_garden_background_extend.gif b/_graphics/walled_garden_background_extend.gif Binary files differnew file mode 100644 index 000000000..09f7318e3 --- /dev/null +++ b/_graphics/walled_garden_background_extend.gif diff --git a/_graphics/walled_garden_background_top.gif b/_graphics/walled_garden_background_top.gif Binary files differnew file mode 100644 index 000000000..145bac9e9 --- /dev/null +++ b/_graphics/walled_garden_background_top.gif diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 93fb7dc28..ea2ca9f74 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -3171,12 +3171,11 @@ function elgg_init() { } function elgg_walled_garden_index() { - global $CONFIG; - - $login = elgg_view('account/forms/login'); - $layout = elgg_view_layout('one_column', $login); - - echo page_draw('', $layout); + $login = elgg_view('account/forms/login_walled_garden'); + echo elgg_view('page_shells/walled_garden', array( + 'body' => $login, + 'sysmessages' => system_messages(NULL, ''), + )); // @hack Index must exit to keep plugins from continuing to extend exit; diff --git a/views/default/account/forms/login_walled_garden.php b/views/default/account/forms/login_walled_garden.php new file mode 100644 index 000000000..05c8215a8 --- /dev/null +++ b/views/default/account/forms/login_walled_garden.php @@ -0,0 +1,59 @@ +<?php +/** +* Walled Garden Login Form +*/ + +global $CONFIG; + +$form_body = "<label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login_textarea username')) . "</label>"; +$form_body .= "<br />"; +$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login_textarea')) . "</label><br />"; +$form_body .= elgg_view('input/hidden', array('internalname' => 'returntoreferer', 'value' => 'true')); +$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))); +$form_body .= "<div class='remember_me'><label><input type='checkbox' name='persistent' checked value='true' />".elgg_echo('user:persistent')."</label></div>"; +$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>"; + +$login_url = $vars['url']; +if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) { + $login_url = str_replace("http", "https", $vars['url']); +} +?> +<style type="text/css"> + body {background:white !important; text-align: center !important;} +</style> +<h2><?php echo elgg_echo('login'); ?></h2> +<?php + echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login")); + echo elgg_view('login/extend'); // view for plugins to extend +?> + +<div class="lostpassword_form margin_top hidden"> + <?php + $lostpassword_form_body = "<p>" . elgg_echo('user:password:text') . "</p>"; + $lostpassword_form_body .= "<p class='margin_none'><label>". elgg_echo('username') . " " + . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login_textarea lostusername')) . "</label></p>"; + $lostpassword_form_body .= elgg_view('input/captcha'); + $lostpassword_form_body .= "<p>" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "</p>"; + + ?> + <h2><?php echo elgg_echo('user:password:lost'); ?></h2> + <?php + echo elgg_view('input/form', array( + 'action' => "{$vars['url']}action/user/requestnewpassword", + 'body' => $lostpassword_form_body, + 'class' => "margin_top" + )); + ?> +</div> + +<script type="text/javascript"> +$(document).ready(function() { + $('input.username').focus(); + + $('a.forgotten_password_link').click(function(e) { + e.preventDefault(); + elgg_slide_toggle(this, '.walledgardenlogin', '.lostpassword_form'); + $('input.lostusername').focus(); + }); +}); +</script> diff --git a/views/default/css.php b/views/default/css.php index 56edd4c9e..3b5e2efc0 100644 --- a/views/default/css.php +++ b/views/default/css.php @@ -1535,3 +1535,86 @@ a.action_button:focus { p.elgg_likes_owner { padding-top:4px; } + + +/* *************************************** + WalledGarden +*************************************** */ +#walledgarden_container { + margin:100px auto 0 auto; + position:relative; + padding:0; + width:563px; + background: url(<?php echo $vars['url']; ?>_graphics/walled_garden_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']; ?>_graphics/walled_garden_background_top.gif) no-repeat left top; +} +#walledgarden_bottom { + margin:0 auto; + background: url(<?php echo $vars['url']; ?>_graphics/walled_garden_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 diff --git a/views/default/page_shells/walled_garden.php b/views/default/page_shells/walled_garden.php new file mode 100644 index 000000000..fc44472e9 --- /dev/null +++ b/views/default/page_shells/walled_garden.php @@ -0,0 +1,30 @@ +<?php +/** + * + */ + +// Set the content type +header("Content-type: text/html; charset=UTF-8"); + +// Set title +if (empty($vars['title'])) { + $title = $vars['config']->sitename; +} elseif (empty($vars['config']->sitename)) { + $title = $vars['title']; +} else { + $title = $vars['config']->sitename . ": " . $vars['title']; +} + +echo elgg_view('page_elements/html_begin', $vars); + +$view = elgg_view('messages/list', array('object' => $vars['sysmessages'])); + +echo "<div id='walledgarden_sysmessages'>$view</div>"; +echo '<div id="walledgarden_container"><div id="walledgarden" class="clearfloat">'; +echo "<div class=\"walledgardenintro clearfloat\"><h1>Welcome to:<br />$title</h1></div>"; +echo "<div class=\"walledgardenlogin clearfloat\">{$vars['body']}</div>"; +echo '</div>'; +echo '<div id="walledgarden_bottom"></div>'; +echo '</div>'; + +echo elgg_view('page_elements/html_end', $vars); |