[horde] Custom links in Horde menu?

Hugo Proost horde at proost.net
Tue Jul 29 12:06:32 PDT 2003


Thnx Chuck,

I updated the Horde CVS and I am now able to use the new function 'target'
=> '_blank' in the registry.php
However....this function does not seem to work for guests if you also have
the value 'allow_guests' => true
This does not realy matter in my situation but I thought you might want to
know anyway...


Adding a custom links to the administration menu works fine if I change
_horde_admin_list() function in
> horde/lib/api.php file.
However, the second and more preffered way you mentioned does not seem to
work the way I did it.
I copied the phpmyadmin folder into my horde root. (horde/phpmyadmin)
Placed this in the horde/config/registry.php

$this->applications['phpmyadmin'] = array(
    'fileroot' => dirname(__FILE__) . '/../phpmyadmin',
    'webroot' => $this->applications['horde']['webroot'] . '/phpmyadmin',
    'icon' => $this->applications['horde']['webroot'] . '/graphics/sql.gif',
    'name' => _("phpmyadmin"),
    'allow_guests' => false,
    'status' => 'active',
    'menu_parent' => 'custom'
);

Placed this in the horde/phpmyadmin/lib/api.php

<?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")));
}
?>

It seems to handle the api.php because if mess it up it crashed the horde
menu completely. It does not realy matter that much because the first trick
already worked!


Now the final one....I had a look at this for quit some time now. I know
almost nothing about php (as you may have noticed ;)
Simply adding the lines:

<?php
include("../navbar.php");
?>

... in a blank /horde/test/index.php file leaves me with a blank screen. And
no toolbar. I would like this one to work though because it makes thing look
a lot nicer... could you please give me some more info on this one?

Thnx,
Hugo







----- Original Message ----- 
From: "Chuck Hagenbuch" <chuck at horde.org>
To: <horde at lists.horde.org>
Sent: Tuesday, July 29, 2003 2:43 PM
Subject: Re: [horde] Custom links in Horde menu?


> 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.
>
> -- 
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>




More information about the horde mailing list