Skip to content

Commit

Permalink
- Guests can no longer make the header disappear. I have a strong bel…
Browse files Browse the repository at this point in the history
…ief that this kind of trick will only be of interest to regular users of a forum, so... Why waste cookie bandwidth on this? (index.template.php, script.js)

* Indenazi. (Boards.template.php, ManageMembergroups.template.php)
  • Loading branch information
Nao committed Jul 5, 2014
1 parent e17a1a1 commit 9247a50
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions core/html/Boards.template.php
Expand Up @@ -220,8 +220,8 @@ function template_boards_newsfader()
</we:cat>
<ul class="reset" id="fadeScroller">';

foreach ($context['news_lines'] as $news)
echo '
foreach ($context['news_lines'] as $news)
echo '
<li>', $news, '</li>';

echo '
Expand Down
4 changes: 2 additions & 2 deletions core/html/ManageMembergroups.template.php
Expand Up @@ -770,6 +770,6 @@ function template_callback_badge_order()
</ul>';

add_js('
$(\'#sortable\').sortable({ handle: \'.handle\' });
$(\'#sortable\').disableSelection();');
$(\'#sortable\').sortable({ handle: \'.handle\' });
$(\'#sortable\').disableSelection();');
}
3 changes: 2 additions & 1 deletion core/html/index.template.php
Expand Up @@ -221,7 +221,8 @@ function template_logo_toggler()
{
global $options;

echo '
if (we::$is_member)
echo '
<div id="upshrink"', empty($options['collapse_header']) ? ' class="fold"' : '', '>›</div>';
}

Expand Down
22 changes: 12 additions & 10 deletions core/javascript/script.js
Expand Up @@ -621,16 +621,18 @@ $(function ()

$(window).load(function ()
{
$('#upshrink').attr('title', $txt['upshrink_description']);

// You may change the ID names for the elements in the index template,
// but you'll have to add_js() the code below, with the new IDs in place.
new weToggle({
isCollapsed: !!window.we_colhead,
aSwapContainers: ['banner'],
aSwapImages: ['upshrink'],
sOption: 'collapse_header'
});
@if member {
$('#upshrink').attr('title', $txt['upshrink_description']);

// You may change the ID names for the elements in the index template,
// but you'll have to add_js() the code below, with the new IDs in place.
new weToggle({
isCollapsed: !!window.we_colhead,
aSwapContainers: ['banner'],
aSwapImages: ['upshrink'],
sOption: 'collapse_header'
});
}

// Show a pop-up with more options when focusing the quick search box.
var opened, $pop = $('<div class="mimenu right">').appendTo($('#search_form').addClass('mime'));
Expand Down

0 comments on commit 9247a50

Please sign in to comment.