Static data 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This module makes it possible to add static HTML data anywhere
on any page on the site. It is mainly intended for adding some
small extra details to the menu, header, footer and similar
pages and using it extensively might cause slow downs. If
another module is made to add a specific kind of content to the
site, don't use this module to do just that.

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

Data administration is available on page "?act=admin&open=data".
Data administration is only available to users in group "admin"
or "dataadmin".

The main data administration box provides a list of existing
data items and tools to create new, edit and delete data items.

The data item editor, which is also used when creating new
items, consists of the following fields:

 * Id
   The unique Id for the data item. When creating a new item
   this is "new".
 * Title
   The title. This is used only to aid the administrator making
   it easier to tell the difference between data items.
 * Rules
   On what page the data item 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 data item may be shown
   if the GET variable act equals "admin" or if this equals
   "that" and name is not "value". This means that the data will
   be shown on "?act=admin" and on "?this=that" but not on
   "?this=that&name=value".
   Leaving this field empty lets the data item be shown on all
   pages.
 * Groups
   A comma separated list of groups. The data item will not be
   shown unless the user belongs to at least one of these
   groups. Leaving this field empty lets the data item be shown
   for all users. Use the quicklist for common groups.
 * Position
   Where the data item will be seen on the page. Use the
   quicklist for available values. Selecting more than one value
   places the data item in several locations at the same time.
 * Content
   This is a field for normal HTML which is the actual data that
   will be displayed according to the other values.

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

 * data_main()
   This function is called on all pages and displays the data
   on them where the rules and groups match.
 * data_admin()
   This function is called on page "?act=admin" and provides a
   list of existing data items and tools for creating, deleting
   and editing items.
 * data_edit()
   This is called on "?act=data_edit" and outputs a form for
   editing a data item.
 * data_save()
   This function is called on "?act=data_save" and is used for
   creating or replacing data items edited on data_edit().
 * data_delete()
   This function removes a data item. It is called on page
   "?act=data_delete".

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

 * $mod_data
   This tells the system the data module is loaded.
 * $data_version
   The Nailblog version the module is developed for.
 * $data_targets
   This is an array of available values for position, which is
   used on "?act=data_edit".

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

