
/* ********************************************************************
** README
**  Copyright 2005-2023 V.Krishn (vkrishn@insteps.net)
**  This file is part of Cookbook recipe "InfoBox" for PmWiki;
**  You can redistribute it and/or modify it under the terms of the
**  GNU General Public License as published by the  Free Software
**  Foundation; either version 2 of the License, or (at your option)
**  any later version. See pmwiki.php for full details.
******************************************************************** */

/* ********************************************************************
** CAUTION
**  Use of InfoBox posses a security problem.
**  Use of this recipe lets you insert arbitrary JavaScript Code.
**
**  DO NOT dissable the security code in "infobox.php" file.
**  Make appropriate settings with the default password = infoboxpass
**  Read the main documentation on Passwords.
* ****************************************************************** */

* ****************************************************************** */

HOW TO USE InfoBox 2.2.x in PmWiki 2.2.x:
==========================================
1. Place the infobox folder under cookbook/

2. Make an entry in you config.php file

       include_once("cookbook/infobox/infobox.php");

       Make appropriate changes in your infobox.php file.
       Read main documentations on setting up passwords in PmWiki.

3. For any group the default `Infotips` Wiki pages is "<Group>.Infotips".
   For any page the default `Infotips` Wiki pages is "<Group>.<Page>Infotips".

   3.1 Create these pages on requirement.

4. Format/syntax for `Infotips` wiki pages,
   for every individual tips make an entry in each separate line:

   maketip('A','B','C');

   A = Unique NAME of the infobox.
   B = TITLE of the infobox.
   C = TEXT of the infobox.

5. Now on "relevant" page,
    Example if `InfoTips` WikiPage = Main.HomePageInfoTips
            Or `Main.InfoTips`
            Then a "relevant" wiki page = Main.HomePage
            or                          = Main.MyGreenPage  ..etc.

    Then depending on the markup you have enabled in infobox.php file,
    To show/display the InfoBox enter the following on "relevant" page:

     (:infobox NAME1|English:) (:infobox NAME2|deutsch:)
       OR
     **NAME1|English** **NAME2|deutsch**
       OR
     ~~NAME1|English~~ ~~NAME2|deutsch~~

    The text displayed on wiki page would be:
    ....... .......
    English deutsch
    ....... .......

    When you HOVER over these text the corresponding infotips:
     i.e
        NAME1  and  NAME2 are shown.



   NOTE: displaying infobox using CSS only.
   ----------------------------------------
   Add (:infobox:) on page to activate loading of css files.
   Syntax sample:
   1.
   %lnktip%[[Main.HomePage | HomePage]] ''The main page of the site''
   2.
   [[Main.HomePage | HomePage]] %lnktip%The main page of the site%%


   NOTE: using unobtrusive JS method
   ---------------------------------
   Syntax sample:

   1.
   [[Main.HomePage | (:infobox|HomePage:)]] %lnktip id='uniqueId-a1'% The main page of the site%%

   2.
   ~~|HomePage~~
   %lnktip id='a2'% The main page of the site
   OR
   ~~|HomePage~~ %lnktip id='a2'% The main page of the site
   OR
   ~~none|HomePage~~ %lnktip id='a3'% The main page of the site

   3.
   ~~|Attach:Main/test.jpg~~
   %lnktip id='a5'% The main page of the site.

   4.
   %infoboxhere%HomePage %lnktip id='a4'% The main page of the site.


   Note: as of v2.3.4, in sample 1-4 above one can just enter
   %lnktip% ...text...

   Important: for 1-4 above, to activate infobox css/js, add to page
   (:infobox id='ContainerID':)
     where 'ContainerID' is the Div/Table wrapper id.


        Thats all folks. :-))


--------------------------------------------
NOTE: Some of the potential uses of infobox.
--------------------------------------------
1. Site wide or group wide tips can be set.
2. Page wise tips can be set.
3. Comprehensive glossary terms can be defined using this
   recipe. Can be used where terms on pages needs additional
   explanations but the page design does not permit the explanation
   to be inserted there itself.
4. Infobox's can be used to explain terms in any other language. Thus
   helping in creating a multilanguage page.
5. Infotips page can be shared among users or easily copied on to a
   new/different website/page.
6. Multi-language infotips pages can be maintained by different users.

