[sork] passwd "logout" menu item
Patrick Boutilier
boutilpj at ednet.ns.ca
Thu Mar 13 16:32:14 PST 2003
I sent this to the imp list earlier this week. Works well and can be
used for other Horde apps I believe.
----------------
I am using Horde 2.2.1, IMP 3.2.1, Turba 1.2, and Passwd 2.2.1-cvs. My
setup hides the /horde directory so apps are accessed like
http://student.ednet.ns.ca/imp, http://student.ednet.ns.ca/turba , etc..
When I log out of IMP and log back in again I am in IMP. However when
logging out of Turba and Passwd and then logging back in again I am
brought into the Horde summary screen.
To fix the problem at my site I changed the part of the horde
registry.php file from
$this->applications['logout'] = array(
'fileroot' => dirname(__FILE__) . '/..',
'webroot' => $this->applications['horde']['webroot'],
'initial_page' => 'login.php?reason=logout',
'icon' => $this->applications['horde']['webroot'] .
'/graphics/logout.gif',
'name' => _("Logout"),
'allow_guests' => false,
'status' => 'notoolbar'
);
to
$this->applications['logout'] = array(
'fileroot' => dirname(__FILE__) . '/..',
'webroot' => $this->applications['horde']['webroot'] . '/imp',
'initial_page' => 'login.php?reason=logout',
'icon' => $this->applications['horde']['webroot'] .
'/graphics/logout.gif',
'name' => _("Logout"),
'allow_guests' => false,
'status' => 'notoolbar'
);
and then added the Logout button to the menu using the
$conf['menu']['apps'] configuration option in each app.
For example in IMP:
$conf['menu']['apps'] = array('turba','passwd','logout');
The final step is to remove the second Logout button that appears in
apps that put their own Logout buttons in. It is usually in
templates/menu/menu.inc
For example in IMP:
/* Logout */
//if ($registry->getMethod('auth/logout') == 'imp' &&
!$imp['direct_access']) {
// Menu::printItem(Horde::url($registry->getParam('webroot', 'horde')
. '/login.php?reason=logout'), _("Logout"), 'logout.gif',
$registry->getParam('graphics', 'horde'));
//} else {
// Menu::printItem(Horde::applicationUrl('login.php?reason=logout'),
_("Logout"), 'logout.gif', $registry->getParam('graphics', 'horde'));
//}
John Dalbec wrote:
> passwd/templates/menu/menu.inc:
>
> /* Logout */
> Menu::printItem(Horde::url($registry->getWebRoot('horde') .
> '/login.php?reason=logout'), _("Logout"), 'logout.gif',
> $registry->getGraphicsPath("horde"));
>
> Shouldn't this be getWebRoot('logout')? I'd like to have some way of
> configuring passwd to logout so that logging back in takes me to IMP and
> not Horde.
> Thanks,
> John Dalbec
>
More information about the sork
mailing list