{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/8386","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8386/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8386/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8386/events","html_url":"https://github.com/joomla/joomla-cms/pull/8386","id":116450756,"number":8386,"title":"Statistics plugin improvements","user":{"login":"phproberto","id":1119272,"avatar_url":"https://avatars.githubusercontent.com/u/1119272?v=3","gravatar_id":"","url":"https://api.github.com/users/phproberto","html_url":"https://github.com/phproberto","followers_url":"https://api.github.com/users/phproberto/followers","following_url":"https://api.github.com/users/phproberto/following{/other_user}","gists_url":"https://api.github.com/users/phproberto/gists{/gist_id}","starred_url":"https://api.github.com/users/phproberto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phproberto/subscriptions","organizations_url":"https://api.github.com/users/phproberto/orgs","repos_url":"https://api.github.com/users/phproberto/repos","events_url":"https://api.github.com/users/phproberto/events{/privacy}","received_events_url":"https://api.github.com/users/phproberto/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/Language%20Change","name":"Language Change","color":"eb6420"},{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/joomla/joomla-cms/milestones/7","html_url":"https://github.com/joomla/joomla-cms/milestones/Joomla!%203.5.0","labels_url":"https://api.github.com/repos/joomla/joomla-cms/milestones/7/labels","id":944889,"number":7,"title":"Joomla! 3.5.0","description":"","creator":{"login":"rdeutz","id":467356,"avatar_url":"https://avatars.githubusercontent.com/u/467356?v=3","gravatar_id":"","url":"https://api.github.com/users/rdeutz","html_url":"https://github.com/rdeutz","followers_url":"https://api.github.com/users/rdeutz/followers","following_url":"https://api.github.com/users/rdeutz/following{/other_user}","gists_url":"https://api.github.com/users/rdeutz/gists{/gist_id}","starred_url":"https://api.github.com/users/rdeutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdeutz/subscriptions","organizations_url":"https://api.github.com/users/rdeutz/orgs","repos_url":"https://api.github.com/users/rdeutz/repos","events_url":"https://api.github.com/users/rdeutz/events{/privacy}","received_events_url":"https://api.github.com/users/rdeutz/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":420,"state":"open","created_at":"2015-01-21T08:12:44Z","updated_at":"2015-12-06T09:35:36Z","due_on":"2016-02-16T23:00:00Z","closed_at":null},"comments":10,"created_at":"2015-11-12T00:10:50Z","updated_at":"2015-12-08T09:31:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/8386","html_url":"https://github.com/joomla/joomla-cms/pull/8386","diff_url":"https://github.com/joomla/joomla-cms/pull/8386.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/8386.patch"},"body":"## Description\r\n\r\nThis changes the JFormField to:\r\n\r\n* Add a new `render()` function that can be used to render layouts inside other layouts. \r\n* Allow to easily override the layout include paths in any child field creating an override of the  `getLayoutPaths()` method.\r\n\r\nRender layouts inside other layouts is used like:\r\n\r\n```php\r\n<a href=\"http://joomla.org\">Joomla</a>\r\n<?php \r\n    // Render `sample.layout` layout inside this layout\r\n    echo $field->render('sample.layout', $displayData);\r\n?>\r\n<p>Another paragraph</p>\r\n```\r\n\r\nYou can see below how I used it to render a common `stats` layout that is renderer in both `message` and `field.data` layouts.\r\n\r\nThis PR also improves the statistics system plugin:\r\n* Changed plugin fields prefix to plgsystemstats to avoid conflicts with any extension using `stats` prefix. Before: `type=\"stats.uniqueid\"` after: `type=\"plgsystemstats.uniqueid\"`\r\n* Remove uniqueid field getInput() method and use the fields layout system so 100% of the plugin output is overridable.\r\n* Create new field data that will be used to render the stats that are going to be sent in the plugin settings view.\r\n\r\n![stats-params-data](https://cloud.githubusercontent.com/assets/1119272/11106927/4e93abc4-88d9-11e5-90cf-1b5ad6e6ed89.png)\r\n\r\n## How to test\r\n\r\n1. This changes the field layout system so you should test that fields that are currently using layouts work as expected. The only fields using it are `JFormFieldRadio` & `JFormFieldCheckboxes` so the best way to check is to edit the codemirror plugin that includes both fields in its settings.\r\n2. Enable debug in statistics system plugin and test that the message selecting the user to configure statistics mode is shown. Also confirm that when you click in `Click here to see which information will be sent.` data is shown below.\r\n3. Go to statistics system plugin settings and confirm that when you click in `Click here to see which information will be sent.` data appears below."},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/162827945","html_url":"https://github.com/joomla/joomla-cms/pull/8386#issuecomment-162827945","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8386","id":162827945,"user":{"login":"Gerlof","id":3882884,"avatar_url":"https://avatars.githubusercontent.com/u/3882884?v=3","gravatar_id":"","url":"https://api.github.com/users/Gerlof","html_url":"https://github.com/Gerlof","followers_url":"https://api.github.com/users/Gerlof/followers","following_url":"https://api.github.com/users/Gerlof/following{/other_user}","gists_url":"https://api.github.com/users/Gerlof/gists{/gist_id}","starred_url":"https://api.github.com/users/Gerlof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gerlof/subscriptions","organizations_url":"https://api.github.com/users/Gerlof/orgs","repos_url":"https://api.github.com/users/Gerlof/repos","events_url":"https://api.github.com/users/Gerlof/events{/privacy}","received_events_url":"https://api.github.com/users/Gerlof/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T09:31:13Z","updated_at":"2015-12-08T09:31:13Z","body":"Am I rifght that this PR cannot be tested using Joomla! Patch Tester?\r\nClicking [Apply Patch] shows message \"The file marked for modification does not exist: plugins/system/stats/layouts/message.php\""}}