New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support collection of custom stats in stats frontend module #15138

Merged
merged 10 commits into from May 27, 2017

Conversation

Projects
7 participants
@zero-24
Contributor

zero-24 commented Apr 6, 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.

@zero-24

This comment has been minimized.

Show comment
Hide comment
@zero-24

zero-24 Apr 13, 2017

Contributor

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

Contributor

zero-24 commented Apr 13, 2017

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

@franz-wohlkoenig

This comment has been minimized.

Show comment
Hide comment
@franz-wohlkoenig

franz-wohlkoenig Apr 13, 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.

franz-wohlkoenig commented Apr 13, 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.

@zero-24 zero-24 added this to the Joomla 3.7.1 milestone Apr 21, 2017

@mbabker mbabker changed the base branch from staging to 3.8-dev Apr 27, 2017

@mbabker mbabker added PR-3.8-dev and removed PR-staging labels Apr 27, 2017

@mbabker mbabker modified the milestones: Joomla 3.8.0, Joomla 3.7.1 Apr 27, 2017

@mbabker mbabker added this to Testing/Review in [3.8] General Apr 27, 2017

@sanderpotjer

This comment has been minimized.

Show comment
Hide comment
@sanderpotjer

sanderpotjer Apr 30, 2017

Member

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

Member

sanderpotjer commented Apr 30, 2017

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

@zero-24

This comment has been minimized.

Show comment
Hide comment
@zero-24

zero-24 Apr 30, 2017

Contributor

Yes in the backend but not in the frontend module.

Contributor

zero-24 commented Apr 30, 2017

Yes in the backend but not in the frontend module.

@sanderpotjer

This comment has been minimized.

Show comment
Hide comment
@sanderpotjer

sanderpotjer May 1, 2017

Member

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.

Member

sanderpotjer commented May 1, 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.

@sanderpotjer

This comment has been minimized.

Show comment
Hide comment
@sanderpotjer

sanderpotjer May 1, 2017

Member

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.

Member

sanderpotjer commented May 1, 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.

@zero-24

This comment has been minimized.

Show comment
Hide comment
@zero-24

zero-24 May 1, 2017

Contributor

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

Contributor

zero-24 commented May 1, 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

@sanderpotjer

This comment has been minimized.

Show comment
Hide comment
@sanderpotjer

sanderpotjer May 1, 2017

Member

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.

Member

sanderpotjer commented May 1, 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.

@sanderpotjer

This comment has been minimized.

Show comment
Hide comment
@sanderpotjer

sanderpotjer May 1, 2017

Member

@zero-24 thanks, that fixed it!

Member

sanderpotjer commented May 1, 2017

@zero-24 thanks, that fixed it!

@astridx

This comment has been minimized.

Show comment
Hide comment
@astridx

astridx May 13, 2017

Contributor

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.

Contributor

astridx commented May 13, 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.

@joomla-cms-bot joomla-cms-bot added the RTC label May 13, 2017

@gwsdesk

This comment has been minimized.

Show comment
Hide comment
@gwsdesk

gwsdesk May 22, 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.

gwsdesk commented May 22, 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.

@gwsdesk

This comment has been minimized.

Show comment
Hide comment
@gwsdesk

gwsdesk May 22, 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.

gwsdesk commented May 22, 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.

@mbabker mbabker merged commit 4887737 into joomla:3.8-dev May 27, 2017

2 of 4 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
JTracker/HumanTestResults Human Test Results: 1 Successful 0 Failed.
Details
continuous-integration/drone/pr the build was successful
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@joomla-cms-bot joomla-cms-bot removed the RTC label May 27, 2017

@mbabker mbabker moved this from Testing/Review to Completed in [3.8] General May 27, 2017

@zero-24 zero-24 deleted the zero-24:modstats branch May 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment