? Success

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
19 Jun 2016

Summary of Changes

Similar to how the quickicons module triggers an event to add additional items to its output, this adds support for the mod_stats_admin module to do the same.

A new onGetStats event is published with a single parameter, a context (hardcoded to mod_stats_admin) and any plugin responding to this event is expected to return an array matching this schema:

array(
    'title' => 'Stats Item Title',
    'data' => 'Data to be displayed',
    'icon' => 'Optional IcoMoon font icon for the row, defaulting to "info" if not set',
);

The title and data attributes MUST be defined or a row is not added.

Similar to the quickicons implementation, items can NOT be removed via the plugin event.

Testing Instructions

Add the following method to a system plugin:

    public function onGetStats($context)
    {
        return array(
            array(
                'title' => 'Plays Audio',
                'data'  => JText::_('JNO'),
                'icon'  => 'music',
            ),
        );
    }

With the admin stats module enabled, you should see a new row with this data.

avatar mbabker mbabker - open - 19 Jun 2016
avatar mbabker mbabker - change - 19 Jun 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jun 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 20 Jun 2016
Category Modules
avatar brianteeman brianteeman - test_item - 20 Jun 2016 - Tested successfully
avatar brianteeman
brianteeman - comment - 20 Jun 2016

I have tested this item successfully on f321fe2


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10870.

avatar nikitadhiman nikitadhiman - test_item - 30 Jun 2016 - Tested successfully
avatar nikitadhiman
nikitadhiman - comment - 30 Jun 2016

I have tested this item successfully on f321fe2


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10870.

avatar zero-24 zero-24 - change - 30 Jun 2016
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 30 Jun 2016

RTC. Maybe with the New Feature label?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10870.

avatar joomla-cms-bot joomla-cms-bot - change - 30 Jun 2016
Labels Added: ?
avatar Fedik
Fedik - comment - 30 Jun 2016

can we allow multiple results then, as it in quickicon onGetIcons?

public function onGetStats($context)
{
   return array(
        array(
            'title' => 'Plays Audio',
            'data'  => JText::_('JNO'),
            'icon'  => 'music',
        ),
        array(
            'title' => 'Plays Video',
            'data'  => JText::_('JYES'),
            'icon'  => 'video',
        ),
   );
}
avatar joomla-cms-bot
joomla-cms-bot - comment - 4 Jul 2016

This PR has received new commits.

CC: @brianteeman, @nikitadhiman


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10870.

avatar mbabker
mbabker - comment - 4 Jul 2016

To me that's creating excessive complexity but whatever, it's done.

avatar mbabker mbabker - change - 4 Jul 2016
The description was changed
avatar brianteeman brianteeman - change - 11 Jul 2016
Milestone Added:
avatar brianteeman brianteeman - change - 11 Jul 2016
Milestone Added:
avatar wilsonge
wilsonge - comment - 4 Sep 2016

Merged with daf470e

avatar wilsonge wilsonge - change - 4 Sep 2016
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2016-09-04 12:57:47
Closed_By wilsonge
avatar wilsonge wilsonge - close - 4 Sep 2016
avatar joomla-cms-bot joomla-cms-bot - close - 4 Sep 2016
avatar joomla-cms-bot joomla-cms-bot - change - 4 Sep 2016
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 4 Sep 2016
Category Modules Administration Modules

Add a Comment

Login with GitHub to post a comment