]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
external pages plugin uses walled garden layout when appropriate
authorCash Costello <cash.costello@gmail.com>
Sat, 11 Feb 2012 13:47:35 +0000 (08:47 -0500)
committerCash Costello <cash.costello@gmail.com>
Sat, 11 Feb 2012 13:47:35 +0000 (08:47 -0500)
mod/externalpages/start.php
mod/externalpages/views/default/expages/wrapper.php [new file with mode: 0644]
views/default/css/walled_garden.php

index 152a8b4d96286cf925e4d417f14daafa839ee563..74da7f8280189182bb0071a770604beed6e8257d 100644 (file)
@@ -77,9 +77,16 @@ function expages_page_handler($page, $handler) {
        } else {
                $content .= elgg_echo("expages:notset");
        }
+       $content = elgg_view('expages/wrapper', array('content' => $content));
 
-       $body = elgg_view_layout("one_sidebar", array('content' => $content));
-       echo elgg_view_page($title, $body);
+       if (elgg_is_logged_in() || !elgg_get_config('walled_garden')) {
+               $body = elgg_view_layout('one_sidebar', array('content' => $content));
+               echo elgg_view_page($title, $body);
+       } else {
+               elgg_load_css('elgg.walled_garden');
+               $body = elgg_view_layout('walled_garden', array('content' => $content));
+               echo elgg_view_page($title, $body, 'walled_garden');
+       }
        return true;
 }
 
diff --git a/mod/externalpages/views/default/expages/wrapper.php b/mod/externalpages/views/default/expages/wrapper.php
new file mode 100644 (file)
index 0000000..8eb0b2f
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Wrapper for site pages content area
+ *
+ * @uses $vars['content']
+ */
+
+echo $vars['content'];
+
+echo '<div class="mtm">';
+echo elgg_view('output/url', array(
+       'text' => 'Back',
+       'href' => $_SERVER['HTTP_REFERER'],
+       'class' => 'float-alt'
+));
+echo '</div>';
index ea2543587237dcc3acbcd55c5e65e85644f5fe7a..f6f7f97dc3c35d08bbf00f5de178bd6192541d30 100644 (file)
@@ -54,8 +54,8 @@ $url = elgg_get_site_url();
        padding: 0 8px;
 }
 
-.elgg-walledgarden-single > .elgg-body > .elgg-inner {
-       padding: 0 8px;
+.elgg-walledgarden-single > .elgg-body {
+       padding: 0 18px;
 }
 
 .elgg-module-walledgarden-login {
@@ -68,7 +68,14 @@ $url = elgg_get_site_url();
 }
 
 .elgg-heading-walledgarden {
-       color: #666666;
        margin-top: 60px;
        line-height: 1.1em;
 }
+
+h1, h2, h3, h4, h5, h6 {
+       color: #666;
+}
+
+a {
+       color: #999;
+}
\ No newline at end of file