#5 Open branch when branch link is clicked on

Adrian Lewis


Me again. Is it possible for a branch to open when you
click on it's link?

As with my previous year -> month -> day example, if
there is a page linked to 2002 and someone clicks on it,
the ability for the menu to automatically open the 2002
branch as well as show the page associated with the
2002 link. This is assuming that the tree menu stays on
every page including those linked to in the tree menu.

I would check the manual but I don't run X-Windows and
hence can't run OpenOffice. OpenOffice on PC can't
make any sense of the manual as Winzip (and others)
unzips to a folder not a file. Any help with that would
also be appreciated.


  • Marco Pratesi
    Marco Pratesi

    Logged In: YES

    I'll reply ASAP to the feature request.

    > I would check the manual but I don't run X-Windows and
    > hence can't run OpenOffice.

    OpenOffice.org does not require X-Window;
    it uses X-Window only on platforms using X-Window
    On the mswindows environment, it runs without
    any need of X-Window:

    BTW, the OOo format is open and documented,
    in fact it is supported also by other suites (e.g. KOffice).

    > Winzip (and others) unzips to a folder not a file.

    The .sxw document has to be opened with OOo,
    you do not have to unzip it.

    Marco Pratesi

  • Adrian Lewis
    Adrian Lewis

    Logged In: YES

    Downloaded the sxw file from here and all is well. I previously
    downloaded a file that was named phplm-manual-3.0.sxw.zip
    and when winzip unzipped it I was left with a folder with an
    sxw extension but not a file.

  • Marco Pratesi
    Marco Pratesi

    Logged In: YES

    I have not added this feature in version 3.1.1, just released,
    because 3.1.1 is basically only a bug fix release.
    ( Currently I am very busy with the organization of the
    Linux Day 2003 in Teramo: http://www.telug.it/linuxday-2003/ )

    Anyway, in the meantime, two considerations.

    *** 1 ***
    I discommend such a feature: if branches are opened
    also clicking on the text item, the user has no more
    any possibility of following the link without opening the
    (clicking on a link is just intended to follow the link ;-)
    to open the branch, there is just the [+] icon.
    As I discommend this feature, it will be added but it will
    be possible to enable/disable it, and, very likely, it will
    disabled by default.

    *** 2 ***
    In the meantime, you should be able to add this feature
    to version 3.1.1 with a very small effort, as explained
    in the following.
    Search for "onmousedown" in lib/treemenu.inc.php ;
    you will find it at lines 161, 175, and 184 (version 3.1.1).
    Also search for "a href", that is at lines 195 and 197.
    To add the requested feature, you should have only
    to paste the same "onmousedown..." after the "href=..."
    at lines 195 and 197.

    Marco Pratesi

  • Marco Pratesi
    Marco Pratesi

    Logged In: YES

    I'm attaching a patch (that is a bit rough) to phplm 3.1.1
    to implement this feature.

    Marco Pratesi

  • BillyG

    Logged In: YES


    It is a very nice and userfull feature and I have made the
    changes as described by Marco Pratesi at Point *** 2 *** (on
    PHPLM version 3.2.0rc) and it works nearly great...

    The Problem is, that if someone clicks on a leaf, a
    javascript error accours. As far as I had disabled showing
    javascript errors on IE it worked (the error still accours)
    but if displaying errors is on then after showing the error
    message the menu doesn't work any more (tha linked page does
    not open).

    Firefox is also showing a javascript error in the console
    but the javascript menu still works.

    Does someone have a workaround for this?