The PHP Layers Menu System

A Horizontal Menu Structure File and the Source Code for this Demo

...GNU's Not Unix!
Open Source  >>
O Desktops  >>
O Office Suites  >>
O Browsers  >>
DOM, layers...  >>
A vertical menu... and its
Menu Structure File

Linus B. Torvalds
O  Linux Kernel Archives
Linux Distributions -->

Tree Menu version
PHP Tree - No JavaScript
Plain - No JavaScript

Linus B. Torvalds
Linux Kernel Archives
Linux Distributions
   Debian GNU/Linux
      About
      News
      Distribution
      Support
      Development
      Search
      A Debian Mirror
   Mandrake
      Errata
      Download
      Mandrake Expert
      Bugzilla
   Slackware

Another vertical menu...

O  Linux related sites  >>
DOM, layers...  >>

Tree Menu version
PHP Tree - No JavaScript
Powered by PHP Layers Menu

Valid XHTML 1.0!

Valid CSS!
Another horizontal menu... and its Menu Structure File

Search Engines >>
Find Files >>
O Browsers >>

Tree Menu version Horizontal Plain version - No JavaScript

Search Engines
   Altavista
   Google
Find Files
   RPM Find
   File Watcher
Browsers
   Mozilla
   Epiphany
   Galeon
   Konqueror
   Non free browsers
      Netscape
      Opera
      Internet Explorer
The PHP Layers Menu System 3.0.2

PHP Layers Menu is a hierarchical dynamic menu system that allows to prepare "on the fly" dynamic HTML menus relying on the PHP scripting engine for the processing of data items.

It is released under the GNU Lesser General Public License (LGPL), either Version 2.1, or (at your option) any later version.

It supports a wide range of browsers: Mozilla, Konqueror, Netscape, Opera, Internet Explorer; rather old browser versions are supported, too; accessibility is provided for text-only browsers.

It achieves a compact view and a reasonably small file size for the page also with a very large number of entries.

It provides horizontal and vertical layers-based menus whose behavior is analogous to the Gnome, KDE, and MS Windows main menus.

Layers-based menus require JavaScript and work at least on the following browsers:

  • Mozilla 0.7+ (versions 0.9.1+ are suggested)
  • Netscape 6.1+ and other browsers based on Mozilla, e.g. Epiphany and Galeon
  • Netscape 4.07+
  • Konqueror 2.1+ and browsers based on it, e.g. Safari
  • Opera 5.x, 6.x, 7.x
  • Internet Explorer 4, 5, 5.5, 6.

It provides also JavaScript-based tree menus, whose look is analogous to the most widely used file managers and bookmark handling tools and whose nodes can be expanded and collapsed on sufficiently DOM-compliant browsers (they remain completely expanded for the other browsers). They have more strict requirements w.r.t. the layers menus and provide complete functionality only to browsers sufficiently DOM-compliant for the purpose at hand, i.e.:

  • Mozilla (versions 0.9.1+ are suggested)
  • Netscape 6.1+ and other browsers based on Mozilla, e.g. Epiphany and Galeon
  • Konqueror 3.0+ and browsers based on it, e.g. Safari
  • Opera 7.x
  • Internet Explorer 4, 5, 5.5, 6

The following browsers are not supported, as supporting them is either not possible at all or really too hard:

  • Netscape 4.x
  • Konqueror 2.x
  • Lynx and Links
  • Opera 5.x and 6.x

However, full accessibility is provided for the above browsers: the Tree Menus always appear completely exploded (and no node can be collapsed) on them, and this guarantees a rather good accessibility for them.

An extended class is provided to prepare also "server-side based" tree menus (that have just the same look of the above JavaScript-based tree menus, but require the PHP support on the web server) and plain menus that do not require the JavaScript support to the browser.

An arbitrary number of vertical and horizontal menus can be used on the same page.

As much levels as needed can be used and each menu is dynamically generated using data retrieved from a file, a string, or a database table; the data format is rather simple and intuitive.

Multiple languages are supported (i18n) if data are retrieved from a database.

PHPLM is compliant with current recommendations for PHP developers: it works correctly with the following settings

  • register_globals = Off
  • safe_mode = On
  • error_reporting = E_ALL
  • allow_call_time_pass_reference = Off
  • short_open_tag = Off

If PEAR is not used (i.e. if the DB support is not used), it works correctly also if the open_basedir restriction is in effect.

It is compliant with the following standards:

  • XHTML 1.0 Transitional
  • CSS 2.0

Some interesting customizations are bundled in the PATCHES directory.

--
Marco Pratesi - http://www.marcopratesi.it/