[horde] Custom links in Horde menu?

Chuck Hagenbuch chuck at horde.org
Tue Jul 29 05:43:51 PDT 2003


Quoting Hugo Proost <horde at proost.net>:

> Can some one tell me if the following is possible? I want to add a couple of
> handy (non Horde) menu items to the left hand side horde menu bar. I entered
> the following information into the registry.php of my Horde 3.0 CVS:
>
> $this->applications['custom'] = array(
>     'icon' => $this->applications['horde']['webroot'] .
> '/graphics/custom.gif',
>     'name' => _("Other Modules"),
>     'status' => 'heading',
> );
>
> $this->applications['phpmyadmin'] = array(
>     'fileroot' => dirname(__FILE__) . '',
>     'webroot' => 'http://www.website.com/phpmyadmin',
>     'initial_page' => 'index.php',
>     'icon' => $this->applications['horde']['webroot'] . '/graphics/sql.gif',
>     'name' => _("PHPMyAdmin"),
>     'allow_guests' => false,
>     'status' => 'active',
>     'menu_parent' => 'custom'
> );
>
> Is that the best way of doing this?

Yup, that looks good and should work fine.

> Can I also put extra items (like PHPMyAdmin) in the "Administration" menu?

For that you'd have to modify the _horde_admin_list() function in
horde/lib/api.php, which is where those items are defined. -OR-, actually, you
could create a lib/api.php file inside the fileroot of phpMyAdmin (above you
have it set to the current directory, for this you'd have to change it to point
to the real directory). In that api.php, put something like this:

<?php

// api.php stub for phpMyAdmin

$_services['admin_list'] = array(true);

function _phpmyadmin_admin_list()
{
    return array('admin' => array(
                     'link' => '%application%/index.php',
                     'name' => _("PHPMyAdmin")));
}

?>

Give that a shot.

> How can I include the the header menu bar? (Does not have to have functioning
> buttons)

You can try including horde/navbar.php.

> What would I have to do if I want the link to open in a new windows?

A 'target' attribute was just added (a day or so ago). So make sure you have the
latest Horde, and then set 'target' => '_blank'.

> I just want to "wrap" horde around a couple of apps like PHPMyAdmin and some
> other open source thingies.

Yup. Let us know how the above works for you.

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
They're just looking at a wall of meat.



More information about the horde mailing list