%META:TOPICINFO{author="VasekDovrtel" date="1181656831" format="1.1" reprev="1.15" version="1.15"}%
---+!! <nop>%TOPIC%   

The plugin to include *[[http://bee.insightstrategy.cz/en/index.html]["The BEE Project"]]* OLAP reports into the TWiki pages.
The Report is included using *%<nop>BEE_REPORT%* variable with a few parameters.
The page-wide default parameters can be set by *%<nop>BEE_PARAMS%* variable optionally as well.

%TOC%

---++ Syntax Rules   

The *%<nop>BEE_PARAMS{...}%* sets the global (page-wide) parameters.

The *%<nop>BEE_REPORT{...}%* includes specific report into topic.

The *%<nop>BEE_VALUE{...}%* includes specific value into topic.

| *Parameter* | *Explanation* | *REPORT* | *VALUE* | *Default* |
| DEFAULT | report or value identification |  %ICON{warning}%  |  %ICON{warning}%  | |
| id | ^ | ^ | ^ | ^ |
| url  | server url (osito) in form [http://]hostname[:port] |  %ICON{warning}%  |  %ICON{warning}%  | bee://osito |
| project  | project name |  %ICON{warning}%  |  %ICON{warning}%  | |
| user  | user name  |  %ICON{warning}%  |  %ICON{warning}%  | Osito user |
| lang  | report language  |  %Y%  | | |
| skin | user interface skin ID |  %Y%  | | |
| style  | report CSS style URL (optional); if STYLE is not set then report's own CSS formating style will be used |  %Y%  | | |
| padding  | padding around the report  |  %Y%  | | 3px |
| hover  | parameters of the line surrounding the report activated by onMouseOver in form "style,color,line_width"; parameters should be in consonance with CSS definition (e.g. style ca be 'dotted','dashed','double',...)  |  %Y%  | | "solid,#ee0,3px" |
| interaction | Can be none, link, menu. none = only output, link = output with link to report, menu = with right click menu(only first reprot) |  %Y% <br> not menu  | | link |
| target | Open report in new window or in same window (_blank or _self) |  %Y%  | | _self |
| display | assumed size of report (it's only for view in wysiwyg editor) |  %Y%  | | |

Note: %ICON{warning}% means parameter is required, %Y% represents optional parameter .

The *%<nop>BEE_INFO{...}%* includes some object or meta-data info into topic.

| *Parameter* | *Explanation* | *Required* | *Default* |
| DEFAULT | type of the required information _(see following table)_ |  %ICON{warning}%  | |
| type | ^ | ^ | ^ |
| url  | server url (osito) in form [http://][hostname][:port] or bee://[osito_root] |  %ICON{warning}%  | bee://osito<br />if url is defined partially then default =hostname= is 'localhost', =port= is 80, =osito_root= is 'osito' |
| project  | project name |  %ICON{warning}%<br/>(not required for =project_list=, optional for =user=)  | |
| user  | user name  |  %ICON{warning}%  | Osito user |
| lang  | report language  | | |
| id  | ID of the object | | |
| format  | output formating string _(see following table)_ | | '$name' for a scalar values<br /> '   * $name' for a lists |
| display | assumed size of report (it's only for view in wysiwyg editor) | | |
| string | select items by regular expression on the $name (Perl syntax) | | |
| folder | select objects from some folder | | |

| *Type* | *Substitution variables* | *Description* | *Implemented* |
| user | $id | ID (login name) of the user | %Y% |
| ^ | $name | Name of the user | ^ |
| ^ | $description | Description of the user | ^ |
| ^ | $salutation | User's salutation | ^ |
| ^ | $email or $email[N] | User's e-mail (first on N-th) | ^ |
| ^ | $sms or $sms[N] | User's SMS No. (first on N-th) | ^ |
| ^ | $fax or $fax[N] | User's Fax No. (first on N-th) | ^ |
| ^ | $group_list | list of the groups user is involved in | ^ |
| ^ | $role_list | list of the roles user is involved in (available only if =project= is specified)<br /> | ^ |
| project | $name | Name of the project | %Y% |
| ^ | $description | Description of the project | ^ |
| project_list | $id | ID of the project | %Y% |
| ^ | $name | Name of the project | ^ |
| ^ | $description | Description of the project | ^ |
| =OBJECT= | $name | Name of the object ( =OBJECT= can be 'report', 'metric', 'filter', 'attr' or 'fact') | %Y% |
| ^ | $description | Description of the object | ^ |
| ^ | $definition | Definition of the object | ^ |
| =OBJECT= _list | $id | ID of the object | %Y% |
| ^ | $name | Name of the object | ^ |
| ^ | $description | Description of the object | ^ |
| ^ | $definition | Definition of the object | ^ |

The *%<nop>BEE_PROMPT{...}%* includes specific prompts into topic.

Reports have to be with the same prompt.
You have to checke off 'share among reports' and  'Selected values:' have to be 'set as default'.

In base usage type only %<nop>BEE_PROMPT{}%.

| *Parameter* | *Explanation* | *Default* |
| id | Optional list (in form "id1,id2,...") of prompt IDs | List of IDs from page |
| topic | Optional topic name from which set of prompts will be collected |  |
| padding  | padding around the report  | 3px |
| display | assumed size of report (it's only for view in wysiwyg editor) |  |

*Note:* Error will be raised if both 'id' and 'topic' will be set.
<!-- 
| url  | server url (osito) in form [http://]hostname[:port] |  %ICON{warning}%  |  %ICON{warning}%  | bee://osito |
| project  | project name |  %ICON{warning}%  |  %ICON{warning}%  | |
| user  | user name  |  %ICON{warning}%  |  %ICON{warning}%  | Osito user |
| lang  | report language  |  %Y%  | | | -->

---++ Examples   

The Example of including two reports. We use BEE_PARAMS to set default url, skin, project and user. Each report has their own lang and id defined.

<verbatim>
    %BEE_PARAMS{url="http://beedemo.insightstrategy.cz/bee2/" skin="cube" user="bee_en" project="BeeDemo"}%

    %BEE_REPORT{lang="en" id="aalQrKMgXde"}%

    %BEE_REPORT{lang="cz" id="aalQrKMgXde" skin="default"}%
</verbatim>

---++ <nop>%TOPIC% Global Settings   

Plugin settings are stored as preferences variables. To reference a plugin setting write ==%&lt;plugin&gt;_&lt;setting&gt;%==, i.e. ==%<nop>BEEWIKIPLUGIN_SHORTDESCRIPTION%==

   * One line description, is shown in the %TWIKIWEB%.TextFormattingRules topic:
      * Set SHORTDESCRIPTION = Includes The BEE Project OLAP reports into TWiki pages.

   * Debug plugin: (See output in =data/debug.txt=)
      * Set DEBUG = 0

---++ Plugin Installation Instructions   

__Note:__ You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running. 

   * Download the ZIP file from the Plugin web (see below)
   * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content:
|*File:* |  *Description:*  |
|data/TWiki/BeeWikiPlugin.txt                           |  Plugin topic  |
|bin/bee_get_local                                      |  Perl script for get report from local machine |
|pub/icn/arrow.png                                      |  Image for topic  |
|pub/icn/bee_wait.gif                                   |  Image for topic  |
|pub/icn/menu.png                                       |  Image for topic  |
|pub/icn/print.png                                      |  Image for topic  |
|pub/icn/bee_alert.png                                  |  Image for topic  |
|pub/icn/bee_error.png                                  |  Image for topic  |
|lib/TWiki/Plugins/BeeWikiPlugin/BeeWiki.p              |  Password file  |
|lib/TWiki/Plugins/BeeWikiPlugin.pm                     |  Plugin Perl module  |
|lib/TWiki/Plugins/BeeWikiPlugin/BeeWiki.pm             |  Plugin Perl module  |
|lib/TWiki/Plugins/BeeWikiPlugin.t                      |  Plugin Perl module (tests)  |
|lib/TWiki/Plugins/BeeWikiPlugin/BeeWikiConst.cfg       |  Plugin constants  |
|lib/TWiki/Plugins/BeeWikiPlugin/BeeWikiFunc.pm         |  Plugin Perl module (functions) |
|lib/TWiki/Plugins/BeeWikiPlugin/BeeWikiFunc.t          |  Plugin Perl module (tests for functions)  |
|AUTHORS                                                |   |
|COPYING                                                |   |
|COPYRIGHT                                              |   |
|README                                                 |   |
|VERSION                                                |   |
|test.sh                                                |  Perl script for testing plugin  |
   * Test if the installation was successful: You can add above mentioned [[#Examples][example]] definition to the sample topic and test including of the reports from "The BEE Project" Internet [[http://bee.insightstrategy.cz/Public/PublicDemoEn.html][Live Demo]].

__Note:__ In case you want to place <nop>BeeWiki.p password file in different than default directory let set its path in <nop>BeeWikiPlugin.pm.<br />
__%RED%Caution:__ Prevent public readability of the password file in any case.%ENDCOLOR%

---++ FAQ

---+++Plugin don't function and tests report fault "Error:  Can't locate Error.pm in @INC" but @INC is good.

You don't have create link in lib directory to this module. Please create it. Example:<br>
In TWiki home directory write<br>
<verbatim>
ln -s CPAN/lib/Error.pm lib/
</verbatim>

---++ Plugin Info   

|  Plugin Author: | TWiki:Main.JanPrichystal, TWiki:Main.MichalDovrtel, TWiki:Main.VasekDovrtel |
|  Copyright: | &copy; 2005-2006, TWiki:Main.JanPrichystal, TWiki:Main.MichalDovrtel, TWiki:Main.VasekDovrtel |
|  License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
|  Plugin Version: | 2.1 |
|  Change History: | <!-- versions below in reverse order -->&nbsp; |
|  12 May 2007 | 3.0: BEE_PROMPT added, code rewrite|
|  30 Aug 2006 | 2.1: BEE_VALUE, BEE_INFO added, code rewrite for compatibility vith TWiki v4 API |
|  28 Jul 2005 | Initial version |
|  TWiki Dependency: |$TWiki::Plugins::VERSION 1.024 |
|  CPAN Dependencies: | none |
|  Other Dependencies: | none |
|  Perl Version: | 5.6 |
|  [[TWiki:Plugins/Benchmark][Benchmarks]]: | %TWIKIWEB%.GoodStyle nn%, %TWIKIWEB%.FormattedSearch nn%, %TOPIC% nn% |
|  Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/BeeWikiPlugin |
|  Feedback: | http://TWiki.org/cgi-bin/view/Plugins/BeeWikiPluginDev |
|  Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/BeeWikiPluginAppraisal |

-- Main.JanPrichystal - 28 Jul 2005

-- Main.VasekDovrtel - 22 Sep 2006


%META:FILEATTACHMENT{name="CVS" attr="" autoattached="1" comment="" date="1179996043" path="CVS" size="4096" user="UnknownUser" version=""}%
%META:FILEATTACHMENT{name="BeeWikiStyle.css" attr="" autoattached="1" comment="" date="1172494040" path="BeeWikiStyle.css" size="782" user="UnknownUser" version=""}%
%META:FILEATTACHMENT{name="fact_tiny.png" attr="" autoattached="1" comment="" date="1172492614" path="fact_tiny.png" size="237" user="UnknownUser" version=""}%
%META:FILEATTACHMENT{name="metric_tiny.png" attr="" autoattached="1" comment="" date="1172492614" path="metric_tiny.png" size="308" user="UnknownUser" version=""}%
%META:FILEATTACHMENT{name="menu.js" attr="" autoattached="1" comment="" date="1137159535" path="menu.js" size="9832" user="UnknownUser" version=""}%
%META:FILEATTACHMENT{name="filter_tiny.png" attr="" autoattached="1" comment="" date="1172492614" path="filter_tiny.png" size="350" user="UnknownUser" version=""}%
%META:FILEATTACHMENT{name="attr_tiny.png" attr="" autoattached="1" comment="" date="1172492614" path="attr_tiny.png" size="297" user="UnknownUser" version=""}%
%META:FILEATTACHMENT{name="report_tiny.png" attr="" autoattached="1" comment="" date="1172492614" path="report_tiny.png" size="126" user="UnknownUser" version=""}%
%META:FILEATTACHMENT{name="bear_tiny.png" attr="" autoattached="1" comment="" date="1172492614" path="bear_tiny.png" size="1115" user="UnknownUser" version=""}%
