Menu module for Nailblog-2.x by Martin Wikström
http://www.waxjism.org/nail/

Content ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

User documentation
 * About
 * Administration

API documentation
 * PHP functions
 * PHP variables

About ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The menu module provides a menu. The menu entries can be placed
in different parts of the site and are visible depending on
the pages visited or on user authentication.

Administration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Menu administration is available on page "?act=admin&open=menu".
Menu administration is only available to users in the groups
"admin" or "menuadmin".

The menu administration consists of a list of menu entries and
tools to create, move, edit and delete an entry.

The following items are found in the menu entry editor, which
also is used to create new entries:

 * Id
   The entry id. When creating a new entry the value is "new".
 * Href
   The target location for the menu entry. It can be either
   local (starting with "?act="), or complete (starting with
   "http://"). Use the quicklist for common local targets.
 * Title
   The text visible in the menu.
 * Position
   Where the menu entry will be seen on the page. Use the
   quicklist for available values. Selecting more than one value
   places the menu entry in several menu locations at the same
   time.
 * Rules
   On what page the menu entry will be seen. The value for
   this field must be a comma separated set of variables and
   value pairs like "act=admin,this=that&name=!value".
   The example is parsed like this; the menu entry may be shown
   if the GET variable act equals "admin" or if this equals
   "that" and name is not "value". This means that the page will
   be shown on "?act=admin" and on "?this=that" but not on
   "?this=that&name=value".
   Leaving this field empty lets the menu entry be shown on all
   pages.
 * Groups
   A comma separated list of groups. The menu entry will not be
   shown unless the user belongs to at least one of these
   groups. Leaving this field empty lets the menu entry be shown
   for all users. Use the quicklist for common groups.

PHP functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 * menu_admin()
   Called on page "?act=admin". Provides the menu entry list.
 * menu_getentry($entryid)
   Returns data for a single menu entry, in an array.
 * menu_edit()
   Called on page "?act=menu_edit". Provides the tool for
   or creating a single menu entry.
 * menu_save()
   Called on page "?act=menu_save". Saves or creates a menu
   entry. The data used is POST data from menu_edit().
 * menu_delete()
   Called on page "?act=menu_delete". Asks if you are sure and
   then deletes a menu entry.
 * menu_main()
   Adds the menus to the site.
 * menu_move()
   Called on page "?act=menu_move". Provides a list of available
   locations to move a menu entry to and moves it after a
   location is selected.

PHP variables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 * $mod_menu
   Defaults to true. Tells the Nailblog that a menu module is
   enabled.
 * $menu_version
   A string containing the Nailblog version this module is
   developed for.
 * $menu_default
   The default content to use if the file menu/menu.txt does not
   exist. Data is in the same format as the return value would
   be if menu.txt would exist and was read using file(...).
   This variable can be overridden.
 * $menu_startid
   The default content to use if the file menu/id.txt does not
   exist. Data in integer format. This variable can be
   overridden.
 * $menu_targets
   An array of string values containing the alternatives for the
   menu entry location quicklist used in menu_edit().
 * $menu_href
   An array of string values containing the alternatives for the
   menu entry target quicklist used in menu_edit().

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

