Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 844)
+++ trunk/CHANGELOG	(revision 845)
@@ -10,13 +10,15 @@
 # = Bugfix
 ! = Update/Change
 
-------------------------------------- 2.7.1 -------------------------------------
-08-Jun-2008 Thomas Hornik
-# hebrew-table in charsets-table.php was faultily imported - fixed. Thanks to forum-member iti.
+------------------------------------- 2.7.1 -------------------------------------
+21-June-2008 Christian Sommer
+#	updated show_menu2 to version 4.60 (to avoid disappearing menus)
+08-Jun-2008 Thomas Hornik
+#	hebrew-table in charsets-table.php was faultily imported - fixed. Thanks to forum-member iti.
 24-May-2008 Christian Sommer
-! modified output filter routine to prevent errors if database entries do not exist
+!	modified output filter routine to prevent errors if database entries do not exist
 04-May-2008 Thomas Hornik
-! changed register_backend_modfile() to work with wysiwyg-module, too
+!	changed register_backend_modfile() to work with wysiwyg-module, too
 01-May-2008 Thomas Hornik
 #	fixed file-naming issue when old page-names (from before 2.7) contains "&"
 26-Apr-2008 Thomas Hornik
Index: trunk/wb/modules/show_menu2/LICENCE
===================================================================
--- trunk/wb/modules/show_menu2/LICENCE	(revision 844)
+++ trunk/wb/modules/show_menu2/LICENCE	(nonexistent)
@@ -1,278 +0,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
Index: trunk/wb/modules/show_menu2/README_DE
===================================================================
--- trunk/wb/modules/show_menu2/README_DE	(revision 844)
+++ trunk/wb/modules/show_menu2/README_DE	(nonexistent)
@@ -1,478 +0,0 @@
-// $Id$
-
-show_menu2, version 4.5
-=======================
-Ist ein Code-Snippet für das CMS Website Baker. Es stellt einen kompletten Ersatz für die eingebaute Menüfuntionalität zur Verfügung. Alle für die Erzeugung des Menüs erforderlichen Daten werden durch eine einzige Datenbankabfrage erzeugt. Durch umfangreiche Anpassungsmöglichkeiten des erzeugten HTML-Code können alle möglichen Menüarten (Listen, Breadcrumbs, Sitemaps, usw.) erzeugt werden.
-
----
-Deutsche Übersetzung von BerndJM. Dies ist eine weitgehend direkte Übersetzung des englischen Originals. Bei Übersetzungs- oder Interpretationsfehlern, bitte eine Email an bjm@wwnw.de.
----
-
-INSTALLATION
-============
-1. Die aktuelle Version von http://code.jellycan.com/show_menu2/ herunterladen.
-2. In das Admin-Backend der Website Baker Installation einlogen.
-3. Erweiterungen -> Module aufrufen.
-4. Wenn bereits eine frühere Version von show_menu2 installiert ist, diese über "Modul deinstallieren" auswählen und deinstallieren.
-5. Im Abschnitt "Modul installieren" das im Schritt 1 heruntergeladene zip-File auswählen und installieren.
-
-   
-BENUTZUNG VON SHOW_MENU2
-========================
-Um show_menu2 zu benutzen muss das verwendete Template an den Stellen modifiziert werden, an denen das Menü erscheinen soll. Bitte beachten: Wenn alte Menüaufrufe ersetzt werden, müssen unbedingt auch die entsprechenden neuen Parameter verwendet werden die show_menu2 benötigt.
-
-In den meisten Fällen genügt bereits der Standardaufruf ohne weitere Parameter von show_menu2. In diesem Fall werden die Vorgabewerte verwendet, dies erzeugt ein Menü das die aktuelle Seite und die Unterseiten der aktuellen Seite anzeigt:
-    
-	show_menu2();
-    
-Bitte beachten: der Aufruf von show_menu2 ist PHP und muss normalerweise in PHP-Codezeichen eingeschlossen werden (ausser der Aufruf erfolgt bereits innerhalb von PHP Code):
-
-    <?php show_menu2(); ?>
-
-Dieses Vorgabe Menü erzeugt bereits ein komplettes Menü auf Listenbasis mit etlichen Klassen, die eine leichte Formatierung mittels CSS ermöglichen. Es wird z.B. die Klasse "menu-current" zu dem <li> Tag des aktuellen Menüpunktes hinzugefügt, zusätzlich erhält jeder Menüpunkt der Unterpunkte enthält die Klasse "menu-expand". Dies erlaubt es sehr differenzierte CSS Regeln für die einzelnen Menüpunkte aufzustellen.
-Zum Beispiel:
-
-    li.menu-expand  { font-weight: bold; }
-    li.menu-current { background: red; }
-
-Im Abschnitt "HTML-Ausgabe" findet sich eine detaillierte Beschreibung welche Klassen welchem Element zugeordnet werden. Durch die Verwendung von verschiedenen Parametern bei dem show_menu2 Funktionsaufruf lassen sich auch recht umfangreiche und unterschiedliche Menüstrukturen erzeugen. Um beispielsweise nur Menüpunkte aus der obersten Ebene der Menüstruktur darzustellen, könnte man folgenden Aufruf verwenden:
-
-    show_menu2(0, SM2_ROOT, SM2_START);
-    
-Oder um beispielsweise bis zu zwei Unterebenen der aktuellen Seite anzuzeigen:
-
-    show_menu2(0, SM2_CURR+1, SM2_CURR+2);
-
-Es gibt jede Menge Möglichkeiten, um die unterschiedlichten Menüstrukturen zu erzeugen, zahlreiche Beispiele dazu findet man auf der Demo-Website: http://code.jellycan.com/sm2test/
-
-
-FUNKTION
-========
-Der komplette Aufruf und die Vorgabe Parameterwerte für show_menu2 sind wie folgt:
-
-    show_menu2(
-        $aMenu          = 0,
-        $aStart         = SM2_ROOT,
-        $aMaxLevel      = SM2_CURR+1,
-        $aFlags         = SM2_TRIM,
-        $aItemOpen      = '[li][a][menu_title]</a>',
-        $aItemClose     = '</li>',
-        $aMenuOpen      = '[ul]',
-        $aMenuClose     = '</ul>',
-        $aTopItemOpen   = false,
-        $aTopMenuOpen   = false
-        )
-
-Im Abschnitt "Parameter" findet sich eine detaillierte Beschreibung jedes einzelnen Parameters.
-Ab $aItemOpen kann jedem Parameter der Wert false übergeben werden um den jeweiligen Vorgabewert zu erhalten.
-Dies kann beispielsweise verwendet werden um eine nummerierte Liste zu erzeugen, während für die einzelnen Menüpunkte trotzdem die Vorgabewerte Verwendung finden:
-
-show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL, false, false, '<ol>', '</ol>');
-
-Bitte beachten: bis einschliessich $aFlags müssen alle Parameter explizit übergeben werden!
-
-
-HTML-AUSGABE
-============
-Die HTML-Ausgabe hängt wesentlich davon ab, welche Parameter an die Funktion übergeben werden. Unabhängig davon werden nachfolgende Klassen grundsätzlich für jedes Menü verwendet, wobei einzelne Menüpunkte, wenn erforderlich, auch mehrere Klassen erhalten können.
-
-    KLAssE          ZUORDNUNG
-    ------------    -------------------------------------------------------
-    menu-top        Nur der erste Menüpunkt
-    menu-parent     Jeder Hauptmenüpunkt.
-    menu-current    Nur der Menüpunkt der aktuellen Seite.
-    menu-sibling    Alle "Geschwister" der aktuellen Seite.
-    menu-child      Jedes Untermenü der aktuellen Seite.
-    menu-expand     Jedes Menü das Untermenüs hat.
-    menu-first      Der erste Punkt eines jeden Menüs oder Untermenüs.
-    menu-last       Der letzte Punkt eines jeden Menüs oder Untermenüs.
-
-    Folgende Klassen werden nur hinzugefügt, wenn das SM2_NUMCLAss flag gesetzt ist:
-
-    menu-N          Jeder Menüpunkt, wobei das N für die ABSOLUTE Menütiefe, 
-		    beginnend bei 0, des jeweiligen Menüpunktes steht.
-                    Die oberste Ebene ist also immer menu-0, die nächste
-                    Ebene menu-1 usw.
-    menu-child-N    Jedes Untermenü der aktuellen Seiten, wobei das N für die
-                    RELATIVE Tiefe des Untermenüs, beginnend bei 0, steht.
-        
-Beispiel einer HTML-Ausgabe:
-
-<ul class="menu-top menu-0">
-  <li class="menu-0 menu-first">  ... </li>
-  <li class="menu-0 menu-expand menu-parent">  ...
-  <ul class="menu-1">
-    <li class="menu-1 menu-expand menu-first">  ...
-    <ul class="menu-2">
-      <li class="menu-2 menu-first">  ...
-      <li class="menu-2 menu-last">  ...
-    </ul>
-    </li>
-    <li class="menu-1 menu-expand menu-parent">  ...
-    <ul class="menu-2">
-      <li class="menu-2 menu-expand menu-current menu-first">  ...      ** CURRENT PAGE **
-      <ul class="menu-3">
-        <li class="menu-3 menu-child menu-child-0 menu-first">  ...
-        <ul class="menu-4">
-          <li class="menu-4 menu-child menu-child-1 menu-first">  ... </li>
-          <li class="menu-4 menu-child menu-child-1 menu-last">  ... </li>
-        </ul>
-        </li>
-        <li class="menu-3 menu-child menu-child-0 menu-last">  ... </li>
-      </ul>
-      </li>
-      <li class="menu-2 menu-sibling menu-last">  ... </li>
-    </ul>
-    </li>
-    <li class="menu-1">  ... </li>
-    <li class="menu-1 menu-expand menu-last">  ...
-    <ul class="menu-2">
-      <li class="menu-2 menu-first menu-last">  ... </li>
-    </ul>
-    </li>
-  </ul>
-  </li>
-  <li class="menu-0 menu-last">  ... </li>
-</ul>
-
-
-PARAMETER
-=========
-$aMenu      
-    Nummer des Menüs. Dies ist nützlich um mehrere Menüs auf einer Seite zu verwenden.
-    Menü Nummer 0 ist das Vorgabemenü der aktuellen Seite, SM2_ALLMENU gibt alle
-    im System verwendeten Menüs zurück.
-
-$aStart  
-    Gibt an, ab welcher Ebene die Erzeugung des Menüs beginnen soll. In den meisten
-    Fällen wird dies die oberste Ebene des anzuzeigenden Menüs sein. Es kann einer
-    der folgenden Werte verwendet werden:
-
-        SM2_ROOT+N  Beginnt N Ebenen unterhalb der obersten Ebene, z.B.:
-                      SM2_ROOT      Beginnt auf der obersten Ebene
-                      SM2_ROOT+1    Beginnt eine Ebene unterhalbe der obersten Ebene
-                      SM2_ROOT+2    Beginnt zwei Ebenen unterhalbe der obersten Ebene
-
-        SM2_CURR+N  Beginnt N Ebenen unterhalb der aktuellen Ebene, z.B.:
-                      SM2_CURR      Beginnt auf der aktuellen Ebene. Alle Geschwister
-                                    der aktuellen Ebene
-                      SM2_CURR+1    Beginnt eine Ebene unterhalb der aktuellen Ebene
-                                    mit allen Unterebenen
-
-        page_id     Verwendet die Seite mit der angegebenen page id als Elternelement.
-                    Alle Untermenüs dieser Seite werden angezeigt. (Die page id kann
-                    ermittelt werden, wenn man die Seite im Admin-Backend editiert,
-		    sie steht dann in der Adresszeile des Browsers:
-		    http://SITE/admin/pages/modify.php?page_id=35
-
-$aMaxLevel   
-    Die maximale Anzahl der Ebenen die angezeigt werden, die Anzeige
-    beginnt ab der in $aStart festgelegten Ebene bis hin zu der hier 
-    festgelegten Ebene.
-        
-	SM2_ALL      Keine Beschränkung, alle Ebenen werden angezeigt
-
-        SM2_CURR+N   Zeigt immer die aktuelle Seite + N Ebenen. 
-                        SM2_CURR      Aktuelle Ebene (keine Unterebene)
-                        SM2_CURR+3    Alle übergeordneten + aktuelle + 3 Unterebenen
-
-        SM2_START+N  Beginnt immer auf der Startebene + N Ebenen.
-                     Die Ebenen werden unabhängig davon angezeigt 
-                     auf welcher Ebene sich die aktuelle Seite befindet.
-		        SM2_START     Eine einzelne Ebene ab der Startebene
-                        SM2_START+1   Startebene + eine Ebene darunter
-
-        SM2_MAX+N    Zeigt höchstens N Ebenen ab der Startebene.
-                     Ebenen unterhalb der aktuellen Ebene werden nicht angezeigt.
-			SM2_MAX       Starting level only (same as SM2_START)
-                        SM2_MAX+1     Maximum of starting level and 1 level.
-
-$aFlags   
-    Spezielle Flags für verschiedene Menügenerierungs Optionen. Sie können mittels
-    einer ODER Verknüpfung (|) miteinander kombiniert werden. Um beispielsweise
-    sowohl TRIM als auch PRETTY zu definieren, verwendet man: SM2_TRIM|SM2_PRETTY.
-
-    GROUP 1
-    -------
-    Aus dieser Gruppe muss stets genau ein Flag angegeben werden. Diese Flags
-    bestimmen auf welche Weise die Geschwisterelemente im Menübaum in der
-    Ausgabe unterdrückt werden.
-    
-    SM2_ALL         Zeigt alle Zweige des Menübaums
-                        A-1 -> B-1 
-                            -> B-2 -> C-1
-                                   -> C-2 (CURRENT)
-                                          -> D-1
-                                          -> D-2
-                                   -> C-3
-                        A-2 -> B-3
-                            -> B-4
-
-    SM2_TRIM        Zeigt alle Geschwistermenüs der Seite im aktuellen Pfad.
-                    Alle Untermenüs von Elemnten die sich nicht im Pfad befinden
-                    werden entfernt.
-                        A-1 -> B-1 
-                            -> B-2 -> C-1
-                                   -> C-2 (CURRENT)
-                                          -> D-1
-                                          -> D-2
-                                   -> C-3
-                        A-2 
-
-    SM2_CRUMB       Zeigt den Breadcrumb Pfad des Menüs an, also den aktuellen
-                    Menüpunkt sowie alle Menüpunkte die dorthin führen.
-                        A-1 -> B-2 -> C-2 (CURRENT)
-
-    SM2_SIBLING     Wie SM2_TRIM, es werden aber nur Geschwistermenüs der aktuellen
-                    Seite angezeigt. Alle anderen Punkte werden unterdrückt.
-                        A-1 -> B-2 -> C-1
-                                   -> C-2 (CURRENT)
-                                          -> D-1
-                                          -> D-2
-                                   -> C-3
-
-    GROUP 2
-    -------
-    Diese Flags sind optional, sie können in beliebiger Anzahl kombiniert werden.
-
-    SM2_NUMCLAss    Fügt die nummerierten Menüklassen "menu-N" und 
-                    "menu-child-N hinzu.
-        
-    SM2_ALLINFO     Lädt alle Felder aus der Seitentabelle der Datenbank.
-                    Dies verursacht einen ziemlich hohen Speicherverbauch und sollte
-                    deshalb nur mit Bedacht verwendet werden.
-                    Dadurch werden z.B. die Keywords, die Seitenbeschreibung sowie
-                    all die anderen Informationen verfügbar, die normalerweise nicht
-                    geladen werden.
-                    Bitte beachten: dieses Flag muss beim ERSTEN Aufruf von schow_menu2
-                    für die jeweilige Menü ID verwendet werden, oder in Verbindung
-                    mit SM2_NOCACHE, sonst zeigt es keine Wirkung.
-    
-    SM2_NOCACHE     Die aus der Datenbank gelesenen Daten werden bei erneutem Aufruf von
-                    show_menu2 nicht wiederverwendet sondern erneut aus der Datenbank gelesen.
-    
-    SM2_PRETTY      Bringt die HTML-Ausgabe des Menüs mittels Leerzeichen und
-                    Zeilenumbrüchen in eine gut lesbare Form. Dies ist besonders nützlich
-                    beim Debuggen der Menüausgabe.
-    
-    SM2_BUFFER      Gibt den HTML-Code nicht direkt aus, sondern speichert ihn intern
-                    zwischen und gibt ihn al kompletten String aus.
-    
-    SM2_CURRTREE    Schliesst alle anderen Toplevelmenüs von der Betrachtung aus.
-                    Es werden nur Menüpunkte des aktuellen Menüzweiges dargestellt.
-                    Dieses Flag kann bei Bedarf mit jedem flag aus der Gruppe 1
-                    kombiniert werden.
-    
-    SM2_ESCAPE      Wendet htmlspecialchars auf den Menüstring an.
-                    Dies kann bei älteren Websitebaker Installationen erforderlich
-                    sein um eine valide HTML Ausgabe zu erzeugen.
-                        
-    SM2_NOESCAPE    Dies ist das Standarverhalten und existiert nur aus Gründen der 
-                    Abwärtskompatibiltät.                   
-
-$aItemOpen
-    Dies legt den Formatstring fest, mit dem jeder einzelne Menüeintrag begonnen
-    wird. Für den allerersten Menüeintrag kann mittels $aTopItemOpen ein anderer
-    Formatstring definiert werden.
-    Wenn dieser Parameter auf false gesetzt wird, wird der Vorgabe Formatstring
-    '[li][a][menu_title]</a>' verwendet um die Kompatibiltät zur Website Baker
-    Standardfunktion show_menu() zu gewährleiten.
-    Da die Formatierung mittels CSS-Klassen oftmals einfacher ist, wenn sie auf den 
-    <a> Tag angewendet werden, empfiehlt es sich hier folgenden Formatstring zu
-    verwenden: '<li>[ac][menu_title]</a>'.
-    
-    Dieser Parameter kann auch als Instanz eine Formatierungklasse für das Menü
-    verwendet werden. Im Abschnitt "Formatter" findet sich dazu eine detailierte 
-    Beschreibung. Wenn hier ein Formatter angegeben wird, werden alle Argumente
-    nach $aItenOpen ignoriert.
-
-$aItemClose
-    Dieser String schliesst jeden Menüpunkt ab. 
-    Bitte beachten: dies ist kein Formatstring und es werden keine Schlüsselworte
-    ersetzt!
-    Wenn dieser Parameter auf false gesetzt ist, wird die Vorgabe '</li>' verwendet.
-    
-$aMenuOpen
-    Mit diesem Formatstring wird eine Liste von Menüeinträgen geöffnet. Für das erste
-    Menü kann mittels $aTopMenuOpen ein davon abweichender Formatstring definiert
-    werden.
-    Wenn dieser Parameter auf false gesetzt ist wird der Vorgabewert '[ul]'
-    verwendet.
-    
-$aMenuClose
-    Dieser String schliesst jedes Menü ab. 
-    Bitte beachten: dies ist kein Formatstring und es werden keine Schlüsselworte
-    ersetzt!
-    Wenn dieser Parameter auf false gesetzt ist, wird die Vorgabe '</ul>' verwendet.
-
-$aTopItemOpen
-    Der Formatstring für den allerersten Menüpunkt. Wenn dieser Parameter auf false
-    gesetzt wird, wird der selbe Formatstring wie bei $aItemOpen verwendet.
-
-$aTopMenuOpen 
-    Der Formatstring für das erste Menü. Wenn dieser Parameter auf false
-    gesetzt wird, wird der selbe Formatstring wie bei $aMenuOpen verwendet.
-
-
-FORMAT STRINGS
-==============
-Die folgenden Tags können in den Formatstrings für $aItemOpen und $aMenuOpen
-verwendet werden und werden durch den entsprechenden Text ersetzt.
-
-[a]             <a> tag ohne Klasse:   '<a href="[url]" target="[target]">'
-[ac]            <a> tag mit Klasse:    '<a href="[url]" target="[target]" class="[class]">'
-[li]            <li> tag mit Klasse:   '<li class="[class]">'
-[ul]            <ul> tag mit Klasse:   '<ul class="[class]">'
-[class]         Liste der Klassen für diese Seite
-[menu_title]    Text des Menütitel (HTML entity escaped ausser das SM2_NOESCAPE Flag ist gesetzt)
-[page_title]    text des Seitentitel (HTML entity escaped ausser das SM2_NOESCAPE Flag ist gesetzt)
-[url]           die URL der Seiten für den <a> tag
-[target]        das Seitenziel für den <a> tag
-[page_id]       die Page ID des aktuellen Menüpunktes
-[parent]        die Page ID des übergeorneten Menüpunktes
-[level]         die Seitenebene, dies ist die gleiche Zahl die im "menu-N" CSS tag verwendet wird.
-[sib]           Anzahl der Geschwister des aktuellen Menüpunktes
-[sibCount]      Anzahl aller Geschwister in diesem Menü
-[if]            Bedingung (Details hierzu im Abschnitt "Bedingte Formatierung')
-
-Folgende tags sind nur verfügbar, wenn das SM2_ALLINFO flag gesetzt ist.
-
-[description]   Seitenbeschreibung
-[keywords]      Schlüsselworte der Seite
-
-
-BEDINGTE FORMATIERUNG
-=====================
-Die Anweisung für eine bedingte Formatierung kann eine der folgenden Formen haben:
-
-    [if(A){B}]
-    [if(A){B}else{C}]
-    
-    A   Die Bedingung. Details dazu, siehe unten.
-    
-    B   Der Ausdruck der verwendet wird, wenn die Bedingung erfüllt ist.
-        Dies kann ein beliebiger String sein, der jedoch nicht das Zeichen '}'
-        enthalten darf. Er kann jeden beliebigen Formatstring aus dem Abschnitt
-        'Format Strings' enthalten, jedoch keinen weiteren Bedingungstest (da das 
-        Zeichen '}' nicht erlaubt ist).
-    
-    C   Der Ausdruck der verwendet wird, wenn die Bedingung nicht erfüllt ist.
-        Dies kann ein beliebiger String sein, der jedoch nicht das zeichen '}'
-        enthalten darf. Er kann jeden beliebigen Formatstring aus dem Abschnitt
-        'Format Strings' enthalten, jedoch keinen weiteren Bedingungstest (da das 
-        Zeichen '}' nicht erlaubt ist).
-
-Die Bedingung ist eine Kombination von einem oder mehreren boolschen Vergleichen.
-Wenn mehr als ein Vergleich erforderlich ist, so muss dieser mit den anderen Vergleichen
-mittels || (boolsches oder - OR) oder && (boolsches und - AND) vernüpft werden.    
-
-Ein einzelner Vergleich besteht aus dem linken Operanden, dem Operator und dem rechten Operanden.
-z.B. X == Y  - hierbei ist X der linke Operand, == der Operator und Y der rechte Operand.
-    
-    Linker Operand. Muss eines der folgende Schlüsselworte sein:
-        class       Überprüfung ob diese Klasse existiert. Es sind nur die
-                    "==" and "!=" Operatoren erlaubt. In diesem Fall haben die Operatoren
-                    die Bedeutung von "enthält" bzw. "enthält nicht" an Stelle von
-                    "ist gleich" bzw. "ist nicht gleich"
-        level       Überprüfung der Seitenebene.
-        sib         Überprüfung der Geschwisteranzahl der aktuellen Seite.
-        sibCount    Überprüfung der Geamtanzahl der Geschwister im aktuellen Menü.
-        id          Überprüfung der page id.
-    
-    Operator. Muss einer der folgenden sein:
-        <           Kleiner als
-        <=          Kleiner oder gleich als
-        ==          Gleich
-        !=          Nicht gleich
-        >=          Grössr oder gleich als
-        >           grösser als
-    
-    Rechter Operand. Die Art dieses Operanden hängt von dem, für den linken Operanden
-                     verwendeten Schlüsselwort ab.
-        class       einer der "menu-*" Klassennamen wie sie im Abschnitt "Ausgabe"
-                    spezifiziert sind.
-        level       Überprüfung der Seitenebene gegen folgende Werte:
-                      <number>  die absolute Seitenebene
-                      root      die oberste Seitenebene
-                      granny    die Seitenebene über der übergeordneten Seitenebene
-                      parent    die übergeordnete Seitenebene
-                      current   die aktuelle Seitenebene
-                      child     die untergeornete Seitenebene
-        id          Überprüfung der page id gegen folgende Werte:
-                      <number>  die absolute page id
-                      parent    die übergeordnete page id
-                      current   die aktuelle page id
-        sib         Eine positive Integerzahl, oder "sibCount" um die Anzahl der
-                    Geschwister in diesem Menü zu überprüfen
-        sibCount    Eine positive Integerzahl
-        
-Folgende Beispiele ergeben "wahr" und der Ausdruck {exp} wird ausgeführt, wenn zutrifft:
-    
-    [if(class==menu-expand){exp}]   hat ein Untermenü
-    [if(class==menu-first){exp}]    ist der erste Eintrag in einem Menü
-    [if(class!=menu-first){exp}]    ist NICHT der erste Eintrag in einem Menü
-    [if(class==menu-last){exp}]     ist der letzte Eintrag in einem Menü
-    [if(level==0){exp}]             befindet sich auf der obersten Ebene
-    [if(level>0){exp}]              befindet sich NICHT auf der obersten Ebene
-    [if(sib==2){exp}]               ist der zweite Eintrag in einem Menü
-    [if(sibCount>1){exp}]           ist in einem Menü mit mehr als einem Eintrag
-    [if(sibCount!=2){exp}]          ist in einem Menü, das nicht genau 2 Einträge hat
-    [if(level>parent){exp}]         ist ine eine Geschwistermenü oder dem Untermenü eines Geschwistermenüs
-    [if(id==parent){exp}]           ist der übergeordnete Punkt der aktuellen id
-
-Wenn eine sonst-Klausel (else) hinzugefügt wird, so wird diese in allen anderen Fällen ausgeführt.
-Zum Beispiel wird "foo" immer dann ausgeführt, wenn die if Überprüfung falsch ergibt, also:
-
-    [if(sib==2){exp}else{foo}]      ist NICHT der zweite Eintrag im Menü
-    [if(sibCount>2){exp}else{foo}]  ist NICHT in einem Menü mit mehr als zwei Einträgen
-
-Bei mehrfach Vergleichen wird der Ausdruck "exp" nur ausgeführt, wenn:
-
-    [if(sib == 1 || sib > 3){exp}]  ist der erste Eintrag ODER ist der vierte oder höhere Eintrag im Menü    
-               
-    [if(id == current && class == menu-expand){exp}  ist der aktuelle Eintrag UND hat Untermenüs
-        
-Bitte beachten:
-Alle Überprüfungen werden in der Reihenfolge ausgeführt, in der sie notiert sind, denn:
-* es findet keine Überprüfung auf evtl. Schleifen statt (alle Überprüfungen werden immer ausgeführt)
-* Überprüfungen werden nicht gruppiert (eine Klammerung von Überprüfungen wird nicht unterstützt)
-* sowohl || als auch && haben die gleiche Wertigkeit
-
-FORMATTER
-=========
-Achtung: dies ist ein fortgeschrittenes und äusserst selten benötigtes Feature!
-
-Mit umfangreichen Kenntnissen in der PHP Programmierung ist es möglich den vordefinierten
-Formatierer von show_menu2 mit einem eigenen zu ersetzen.
-In der include.php von show_menu2 sieht man wie der Formatierer geschreiben werden muss.
-Die API die verwendet werden muss sieht wie folgt aus:
-
-(Anmerkung des Übersetzers: Kommentare nicht übersetzt, wer sich so weit vorwagt, sollte
-damit keine Probleme haben ;-)
-
-class SM2_Formatter
-{
-    // called once before any menu is processed to allow object initialization
-    function initialize() { }
-    
-    // called to open the menu list
-    function startList($aPage, $aUrl) { }
-    
-    // called to open the menu item
-    function startItem($aPage, $aUrl, $aCurrSib, $aSibCount) { }
-    
-    // called to close the menu item
-    function finishItem() { }
-    
-    // called to close the menu list
-    function finishList() { }
-    
-    // called once after all menu has been processed to allow object finalization
-    function finalize() { }
-    
-    // called once after finalize() if the SM2_NOOUTPUT flag is used
-    function getOutput() { }
-};
-
-
-

Property changes on: trunk/wb/modules/show_menu2/README_DE
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/show_menu2/README
===================================================================
--- trunk/wb/modules/show_menu2/README	(revision 844)
+++ trunk/wb/modules/show_menu2/README	(nonexistent)
@@ -1,474 +0,0 @@
-// $Id$
-
-show_menu2, version 4.5
-=======================
-A code snippet for the Website Baker CMS software. It provides a complete 
-replacement for the builtin menu functions. All menu data is retrieved using 
-a single database query, all types of menu styles (lists, breadcrums, sitemaps) 
-can be generated with extensive customisation of the resulting HTML.
-
-
-INSTALLATION
-============
-1. Download the latest version from http://code.jellycan.com/show_menu2/
-2. Log into your WebsiteBaker installation
-3. Go to Addons -> Modules
-4. If a previous version of show_menu2 is already installed, select it from
-   the "Uninstall Module" list and choose the "Uninstall" button.
-5. In the "Install Module" section, enter the path to the show_menu2 zip file
-   that you downloaded in step 1, and choose the "Install" button.
-   
-   
-USING SHOW_MENU2
-================
-You need to modify the PHP files of your template to call show_menu2 where you 
-wish to have the menu displayed. Remember when you replace calls to the old
-menu functions to use the new parameters that show_menu2 requires. 
-
-Often times the default menu generated by show_menu2 is all that you need.
-This menu shows the current page and children of the current page. It is
-generated by just calling show_menu2 with no parameters. For example:
-
-    show_menu2();
-    
-Note that the call to show_menu2 is PHP, so you usually need to wrap it in the
-PHP code brackets so that it will execute. Like this:
-
-    <?php show_menu2(); ?>
-
-This default menu generates a complete list based menu with many classes that
-allow easy CSS styling. For example, the current menu item will have the
-"menu-current" class added to the <li> tag. Additionally, every menu item with
-a sub-menu will have the "menu-expand" class added to the <li> tag. This allows 
-you to create CSS rules to style those menu items differently. For example:
-
-    li.menu-expand  { font-weight: bold; }
-    li.menu-current { background: red; }
-
-See the "Output" section for details of exactly what classes are added to each 
-element. More elaborate and different menu structures are able to be created by 
-supplying parameters to the show_menu2 function call. For example, to show only 
-menu items from the top level of the menu you use:
-
-    show_menu2(0, SM2_ROOT, SM2_START);
-    
-Alternatively, to show up to two levels of the child menus of the current page:
-
-    show_menu2(0, SM2_CURR+1, SM2_CURR+2);
-
-There are many more possible menus that can be generated by show_menu2. See the
-demonstration website at http://code.jellycan.com/sm2test/ for more examples. 
-
-
-FUNCTION
-========
-
-The complete call signature and default parameter value for show_menu2 is:
-
-    show_menu2(
-        $aMenu          = 0,
-        $aStart         = SM2_ROOT,
-        $aMaxLevel      = SM2_CURR+1,
-        $aFlags         = SM2_TRIM,
-        $aItemOpen      = '[li][a][menu_title]</a>',
-        $aItemClose     = '</li>',
-        $aMenuOpen      = '[ul]',
-        $aMenuClose     = '</ul>',
-        $aTopItemOpen   = false,
-        $aTopMenuOpen   = false
-        )
-
-See the "Parameters" section for detailed descriptions of each parameter.
-Note that every parameter from $aItemOpen onwards can be supplied as false
-in order to get the default value, this allows (for example) a numbered list
-to be used while still using the the default menu parameters for the items.
-Note that all parameters up to $aFlags need to be explicitly supplied.
-For example:
-
-show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL, false, false, '<ol>', '</ol>');
-
-
-OUTPUT
-======
-The menu is output differently depending on what parameters have been 
-supplied to the function, however in general the following classes are used 
-for each menu. Note that items will have multiple classes when relevant.
-
-    CLASS           ATTACHED TO
-    ------------    -------------------------------------------------------
-    menu-top        First menu tag only
-    menu-parent     Every parent menu item of the current page.
-    menu-current    Only the menu item for the current page.
-    menu-sibling    Every sibling of the current page.
-    menu-child      Every sub-menu of the current page.
-    menu-expand     Every menu item with children.
-    menu-first      First item in any menu or sub-menu.
-    menu-last       Last item in any menu or sub-menu.
-
-    The following classes are added only if SM2_NUMCLASS flag has been used.
-
-    menu-N          Every menu item. The N is replaced with the ABSOLUTE 
-                    menu depth of the item starting with 0. The root level 
-                    menu is always menu-0, the next level is menu-1, etc.
-    menu-child-N    Every sub-menu of the current page, the N is replaced 
-                    with the relative depth of the submenu starting at 0.
-
-
-<ul class="menu-top menu-0">
-  <li class="menu-0 menu-first">  ... </li>
-  <li class="menu-0 menu-expand menu-parent">  ...
-  <ul class="menu-1">
-    <li class="menu-1 menu-expand menu-first">  ...
-    <ul class="menu-2">
-      <li class="menu-2 menu-first">  ...
-      <li class="menu-2 menu-last">  ...
-    </ul>
-    </li>
-    <li class="menu-1 menu-expand menu-parent">  ...
-    <ul class="menu-2">
-      <li class="menu-2 menu-expand menu-current menu-first">  ...      ** CURRENT PAGE **
-      <ul class="menu-3">
-        <li class="menu-3 menu-child menu-child-0 menu-first">  ...
-        <ul class="menu-4">
-          <li class="menu-4 menu-child menu-child-1 menu-first">  ... </li>
-          <li class="menu-4 menu-child menu-child-1 menu-last">  ... </li>
-        </ul>
-        </li>
-        <li class="menu-3 menu-child menu-child-0 menu-last">  ... </li>
-      </ul>
-      </li>
-      <li class="menu-2 menu-sibling menu-last">  ... </li>
-    </ul>
-    </li>
-    <li class="menu-1">  ... </li>
-    <li class="menu-1 menu-expand menu-last">  ...
-    <ul class="menu-2">
-      <li class="menu-2 menu-first menu-last">  ... </li>
-    </ul>
-    </li>
-  </ul>
-  </li>
-  <li class="menu-0 menu-last">  ... </li>
-</ul>
-
-
-
-PARAMETERS
-==========
-$aMenu      
-    Menu number to use. This is useful when you are using multiple menus. 
-    Supplying a menu number of 0 will use the default menu for the current 
-    page. Supplying SM2_ALLMENU will return all menus in the system.
-
-$aStart  
-    Specify where the menu generation should start from. This is most
-    times the parent item of the menu to display. It must be one of the 
-    following values:
-        SM2_ROOT+N  Start N levels down from the root. e.g.
-                      SM2_ROOT      Starting at the root menu 
-                      SM2_ROOT+1    Start 1 level below the root
-                      SM2_ROOT+2    Start 2 levels below the root
-        SM2_CURR+N  Start N levels down from the current page level. e.g.
-                      SM2_CURR      Starts at the current page level. All
-                                    sibling menus to the current page.
-                      SM2_CURR+1    Starts 1 level down from the current
-                                    page with the children menus.
-        page_id     Display using the specific page as the parent. All
-                    child menus of that page will be displayed. The 
-                    page_id can be found by editing the page in WB admin 
-                    interface. The page_id is included in the URL like: 
-                        http://SITE/admin/pages/modify.php?page_id=35
-
-$aMaxLevel   
-    Maximum menu level to display. Menus are displayed from the start
-    level down to this level.
-        SM2_ALL     No limit, all levels are displayed
-        SM2_CURR+N  Always show to the current page + N levels. 
-                      SM2_CURR      Current (no children)
-                      SM2_CURR+3    All parents + current + 3 children
-        SM2_START+N Always show from the starting level + N levels. The
-                    levels of menu will always be displayed regardless of
-                    what level the current page is.
-                      SM2_START     Single level of menus from starting level
-                      SM2_START+1   Starting level and 1 level down
-        SM2_MAX+N   Show at most N levels from the starting level. Levels 
-                    won't be shown if they are below the current level.
-                      SM2_MAX       Starting level only (same as SM2_START)
-                      SM2_MAX+1     Maximum of starting level and 1 level.
-
-$aFlags   
-    Specify flags for different generation options for the menu. The flags
-    may be combined together using bitwise OR (|). For example, to specify
-    both TRIM and PRETTY you should use, SM2_TRIM|SM2_PRETTY.
-
-    GROUP 1
-    -------
-    Exactly one flag from this group must always be supplied. These flags 
-    affect how the siblings in the tree are removed from the output. 
-
-    SM2_ALL         Show all branches of the menu tree
-                        A-1 -> B-1 
-                            -> B-2 -> C-1
-                                   -> C-2 (CURRENT)
-                                          -> D-1
-                                          -> D-2
-                                   -> C-3
-                        A-2 -> B-3
-                            -> B-4
-    SM2_TRIM        Show all sibling menus of pages on the current path. 
-                    All sub-menus of elements that are not on the path 
-                    are removed.
-                        A-1 -> B-1 
-                            -> B-2 -> C-1
-                                   -> C-2 (CURRENT)
-                                          -> D-1
-                                          -> D-2
-                                   -> C-3
-                        A-2 
-    SM2_CRUMB       Show only the breadcrumb trail, i.e. the current
-                    menu and all of it's ancestor menus.
-                        A-1 -> B-2 -> C-2 (CURRENT)
-    SM2_SIBLING     The same as SM2_TRIM however only sibling menus of 
-                    the current page are displayed. All other menus are 
-                    trimmed to show only the path.
-                        A-1 -> B-2 -> C-1
-                                   -> C-2 (CURRENT)
-                                          -> D-1
-                                          -> D-2
-                                   -> C-3
-
-    GROUP 2
-    -------
-    All of these flags are optional. Any number of them may be combined.
-
-    SM2_NUMCLASS    Add the numbered menu classes to the menu. If this 
-                    flag is supplied, the "menu-N" and "menu-child-N" 
-                    classes will be added.
-    SM2_ALLINFO     Load all fields from the page table of the database.
-                    This will result in quite a lot of memory being used
-                    and is not recommended, however it will make keywords,
-                    descriptions, and other fields available. This data
-                    is not loaded by default.
-                    NOTE: This flag must be used on the *FIRST* call to
-                    show_menu2 *for this menu ID*, or in combination with
-                    SM2_NOCACHE otherwise it will have no effect.
-    SM2_NOCACHE     Do not reuse or store the data read from the database
-                    between calls to show_menu2. 
-    SM2_PRETTY      Pretty print the menu HTML with spacing and newlines
-                    for debugging purposes.
-    SM2_BUFFER      Do not output the menu HTML but instead buffer it 
-                    internally and return it as a string from show_menu2.
-    SM2_CURRTREE    Exclude all other top level menus from being considered. 
-                    Only items in the current menu tree will be output.
-                    This can be combined with any of the Group 1 flags as
-                    necessary.
-    SM2_ESCAPE      Call htmlspecialchars on the menu strings. This may be
-                    required with older installations of WB. By escaping the
-                    raw database strings, it permits menus to have HTML 
-                    formatting in them that would cause otherwise cause
-                    pages to fail validation. 
-    SM2_NOESCAPE    Default behaviour. Exists only for backwards compatibility.                    
-
-
-$aItemOpen
-    Format string to use for creating each individual menu item entry.
-    A different format string may be used for the very first entry by 
-    supplying a different format string for $aTopItemOpen. When set to 
-    false, it uses the default of '[li][a][menu_title]</a>' to maintain
-    compatibility with show_menu(). Note however that CSS formatting is
-    often easier if the classes are added to the <a> tag. Use the format
-    string of '<li>[ac][menu_title]</a>' for this style of tag.
-
-    This parameter may also be specified as an instance of a formatting 
-    class for the menu. See the section "Formatter" below for details of
-    the API this class must expose. When a formatter is supplied, all 
-    arguments after $aItemOpen are ignored.
-
-$aItemClose
-    String used to close each item. Note that this is not a format
-    string and no keywords will be replaced. When set to false, it uses 
-    the default of '</li>'.
-
-$aMenuOpen
-    Format string to use for opening a list of menu item entries. A 
-    different format string may be used for the very first menu by 
-    supplying a different format string for $aTopMenuOpen. When set to 
-    false, it uses the default of '[ul]'.
-
-$aMenuClose
-    String used to close each menu. Note that this is not a format
-    string and no keywords will be replaced. When set to false, it uses 
-    the default of '</ul>'.
-
-$aTopItemOpen
-    Format string for the first item. When set to false, it uses the same 
-    format as $aItemOpen.
-
-$aTopMenuOpen 
-    Format string for the first menu. When set to false, it uses the same 
-    format as $aMenuOpen.
-        
-
-
-FORMAT STRINGS
-==============
-The following tags may be included in the format strings for $aItemOpen and 
-$aMenuOpen and will be replaced with the appropriate text.
-
-[a]             <a> tag (no class):         '<a href="[url]" target="[target]">'
-[ac]            <a> tag including class:    '<a href="[url]" target="[target]" class="[class]">'
-[li]            <li> tag including class:   '<li class="[class]">'
-[ul]            <ul> tag including class:   '<ul class="[class]">'
-[class]         List of classes for that page
-[menu_title]    Menu title text (HTML entity escaped unless SM2_NOESCAPE flag is used)
-[page_title]    Page title text (HTML entity escaped unless SM2_NOESCAPE flag is used)
-[url]           Page URL for the <a> tag
-[target]        Page target for the <a> tag
-[page_id]       Page ID of the current menu item
-[parent]        Page ID of the parent menu item
-[level]         Page level, the same number as is used for the "menu-N" CSS tag.
-[sib]           Current menu sibling number
-[sibCount]      Total number of siblings in this menu
-[if]            Conditional test (see section CONDITIONAL FORMATTING)
-
-The following tags are only available when the SM2_ALLINFO flag is used.
-
-[description]   Page description
-[keywords]      Page keywords
-
-
-CONDITIONAL FORMATTING
-======================
-The conditional formatting directive takes one of the following forms:
-
-    [if(A){B}]
-    [if(A){B}else{C}]
-    
-    A   Conditional test. See below for more details.
-    
-    B   Expression emitted when the if-test is true. This may be any string 
-        that does NOT include the '}' character. It may include any of the 
-        format strings described in the section FORMAT STRINGS with the 
-        exception of the conditional test (because '}' is not permitted).
-        
-    C   Expression emitted when the if-test is false. This may be any string 
-        that does NOT include the '}' character. It may include any of the 
-        format strings described in the section FORMAT STRINGS with the 
-        exception of the conditional test (because '}' is not permitted).
-    
-The conditional test is a combination of one or more boolean tests.
-If more than one test is supplied, it must be combined with other tests
-using either || (boolean OR) or && (boolean AND). 
-
-A single test is made up of the left operand, operator and right operand.
-e.g. X == Y where X is the left operand, == is the operator and Y is the
-right operand.
-    
-    Left operand. It must be one of the following keywords:
-        class       Test for existence of one of the classes. Only the
-                    "==" and "!=" operators are permitted. In this case
-                    these operators have the meaning of "includes" 
-                    instead of "equals".
-        level       Test against the page level.
-        sib         Test against the current page sibling number.
-        sibCount    Test against the number of siblings in the menu.
-        id          Test against the page id.
-    
-    Operator. It must be one of the following:
-        <           Less Than
-        <=          Less Than Equals
-        ==          Equals
-        !=          Not Equal
-        >=          Greater Than Equals
-        >           Greater Than
-    
-    Right operand. The type of this operand depends on the keyword used
-    for the left operand:
-        class       One of the "menu-*" class names as listed in the 
-                    section "OUTPUT".
-        level       Test the page level against the following values:
-                      <number>  absolute page level
-                      root      the root page level
-                      granny    the grand-parent page level
-                      parent    the parent page level
-                      current   the current page level
-                      child     the child page level
-        id          Test the page id against the following values:
-                      <number>  absolute page id
-                      parent    the parent page id
-                      current   the current page id
-        sib         A positive integer, or "sibCount" to test against
-                    the count of siblings in this menu.
-        sibCount    A positive integer.
-        
-For example, valid tests are expression "exp" is emitted only when the menu item:
-    
-    [if(class==menu-expand){exp}]   has a sub-menu
-    [if(class==menu-first){exp}]    is first item in a menu
-    [if(class!=menu-first){exp}]    is NOT first item in a menu
-    [if(class==menu-last){exp}]     is last item in a menu
-    [if(level==0){exp}]             is at the root
-    [if(level>0){exp}]              is not at the root
-    [if(sib==2){exp}]               is the second item in a menu
-    [if(sibCount>1){exp}]           is in a menu with more than 1 entry
-    [if(sibCount!=2){exp}]          is in a menu which doesn't have exactly
-    [if(level>parent){exp}]         is in a sibling menu or child of a sibling
-    [if(id==parent){exp}]           is the parent of the current page
-
-If an else-clause was added, then the expression for the else would be 
-emitted in all other cases. For example the expression "foo" is emitted
-whenever the if-test is false, so therefore:
-
-    [if(sib==2){exp}else{foo}]          is NOT the second item in a menu
-    [if(sibCount>2){exp}else{foo}]      is NOT in a menu with more than 2 entries
-
-For multiple tests, the expression "exp" is emitted only when the menu item:
-
-    [if(sib == 1 || sib > 3){exp}]      
-        [is the first item] OR [is the 4th or larger item] in the menu
-        
-    [if(id == current && class == menu-expand){exp}
-        [is the current item] AND [it has children]
-
-Note that all tests are evaluated in the order listed because:
- * there is no short-circuit evaluation (all individual tests are always evaluated)
- * there is no grouping of tests (i.e. no support for parenthesis)
- * both || and && are considered the same level 
-
-
-
-FORMATTER
-=========
-Note: This is an advanced and rarely needed feature!
-
-If you are capable of extensive PHP programming, it is possible to replace the 
-predefined menu formatter that show_menu2 is uses with a custom module. See the
-include.php file of show_menu2 for an example of how the menu formatter must be 
-written. The API it must use is:
-
-class SM2_Formatter
-{
-    // called once before any menu is processed to allow object initialization
-    function initialize() { }
-    
-    // called to open the menu list
-    function startList($aPage, $aUrl) { }
-    
-    // called to open the menu item
-    function startItem($aPage, $aUrl, $aCurrSib, $aSibCount) { }
-    
-    // called to close the menu item
-    function finishItem() { }
-    
-    // called to close the menu list
-    function finishList() { }
-    
-    // called once after all menu has been processed to allow object finalization
-    function finalize() { }
-    
-    // called once after finalize() if the SM2_NOOUTPUT flag is used
-    function getOutput() { }
-};
-
-
-

Property changes on: trunk/wb/modules/show_menu2/README
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: trunk/wb/modules/show_menu2/LICENCE.txt
===================================================================
--- trunk/wb/modules/show_menu2/LICENCE.txt	(nonexistent)
+++ trunk/wb/modules/show_menu2/LICENCE.txt	(revision 845)
@@ -0,0 +1,278 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
Index: trunk/wb/modules/show_menu2/info.php
===================================================================
--- trunk/wb/modules/show_menu2/info.php	(revision 844)
+++ trunk/wb/modules/show_menu2/info.php	(revision 845)
@@ -39,9 +39,9 @@
 $module_directory = 'show_menu2';
 $module_name = 'show_menu2';
 $module_function = 'snippet';
-$module_version = '4.5';
+$module_version = '4.6';
 $module_platform = '2.6.x | 2.7.x';
 $module_author = 'Brodie Thiesfield';
 $module_license = 'GNU General Public License';
-$module_description = 'A code snippet for the Website Baker CMS providing a complete replacement for the builtin menu functions. See <a href="http://code.jellycan.com/show_menu2/" target="_blank">http://code.jellycan.com/show_menu2/</a> for details or view the <a href="' .WB_URL .'/modules/show_menu2/README" target="_blank">README</a> file.';
+$module_description = 'A code snippet for the Website Baker CMS providing a complete replacement for the builtin menu functions. See <a href="http://code.jellycan.com/show_menu2/" target="_blank">http://code.jellycan.com/show_menu2/</a> for details or view the <a href="' .WB_URL .'/modules/show_menu2/README.en.txt" target="_blank">readme</a> file.';
 ?>
\ No newline at end of file
Index: trunk/wb/modules/show_menu2/README.de.txt
===================================================================
--- trunk/wb/modules/show_menu2/README.de.txt	(nonexistent)
+++ trunk/wb/modules/show_menu2/README.de.txt	(revision 845)
@@ -0,0 +1,476 @@
+ï»¿show_menu2, version 4.6
+=======================
+Ist ein Code-Snippet fÃ¼r das CMS Website Baker. Es stellt einen kompletten Ersatz fÃ¼r die eingebaute MenÃ¼funtionalitÃ¤t zur VerfÃ¼gung. Alle fÃ¼r die Erzeugung des MenÃ¼s erforderlichen Daten werden durch eine einzige Datenbankabfrage erzeugt. Durch umfangreiche AnpassungsmÃ¶glichkeiten des erzeugten HTML-Code kÃ¶nnen alle mÃ¶glichen MenÃ¼arten (Listen, Breadcrumbs, Sitemaps, usw.) erzeugt werden.
+
+---
+Deutsche Ãœbersetzung von BerndJM. Dies ist eine weitgehend direkte Ãœbersetzung des englischen Originals. Bei Ãœbersetzungs- oder Interpretationsfehlern, bitte eine Email an bjm@wwnw.de.
+---
+
+INSTALLATION
+============
+1. Die aktuelle Version von http://code.jellycan.com/show_menu2/ herunterladen.
+2. In das Admin-Backend der Website Baker Installation einlogen.
+3. Erweiterungen -> Module aufrufen.
+4. Wenn bereits eine frÃ¼here Version von show_menu2 installiert ist, diese Ã¼ber "Modul deinstallieren" auswÃ¤hlen und deinstallieren.
+5. Im Abschnitt "Modul installieren" das im Schritt 1 heruntergeladene zip-File auswÃ¤hlen und installieren.
+
+   
+BENUTZUNG VON SHOW_MENU2
+========================
+Um show_menu2 zu benutzen muss das verwendete Template an den Stellen modifiziert werden, an denen das MenÃ¼ erscheinen soll. Bitte beachten: Wenn alte MenÃ¼aufrufe ersetzt werden, mÃ¼ssen unbedingt auch die entsprechenden neuen Parameter verwendet werden die show_menu2 benÃ¶tigt.
+
+In den meisten FÃ¤llen genÃ¼gt bereits der Standardaufruf ohne weitere Parameter von show_menu2. In diesem Fall werden die Vorgabewerte verwendet, dies erzeugt ein MenÃ¼ das die aktuelle Seite und die Unterseiten der aktuellen Seite anzeigt:
+    
+	show_menu2();
+    
+Bitte beachten: der Aufruf von show_menu2 ist PHP und muss normalerweise in PHP-Codezeichen eingeschlossen werden (ausser der Aufruf erfolgt bereits innerhalb von PHP Code):
+
+    <?php show_menu2(); ?>
+
+Dieses Vorgabe MenÃ¼ erzeugt bereits ein komplettes MenÃ¼ auf Listenbasis mit etlichen Klassen, die eine leichte Formatierung mittels CSS ermÃ¶glichen. Es wird z.B. die Klasse "menu-current" zu dem <li> Tag des aktuellen MenÃ¼punktes hinzugefÃ¼gt, zusÃ¤tzlich erhÃ¤lt jeder MenÃ¼punkt der Unterpunkte enthÃ¤lt die Klasse "menu-expand". Dies erlaubt es sehr differenzierte CSS Regeln fÃ¼r die einzelnen MenÃ¼punkte aufzustellen.
+Zum Beispiel:
+
+    li.menu-expand  { font-weight: bold; }
+    li.menu-current { background: red; }
+
+Im Abschnitt "HTML-Ausgabe" findet sich eine detaillierte Beschreibung welche Klassen welchem Element zugeordnet werden. Durch die Verwendung von verschiedenen Parametern bei dem show_menu2 Funktionsaufruf lassen sich auch recht umfangreiche und unterschiedliche MenÃ¼strukturen erzeugen. Um beispielsweise nur MenÃ¼punkte aus der obersten Ebene der MenÃ¼struktur darzustellen, kÃ¶nnte man folgenden Aufruf verwenden:
+
+    show_menu2(0, SM2_ROOT, SM2_START);
+    
+Oder um beispielsweise bis zu zwei Unterebenen der aktuellen Seite anzuzeigen:
+
+    show_menu2(0, SM2_CURR+1, SM2_CURR+2);
+
+Es gibt jede Menge MÃ¶glichkeiten, um die unterschiedlichten MenÃ¼strukturen zu erzeugen, zahlreiche Beispiele dazu findet man auf der Demo-Website: http://code.jellycan.com/sm2test/
+
+
+FUNKTION
+========
+Der komplette Aufruf und die Vorgabe Parameterwerte fÃ¼r show_menu2 sind wie folgt:
+
+    show_menu2(
+        $aMenu          = 0,
+        $aStart         = SM2_ROOT,
+        $aMaxLevel      = SM2_CURR+1,
+        $aFlags         = SM2_TRIM,
+        $aItemOpen      = '[li][a][menu_title]</a>',
+        $aItemClose     = '</li>',
+        $aMenuOpen      = '[ul]',
+        $aMenuClose     = '</ul>',
+        $aTopItemOpen   = false,
+        $aTopMenuOpen   = false
+        )
+
+Im Abschnitt "Parameter" findet sich eine detaillierte Beschreibung jedes einzelnen Parameters.
+Ab $aItemOpen kann jedem Parameter der Wert false Ã¼bergeben werden um den jeweiligen Vorgabewert zu erhalten.
+Dies kann beispielsweise verwendet werden um eine nummerierte Liste zu erzeugen, wÃ¤hrend fÃ¼r die einzelnen MenÃ¼punkte trotzdem die Vorgabewerte Verwendung finden:
+
+show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL, false, false, '<ol>', '</ol>');
+
+Bitte beachten: bis einschliessich $aFlags mÃ¼ssen alle Parameter explizit Ã¼bergeben werden!
+
+
+HTML-AUSGABE
+============
+Die HTML-Ausgabe hÃ¤ngt wesentlich davon ab, welche Parameter an die Funktion Ã¼bergeben werden. UnabhÃ¤ngig davon werden nachfolgende Klassen grundsÃ¤tzlich fÃ¼r jedes MenÃ¼ verwendet, wobei einzelne MenÃ¼punkte, wenn erforderlich, auch mehrere Klassen erhalten kÃ¶nnen.
+
+    KLAssE          ZUORDNUNG
+    ------------    -------------------------------------------------------
+    menu-top        Nur der erste MenÃ¼punkt
+    menu-parent     Jeder HauptmenÃ¼punkt.
+    menu-current    Nur der MenÃ¼punkt der aktuellen Seite.
+    menu-sibling    Alle "Geschwister" der aktuellen Seite.
+    menu-child      Jedes UntermenÃ¼ der aktuellen Seite.
+    menu-expand     Jedes MenÃ¼ das UntermenÃ¼s hat.
+    menu-first      Der erste Punkt eines jeden MenÃ¼s oder UntermenÃ¼s.
+    menu-last       Der letzte Punkt eines jeden MenÃ¼s oder UntermenÃ¼s.
+
+    Folgende Klassen werden nur hinzugefÃ¼gt, wenn das SM2_NUMCLAss flag gesetzt ist:
+
+    menu-N          Jeder MenÃ¼punkt, wobei das N fÃ¼r die ABSOLUTE MenÃ¼tiefe, 
+		    beginnend bei 0, des jeweiligen MenÃ¼punktes steht.
+                    Die oberste Ebene ist also immer menu-0, die nÃ¤chste
+                    Ebene menu-1 usw.
+    menu-child-N    Jedes UntermenÃ¼ der aktuellen Seiten, wobei das N fÃ¼r die
+                    RELATIVE Tiefe des UntermenÃ¼s, beginnend bei 0, steht.
+        
+Beispiel einer HTML-Ausgabe:
+
+<ul class="menu-top menu-0">
+  <li class="menu-0 menu-first">  ... </li>
+  <li class="menu-0 menu-expand menu-parent">  ...
+  <ul class="menu-1">
+    <li class="menu-1 menu-expand menu-first">  ...
+    <ul class="menu-2">
+      <li class="menu-2 menu-first">  ...
+      <li class="menu-2 menu-last">  ...
+    </ul>
+    </li>
+    <li class="menu-1 menu-expand menu-parent">  ...
+    <ul class="menu-2">
+      <li class="menu-2 menu-expand menu-current menu-first">  ...      ** CURRENT PAGE **
+      <ul class="menu-3">
+        <li class="menu-3 menu-child menu-child-0 menu-first">  ...
+        <ul class="menu-4">
+          <li class="menu-4 menu-child menu-child-1 menu-first">  ... </li>
+          <li class="menu-4 menu-child menu-child-1 menu-last">  ... </li>
+        </ul>
+        </li>
+        <li class="menu-3 menu-child menu-child-0 menu-last">  ... </li>
+      </ul>
+      </li>
+      <li class="menu-2 menu-sibling menu-last">  ... </li>
+    </ul>
+    </li>
+    <li class="menu-1">  ... </li>
+    <li class="menu-1 menu-expand menu-last">  ...
+    <ul class="menu-2">
+      <li class="menu-2 menu-first menu-last">  ... </li>
+    </ul>
+    </li>
+  </ul>
+  </li>
+  <li class="menu-0 menu-last">  ... </li>
+</ul>
+
+
+PARAMETER
+=========
+$aMenu      
+    Nummer des MenÃ¼s. Dies ist nÃ¼tzlich um mehrere MenÃ¼s auf einer Seite zu verwenden.
+    MenÃ¼ Nummer 0 ist das VorgabemenÃ¼ der aktuellen Seite, SM2_ALLMENU gibt alle
+    im System verwendeten MenÃ¼s zurÃ¼ck.
+
+$aStart  
+    Gibt an, ab welcher Ebene die Erzeugung des MenÃ¼s beginnen soll. In den meisten
+    FÃ¤llen wird dies die oberste Ebene des anzuzeigenden MenÃ¼s sein. Es kann einer
+    der folgenden Werte verwendet werden:
+
+        SM2_ROOT+N  Beginnt N Ebenen unterhalb der obersten Ebene, z.B.:
+                      SM2_ROOT      Beginnt auf der obersten Ebene
+                      SM2_ROOT+1    Beginnt eine Ebene unterhalbe der obersten Ebene
+                      SM2_ROOT+2    Beginnt zwei Ebenen unterhalbe der obersten Ebene
+
+        SM2_CURR+N  Beginnt N Ebenen unterhalb der aktuellen Ebene, z.B.:
+                      SM2_CURR      Beginnt auf der aktuellen Ebene. Alle Geschwister
+                                    der aktuellen Ebene
+                      SM2_CURR+1    Beginnt eine Ebene unterhalb der aktuellen Ebene
+                                    mit allen Unterebenen
+
+        page_id     Verwendet die Seite mit der angegebenen page id als Elternelement.
+                    Alle UntermenÃ¼s dieser Seite werden angezeigt. (Die page id kann
+                    ermittelt werden, wenn man die Seite im Admin-Backend editiert,
+		    sie steht dann in der Adresszeile des Browsers:
+		    http://SITE/admin/pages/modify.php?page_id=35
+
+$aMaxLevel   
+    Die maximale Anzahl der Ebenen die angezeigt werden, die Anzeige
+    beginnt ab der in $aStart festgelegten Ebene bis hin zu der hier 
+    festgelegten Ebene.
+        
+	SM2_ALL      Keine BeschrÃ¤nkung, alle Ebenen werden angezeigt
+
+        SM2_CURR+N   Zeigt immer die aktuelle Seite + N Ebenen. 
+                        SM2_CURR      Aktuelle Ebene (keine Unterebene)
+                        SM2_CURR+3    Alle Ã¼bergeordneten + aktuelle + 3 Unterebenen
+
+        SM2_START+N  Beginnt immer auf der Startebene + N Ebenen.
+                     Die Ebenen werden unabhÃ¤ngig davon angezeigt 
+                     auf welcher Ebene sich die aktuelle Seite befindet.
+		        SM2_START     Eine einzelne Ebene ab der Startebene
+                        SM2_START+1   Startebene + eine Ebene darunter
+
+        SM2_MAX+N    Zeigt hÃ¶chstens N Ebenen ab der Startebene.
+                     Ebenen unterhalb der aktuellen Ebene werden nicht angezeigt.
+			SM2_MAX       Starting level only (same as SM2_START)
+                        SM2_MAX+1     Maximum of starting level and 1 level.
+
+$aFlags   
+    Spezielle Flags fÃ¼r verschiedene MenÃ¼generierungs Optionen. Sie kÃ¶nnen mittels
+    einer ODER VerknÃ¼pfung (|) miteinander kombiniert werden. Um beispielsweise
+    sowohl TRIM als auch PRETTY zu definieren, verwendet man: SM2_TRIM|SM2_PRETTY.
+
+    GROUP 1
+    -------
+    Aus dieser Gruppe muss stets genau ein Flag angegeben werden. Diese Flags
+    bestimmen auf welche Weise die Geschwisterelemente im MenÃ¼baum in der
+    Ausgabe unterdrÃ¼ckt werden.
+    
+    SM2_ALL         Zeigt alle Zweige des MenÃ¼baums
+                        A-1 -> B-1 
+                            -> B-2 -> C-1
+                                   -> C-2 (CURRENT)
+                                          -> D-1
+                                          -> D-2
+                                   -> C-3
+                        A-2 -> B-3
+                            -> B-4
+
+    SM2_TRIM        Zeigt alle GeschwistermenÃ¼s der Seite im aktuellen Pfad.
+                    Alle UntermenÃ¼s von Elemnten die sich nicht im Pfad befinden
+                    werden entfernt.
+                        A-1 -> B-1 
+                            -> B-2 -> C-1
+                                   -> C-2 (CURRENT)
+                                          -> D-1
+                                          -> D-2
+                                   -> C-3
+                        A-2 
+
+    SM2_CRUMB       Zeigt den Breadcrumb Pfad des MenÃ¼s an, also den aktuellen
+                    MenÃ¼punkt sowie alle MenÃ¼punkte die dorthin fÃ¼hren.
+                        A-1 -> B-2 -> C-2 (CURRENT)
+
+    SM2_SIBLING     Wie SM2_TRIM, es werden aber nur GeschwistermenÃ¼s der aktuellen
+                    Seite angezeigt. Alle anderen Punkte werden unterdrÃ¼ckt.
+                        A-1 -> B-2 -> C-1
+                                   -> C-2 (CURRENT)
+                                          -> D-1
+                                          -> D-2
+                                   -> C-3
+
+    GROUP 2
+    -------
+    Diese Flags sind optional, sie kÃ¶nnen in beliebiger Anzahl kombiniert werden.
+
+    SM2_NUMCLAss    FÃ¼gt die nummerierten MenÃ¼klassen "menu-N" und 
+                    "menu-child-N hinzu.
+        
+    SM2_ALLINFO     LÃ¤dt alle Felder aus der Seitentabelle der Datenbank.
+                    Dies verursacht einen ziemlich hohen Speicherverbauch und sollte
+                    deshalb nur mit Bedacht verwendet werden.
+                    Dadurch werden z.B. die Keywords, die Seitenbeschreibung sowie
+                    all die anderen Informationen verfÃ¼gbar, die normalerweise nicht
+                    geladen werden.
+                    Bitte beachten: dieses Flag muss beim ERSTEN Aufruf von schow_menu2
+                    fÃ¼r die jeweilige MenÃ¼ ID verwendet werden, oder in Verbindung
+                    mit SM2_NOCACHE, sonst zeigt es keine Wirkung.
+    
+    SM2_NOCACHE     Die aus der Datenbank gelesenen Daten werden bei erneutem Aufruf von
+                    show_menu2 nicht wiederverwendet sondern erneut aus der Datenbank gelesen.
+    
+    SM2_PRETTY      Bringt die HTML-Ausgabe des MenÃ¼s mittels Leerzeichen und
+                    ZeilenumbrÃ¼chen in eine gut lesbare Form. Dies ist besonders nÃ¼tzlich
+                    beim Debuggen der MenÃ¼ausgabe.
+    
+    SM2_BUFFER      Gibt den HTML-Code nicht direkt aus, sondern speichert ihn intern
+                    zwischen und gibt ihn al kompletten String aus.
+    
+    SM2_CURRTREE    Schliesst alle anderen ToplevelmenÃ¼s von der Betrachtung aus.
+                    Es werden nur MenÃ¼punkte des aktuellen MenÃ¼zweiges dargestellt.
+                    Dieses Flag kann bei Bedarf mit jedem flag aus der Gruppe 1
+                    kombiniert werden.
+    
+    SM2_ESCAPE      Wendet htmlspecialchars auf den MenÃ¼string an.
+                    Dies kann bei Ã¤lteren Websitebaker Installationen erforderlich
+                    sein um eine valide HTML Ausgabe zu erzeugen.
+                        
+    SM2_NOESCAPE    Dies ist das Standarverhalten und existiert nur aus GrÃ¼nden der 
+                    AbwÃ¤rtskompatibiltÃ¤t.                   
+
+$aItemOpen
+    Dies legt den Formatstring fest, mit dem jeder einzelne MenÃ¼eintrag begonnen
+    wird. FÃ¼r den allerersten MenÃ¼eintrag kann mittels $aTopItemOpen ein anderer
+    Formatstring definiert werden.
+    Wenn dieser Parameter auf false gesetzt wird, wird der Vorgabe Formatstring
+    '[li][a][menu_title]</a>' verwendet um die KompatibiltÃ¤t zur Website Baker
+    Standardfunktion show_menu() zu gewÃ¤hrleiten.
+    Da die Formatierung mittels CSS-Klassen oftmals einfacher ist, wenn sie auf den 
+    <a> Tag angewendet werden, empfiehlt es sich hier folgenden Formatstring zu
+    verwenden: '<li>[ac][menu_title]</a>'.
+    
+    Dieser Parameter kann auch als Instanz eine Formatierungklasse fÃ¼r das MenÃ¼
+    verwendet werden. Im Abschnitt "Formatter" findet sich dazu eine detailierte 
+    Beschreibung. Wenn hier ein Formatter angegeben wird, werden alle Argumente
+    nach $aItenOpen ignoriert.
+
+$aItemClose
+    Dieser String schliesst jeden MenÃ¼punkt ab. 
+    Bitte beachten: dies ist kein Formatstring und es werden keine SchlÃ¼sselworte
+    ersetzt!
+    Wenn dieser Parameter auf false gesetzt ist, wird die Vorgabe '</li>' verwendet.
+    
+$aMenuOpen
+    Mit diesem Formatstring wird eine Liste von MenÃ¼eintrÃ¤gen geÃ¶ffnet. FÃ¼r das erste
+    MenÃ¼ kann mittels $aTopMenuOpen ein davon abweichender Formatstring definiert
+    werden.
+    Wenn dieser Parameter auf false gesetzt ist wird der Vorgabewert '[ul]'
+    verwendet.
+    
+$aMenuClose
+    Dieser String schliesst jedes MenÃ¼ ab. 
+    Bitte beachten: dies ist kein Formatstring und es werden keine SchlÃ¼sselworte
+    ersetzt!
+    Wenn dieser Parameter auf false gesetzt ist, wird die Vorgabe '</ul>' verwendet.
+
+$aTopItemOpen
+    Der Formatstring fÃ¼r den allerersten MenÃ¼punkt. Wenn dieser Parameter auf false
+    gesetzt wird, wird der selbe Formatstring wie bei $aItemOpen verwendet.
+
+$aTopMenuOpen 
+    Der Formatstring fÃ¼r das erste MenÃ¼. Wenn dieser Parameter auf false
+    gesetzt wird, wird der selbe Formatstring wie bei $aMenuOpen verwendet.
+
+
+FORMAT STRINGS
+==============
+Die folgenden Tags kÃ¶nnen in den Formatstrings fÃ¼r $aItemOpen und $aMenuOpen
+verwendet werden und werden durch den entsprechenden Text ersetzt.
+
+[a]             <a> tag ohne Klasse:   '<a href="[url]" target="[target]">'
+[ac]            <a> tag mit Klasse:    '<a href="[url]" target="[target]" class="[class]">'
+[li]            <li> tag mit Klasse:   '<li class="[class]">'
+[ul]            <ul> tag mit Klasse:   '<ul class="[class]">'
+[class]         Liste der Klassen fÃ¼r diese Seite
+[menu_title]    Text des MenÃ¼titel (HTML entity escaped ausser das SM2_NOESCAPE Flag ist gesetzt)
+[page_title]    text des Seitentitel (HTML entity escaped ausser das SM2_NOESCAPE Flag ist gesetzt)
+[url]           die URL der Seiten fÃ¼r den <a> tag
+[target]        das Seitenziel fÃ¼r den <a> tag
+[page_id]       die Page ID des aktuellen MenÃ¼punktes
+[parent]        die Page ID des Ã¼bergeorneten MenÃ¼punktes
+[level]         die Seitenebene, dies ist die gleiche Zahl die im "menu-N" CSS tag verwendet wird.
+[sib]           Anzahl der Geschwister des aktuellen MenÃ¼punktes
+[sibCount]      Anzahl aller Geschwister in diesem MenÃ¼
+[if]            Bedingung (Details hierzu im Abschnitt "Bedingte Formatierung')
+
+Folgende tags sind nur verfÃ¼gbar, wenn das SM2_ALLINFO flag gesetzt ist.
+
+[description]   Seitenbeschreibung
+[keywords]      SchlÃ¼sselworte der Seite
+
+
+BEDINGTE FORMATIERUNG
+=====================
+Die Anweisung fÃ¼r eine bedingte Formatierung kann eine der folgenden Formen haben:
+
+    [if(A){B}]
+    [if(A){B}else{C}]
+    
+    A   Die Bedingung. Details dazu, siehe unten.
+    
+    B   Der Ausdruck der verwendet wird, wenn die Bedingung erfÃ¼llt ist.
+        Dies kann ein beliebiger String sein, der jedoch nicht das Zeichen '}'
+        enthalten darf. Er kann jeden beliebigen Formatstring aus dem Abschnitt
+        'Format Strings' enthalten, jedoch keinen weiteren Bedingungstest (da das 
+        Zeichen '}' nicht erlaubt ist).
+    
+    C   Der Ausdruck der verwendet wird, wenn die Bedingung nicht erfÃ¼llt ist.
+        Dies kann ein beliebiger String sein, der jedoch nicht das zeichen '}'
+        enthalten darf. Er kann jeden beliebigen Formatstring aus dem Abschnitt
+        'Format Strings' enthalten, jedoch keinen weiteren Bedingungstest (da das 
+        Zeichen '}' nicht erlaubt ist).
+
+Die Bedingung ist eine Kombination von einem oder mehreren boolschen Vergleichen.
+Wenn mehr als ein Vergleich erforderlich ist, so muss dieser mit den anderen Vergleichen
+mittels || (boolsches oder - OR) oder && (boolsches und - AND) vernÃ¼pft werden.    
+
+Ein einzelner Vergleich besteht aus dem linken Operanden, dem Operator und dem rechten Operanden.
+z.B. X == Y  - hierbei ist X der linke Operand, == der Operator und Y der rechte Operand.
+    
+    Linker Operand. Muss eines der folgende SchlÃ¼sselworte sein:
+        class       ÃœberprÃ¼fung ob diese Klasse existiert. Es sind nur die
+                    "==" and "!=" Operatoren erlaubt. In diesem Fall haben die Operatoren
+                    die Bedeutung von "enthÃ¤lt" bzw. "enthÃ¤lt nicht" an Stelle von
+                    "ist gleich" bzw. "ist nicht gleich"
+        level       ÃœberprÃ¼fung der Seitenebene.
+        sib         ÃœberprÃ¼fung der Geschwisteranzahl der aktuellen Seite.
+        sibCount    ÃœberprÃ¼fung der Geamtanzahl der Geschwister im aktuellen MenÃ¼.
+        id          ÃœberprÃ¼fung der page id.
+    
+    Operator. Muss einer der folgenden sein:
+        <           Kleiner als
+        <=          Kleiner oder gleich als
+        ==          Gleich
+        !=          Nicht gleich
+        >=          GrÃ¶ssr oder gleich als
+        >           grÃ¶sser als
+    
+    Rechter Operand. Die Art dieses Operanden hÃ¤ngt von dem, fÃ¼r den linken Operanden
+                     verwendeten SchlÃ¼sselwort ab.
+        class       einer der "menu-*" Klassennamen wie sie im Abschnitt "Ausgabe"
+                    spezifiziert sind.
+        level       ÃœberprÃ¼fung der Seitenebene gegen folgende Werte:
+                      <number>  die absolute Seitenebene
+                      root      die oberste Seitenebene
+                      granny    die Seitenebene Ã¼ber der Ã¼bergeordneten Seitenebene
+                      parent    die Ã¼bergeordnete Seitenebene
+                      current   die aktuelle Seitenebene
+                      child     die untergeornete Seitenebene
+        id          ÃœberprÃ¼fung der page id gegen folgende Werte:
+                      <number>  die absolute page id
+                      parent    die Ã¼bergeordnete page id
+                      current   die aktuelle page id
+        sib         Eine positive Integerzahl, oder "sibCount" um die Anzahl der
+                    Geschwister in diesem MenÃ¼ zu Ã¼berprÃ¼fen
+        sibCount    Eine positive Integerzahl
+        
+Folgende Beispiele ergeben "wahr" und der Ausdruck {exp} wird ausgefÃ¼hrt, wenn zutrifft:
+    
+    [if(class==menu-expand){exp}]   hat ein UntermenÃ¼
+    [if(class==menu-first){exp}]    ist der erste Eintrag in einem MenÃ¼
+    [if(class!=menu-first){exp}]    ist NICHT der erste Eintrag in einem MenÃ¼
+    [if(class==menu-last){exp}]     ist der letzte Eintrag in einem MenÃ¼
+    [if(level==0){exp}]             befindet sich auf der obersten Ebene
+    [if(level>0){exp}]              befindet sich NICHT auf der obersten Ebene
+    [if(sib==2){exp}]               ist der zweite Eintrag in einem MenÃ¼
+    [if(sibCount>1){exp}]           ist in einem MenÃ¼ mit mehr als einem Eintrag
+    [if(sibCount!=2){exp}]          ist in einem MenÃ¼, das nicht genau 2 EintrÃ¤ge hat
+    [if(level>parent){exp}]         ist ine eine GeschwistermenÃ¼ oder dem UntermenÃ¼ eines GeschwistermenÃ¼s
+    [if(id==parent){exp}]           ist der Ã¼bergeordnete Punkt der aktuellen id
+
+Wenn eine sonst-Klausel (else) hinzugefÃ¼gt wird, so wird diese in allen anderen FÃ¤llen ausgefÃ¼hrt.
+Zum Beispiel wird "foo" immer dann ausgefÃ¼hrt, wenn die if ÃœberprÃ¼fung falsch ergibt, also:
+
+    [if(sib==2){exp}else{foo}]      ist NICHT der zweite Eintrag im MenÃ¼
+    [if(sibCount>2){exp}else{foo}]  ist NICHT in einem MenÃ¼ mit mehr als zwei EintrÃ¤gen
+
+Bei mehrfach Vergleichen wird der Ausdruck "exp" nur ausgefÃ¼hrt, wenn:
+
+    [if(sib == 1 || sib > 3){exp}]  ist der erste Eintrag ODER ist der vierte oder hÃ¶here Eintrag im MenÃ¼    
+               
+    [if(id == current && class == menu-expand){exp}  ist der aktuelle Eintrag UND hat UntermenÃ¼s
+        
+Bitte beachten:
+Alle ÃœberprÃ¼fungen werden in der Reihenfolge ausgefÃ¼hrt, in der sie notiert sind, denn:
+* es findet keine ÃœberprÃ¼fung auf evtl. Schleifen statt (alle ÃœberprÃ¼fungen werden immer ausgefÃ¼hrt)
+* ÃœberprÃ¼fungen werden nicht gruppiert (eine Klammerung von ÃœberprÃ¼fungen wird nicht unterstÃ¼tzt)
+* sowohl || als auch && haben die gleiche Wertigkeit
+
+FORMATTER
+=========
+Achtung: dies ist ein fortgeschrittenes und Ã¤usserst selten benÃ¶tigtes Feature!
+
+Mit umfangreichen Kenntnissen in der PHP Programmierung ist es mÃ¶glich den vordefinierten
+Formatierer von show_menu2 mit einem eigenen zu ersetzen.
+In der include.php von show_menu2 sieht man wie der Formatierer geschreiben werden muss.
+Die API die verwendet werden muss sieht wie folgt aus:
+
+(Anmerkung des Ãœbersetzers: Kommentare nicht Ã¼bersetzt, wer sich so weit vorwagt, sollte
+damit keine Probleme haben ;-)
+
+class SM2_Formatter
+{
+    // called once before any menu is processed to allow object initialization
+    function initialize() { }
+    
+    // called to open the menu list
+    function startList($aPage, $aUrl) { }
+    
+    // called to open the menu item
+    function startItem($aPage, $aUrl, $aCurrSib, $aSibCount) { }
+    
+    // called to close the menu item
+    function finishItem() { }
+    
+    // called to close the menu list
+    function finishList() { }
+    
+    // called once after all menu has been processed to allow object finalization
+    function finalize() { }
+    
+    // called once after finalize() if the SM2_NOOUTPUT flag is used
+    function getOutput() { }
+};
+
+
+
Index: trunk/wb/modules/show_menu2/languages/DE.php
===================================================================
--- trunk/wb/modules/show_menu2/languages/DE.php	(revision 844)
+++ trunk/wb/modules/show_menu2/languages/DE.php	(revision 845)
@@ -23,6 +23,6 @@
 */
 
 // Deutsche Modulbeschreibung
-$module_description = 'Dieses Modul integriert die erweiterte Men&uuml;funktion <code>show_menu2()</code> in Website Baker. Detailierte Informationen gibt es auf <a href="http://code.jellycan.com/show_menu2/" target="_blank">http://code.jellycan.com/show_menu2/</a> oder in der <a href="{WB_URL}/modules/show_menu2/README_DE" target="_blank">README</a> Datei.';
+$module_description = 'Dieses Modul integriert die erweiterte Men&uuml;funktion <code>show_menu2()</code> in Website Baker. Detailierte Informationen gibt es auf <a href="http://code.jellycan.com/show_menu2/" target="_blank">http://code.jellycan.com/show_menu2/</a> oder in der <a href="{WB_URL}/modules/show_menu2/README.de.txt" target="_blank">readme</a> Datei.';
 
 ?>
\ No newline at end of file
Index: trunk/wb/modules/show_menu2/include.php
===================================================================
--- trunk/wb/modules/show_menu2/include.php	(revision 844)
+++ trunk/wb/modules/show_menu2/include.php	(revision 845)
@@ -22,7 +22,7 @@
     02110-1301, USA.
 
     ***********************************************
-    ** Version 4.5: see README for documentation **
+    ** Version 4.6: see README for documentation **
     ***********************************************
 */
 
@@ -149,7 +149,7 @@
             // not set if false, so existence = true
             $currClass .= ' menu-expand';
         }
-        if ($aPage['page_id'] == PAGE_ID) {
+        if (array_key_exists('sm2_is_curr', $aPage)) { 
             $currClass .= ' menu-current';
         }
         elseif (array_key_exists('sm2_is_parent', $aPage)) { 
@@ -424,6 +424,19 @@
         $aFlags |= SM2_TRIM; // default to TRIM
     }
     
+    // search page results don't have any of the page data loaded by WB, so we load it 
+    // ourselves using the referrer ID as the current page
+    $CURR_PAGE_ID = defined('REFERRER_ID') ? REFERRER_ID : PAGE_ID;
+    if (count($wb->page) == 0 && defined('REFERRER_ID') && REFERRER_ID > 0) {
+        global $database;
+        $sql = "SELECT * FROM ".TABLE_PREFIX."pages WHERE page_id = '".REFERRER_ID."'";
+        $result = $database->query($sql);
+        if ($result->numRows() == 1) {
+            $wb->page = $result->fetchRow();
+        }
+        unset($result);
+    }
+    
     // fix up the menu number to default to the menu number
     // of the current page if no menu has been supplied
     if ($aMenu == 0) {
@@ -431,7 +444,7 @@
     } 
 
     // Set some of the $wb->page[] settings to defaults if not set
-    $pageLevel = $wb->page['level'] == '' ? 0 : $wb->page['level'];
+    $pageLevel  = $wb->page['level']  == '' ? 0 : $wb->page['level'];
     $pageParent = $wb->page['parent'] == '' ? 0 : $wb->page['parent'];
     
     // adjust the start level and start page ID as necessary to
@@ -440,11 +453,11 @@
     if ($aStart < SM2_ROOT) {   // SM2_CURR+N
         if ($aStart == SM2_CURR) {
             $aStartLevel = $pageLevel;
-            $aStart =  $pageParent;
+            $aStart = $pageParent;
         }
         else {
             $aStartLevel = $pageLevel + $aStart - SM2_CURR;
-            $aStart = PAGE_ID; 
+            $aStart = $CURR_PAGE_ID; 
         }
     }
     elseif ($aStart < 0) {   // SM2_ROOT+N
@@ -481,7 +494,7 @@
         // is called (i.e. where the database is loaded) then the info won't
         // exist anyhow.
         $fields = 'parent,page_id,menu_title,page_title,link,target,level,visibility,viewing_groups';
-        if(version_compare(WB_VERSION, '2.7', '>=')) { // WB 2.7+
+        if (version_compare(WB_VERSION, '2.7', '>=')) { // WB 2.7+
             $fields .= ',viewing_users';
         }
         if ($aFlags & SM2_ALLINFO) {
@@ -506,17 +519,16 @@
             // create an in memory array of the database data based on the item's parent. 
             // The array stores all elements in the correct display order.
             while ($page = $oRowset->fetchRow()) {
-				// ignore all pages that the current user is not permitted to view
+                // ignore all pages that the current user is not permitted to view
                 if(version_compare(WB_VERSION, '2.7', '>=')) { // WB >= 2.7
                     // 1. all pages with no active sections (unless it is the top page) are ignored
-                    if(!$wb->page_is_active($page) && $page['link'] != $wb->default_link && !INTRO_PAGE) {
+                    if (!$wb->page_is_active($page) && $page['link'] != $wb->default_link && !INTRO_PAGE) {
                       continue; 
                     }
                     // 2. all pages not visible to this user (unless always visible to registered users) are ignored
-                    if(!$wb->page_is_visible($page) && $page['visibility'] != 'registered') {
+                    if (!$wb->page_is_visible($page) && $page['visibility'] != 'registered') {
                         continue;
                     }
-
                 }
                 else {  // WB < 2.7
                     // We can't do this in SQL as the viewing_groups column contains multiple 
@@ -537,7 +549,8 @@
                 }
 
                 // mark our current page as being on the current path
-                if ($page['page_id'] == PAGE_ID) {
+                if ($page['page_id'] == $CURR_PAGE_ID) {
+                    $page['sm2_is_curr'] = true;
                     $page['sm2_on_curr_path'] = true;
                 }
 
@@ -573,7 +586,7 @@
                 if (array_key_exists($mark['page_id'], $rgParent)) {
                     $mark['sm2_has_child'] = true;
                 }
-                if ($mark['parent'] == $parentId && $mark['page_id'] != PAGE_ID) {
+                if ($mark['parent'] == $parentId && $mark['page_id'] != $CURR_PAGE_ID) {
                     $mark['sm2_is_sibling'] = true;
                 }
                 unset($mark);
@@ -582,10 +595,11 @@
         }
         
         // mark all children of the current page. We don't do this when 
-        // PAGE_ID is 0, as 0 is the parent of everything. PAGE_ID == 0 
-        // occurs on special pages like search results.
-        if (PAGE_ID != 0) {
-            sm2_mark_children($rgParent, PAGE_ID, 1);
+        // $CURR_PAGE_ID is 0, as 0 is the parent of everything. 
+        // $CURR_PAGE_ID == 0 occurs on special pages like search results
+        // when no referrer is available.s
+        if ($CURR_PAGE_ID != 0) {
+            sm2_mark_children($rgParent, $CURR_PAGE_ID, 1);
         }
         
         // store the complete processed menu data as a global. We don't 
Index: trunk/wb/modules/show_menu2/README.en.txt
===================================================================
--- trunk/wb/modules/show_menu2/README.en.txt	(nonexistent)
+++ trunk/wb/modules/show_menu2/README.en.txt	(revision 845)
@@ -0,0 +1,472 @@
+ï»¿show_menu2, version 4.6
+=======================
+A code snippet for the Website Baker CMS software. It provides a complete 
+replacement for the builtin menu functions. All menu data is retrieved using 
+a single database query, all types of menu styles (lists, breadcrums, sitemaps) 
+can be generated with extensive customisation of the resulting HTML.
+
+
+INSTALLATION
+============
+1. Download the latest version from http://code.jellycan.com/show_menu2/
+2. Log into your WebsiteBaker installation
+3. Go to Addons -> Modules
+4. If a previous version of show_menu2 is already installed, select it from
+   the "Uninstall Module" list and choose the "Uninstall" button.
+5. In the "Install Module" section, enter the path to the show_menu2 zip file
+   that you downloaded in step 1, and choose the "Install" button.
+   
+   
+USING SHOW_MENU2
+================
+You need to modify the PHP files of your template to call show_menu2 where you 
+wish to have the menu displayed. Remember when you replace calls to the old
+menu functions to use the new parameters that show_menu2 requires. 
+
+Often times the default menu generated by show_menu2 is all that you need.
+This menu shows the current page and children of the current page. It is
+generated by just calling show_menu2 with no parameters. For example:
+
+    show_menu2();
+    
+Note that the call to show_menu2 is PHP, so you usually need to wrap it in the
+PHP code brackets so that it will execute. Like this:
+
+    <?php show_menu2(); ?>
+
+This default menu generates a complete list based menu with many classes that
+allow easy CSS styling. For example, the current menu item will have the
+"menu-current" class added to the <li> tag. Additionally, every menu item with
+a sub-menu will have the "menu-expand" class added to the <li> tag. This allows 
+you to create CSS rules to style those menu items differently. For example:
+
+    li.menu-expand  { font-weight: bold; }
+    li.menu-current { background: red; }
+
+See the "Output" section for details of exactly what classes are added to each 
+element. More elaborate and different menu structures are able to be created by 
+supplying parameters to the show_menu2 function call. For example, to show only 
+menu items from the top level of the menu you use:
+
+    show_menu2(0, SM2_ROOT, SM2_START);
+    
+Alternatively, to show up to two levels of the child menus of the current page:
+
+    show_menu2(0, SM2_CURR+1, SM2_CURR+2);
+
+There are many more possible menus that can be generated by show_menu2. See the
+demonstration website at http://code.jellycan.com/sm2test/ for more examples. 
+
+
+FUNCTION
+========
+
+The complete call signature and default parameter value for show_menu2 is:
+
+    show_menu2(
+        $aMenu          = 0,
+        $aStart         = SM2_ROOT,
+        $aMaxLevel      = SM2_CURR+1,
+        $aFlags         = SM2_TRIM,
+        $aItemOpen      = '[li][a][menu_title]</a>',
+        $aItemClose     = '</li>',
+        $aMenuOpen      = '[ul]',
+        $aMenuClose     = '</ul>',
+        $aTopItemOpen   = false,
+        $aTopMenuOpen   = false
+        )
+
+See the "Parameters" section for detailed descriptions of each parameter.
+Note that every parameter from $aItemOpen onwards can be supplied as false
+in order to get the default value, this allows (for example) a numbered list
+to be used while still using the the default menu parameters for the items.
+Note that all parameters up to $aFlags need to be explicitly supplied.
+For example:
+
+show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL, false, false, '<ol>', '</ol>');
+
+
+OUTPUT
+======
+The menu is output differently depending on what parameters have been 
+supplied to the function, however in general the following classes are used 
+for each menu. Note that items will have multiple classes when relevant.
+
+    CLASS           ATTACHED TO
+    ------------    -------------------------------------------------------
+    menu-top        First menu tag only
+    menu-parent     Every parent menu item of the current page.
+    menu-current    Only the menu item for the current page.
+    menu-sibling    Every sibling of the current page.
+    menu-child      Every sub-menu of the current page.
+    menu-expand     Every menu item with children.
+    menu-first      First item in any menu or sub-menu.
+    menu-last       Last item in any menu or sub-menu.
+
+    The following classes are added only if SM2_NUMCLASS flag has been used.
+
+    menu-N          Every menu item. The N is replaced with the ABSOLUTE 
+                    menu depth of the item starting with 0. The root level 
+                    menu is always menu-0, the next level is menu-1, etc.
+    menu-child-N    Every sub-menu of the current page, the N is replaced 
+                    with the relative depth of the submenu starting at 0.
+
+
+<ul class="menu-top menu-0">
+  <li class="menu-0 menu-first">  ... </li>
+  <li class="menu-0 menu-expand menu-parent">  ...
+  <ul class="menu-1">
+    <li class="menu-1 menu-expand menu-first">  ...
+    <ul class="menu-2">
+      <li class="menu-2 menu-first">  ...
+      <li class="menu-2 menu-last">  ...
+    </ul>
+    </li>
+    <li class="menu-1 menu-expand menu-parent">  ...
+    <ul class="menu-2">
+      <li class="menu-2 menu-expand menu-current menu-first">  ...      ** CURRENT PAGE **
+      <ul class="menu-3">
+        <li class="menu-3 menu-child menu-child-0 menu-first">  ...
+        <ul class="menu-4">
+          <li class="menu-4 menu-child menu-child-1 menu-first">  ... </li>
+          <li class="menu-4 menu-child menu-child-1 menu-last">  ... </li>
+        </ul>
+        </li>
+        <li class="menu-3 menu-child menu-child-0 menu-last">  ... </li>
+      </ul>
+      </li>
+      <li class="menu-2 menu-sibling menu-last">  ... </li>
+    </ul>
+    </li>
+    <li class="menu-1">  ... </li>
+    <li class="menu-1 menu-expand menu-last">  ...
+    <ul class="menu-2">
+      <li class="menu-2 menu-first menu-last">  ... </li>
+    </ul>
+    </li>
+  </ul>
+  </li>
+  <li class="menu-0 menu-last">  ... </li>
+</ul>
+
+
+
+PARAMETERS
+==========
+$aMenu      
+    Menu number to use. This is useful when you are using multiple menus. 
+    Supplying a menu number of 0 will use the default menu for the current 
+    page. Supplying SM2_ALLMENU will return all menus in the system.
+
+$aStart  
+    Specify where the menu generation should start from. This is most
+    times the parent item of the menu to display. It must be one of the 
+    following values:
+        SM2_ROOT+N  Start N levels down from the root. e.g.
+                      SM2_ROOT      Starting at the root menu 
+                      SM2_ROOT+1    Start 1 level below the root
+                      SM2_ROOT+2    Start 2 levels below the root
+        SM2_CURR+N  Start N levels down from the current page level. e.g.
+                      SM2_CURR      Starts at the current page level. All
+                                    sibling menus to the current page.
+                      SM2_CURR+1    Starts 1 level down from the current
+                                    page with the children menus.
+        page_id     Display using the specific page as the parent. All
+                    child menus of that page will be displayed. The 
+                    page_id can be found by editing the page in WB admin 
+                    interface. The page_id is included in the URL like: 
+                        http://SITE/admin/pages/modify.php?page_id=35
+
+$aMaxLevel   
+    Maximum menu level to display. Menus are displayed from the start
+    level down to this level.
+        SM2_ALL     No limit, all levels are displayed
+        SM2_CURR+N  Always show to the current page + N levels. 
+                      SM2_CURR      Current (no children)
+                      SM2_CURR+3    All parents + current + 3 children
+        SM2_START+N Always show from the starting level + N levels. The
+                    levels of menu will always be displayed regardless of
+                    what level the current page is.
+                      SM2_START     Single level of menus from starting level
+                      SM2_START+1   Starting level and 1 level down
+        SM2_MAX+N   Show at most N levels from the starting level. Levels 
+                    won't be shown if they are below the current level.
+                      SM2_MAX       Starting level only (same as SM2_START)
+                      SM2_MAX+1     Maximum of starting level and 1 level.
+
+$aFlags   
+    Specify flags for different generation options for the menu. The flags
+    may be combined together using bitwise OR (|). For example, to specify
+    both TRIM and PRETTY you should use, SM2_TRIM|SM2_PRETTY.
+
+    GROUP 1
+    -------
+    Exactly one flag from this group must always be supplied. These flags 
+    affect how the siblings in the tree are removed from the output. 
+
+    SM2_ALL         Show all branches of the menu tree
+                        A-1 -> B-1 
+                            -> B-2 -> C-1
+                                   -> C-2 (CURRENT)
+                                          -> D-1
+                                          -> D-2
+                                   -> C-3
+                        A-2 -> B-3
+                            -> B-4
+    SM2_TRIM        Show all sibling menus of pages on the current path. 
+                    All sub-menus of elements that are not on the path 
+                    are removed.
+                        A-1 -> B-1 
+                            -> B-2 -> C-1
+                                   -> C-2 (CURRENT)
+                                          -> D-1
+                                          -> D-2
+                                   -> C-3
+                        A-2 
+    SM2_CRUMB       Show only the breadcrumb trail, i.e. the current
+                    menu and all of it's ancestor menus.
+                        A-1 -> B-2 -> C-2 (CURRENT)
+    SM2_SIBLING     The same as SM2_TRIM however only sibling menus of 
+                    the current page are displayed. All other menus are 
+                    trimmed to show only the path.
+                        A-1 -> B-2 -> C-1
+                                   -> C-2 (CURRENT)
+                                          -> D-1
+                                          -> D-2
+                                   -> C-3
+
+    GROUP 2
+    -------
+    All of these flags are optional. Any number of them may be combined.
+
+    SM2_NUMCLASS    Add the numbered menu classes to the menu. If this 
+                    flag is supplied, the "menu-N" and "menu-child-N" 
+                    classes will be added.
+    SM2_ALLINFO     Load all fields from the page table of the database.
+                    This will result in quite a lot of memory being used
+                    and is not recommended, however it will make keywords,
+                    descriptions, and other fields available. This data
+                    is not loaded by default.
+                    NOTE: This flag must be used on the *FIRST* call to
+                    show_menu2 *for this menu ID*, or in combination with
+                    SM2_NOCACHE otherwise it will have no effect.
+    SM2_NOCACHE     Do not reuse or store the data read from the database
+                    between calls to show_menu2. 
+    SM2_PRETTY      Pretty print the menu HTML with spacing and newlines
+                    for debugging purposes.
+    SM2_BUFFER      Do not output the menu HTML but instead buffer it 
+                    internally and return it as a string from show_menu2.
+    SM2_CURRTREE    Exclude all other top level menus from being considered. 
+                    Only items in the current menu tree will be output.
+                    This can be combined with any of the Group 1 flags as
+                    necessary.
+    SM2_ESCAPE      Call htmlspecialchars on the menu strings. This may be
+                    required with older installations of WB. By escaping the
+                    raw database strings, it permits menus to have HTML 
+                    formatting in them that would cause otherwise cause
+                    pages to fail validation. 
+    SM2_NOESCAPE    Default behaviour. Exists only for backwards compatibility.                    
+
+
+$aItemOpen
+    Format string to use for creating each individual menu item entry.
+    A different format string may be used for the very first entry by 
+    supplying a different format string for $aTopItemOpen. When set to 
+    false, it uses the default of '[li][a][menu_title]</a>' to maintain
+    compatibility with show_menu(). Note however that CSS formatting is
+    often easier if the classes are added to the <a> tag. Use the format
+    string of '<li>[ac][menu_title]</a>' for this style of tag.
+
+    This parameter may also be specified as an instance of a formatting 
+    class for the menu. See the section "Formatter" below for details of
+    the API this class must expose. When a formatter is supplied, all 
+    arguments after $aItemOpen are ignored.
+
+$aItemClose
+    String used to close each item. Note that this is not a format
+    string and no keywords will be replaced. When set to false, it uses 
+    the default of '</li>'.
+
+$aMenuOpen
+    Format string to use for opening a list of menu item entries. A 
+    different format string may be used for the very first menu by 
+    supplying a different format string for $aTopMenuOpen. When set to 
+    false, it uses the default of '[ul]'.
+
+$aMenuClose
+    String used to close each menu. Note that this is not a format
+    string and no keywords will be replaced. When set to false, it uses 
+    the default of '</ul>'.
+
+$aTopItemOpen
+    Format string for the first item. When set to false, it uses the same 
+    format as $aItemOpen.
+
+$aTopMenuOpen 
+    Format string for the first menu. When set to false, it uses the same 
+    format as $aMenuOpen.
+        
+
+
+FORMAT STRINGS
+==============
+The following tags may be included in the format strings for $aItemOpen and 
+$aMenuOpen and will be replaced with the appropriate text.
+
+[a]             <a> tag (no class):         '<a href="[url]" target="[target]">'
+[ac]            <a> tag including class:    '<a href="[url]" target="[target]" class="[class]">'
+[li]            <li> tag including class:   '<li class="[class]">'
+[ul]            <ul> tag including class:   '<ul class="[class]">'
+[class]         List of classes for that page
+[menu_title]    Menu title text (HTML entity escaped unless SM2_NOESCAPE flag is used)
+[page_title]    Page title text (HTML entity escaped unless SM2_NOESCAPE flag is used)
+[url]           Page URL for the <a> tag
+[target]        Page target for the <a> tag
+[page_id]       Page ID of the current menu item
+[parent]        Page ID of the parent menu item
+[level]         Page level, the same number as is used for the "menu-N" CSS tag.
+[sib]           Current menu sibling number
+[sibCount]      Total number of siblings in this menu
+[if]            Conditional test (see section CONDITIONAL FORMATTING)
+
+The following tags are only available when the SM2_ALLINFO flag is used.
+
+[description]   Page description
+[keywords]      Page keywords
+
+
+CONDITIONAL FORMATTING
+======================
+The conditional formatting directive takes one of the following forms:
+
+    [if(A){B}]
+    [if(A){B}else{C}]
+    
+    A   Conditional test. See below for more details.
+    
+    B   Expression emitted when the if-test is true. This may be any string 
+        that does NOT include the '}' character. It may include any of the 
+        format strings described in the section FORMAT STRINGS with the 
+        exception of the conditional test (because '}' is not permitted).
+        
+    C   Expression emitted when the if-test is false. This may be any string 
+        that does NOT include the '}' character. It may include any of the 
+        format strings described in the section FORMAT STRINGS with the 
+        exception of the conditional test (because '}' is not permitted).
+    
+The conditional test is a combination of one or more boolean tests.
+If more than one test is supplied, it must be combined with other tests
+using either || (boolean OR) or && (boolean AND). 
+
+A single test is made up of the left operand, operator and right operand.
+e.g. X == Y where X is the left operand, == is the operator and Y is the
+right operand.
+    
+    Left operand. It must be one of the following keywords:
+        class       Test for existence of one of the classes. Only the
+                    "==" and "!=" operators are permitted. In this case
+                    these operators have the meaning of "includes" 
+                    instead of "equals".
+        level       Test against the page level.
+        sib         Test against the current page sibling number.
+        sibCount    Test against the number of siblings in the menu.
+        id          Test against the page id.
+    
+    Operator. It must be one of the following:
+        <           Less Than
+        <=          Less Than Equals
+        ==          Equals
+        !=          Not Equal
+        >=          Greater Than Equals
+        >           Greater Than
+    
+    Right operand. The type of this operand depends on the keyword used
+    for the left operand:
+        class       One of the "menu-*" class names as listed in the 
+                    section "OUTPUT".
+        level       Test the page level against the following values:
+                      <number>  absolute page level
+                      root      the root page level
+                      granny    the grand-parent page level
+                      parent    the parent page level
+                      current   the current page level
+                      child     the child page level
+        id          Test the page id against the following values:
+                      <number>  absolute page id
+                      parent    the parent page id
+                      current   the current page id
+        sib         A positive integer, or "sibCount" to test against
+                    the count of siblings in this menu.
+        sibCount    A positive integer.
+        
+For example, valid tests are expression "exp" is emitted only when the menu item:
+    
+    [if(class==menu-expand){exp}]   has a sub-menu
+    [if(class==menu-first){exp}]    is first item in a menu
+    [if(class!=menu-first){exp}]    is NOT first item in a menu
+    [if(class==menu-last){exp}]     is last item in a menu
+    [if(level==0){exp}]             is at the root
+    [if(level>0){exp}]              is not at the root
+    [if(sib==2){exp}]               is the second item in a menu
+    [if(sibCount>1){exp}]           is in a menu with more than 1 entry
+    [if(sibCount!=2){exp}]          is in a menu which doesn't have exactly
+    [if(level>parent){exp}]         is in a sibling menu or child of a sibling
+    [if(id==parent){exp}]           is the parent of the current page
+
+If an else-clause was added, then the expression for the else would be 
+emitted in all other cases. For example the expression "foo" is emitted
+whenever the if-test is false, so therefore:
+
+    [if(sib==2){exp}else{foo}]          is NOT the second item in a menu
+    [if(sibCount>2){exp}else{foo}]      is NOT in a menu with more than 2 entries
+
+For multiple tests, the expression "exp" is emitted only when the menu item:
+
+    [if(sib == 1 || sib > 3){exp}]      
+        [is the first item] OR [is the 4th or larger item] in the menu
+        
+    [if(id == current && class == menu-expand){exp}
+        [is the current item] AND [it has children]
+
+Note that all tests are evaluated in the order listed because:
+ * there is no short-circuit evaluation (all individual tests are always evaluated)
+ * there is no grouping of tests (i.e. no support for parenthesis)
+ * both || and && are considered the same level 
+
+
+
+FORMATTER
+=========
+Note: This is an advanced and rarely needed feature!
+
+If you are capable of extensive PHP programming, it is possible to replace the 
+predefined menu formatter that show_menu2 is uses with a custom module. See the
+include.php file of show_menu2 for an example of how the menu formatter must be 
+written. The API it must use is:
+
+class SM2_Formatter
+{
+    // called once before any menu is processed to allow object initialization
+    function initialize() { }
+    
+    // called to open the menu list
+    function startList($aPage, $aUrl) { }
+    
+    // called to open the menu item
+    function startItem($aPage, $aUrl, $aCurrSib, $aSibCount) { }
+    
+    // called to close the menu item
+    function finishItem() { }
+    
+    // called to close the menu list
+    function finishList() { }
+    
+    // called once after all menu has been processed to allow object finalization
+    function finalize() { }
+    
+    // called once after finalize() if the SM2_NOOUTPUT flag is used
+    function getOutput() { }
+};
+
+
+
