StatisticsBlock » History » Revision 3

« Previous | Revision 3/4 (diff) | Next »
Anonymous, December 02, 2012 22:16

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:

    $blockInfo = array(
            'key' => 'Total',
            'value' => '29'
            'key' => 'Active',
            'value' => '16'

    $data['Articles'] = $blockInfo;

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

Updated by Anonymous about 8 years ago · 3 revisions