From e778258e839965597e5ebb8da362806db83e0dfb Mon Sep 17 00:00:00 2001 From: Sem Date: Wed, 26 Oct 2011 12:39:05 +0200 Subject: Closes #3947. External pages are now viewable by visitors in walled-garden sites. Footer menu is also added into walled-garden logging page. --- views/default/page/walled_garden.php | 1 + 1 file changed, 1 insertion(+) (limited to 'views/default/page/walled_garden.php') diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php index 95d17fcff..62d8bb077 100644 --- a/views/default/page/walled_garden.php +++ b/views/default/page/walled_garden.php @@ -31,6 +31,7 @@ $title = $site->name; echo $title; ?> + 'priority', 'class' => 'elgg-menu-hz')); ?>
-- cgit v1.2.3 From f126deebed40cf175a5b0ef2744737189429a5ca Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 27 Oct 2011 21:23:28 -0400 Subject: Fixes #3863 introduced elgg-menu-general so that elgg-menu-footer can be specific to site footer --- mod/externalpages/start.php | 2 +- views/default/css/elements/navigation.php | 16 +++++++++++++++- views/default/css/ie7.php | 7 +++++-- views/default/forms/login.php | 2 +- views/default/page/walled_garden.php | 7 ++++++- 5 files changed, 28 insertions(+), 6 deletions(-) (limited to 'views/default/page/walled_garden.php') diff --git a/mod/externalpages/start.php b/mod/externalpages/start.php index ce911bf10..3169503be 100644 --- a/mod/externalpages/start.php +++ b/mod/externalpages/start.php @@ -44,7 +44,7 @@ function expages_setup_footer_menu() { foreach ($pages as $page) { $url = "$page"; $item = new ElggMenuItem($page, elgg_echo("expages:$page"), $url); - elgg_register_menu_item('footer', $item); + elgg_register_menu_item('walled_garden', $item); } } diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php index bee1312ec..bf1046dda 100644 --- a/views/default/css/elements/navigation.php +++ b/views/default/css/elements/navigation.php @@ -407,7 +407,7 @@ } /* *************************************** - FOOTER + SITE FOOTER *************************************** */ .elgg-menu-footer > li, .elgg-menu-footer > li > a { @@ -428,6 +428,20 @@ float: left; } +/* *************************************** + GENERAL MENU +*************************************** */ +.elgg-menu-general > li, +.elgg-menu-general > li > a { + display: inline-block; + color: #999; +} + +.elgg-menu-general > li:after { + content: "\007C"; + padding: 0 4px; +} + /* *************************************** ENTITY AND ANNOTATION *************************************** */ diff --git a/views/default/css/ie7.php b/views/default/css/ie7.php index 56047b954..754ed3664 100644 --- a/views/default/css/ie7.php +++ b/views/default/css/ie7.php @@ -22,7 +22,9 @@ .elgg-menu-hz > li > span, .elgg-breadcrumbs > li, .elgg-menu-footer > li > a, -.elgg-menu-footer li { +.elgg-menu-footer li, +.elgg-menu-general > li > a, +.elgg-menu-general li { display: inline; } @@ -34,7 +36,8 @@ border-right: 1px solid #bababa; } .elgg-menu-footer li, -.elgg-menu-user li { +.elgg-menu-user li, +.elgg-menu-general li { padding-left: 4px; padding-right: 4px; } diff --git a/views/default/forms/login.php b/views/default/forms/login.php index 956b3a87f..07f084660 100644 --- a/views/default/forms/login.php +++ b/views/default/forms/login.php @@ -36,7 +36,7 @@ } ?> -
-- cgit v1.2.3 From 29e9a542b6f9c9e7d4bc50c6341f5874126fc7d5 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 30 Oct 2011 18:15:23 -0400 Subject: basic walled garden implementation for logging in --- _graphics/walled_garden/one_column_bottom.png | Bin 0 -> 522 bytes _graphics/walled_garden/one_column_middle.png | Bin 0 -> 226 bytes _graphics/walled_garden/one_column_top.png | Bin 0 -> 517 bytes _graphics/walled_garden/two_column_bottom.png | Bin 0 -> 532 bytes _graphics/walled_garden/two_column_middle.png | Bin 0 -> 231 bytes _graphics/walled_garden/two_column_top.png | Bin 0 -> 547 bytes _graphics/walled_garden_background_bottom.gif | Bin 2940 -> 0 bytes _graphics/walled_garden_background_extend.gif | Bin 199 -> 0 bytes _graphics/walled_garden_background_top.gif | Bin 4257 -> 0 bytes _graphics/walled_garden_backgroundfull_bottom.gif | Bin 2811 -> 0 bytes _graphics/walled_garden_backgroundfull_top.gif | Bin 6786 -> 0 bytes engine/lib/elgglib.php | 4 +- views/default/core/walled_garden/body.php | 33 ++++++++++ views/default/css/walled_garden.php | 74 ++++++++-------------- views/default/page/walled_garden.php | 31 +-------- 15 files changed, 65 insertions(+), 77 deletions(-) create mode 100644 _graphics/walled_garden/one_column_bottom.png create mode 100644 _graphics/walled_garden/one_column_middle.png create mode 100644 _graphics/walled_garden/one_column_top.png create mode 100644 _graphics/walled_garden/two_column_bottom.png create mode 100644 _graphics/walled_garden/two_column_middle.png create mode 100644 _graphics/walled_garden/two_column_top.png delete mode 100644 _graphics/walled_garden_background_bottom.gif delete mode 100644 _graphics/walled_garden_background_extend.gif delete mode 100644 _graphics/walled_garden_background_top.gif delete mode 100644 _graphics/walled_garden_backgroundfull_bottom.gif delete mode 100644 _graphics/walled_garden_backgroundfull_top.gif create mode 100644 views/default/core/walled_garden/body.php (limited to 'views/default/page/walled_garden.php') diff --git a/_graphics/walled_garden/one_column_bottom.png b/_graphics/walled_garden/one_column_bottom.png new file mode 100644 index 000000000..1dfd7f8ad Binary files /dev/null and b/_graphics/walled_garden/one_column_bottom.png differ diff --git a/_graphics/walled_garden/one_column_middle.png b/_graphics/walled_garden/one_column_middle.png new file mode 100644 index 000000000..f53abc123 Binary files /dev/null and b/_graphics/walled_garden/one_column_middle.png differ diff --git a/_graphics/walled_garden/one_column_top.png b/_graphics/walled_garden/one_column_top.png new file mode 100644 index 000000000..429a88b75 Binary files /dev/null and b/_graphics/walled_garden/one_column_top.png differ diff --git a/_graphics/walled_garden/two_column_bottom.png b/_graphics/walled_garden/two_column_bottom.png new file mode 100644 index 000000000..8aeceeeee Binary files /dev/null and b/_graphics/walled_garden/two_column_bottom.png differ diff --git a/_graphics/walled_garden/two_column_middle.png b/_graphics/walled_garden/two_column_middle.png new file mode 100644 index 000000000..9a93f19a9 Binary files /dev/null and b/_graphics/walled_garden/two_column_middle.png differ diff --git a/_graphics/walled_garden/two_column_top.png b/_graphics/walled_garden/two_column_top.png new file mode 100644 index 000000000..c28b3f630 Binary files /dev/null and b/_graphics/walled_garden/two_column_top.png differ diff --git a/_graphics/walled_garden_background_bottom.gif b/_graphics/walled_garden_background_bottom.gif deleted file mode 100644 index 7e25fbedc..000000000 Binary files a/_graphics/walled_garden_background_bottom.gif and /dev/null differ diff --git a/_graphics/walled_garden_background_extend.gif b/_graphics/walled_garden_background_extend.gif deleted file mode 100644 index 09f7318e3..000000000 Binary files a/_graphics/walled_garden_background_extend.gif and /dev/null differ diff --git a/_graphics/walled_garden_background_top.gif b/_graphics/walled_garden_background_top.gif deleted file mode 100644 index 20d551e2f..000000000 Binary files a/_graphics/walled_garden_background_top.gif and /dev/null differ diff --git a/_graphics/walled_garden_backgroundfull_bottom.gif b/_graphics/walled_garden_backgroundfull_bottom.gif deleted file mode 100644 index c05447cc8..000000000 Binary files a/_graphics/walled_garden_backgroundfull_bottom.gif and /dev/null differ diff --git a/_graphics/walled_garden_backgroundfull_top.gif b/_graphics/walled_garden_backgroundfull_top.gif deleted file mode 100644 index 99b4832ec..000000000 Binary files a/_graphics/walled_garden_backgroundfull_top.gif and /dev/null differ diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 66268cc96..95e71e227 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1991,9 +1991,9 @@ function elgg_walled_garden_index() { elgg_register_css('elgg.walled_garden', '/css/walled_garden.css'); elgg_load_css('elgg.walled_garden'); - $login = elgg_view('core/account/login_walled_garden'); + $body = elgg_view('core/walled_garden/body'); - echo elgg_view_page('', $login, 'walled_garden'); + echo elgg_view_page('', $body, 'walled_garden'); // return true to prevent other plugins from adding a front page return true; diff --git a/views/default/core/walled_garden/body.php b/views/default/core/walled_garden/body.php new file mode 100644 index 000000000..bee1c9805 --- /dev/null +++ b/views/default/core/walled_garden/body.php @@ -0,0 +1,33 @@ +name; +$welcome = elgg_echo('walled_garden:welcome'); +$welcome .= ':
' . $title; + +$menu = elgg_view_menu('walled_garden', array( + 'sort_by' => 'priority', + 'class' => 'elgg-menu-general elgg-menu-hz', +)); + +$login_box = elgg_view('core/account/login_box', array('module' => 'walledgarden-login')); + +$content = << +
+

+ $welcome +

+ $menu +
+
+
+
+ $login_box +
+
+HTML; + +echo elgg_view_module('walledgarden', '', $content, $vars); diff --git a/views/default/css/walled_garden.php b/views/default/css/walled_garden.php index 47850425b..9a6b37e98 100644 --- a/views/default/css/walled_garden.php +++ b/views/default/css/walled_garden.php @@ -6,36 +6,40 @@ $url = elgg_get_site_url(); ?> -#elgg-walledgarden { +.elgg-module-walledgarden { margin: 100px auto 0 auto; - width: 563px; - min-height: 230px; - background: url(_graphics/walled_garden_background_top.gif) no-repeat left top; - padding: 0; position: relative; + width: 530px; } - -#elgg-walledgarden-bottom { - margin:0 auto; - background: url(_graphics/walled_garden_background_bottom.gif) no-repeat left bottom; - width:563px; - height:54px; +.elgg-module-walledgarden > .elgg-head { + background: url(_graphics/walled_garden/two_column_top.png) no-repeat left top; + height: 17px; } - -#elgg-walledgarden-intro { - width: 230px; - float: left; - margin: 35px 15px 15px 35px; +.elgg-module-walledgarden > .elgg-body { + background: url(_graphics/walled_garden/two_column_middle.png) repeat-y left top; + padding: 0 10px; } - -#elgg-walledgarden-intro ul { - float: left; +.elgg-module-walledgarden > .elgg-foot { + background: url(_graphics/walled_garden/two_column_bottom.png) no-repeat left top; + height: 17px; +} +.elgg-col > .elgg-inner { + margin: 0 0 0 5px; +} +.elgg-col:first-child > .elgg-inner { + margin: 0 5px 0 0; +} +.elgg-col > .elgg-inner { + padding: 0 8px; } -#elgg-walledgarden-login { - width: 230px; - float: left; - margin: 30px 15px 45px 19px; +.elgg-module-walledgarden-login { + margin: 0; +} +.elgg-module-walledgarden-login h3 { + font-size: 1.5em; + line-height: 1.1em; + padding-bottom: 5px; } .elgg-heading-walledgarden { @@ -43,27 +47,3 @@ $url = elgg_get_site_url(); margin-top: 60px; line-height: 1.1em; } - -#elgg-walledgarden-lostpassword, -#elgg-walledgarden-registration { - position: absolute; - right: 0; - top: 0; - width: 563px; - background-color: white; - padding: 0; - background: url(_graphics/walled_garden_backgroundfull_top.gif) no-repeat left top; - height: auto; -} - -.elgg-hiddenform-body { - padding: 30px 40px 0 40px; - height: auto; -} -.elgg-hiddenform-bottom { - margin: 0 auto; - background: url(_graphics/walled_garden_backgroundfull_bottom.gif) no-repeat left bottom; - width: 563px; - height: 54px; - position: relative; -} diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php index 625c63ddb..f13db709a 100644 --- a/views/default/page/walled_garden.php +++ b/views/default/page/walled_garden.php @@ -7,12 +7,9 @@ // Set the content type header("Content-type: text/html; charset=UTF-8"); - -$site = elgg_get_site_entity(); -$title = $site->name; - ?> - + + @@ -21,29 +18,7 @@ $title = $site->name;
$vars['sysmessages'])); ?>
-
-
-
-

- '; - echo $title; - ?> -

- 'priority', - 'class' => 'elgg-menu-general elgg-menu-hz', - )); - ?> -
-
- -
-
-
-
+ -- cgit v1.2.3 From d53556f07f33b843152ff2393aecc6c955f36e97 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 30 Oct 2011 19:09:28 -0400 Subject: added back support for registration and forgotten passwords to walled garden index --- engine/lib/elgglib.php | 2 + views/default/core/account/login_walled_garden.php | 100 --------------------- views/default/core/walled_garden/body.php | 32 ++----- views/default/core/walled_garden/login.php | 33 +++++++ views/default/core/walled_garden/lost_password.php | 17 ++++ views/default/core/walled_garden/register.php | 21 +++++ views/default/css/walled_garden.php | 35 ++++++-- views/default/forms/login.php | 2 +- views/default/js/walled_garden.php | 40 +++++++++ views/default/page/walled_garden.php | 4 +- 10 files changed, 152 insertions(+), 134 deletions(-) delete mode 100644 views/default/core/account/login_walled_garden.php create mode 100644 views/default/core/walled_garden/login.php create mode 100644 views/default/core/walled_garden/lost_password.php create mode 100644 views/default/core/walled_garden/register.php create mode 100644 views/default/js/walled_garden.php (limited to 'views/default/page/walled_garden.php') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 95e71e227..a6f5fbc6f 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1990,6 +1990,8 @@ function elgg_is_valid_options_for_batch_operation($options, $type) { function elgg_walled_garden_index() { elgg_register_css('elgg.walled_garden', '/css/walled_garden.css'); elgg_load_css('elgg.walled_garden'); + elgg_register_js('elgg.walled_garden', '/js/walled_garden.js'); + elgg_load_js('elgg.walled_garden'); $body = elgg_view('core/walled_garden/body'); diff --git a/views/default/core/account/login_walled_garden.php b/views/default/core/account/login_walled_garden.php deleted file mode 100644 index 1606b9592..000000000 --- a/views/default/core/account/login_walled_garden.php +++ /dev/null @@ -1,100 +0,0 @@ - elgg_echo('cancel'), - 'class' => 'elgg-button-cancel mlm', -)); - -$form_body = elgg_view('forms/login'); -$form_body .= elgg_view('input/hidden', array( - 'name' => 'returntoreferer', - 'value' => 'true', -)); - -$login_url = elgg_get_site_url(); -if (elgg_get_config('https_login')) { - $login_url = str_replace("http:", "https:", elgg_get_site_url()); -} - -?> -

- $form_body, - 'action' => "{$login_url}action/login", -)); - -if (elgg_get_config('allow_registration')) { - $title = elgg_echo('register'); - $body = elgg_view_form('register', array(), array( - 'friend_guid' => (int) get_input('friend_guid', 0), - 'invitecode' => get_input('invitecode'), - )); - - echo <<<__HTML - -__HTML; -} - -$title = elgg_echo('user:password:lost'); -$body = elgg_view_form('user/requestnewpassword'); -echo <<<__HTML - -__HTML; - -//@todo JS 1.8: no -?> - diff --git a/views/default/core/walled_garden/body.php b/views/default/core/walled_garden/body.php index bee1c9805..67d8e0c37 100644 --- a/views/default/core/walled_garden/body.php +++ b/views/default/core/walled_garden/body.php @@ -3,31 +3,9 @@ * Walled garden body */ -$title = elgg_get_site_entity()->name; -$welcome = elgg_echo('walled_garden:welcome'); -$welcome .= ':
' . $title; +echo elgg_view('core/walled_garden/login'); +echo elgg_view('core/walled_garden/lost_password'); -$menu = elgg_view_menu('walled_garden', array( - 'sort_by' => 'priority', - 'class' => 'elgg-menu-general elgg-menu-hz', -)); - -$login_box = elgg_view('core/account/login_box', array('module' => 'walledgarden-login')); - -$content = << -
-

- $welcome -

- $menu -
- -
-
- $login_box -
-
-HTML; - -echo elgg_view_module('walledgarden', '', $content, $vars); +if (elgg_get_config('allow_registration')) { + echo elgg_view('core/walled_garden/register'); +} diff --git a/views/default/core/walled_garden/login.php b/views/default/core/walled_garden/login.php new file mode 100644 index 000000000..069422bfa --- /dev/null +++ b/views/default/core/walled_garden/login.php @@ -0,0 +1,33 @@ +name; +$welcome = elgg_echo('walled_garden:welcome'); +$welcome .= ':
' . $title; + +$menu = elgg_view_menu('walled_garden', array( + 'sort_by' => 'priority', + 'class' => 'elgg-menu-general elgg-menu-hz', +)); + +$login_box = elgg_view('core/account/login_box', array('module' => 'walledgarden-login')); + +$content = << +
+

+ $welcome +

+ $menu +
+ +
+
+ $login_box +
+
+HTML; + +echo elgg_view_module('walledgarden', '', $content, array('class' => 'elgg-walledgarden-double')); diff --git a/views/default/core/walled_garden/lost_password.php b/views/default/core/walled_garden/lost_password.php new file mode 100644 index 000000000..60356aaf0 --- /dev/null +++ b/views/default/core/walled_garden/lost_password.php @@ -0,0 +1,17 @@ + +

$title

+ $body + +HTML; + +echo elgg_view_module('walledgarden', '', $lost, array( + 'class' => 'elgg-walledgarden-single elgg-walledgarden-password hidden', +)); diff --git a/views/default/core/walled_garden/register.php b/views/default/core/walled_garden/register.php new file mode 100644 index 000000000..951bd7295 --- /dev/null +++ b/views/default/core/walled_garden/register.php @@ -0,0 +1,21 @@ + (int) get_input('friend_guid', 0), + 'invitecode' => get_input('invitecode'), +)); + +$content = <<<__HTML +
+

$title

+ $body +
+__HTML; + +echo elgg_view_module('walledgarden', '', $content, array( + 'class' => 'elgg-walledgarden-single elgg-walledgarden-register hidden', +)); \ No newline at end of file diff --git a/views/default/css/walled_garden.php b/views/default/css/walled_garden.php index 9a6b37e98..ea2543587 100644 --- a/views/default/css/walled_garden.php +++ b/views/default/css/walled_garden.php @@ -6,23 +6,44 @@ $url = elgg_get_site_url(); ?> -.elgg-module-walledgarden { +.elgg-body-walledgarden { margin: 100px auto 0 auto; position: relative; width: 530px; } +.elgg-module-walledgarden { + position: absolute; + top: 0; + left: 0; +} .elgg-module-walledgarden > .elgg-head { - background: url(_graphics/walled_garden/two_column_top.png) no-repeat left top; height: 17px; } .elgg-module-walledgarden > .elgg-body { - background: url(_graphics/walled_garden/two_column_middle.png) repeat-y left top; padding: 0 10px; } .elgg-module-walledgarden > .elgg-foot { - background: url(_graphics/walled_garden/two_column_bottom.png) no-repeat left top; height: 17px; } +.elgg-walledgarden-double > .elgg-head { + background: url(_graphics/walled_garden/two_column_top.png) no-repeat left top; +} +.elgg-walledgarden-double > .elgg-body { + background: url(_graphics/walled_garden/two_column_middle.png) repeat-y left top; +} +.elgg-walledgarden-double > .elgg-foot { + background: url(_graphics/walled_garden/two_column_bottom.png) no-repeat left top; +} +.elgg-walledgarden-single > .elgg-head { + background: url(_graphics/walled_garden/one_column_top.png) no-repeat left top; +} +.elgg-walledgarden-single > .elgg-body { + background: url(_graphics/walled_garden/one_column_middle.png) repeat-y left top; +} +.elgg-walledgarden-single > .elgg-foot { + background: url(_graphics/walled_garden/one_column_bottom.png) no-repeat left top; +} + .elgg-col > .elgg-inner { margin: 0 0 0 5px; } @@ -33,10 +54,14 @@ $url = elgg_get_site_url(); padding: 0 8px; } +.elgg-walledgarden-single > .elgg-body > .elgg-inner { + padding: 0 8px; +} + .elgg-module-walledgarden-login { margin: 0; } -.elgg-module-walledgarden-login h3 { +.elgg-body-walledgarden h3 { font-size: 1.5em; line-height: 1.1em; padding-bottom: 5px; diff --git a/views/default/forms/login.php b/views/default/forms/login.php index 07f084660..670731883 100644 --- a/views/default/forms/login.php +++ b/views/default/forms/login.php @@ -42,7 +42,7 @@ echo '
  • ' . elgg_echo('register') . '
  • '; } ?> -
  • +
  • diff --git a/views/default/js/walled_garden.php b/views/default/js/walled_garden.php new file mode 100644 index 000000000..46c2934ff --- /dev/null +++ b/views/default/js/walled_garden.php @@ -0,0 +1,40 @@ + elgg_echo('cancel'), + 'class' => 'elgg-button-cancel mlm', +)); +$cancel_button = trim($cancel_button); + +?> + +$(document).ready(function() { + + // add cancel button to inline forms + $(".elgg-walledgarden-password").find('input.elgg-button-submit').after(''); + $('.elgg-walledgarden-register').find('input.elgg-button-submit').after(''); + + $(".forgot_link").click(function(event) { + event.preventDefault(); + $(".elgg-walledgarden-password").fadeToggle(); + }); + + $(".registration_link").click(function(event) { + event.preventDefault(); + $(".elgg-walledgarden-register").fadeToggle(); + }); + + $('input.elgg-button-cancel').click(function(event) { + if ($(".elgg-walledgarden-password").is(':visible')) { + $(".forgot_link").click(); + } else if ($('.elgg-walledgarden-register').is(':visible')) { + $(".registration_link").click(); + } + event.preventDefault(); + }); +}); \ No newline at end of file diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php index f13db709a..ff8e317c7 100644 --- a/views/default/page/walled_garden.php +++ b/views/default/page/walled_garden.php @@ -18,7 +18,9 @@ header("Content-type: text/html; charset=UTF-8");
    $vars['sysmessages'])); ?>
    - +
    + +
    -- cgit v1.2.3