Quickstart¶
Step 1: Download and extract¶
- After purchasing a license, and downloading the ZIP-file from the official download site, ...
- extract the contents into your project directory
After extraction, ensure that the fileresources/lib/AppGiniHelperIndicators.php
exists.
Step 2: Initialize¶
- Open
hooks/header-extras.php
in your favourite code editor - Initialize the library with the following line of code:
1 2 3 4
<!-- file: hooks/header-extras.php --> <?php AppGiniHelperIndicators::init();
Step 3: Create indicators¶
- Open
hooks/__global.php
in your favourite code editor - Tell the library which indicators you want and what values they shall return by pasting the following code somewhere after the
<?php
tag:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
- save and test in you browser by reloading.
Description¶
This example creates 4 different indicators.
-
The function
indicator_loader
returns the (unique) names (=keys) of the required indicators and controls beaviour for example the refresh-interval. -
The function
indicator_handler
gets called repeatedly and returns the value to be shown per indicator, identified by name, plus additional settings like icon, visibility or tooltip.