Project

General

Profile

Statistics Block

The "Statistics" block is used to display site statistics parameters by packages or even plugins.

You have to follow instructions below to install your data into "Statistics" common block.

  1. Place "populateCommonStatisticsBlock" named hook
  2. The script will provide '$data' variable into hook code
  3. The hook code should append needed number of array items into $data variable
  4. Array key will be shown as a heading of provided data
  5. Array items should be designed in the following manner: every item will be a separate row, 'item' element will be shown at left hand side, and 'value' element will appear at right hand side.

Example hook code:

if(isset($data))
{
    $blockInfo = array(
        array(
            'key' => 'Total',
            'value' => '29'
        ),
        array(
            'key' => 'Active',
            'value' => '16'
        )
    );

    $data['Articles'] = $blockInfo;
}

The script will assemble all of items and will render it as a block.