[dev] persistant sidebar menu
Ben Chavet
ben at chavet.net
Sat Aug 9 05:48:26 PDT 2003
Here is the patch I was talking about earlier that will allow the side menu to
always be displayed. When enabled, this feature will show the side menu and
refresh it when there is a login or a logout. This makes the login/logout link
change to what is appropriate as well as adding/removing the Administration
link when appropriate. It has a side-effect of collapsing any submenus, but I
think that is acceptable, since you are changing the state of the application,
anyway.
I had to make a handful of changes in a lot of different places, so here's the
rundown:
* the 'target' parameter is documented in registry.php, but was not implemented
in lib/Menu.php. I had to implement that to get this to work properly.
* Added a new parameter (always-display) to $conf['menu'] to control this
setting
* Added a 'login' entry to registry.php
* Added a 'target' parameter to the login and logout entries in registry.php.
'_top' is the default.
* Changed the 'logout' link in the portal to use the settings in the registry.
* Made index.php look for the new setting and create the frameset when
appropriate
* Made login.php send a new GET variable (isLogin) to tell the applications that
they should refresh the horde_menu frame. index.php and portal.php now look
for this variable.
* Created templates/blank-menu.inc and imp/templates/blank-menu.inc to be
included with the login, guest, and signup pages. This is just cosmetic,
so the top bar is consistent.
* Removed the 'logout' link in the imp menu. There is a logout entry in the
registry, so I figured imp could use it like any other app would.
* Made imp's login work with this patch by telling it to refresh horde_menu
if appropriate.
* Made imp/redirect.php send the isLogin flag to be consistent with horde's
login.
Diffs are attached. I still have to figure out how to dynamically disable the
'show_sidebar' preference.
files modified:
conf/conf.php.dist
conf/registry.php.dist
lib/Menu.php
templates/guest/guest.inc
templates/portal/menu.inc
imp/templates/menu/menu.inc
imp/redirect.php
imp/login.php
index.php
menu.php
login.php
signup.php
portal.php
files added:
templates/blank-menu.inc
imp/templates/blank-menu.inc
--Ben Chavet
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blank-menu.inc
Type: application/octet-stream
Size: 118 bytes
Desc: templates/blank-menu.inc
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/blank-menu.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blank-menu.inc
Type: application/octet-stream
Size: 118 bytes
Desc: imp/templates/blank-menu.inc
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/blank-menu-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: conf.php.dist.diff
Type: text/diff
Size: 1055 bytes
Desc: diffs: config/conf.php.dist
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/conf.php.dist.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: registry.php.dist.diff
Type: text/diff
Size: 1002 bytes
Desc: diffs: config/registry.php.dist
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/registry.php.dist.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Menu.php.diff
Type: text/diff
Size: 834 bytes
Desc: diffs: lib/Menu.php
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/Menu.php.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: guest.inc.diff
Type: text/diff
Size: 661 bytes
Desc: diffs: templates/guest/guest.inc
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/guest.inc.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: menu.inc.diff
Type: text/diff
Size: 816 bytes
Desc: diffs: templates/portal/menu.inc
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/menu.inc.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: menu.inc.diff
Type: text/diff
Size: 1002 bytes
Desc: diffs: imp/templates/menu/menu.inc
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/menu.inc-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: redirect.php.diff
Type: text/diff
Size: 900 bytes
Desc: diffs: imp/redirect.php
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/redirect.php.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: login.php.diff
Type: text/diff
Size: 1338 bytes
Desc: diffs: imp/login.php
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/login.php.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: index.php.diff
Type: text/diff
Size: 864 bytes
Desc: diffs: index.php
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/index.php.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: menu.php.diff
Type: text/diff
Size: 2199 bytes
Desc: diffs: menu.php
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/menu.php.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: login.php.diff
Type: text/diff
Size: 1910 bytes
Desc: diffs: login.php
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/login.php-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signup.php.diff
Type: text/diff
Size: 602 bytes
Desc: diffs: signup.php
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/signup.php.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: portal.php.diff
Type: text/diff
Size: 648 bytes
Desc: diffs: portal.php
Url : http://lists.horde.org/archives/dev/attachments/20030809/67ad7a5c/portal.php.bin
More information about the dev
mailing list