? ? Pending

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
6 Apr 2017

Summary of Changes

Similar to how the backend module triggers an event to add additional items to its output, this adds support for the mod_stats 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.

Based on the same thing that @mbabker did for the backend: #10870

The weblinks part is moved here: https://github.com/joomla-extensions/weblinks/pull/333/files to be included in the 3.7 version.

avatar zero-24 zero-24 - open - 6 Apr 2017
avatar zero-24 zero-24 - change - 6 Apr 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Apr 2017
Category Modules Front End
avatar zero-24 zero-24 - change - 7 Apr 2017
Labels Added: ?
avatar zero-24
zero-24 - comment - 13 Apr 2017

@franz-wohlkoenig as you have tested the weblinks PR you have also tested here ;)

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 13 Apr 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 13 Apr 2017

I have tested this item successfully on 9883fad


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

avatar sanderpotjer
sanderpotjer - comment - 30 Apr 2017

@zero-24 adding the onGetStats function to a system plugin already adding a new row before applying your patch?

avatar zero-24
zero-24 - comment - 30 Apr 2017

Yes in the backend but not in the frontend module.

avatar sanderpotjer
sanderpotjer - comment - 1 May 2017

I have tested this item 🔴 unsuccessfully on 9883fad


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

avatar sanderpotjer sanderpotjer - test_item - 1 May 2017 - Tested unsuccessfully
avatar sanderpotjer
sanderpotjer - comment - 1 May 2017

The custom data is displayed instead of the "article hits" when "Hit Counter" is set to yes in the module options.

Before patch:
screen shot 2017-05-01 at 09 51 43

After patch:
screen shot 2017-05-01 at 09 51 53

So the custom stats data is shown, but the hits value is gone.

avatar zero-24 zero-24 - change - 1 May 2017
Labels Added: ?
Removed: ?
avatar zero-24
zero-24 - comment - 1 May 2017

The custom data is displayed instead of the "article hits" when "Hit Counter" is set to yes in the module options.

fixed please test again @sanderpotjer

avatar sanderpotjer
sanderpotjer - comment - 1 May 2017

I have tested this item successfully on f9dd52a


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

avatar sanderpotjer sanderpotjer - test_item - 1 May 2017 - Tested successfully
avatar sanderpotjer
sanderpotjer - comment - 1 May 2017

@zero-24 thanks, that fixed it!

avatar zero-24 zero-24 - change - 11 May 2017
Status Pending Ready to Commit
avatar astridx
astridx - comment - 13 May 2017

I have tested this item successfully on f9dd52a

I tested this successfully.


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

avatar astridx astridx - test_item - 13 May 2017 - Tested successfully
avatar astridx astridx - test_item - 13 May 2017 - Tested successfully
avatar zero-24 zero-24 - change - 13 May 2017
Labels Added: ?
avatar gwsdesk
gwsdesk - comment - 22 May 2017

I have tested this item successfully on 84c2ee7

I have tested this item successfully on f9dd52a


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

avatar gwsdesk gwsdesk - test_item - 22 May 2017 - Tested successfully
avatar gwsdesk
gwsdesk - comment - 22 May 2017

I have tested this item successfully on f9dd52a


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

avatar mbabker mbabker - change - 27 May 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-05-27 14:33:16
Closed_By mbabker
avatar mbabker mbabker - close - 27 May 2017
avatar mbabker mbabker - merge - 27 May 2017

Add a Comment

Login with GitHub to post a comment