diff options
Diffstat (limited to 'views')
29 files changed, 282 insertions, 257 deletions
diff --git a/views/default/core/account/login_box.php b/views/default/core/account/login_box.php index 8c586d425..f39113653 100644 --- a/views/default/core/account/login_box.php +++ b/views/default/core/account/login_box.php @@ -4,8 +4,12 @@ * * @package Elgg * @subpackage Core + * + * @uses $vars['module'] The module name. Default: aside */ +$module = elgg_extract('module', $vars, 'aside'); + $login_url = elgg_get_site_url(); if (elgg_get_config('https_login')) { $login_url = str_replace("http:", "https:", $login_url); @@ -14,4 +18,4 @@ if (elgg_get_config('https_login')) { $title = elgg_echo('login'); $body = elgg_view_form('login', array('action' => "{$login_url}action/login")); -echo elgg_view_module('aside', $title, $body); +echo elgg_view_module($module, $title, $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 @@ -<?php -/** - * Walled Garden Login Form - * - * @todo still requires clean up - */ - -$reg_url = elgg_normalize_url('register'); -$forgot_url = elgg_normalize_url('forgotpassword'); -$cancel_button = elgg_view('input/button', array( - 'value' => 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()); -} - -?> -<h2><?php echo elgg_echo('login'); ?></h2> -<?php -//@todo Forms 1.8: Convert to use elgg_view_form() -echo elgg_view('input/form', array( - 'body' => $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 -<div id="elgg-walledgarden-registration" class="hidden clearfix"> - <div class="elgg-hiddenform-body" class="clearfix"> - <h2>$title</h2> - $body - </div> - <div class="elgg-hiddenform-bottom"></div> -</div> -__HTML; -} - -$title = elgg_echo('user:password:lost'); -$body = elgg_view_form('user/requestnewpassword'); -echo <<<__HTML -<div id="elgg-walledgarden-lostpassword" class="hidden clearfix"> - <div class="elgg-hiddenform-body" class="clearfix"> - <h2>$title</h2> - $body - </div> - <div class="elgg-hiddenform-bottom"></div> -</div> -__HTML; - -//@todo JS 1.8: no -?> -<script type="text/javascript"> -$(document).ready(function() { - $('input.username').focus(); - - // add cancel button to inline forms - $('#elgg-walledgarden-registration').find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>'); - $('#elgg-walledgarden-lostpassword').find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>'); - - function elgg_slide_hiddenform(activateLink, parentElement, toggleElement) { - $(activateLink).closest(parentElement).find(toggleElement).fadeToggle('medium'); - } - - $('a[href="<?php echo $reg_url; ?>"]').click(function(e) { - e.preventDefault(); - elgg_slide_hiddenform(this, '#elgg-walledgarden-login', '#elgg-walledgarden-registration'); - $('input.name').focus(); - }); - - $('a[href="<?php echo $forgot_url; ?>"]').click(function(e) { - e.preventDefault(); - elgg_slide_hiddenform(this, '#elgg-walledgarden-login', '#elgg-walledgarden-lostpassword'); - $('input.lostusername').focus(); - }); - - $('input.elgg-button-cancel').click(function() { - if ($('#elgg-walledgarden-lostpassword').is(':visible')) { - $('a[href="<?php echo $forgot_url; ?>"]').click(); - } else if ($('#elgg-walledgarden-registration').is(':visible')) { - $('a[href="<?php echo $reg_url; ?>"]').click(); - } - return false; - }); -}); -</script> diff --git a/views/default/core/walled_garden/body.php b/views/default/core/walled_garden/body.php new file mode 100644 index 000000000..67d8e0c37 --- /dev/null +++ b/views/default/core/walled_garden/body.php @@ -0,0 +1,11 @@ +<?php +/** + * Walled garden body + */ + +echo elgg_view('core/walled_garden/login'); +echo elgg_view('core/walled_garden/lost_password'); + +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..0a8b4a908 --- /dev/null +++ b/views/default/core/walled_garden/login.php @@ -0,0 +1,37 @@ +<?php +/** + * Walled garden login + */ + +$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, array( + 'class' => 'elgg-walledgarden-double', + 'header' => ' ', + 'footer' => ' ', +)); 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..ce75b558b --- /dev/null +++ b/views/default/core/walled_garden/lost_password.php @@ -0,0 +1,19 @@ +<?php +/** + * Walled garden lost password + */ + +$title = elgg_echo('user:password:lost'); +$body = elgg_view_form('user/requestnewpassword'); +$lost = <<<HTML +<div class="elgg-inner"> + <h3>$title</h3> + $body +</div> +HTML; + +echo elgg_view_module('walledgarden', '', $lost, array( + 'class' => 'elgg-walledgarden-single elgg-walledgarden-password hidden', + 'header' => ' ', + 'footer' => ' ', +)); diff --git a/views/default/core/walled_garden/register.php b/views/default/core/walled_garden/register.php new file mode 100644 index 000000000..7f6aac99b --- /dev/null +++ b/views/default/core/walled_garden/register.php @@ -0,0 +1,23 @@ +<?php +/** + * Walled garden registration + */ + +$title = elgg_echo('register'); +$body = elgg_view_form('register', array(), array( + 'friend_guid' => (int) get_input('friend_guid', 0), + 'invitecode' => get_input('invitecode'), +)); + +$content = <<<__HTML +<div class="elgg-inner"> + <h2>$title</h2> + $body +</div> +__HTML; + +echo elgg_view_module('walledgarden', '', $content, array( + 'class' => 'elgg-walledgarden-single elgg-walledgarden-register hidden', + 'header' => ' ', + 'footer' => ' ', +));
\ No newline at end of file diff --git a/views/default/css/elements/forms.php b/views/default/css/elements/forms.php index d14c341a7..e358c86e7 100644 --- a/views/default/css/elements/forms.php +++ b/views/default/css/elements/forms.php @@ -72,7 +72,7 @@ input[type="radio"] { width:auto; } .elgg-input-checkboxes.elgg-horizontal li, -.elgg-input-radio.elgg-horizontal li { +.elgg-input-radios.elgg-horizontal li { display: inline; padding-right: 10px; } diff --git a/views/default/css/ie7.php b/views/default/css/ie7.php index 754ed3664..db0125b4b 100644 --- a/views/default/css/ie7.php +++ b/views/default/css/ie7.php @@ -53,4 +53,13 @@ .elgg-avatar { display: inline; +} + +.elgg-body-walledgarden .elgg-col-1of2 { + width: 255px; +} + +.elgg-module-walledgarden > .elgg-head, +.elgg-module-walledgarden > .elgg-foot { + width: 530px; }
\ No newline at end of file diff --git a/views/default/css/walled_garden.php b/views/default/css/walled_garden.php index 47850425b..ea2543587 100644 --- a/views/default/css/walled_garden.php +++ b/views/default/css/walled_garden.php @@ -6,36 +6,65 @@ $url = elgg_get_site_url(); ?> -#elgg-walledgarden { +.elgg-body-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 { + position: absolute; + top: 0; + left: 0; +} +.elgg-module-walledgarden > .elgg-head { + height: 17px; +} +.elgg-module-walledgarden > .elgg-body { + padding: 0 10px; +} +.elgg-module-walledgarden > .elgg-foot { + height: 17px; +} +.elgg-walledgarden-double > .elgg-head { + background: url(<?php echo $url; ?>_graphics/walled_garden/two_column_top.png) no-repeat left top; +} +.elgg-walledgarden-double > .elgg-body { + background: url(<?php echo $url; ?>_graphics/walled_garden/two_column_middle.png) repeat-y left top; +} +.elgg-walledgarden-double > .elgg-foot { + background: url(<?php echo $url; ?>_graphics/walled_garden/two_column_bottom.png) no-repeat left top; +} +.elgg-walledgarden-single > .elgg-head { + background: url(<?php echo $url; ?>_graphics/walled_garden/one_column_top.png) no-repeat left top; +} +.elgg-walledgarden-single > .elgg-body { + background: url(<?php echo $url; ?>_graphics/walled_garden/one_column_middle.png) repeat-y left top; +} +.elgg-walledgarden-single > .elgg-foot { + background: url(<?php echo $url; ?>_graphics/walled_garden/one_column_bottom.png) no-repeat left top; } -#elgg-walledgarden-intro { - width: 230px; - float: left; - margin: 35px 15px 15px 35px; +.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-intro ul { - float: left; +.elgg-walledgarden-single > .elgg-body > .elgg-inner { + padding: 0 8px; } -#elgg-walledgarden-login { - width: 230px; - float: left; - margin: 30px 15px 45px 19px; +.elgg-module-walledgarden-login { + margin: 0; +} +.elgg-body-walledgarden h3 { + font-size: 1.5em; + line-height: 1.1em; + padding-bottom: 5px; } .elgg-heading-walledgarden { @@ -43,27 +72,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; -} diff --git a/views/default/forms/login.php b/views/default/forms/login.php index 07f084660..9536bb439 100644 --- a/views/default/forms/login.php +++ b/views/default/forms/login.php @@ -23,13 +23,13 @@ <?php echo elgg_view('login/extend'); ?> <div class="elgg-foot"> - <?php echo elgg_view('input/submit', array('value' => elgg_echo('login'))); ?> - - <label class="right mtm"> + <label class="mtm float-alt"> <input type="checkbox" name="persistent" value="true" /> <?php echo elgg_echo('user:persistent'); ?> </label> + <?php echo elgg_view('input/submit', array('value' => elgg_echo('login'))); ?> + <?php if ($vars['returntoreferer']) { echo elgg_view('input/hidden', array('name' => 'returntoreferer', 'value' => 'true')); @@ -42,7 +42,7 @@ echo '<li><a class="registration_link" href="' . elgg_get_site_url() . 'register">' . elgg_echo('register') . '</a></li>'; } ?> - <li><a href="<?php echo elgg_get_site_url(); ?>forgotpassword"> + <li><a class="forgot_link" href="<?php echo elgg_get_site_url(); ?>forgotpassword"> <?php echo elgg_echo('user:password:lost'); ?> </a></li> </ul> diff --git a/views/default/icon/default.php b/views/default/icon/default.php index 533b92c43..ec39e59f2 100644 --- a/views/default/icon/default.php +++ b/views/default/icon/default.php @@ -5,10 +5,11 @@ * @package Elgg * @subpackage Core * - * @uses $vars['entity'] The entity the icon represents - uses getIconURL() method - * @uses $vars['size'] topbar, tiny, small, medium (default), large, master - * @uses $vars['href'] Optional override for link + * @uses $vars['entity'] The entity the icon represents - uses getIconURL() method + * @uses $vars['size'] topbar, tiny, small, medium (default), large, master + * @uses $vars['href'] Optional override for link * @uses $vars['img_class'] Optional CSS class added to img + * @uses $vars['link_class'] Optional CSS class for the link */ $entity = $vars['entity']; @@ -26,6 +27,7 @@ if (isset($entity->name)) { } else { $title = $entity->title; } +$title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8', false); $url = $entity->getURL(); if (isset($vars['href'])) { @@ -36,11 +38,17 @@ $img_src = $entity->getIconURL($vars['size']); $img = "<img $class src=\"$img_src\" alt=\"$title\" />"; if ($url) { - echo elgg_view('output/url', array( + $params = array( 'href' => $url, 'text' => $img, 'is_trusted' => true, - )); + ); + $class = elgg_extract('link_class', $vars, ''); + if ($class) { + $params['class'] = $class; + } + + echo elgg_view('output/url', $params); } else { echo $img; } diff --git a/views/default/icon/user/default.php b/views/default/icon/user/default.php index 0eb3691bd..54885805b 100644 --- a/views/default/icon/user/default.php +++ b/views/default/icon/user/default.php @@ -5,10 +5,13 @@ * Rounded avatar corners - CSS3 method * uses avatar as background image so we can clip it with border-radius in supported browsers * - * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. - * @uses $vars['size'] The size - tiny, small, medium or large. (medium) - * @uses $vars['hover'] Display the hover menu? (true) - * @uses $vars['class'] Optional class added to the .elgg-avatar div + * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. + * @uses $vars['size'] The size - tiny, small, medium or large. (medium) + * @uses $vars['use_hover'] Display the hover menu? (true) + * @uses $vars['use_link'] Wrap a link around image? (true) + * @uses $vars['class'] Optional class added to the .elgg-avatar div + * @uses $vars['img_class'] Optional CSS class added to img + * @uses $vars['link_class'] Optional CSS class for the link */ $user = elgg_extract('entity', $vars, elgg_get_logged_in_user_entity()); @@ -22,11 +25,13 @@ if (isset($vars['class'])) { $class = "$class {$vars['class']}"; } +$use_link = elgg_extract('use_link', $vars, true); + if (!($user instanceof ElggUser)) { return true; } -$name = htmlspecialchars($user->name, ENT_QUOTES, 'UTF-8'); +$name = htmlspecialchars($user->name, ENT_QUOTES, 'UTF-8', false); $username = $user->username; $icontime = $user->icontime; @@ -35,19 +40,31 @@ if (!$icontime) { } $js = elgg_extract('js', $vars, ''); +if ($js) { + elgg_deprecated_notice("Passing 'js' to icon views is deprecated.", 1.8, 5); +} + +$img_class = ''; +if (isset($vars['img_class'])) { + $img_class = "class=\"{$vars['img_class']}\""; +} -$hover = elgg_extract('hover', $vars, true); +$use_hover = elgg_extract('use_hover', $vars, true); if (isset($vars['override'])) { - elgg_deprecated_notice("Use 'hover' rather than 'override' with user avatars", 1.8, 5); - $hover = false; + elgg_deprecated_notice("Use 'use_hover' rather than 'override' with user avatars", 1.8, 5); + $use_hover = false; +} +if (isset($vars['hover'])) { + // only 1.8.0 was released with 'hover' as the key + $use_hover = $vars['hover']; } $spacer_url = elgg_get_site_url() . '_graphics/spacer.gif'; $icon_url = $user->getIconURL($size); -$icon = "<img src=\"$spacer_url\" alt=\"$name\" title=\"$name\" $js style=\"background: url($icon_url) no-repeat;\" />"; +$icon = "<img src=\"$spacer_url\" alt=\"$name\" title=\"$name\" $img_class $js style=\"background: url($icon_url) no-repeat;\" />"; -$show_menu = $hover && (elgg_is_admin_logged_in() || !$user->isBanned()); +$show_menu = $use_hover && (elgg_is_admin_logged_in() || !$user->isBanned()); ?> <div class="<?php echo $class; ?>"> @@ -63,10 +80,16 @@ if ($show_menu) { echo elgg_view_menu('user_hover', $params); } -echo elgg_view('output/url', array( - 'href' => $user->getURL(), - 'text' => $icon, - 'is_trusted' => true, -)); +if ($use_link) { + $class = elgg_extract('link_class', $vars, ''); + echo elgg_view('output/url', array( + 'href' => $user->getURL(), + 'text' => $icon, + 'is_trusted' => true, + 'class' => $class, + )); +} else { + echo "<a>$icon</a>"; +} ?> </div> diff --git a/views/default/input/date.php b/views/default/input/date.php index ceeb2105c..828ce5520 100644 --- a/views/default/input/date.php +++ b/views/default/input/date.php @@ -49,7 +49,7 @@ if ($timestamp) { // convert timestamps to text for display if (is_numeric($vars['value'])) { - $vars['value'] = gmdate('Y/m/d', $vars['value']); + $vars['value'] = gmdate('Y-m-d', $vars['value']); } $attributes = elgg_format_attributes($vars); diff --git a/views/default/input/friendspicker.php b/views/default/input/friendspicker.php index ecf468da3..b41449fbf 100644 --- a/views/default/input/friendspicker.php +++ b/views/default/input/friendspicker.php @@ -187,7 +187,7 @@ if (!isset($vars['replacement'])) { } //echo "<p>" . $user->name . "</p>"; - $label = elgg_view_entity_icon($friend, 'tiny', array('hover' => false)); + $label = elgg_view_entity_icon($friend, 'tiny', array('use_hover' => false)); $options[$label] = $friend->getGUID(); if ($vars['highlight'] == 'all' diff --git a/views/default/input/userpicker.php b/views/default/input/userpicker.php index 5c4b297b1..246c462da 100644 --- a/views/default/input/userpicker.php +++ b/views/default/input/userpicker.php @@ -27,7 +27,7 @@ function user_picker_add_user($user_id) { return false; } - $icon = elgg_view_entity_icon($user, 'tiny', array('hover' => false)); + $icon = elgg_view_entity_icon($user, 'tiny', array('use_hover' => false)); // this html must be synced with the userpicker.js library $code = '<li><div class="elgg-image-block">'; 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 @@ +<?php +/** + * Walled garden JavaScript + * + * @todo update for new JS lib + */ + +$cancel_button = elgg_view('input/button', array( + 'value' => 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('<?php echo $cancel_button; ?>'); + $('.elgg-walledgarden-register').find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>'); + + $(".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/navigation/listtype.php b/views/default/navigation/listtype.php deleted file mode 100644 index e90667e8d..000000000 --- a/views/default/navigation/listtype.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Elgg list view switcher - * - * @package Elgg - * @subpackage Core - */ - -$baseurl = elgg_http_remove_url_query_element($vars['baseurl'], 'search_listtype'); - -if ($vars['listtype'] == "list") { - $listtype = "gallery"; -} else { - $listtype = "list"; -} - -if (substr_count($baseurl,'?')) { - $baseurl .= "&search_listtype=" . $listtype; -} else { - $baseurl .= "?search_listtype=" . $listtype; -} - -?> - -<p class="mtm"> - <?php echo elgg_echo("listtype:change") ?>: - <a href="<?php echo $baseurl; ?>"><?php echo elgg_echo("listtype:{$listtype}"); ?></a> -</p>
\ No newline at end of file diff --git a/views/default/navigation/viewtype.php b/views/default/navigation/viewtype.php index 69d29dc32..6dfa4ebc7 100644 --- a/views/default/navigation/viewtype.php +++ b/views/default/navigation/viewtype.php @@ -5,9 +5,7 @@ * @package Elgg * @subpackage Core * - * @deprecated 1.8 Use navigation/listtype + * @deprecated 1.8 See how file plugin adds a toggle in function file_register_toggle() */ -elgg_deprecated_notice('navigation/viewtype was deprecated by navigation/listtype', 1.8); - -echo elgg_view('navigation/listtype', $vars);
\ No newline at end of file +elgg_deprecated_notice('navigation/viewtype was deprecated', 1.8); diff --git a/views/default/output/date.php b/views/default/output/date.php index 7c98dddc9..1644a3480 100644 --- a/views/default/output/date.php +++ b/views/default/output/date.php @@ -11,7 +11,7 @@ // convert timestamps to text for display if (is_numeric($vars['value'])) { - $vars['value'] = gmdate('Y/m/d', $vars['value']); + $vars['value'] = gmdate('Y-m-d', $vars['value']); } echo $vars['value']; diff --git a/views/default/page/components/module.php b/views/default/page/components/module.php index b1198ee9a..0a2f1c35a 100644 --- a/views/default/page/components/module.php +++ b/views/default/page/components/module.php @@ -2,10 +2,10 @@ /** * Elgg module element * - * @uses $vars['title'] Title text - * @uses $vars['header'] HTML content of the header + * @uses $vars['title'] Optional title text (do not pass header with this option) + * @uses $vars['header'] Optional HTML content of the header * @uses $vars['body'] HTML content of the body - * @uses $vars['footer'] HTML content of the footer + * @uses $vars['footer'] Optional HTML content of the footer * @uses $vars['class'] Optional additional class for module * @uses $vars['id'] Optional id for module * @uses $vars['show_inner'] Optional flag to leave out inner div (default: false) @@ -28,22 +28,16 @@ if (isset($vars['id'])) { $id = "id=\"{$vars['id']}\""; } -if (isset($vars['header'])) { - if ($vars['header']) { - $header = "<div class=\"elgg-head\">$header</div>"; - } -} else { +if ($vars['header']) { + $header = "<div class=\"elgg-head\">$header</div>"; +} elseif ($title) { $header = "<div class=\"elgg-head\"><h3>$title</h3></div>"; } $body = "<div class=\"elgg-body\">$body</div>"; -if (isset($vars['footer'])) { - if ($vars['footer']) { - $footer = "<div class=\"elgg-foot\">$footer</div>"; - } -} else { - $footer = "<div class=\"elgg-foot\"></div>"; +if ($footer) { + $footer = "<div class=\"elgg-foot\">$footer</div>"; } $contents = $header . $body . $footer; diff --git a/views/default/page/elements/sidebar.php b/views/default/page/elements/sidebar.php index e1d25eed5..fe6bb450e 100644 --- a/views/default/page/elements/sidebar.php +++ b/views/default/page/elements/sidebar.php @@ -6,7 +6,7 @@ */ echo elgg_view_menu('extras', array( - 'sort_by' => 'name', + 'sort_by' => 'priority', 'class' => 'elgg-menu-hz', )); diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php index 625c63ddb..ff8e317c7 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; - ?> -<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,28 +18,8 @@ $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 class="elgg-body-walledgarden"> + <?php echo $vars['body']; ?> </div> </div> <?php echo elgg_view('page/elements/foot'); ?> diff --git a/views/default/profile/icon.php b/views/default/profile/icon.php index a69c41f1e..5f06cfd54 100644 --- a/views/default/profile/icon.php +++ b/views/default/profile/icon.php @@ -12,6 +12,6 @@ elgg_deprecated_notice('The profile/icon view was deprecated. Use elgg_view_entity_icon()', 1.8); $override = elgg_extract('override', $vars, false); -$vars['hover'] = !$override; +$vars['use_hover'] = !$override; echo elgg_view('icon/user/default', $vars); diff --git a/views/default/river/user/default/profileiconupdate.php b/views/default/river/user/default/profileiconupdate.php index 160ffd252..271064a06 100644 --- a/views/default/river/user/default/profileiconupdate.php +++ b/views/default/river/user/default/profileiconupdate.php @@ -17,5 +17,8 @@ $string = elgg_echo('river:update:user:avatar', array($subject_link)); echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'summary' => $string, - 'attachments' => elgg_view_entity_icon($subject, 'tiny', array('hover' => false)), + 'attachments' => elgg_view_entity_icon($subject, 'tiny', array( + 'use_hover' => false, + 'use_link' => false, + )), )); diff --git a/views/installation/page/default.php b/views/installation/page/default.php index 10499ed27..662e8206e 100644 --- a/views/installation/page/default.php +++ b/views/installation/page/default.php @@ -29,7 +29,7 @@ header('Expires: Fri, 05 Feb 1982 00:00:00 -0500', TRUE); <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="SHORTCUT ICON" href="<?php echo elgg_get_site_url(); ?>_graphics/favicon.ico" /> <link rel="stylesheet" href="<?php echo elgg_get_site_url(); ?>install/css/install.css" type="text/css" /> - <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery-1.6.2.min.js"></script> + <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery-1.6.4.min.js"></script> <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>install/js/install.js"></script> </head> <body> diff --git a/views/rss/annotation/generic_comment.php b/views/rss/annotation/generic_comment.php index 9e9107568..de652fc8e 100644 --- a/views/rss/annotation/generic_comment.php +++ b/views/rss/annotation/generic_comment.php @@ -16,7 +16,7 @@ $permalink = $annotation->getURL(); $title = elgg_echo('generic_comment:title', array($poster_name)); $creator = elgg_view('page/components/creator', array('entity' => $annotation)); -$extensions = elgg_view('extensions/item'); +$extensions = elgg_view('extensions/item', $vars); $item = <<<__HTML <item> diff --git a/views/rss/group/default.php b/views/rss/group/default.php index 1276ab8f1..f57c7f82c 100644 --- a/views/rss/group/default.php +++ b/views/rss/group/default.php @@ -20,7 +20,7 @@ if ($vars['entity']->description) { $creator = elgg_view('page/components/creator', $vars); $georss = elgg_view('page/components/georss', $vars); -$extension = elgg_view('extensions/item'); +$extension = elgg_view('extensions/item', $vars); $item = <<<__HTML <item> diff --git a/views/rss/object/default.php b/views/rss/object/default.php index b5d269ac7..be8025953 100644 --- a/views/rss/object/default.php +++ b/views/rss/object/default.php @@ -15,9 +15,11 @@ if (empty($title)) { $permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8'); $pubdate = date('r', $vars['entity']->getTimeCreated()); +$description = autop($vars['entity']->description); + $creator = elgg_view('page/components/creator', $vars); $georss = elgg_view('page/components/georss', $vars); -$extension = elgg_view('extensions/item'); +$extension = elgg_view('extensions/item', $vars); $item = <<<__HTML <item> @@ -25,7 +27,7 @@ $item = <<<__HTML <pubDate>$pubdate</pubDate> <link>$permalink</link> <title><![CDATA[$title]]></title> - <description><![CDATA[{$vars['entity']->description}]]></description> + <description><![CDATA[$description]]></description> $creator$georss$extension </item> diff --git a/views/rss/user/default.php b/views/rss/user/default.php index 1500881f8..1c7bf75e7 100644 --- a/views/rss/user/default.php +++ b/views/rss/user/default.php @@ -17,7 +17,7 @@ if ($vars['entity']->description) { } $georss = elgg_view('page/components/georss', $vars); -$extension = elgg_view('extensions/item'); +$extension = elgg_view('extensions/item', $vars); $item = <<<__HTML <item> |