How to always default top user info box to closed/collapsed?

Started by ilsa, March 24, 2008, 08:13:29 PM

Previous topic - Next topic

ilsa

How would I modify the v1.1.4 default template code so that the header box at the top of the page (i.e., the one with the greeting, # of messages, quick login, etc.) is always closed/collapsed upon loading of the page, no matter what the cookie value is. Alternatively, how could I disable the cookie that keeps track of whether that info box was open or closed?

ilsa

Never mind (as if anyone was waiting for the answer). I achieved what I wanted by changing these lines in index.template.php:

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);


to this:
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
    $options['collapse_header'] = 1;


What this gets you is that the user info box does not display upon initial load or refresh of the index page by a non-member or logged-out member (i.e., guest), even if the guest had previously opened it themselves. Note that I don't let guests browse or search the forum. All they get when they click the user info box expand/collapse button (after further mods to index.template.php) is the brief greeting and a reminder to login or register.

Advertisement: