]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
basic walled garden implementation for logging in
authorcash <cash.costello@gmail.com>
Sun, 30 Oct 2011 22:15:23 +0000 (18:15 -0400)
committercash <cash.costello@gmail.com>
Sun, 30 Oct 2011 22:15:23 +0000 (18:15 -0400)
15 files changed:
_graphics/walled_garden/one_column_bottom.png [new file with mode: 0644]
_graphics/walled_garden/one_column_middle.png [new file with mode: 0644]
_graphics/walled_garden/one_column_top.png [new file with mode: 0644]
_graphics/walled_garden/two_column_bottom.png [new file with mode: 0644]
_graphics/walled_garden/two_column_middle.png [new file with mode: 0644]
_graphics/walled_garden/two_column_top.png [new file with mode: 0644]
_graphics/walled_garden_background_bottom.gif [deleted file]
_graphics/walled_garden_background_extend.gif [deleted file]
_graphics/walled_garden_background_top.gif [deleted file]
_graphics/walled_garden_backgroundfull_bottom.gif [deleted file]
_graphics/walled_garden_backgroundfull_top.gif [deleted file]
engine/lib/elgglib.php
views/default/core/walled_garden/body.php [new file with mode: 0644]
views/default/css/walled_garden.php
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 (file)
index 0000000..1dfd7f8
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 (file)
index 0000000..f53abc1
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 (file)
index 0000000..429a88b
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 (file)
index 0000000..8aeceee
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 (file)
index 0000000..9a93f19
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 (file)
index 0000000..c28b3f6
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 (file)
index 7e25fbe..0000000
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 (file)
index 09f7318..0000000
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 (file)
index 20d551e..0000000
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 (file)
index c05447c..0000000
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 (file)
index 99b4832..0000000
Binary files a/_graphics/walled_garden_backgroundfull_top.gif and /dev/null differ
index 66268cc964e1b711a0e53b277c9751f6790bffc8..95e71e227bf9d220b455ca641d72055508591739 100644 (file)
@@ -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 (file)
index 0000000..bee1c98
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Walled garden body
+ */
+
+$title = elgg_get_site_entity()->name;
+$welcome = elgg_echo('walled_garden:welcome');
+$welcome .= ': <br/>' . $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 = <<<HTML
+<div class="elgg-col elgg-col-1of2">
+       <div class="elgg-inner">
+               <h1 class="elgg-heading-walledgarden">
+                       $welcome
+               </h1>
+               $menu
+       </div>
+</div>
+<div class="elgg-col elgg-col-1of2">
+       <div class="elgg-inner">
+               $login_box
+       </div>
+</div>
+HTML;
+
+echo elgg_view_module('walledgarden', '', $content, $vars);
index 47850425be1f37d8d38b748907b0f7a532425403..9a6b37e98ee3ec4d276d53c32daab272bf90d524 100644 (file)
@@ -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(<?php echo $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(<?php echo $url; ?>_graphics/walled_garden_background_bottom.gif) no-repeat left bottom;
-       width:563px;
-       height:54px;
+.elgg-module-walledgarden > .elgg-head {
+       background: url(<?php echo $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(<?php echo $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(<?php echo $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(<?php echo $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(<?php echo $url; ?>_graphics/walled_garden_backgroundfull_bottom.gif) no-repeat left bottom;
-       width: 563px;
-       height: 54px;
-       position: relative;
-}
index 625c63ddbe5cfebfe9fa2095d7d7ce0514d3d5cc..f13db709a0f175794a69971f631e77525a3cdf24 100644 (file)
@@ -7,12 +7,9 @@
 
 // Set the content type
 header("Content-type: text/html; charset=UTF-8");
-
-$site = elgg_get_site_entity();
-$title = $site->name;
-
 ?>
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <?php echo elgg_view('page/elements/head', $vars); ?>
 </head>
@@ -21,29 +18,7 @@ $title = $site->name;
        <div class="elgg-page-messages">
                <?php echo elgg_view('page/elements/messages', array('object' => $vars['sysmessages'])); ?>
        </div>
-       <div class="elgg-page-body">
-               <div id="elgg-walledgarden">
-                       <div id="elgg-walledgarden-intro">
-                               <h1 class="elgg-heading-walledgarden">
-                                       <?php
-                                               echo elgg_echo('walled_garden:welcome');
-                                               echo ': <br/>';
-                                               echo $title;
-                                       ?>
-                               </h1>
-                               <?php
-                               echo elgg_view_menu('walled_garden', array(
-                                       'sort_by' => 'priority',
-                                       'class' => 'elgg-menu-general elgg-menu-hz',
-                               ));
-                               ?>
-                       </div>
-                       <div id="elgg-walledgarden-login">
-                               <?php echo $vars['body']; ?>
-                       </div>
-               </div>
-               <div id="elgg-walledgarden-bottom"></div>
-       </div>
+       <?php echo $vars['body']; ?>
 </div>
 <?php echo elgg_view('page/elements/foot'); ?>
 </body>