@mattab opened this Issue on September 6th 2013 Member

Add possibility to define settings for plugins, using radio/checkbox/input/select.

  • Let dev specify name/label, description, inline help, default value, etc.
  • Specify type of data: int, string, ...
  • Allow dev to display these settings in a new dedicated page, accessible via an admin's sub menu link
  • or the settings are added in the new "Plugin Settings" page (below "General Settings" in admin menu). This page loads all plugin settings which are not created in their own page.
  • Add Link in plugin list to the plugin's setting page (and #anchor if appropriate)
@mattab commented on September 6th 2013 Member

Possibly we add new column in piwik_option table to store plugin, so plugin settings are cleanly separate from core values.

@julienmoumne commented on September 7th 2013 Member

Would this new mechanism be used to store the phone numbers and validation codes of the MobileMessaging plugin?

@mattab commented on September 21st 2013 Member

Replying to JulienM:

Would this new mechanism be used to store the phone numbers and validation codes of the MobileMessaging plugin?

Nope it would be for pure simple settings label / description / inline help / type / id, to avoid user having to write a controller action+template+form for simple settings.

@mattab commented on October 14th 2013 Member

In a5a50036fa5cc33968a7e1ef0f4bdfd414d69611: Deleting Plugin\Config since it wouldnt be best practise to have per-plugin config file. Waiting for refs #4126

@tsteur commented on October 22nd 2013 Member

In d4f2a75a40b6f4a015ae29e8c4ea5547e20d9f22: refs #4126 started to work on plugin settings

@tsteur commented on October 22nd 2013 Member

In b969dc796fe9a0116ef7481d009ef10c2ca7dc0a: refs #4126 fix settings were not saved

@tsteur commented on October 22nd 2013 Member

In f70afa24a0c619d93598c308325fc8c3b38a16b8: refs #4126 added possibility to use other fields as well

@tsteur commented on October 22nd 2013 Member

In 599ff6f0980eabcabec6cbece067bd3697e33264: refs #4126 plugins just have to create a settings.php, there is no longer a need to use a hook

@tsteur commented on October 22nd 2013 Member

In 7090ace96131a8a1870e87371e074c8ca885c0f1: refs #4126 escape html attributes

@tsteur commented on October 23rd 2013 Member

In 0550fb10e93cfa4b116b28b7853e06d37733c392: refs #4126 differentiate between user and system settings to make a plugin developers live as easy and as secure as possible, add automatically validator in case field options are set, for security allow only names that are alNum

@tsteur commented on October 23rd 2013 Member

In 4af4d0439069449d19e11a41030ef5aa6d905db4: refs #4126 for security remove settings in case a user is deleted or a plugin installed, needs to be tested

@tsteur commented on October 23rd 2013 Member

In 3ded6de3dc24e2b0c9f855bed44755d2622ca0d8: refs #4126 added possibility to define introductions, display inline help

@tsteur commented on October 23rd 2013 Member

In 7bc0b8734ed1f8876931810a4d6e003ade036d84: refs #4126 fix remove user settings did not work

@tsteur commented on October 23rd 2013 Member

In 0abe2b8e7de4ada6d1d8c9e693e6c17dbe986bbc: refs #4126 refactored plugin settings to work with User and System setting data objects, the plugin settings does not know anything abotu User/System settings so it is possible to add different kind of settings in the future. Also added nonce when saving settings

@tsteur commented on October 24th 2013 Member

In e8456f5942e34b6409570fb9a4bf61d75e219a33: refs #4126 added some documentation and removed some unused methods

@tsteur commented on October 24th 2013 Member

In 29dbc73bc06230aeb194d2339cab07708546828f: refs #4126 do not display a default value in case we are displaying a checkbox, not needed here

@tsteur commented on October 24th 2013 Member

In ff25602897305a7033f8f8af62499db79497b3ed: refs #4126 display a list of plugins at the beginning of the plugin settings page and explain the user is going to change 3rd party settings

@tsteur commented on October 24th 2013 Member

In 1297f8109d8a86bc96ac285a7556c8b7bc4917ad: refs #4126 display a link to plugin settings page from plugins and themes page as well as after activating a plugin

@tsteur commented on October 24th 2013 Member

In 48e9a1b3f0c0f8bd825deb4ce8da87a5d7897025: refs #4126 allow only to change the settings for activated plugins

@tsteur commented on October 24th 2013 Member

In 0785060693c83e5e78a9a532e53de8fe5ed22fc0: refs #4126 added example plugin for settings

@tsteur commented on October 24th 2013 Member

In 79b395731cc64e7fa0d7e275f6e36272f5ce54d7: refs #4126 added a command to generate plugin settings

@tsteur commented on October 24th 2013 Member

In 5c5135d1aea2d4caa5afb5dbea2dbd7db4e8b671: refs #4126 fix plugin settings not displayed for regular users

@tsteur commented on October 24th 2013 Member

In 52e8a0d868069c090997aaa134ecc51ef275b4c2: refs #4126 added more example, handle type array and field multi select correct, code cleanup

@tsteur commented on October 24th 2013 Member

In a24ff9191dba30a3513009850db5f6cfe87a1dc0: refs #4126 invalidate token only in case of success, otherwise it is not possible to correct an invalid number

@tsteur commented on October 24th 2013 Member

In ccf26a7f1801b413b9434e2e1b74d96cee54ccb2: refs #4126 translate messages that can be displayed to the user

@tsteur commented on October 24th 2013 Member

In cd5a5ece5fe0917a3064ede88f9bed9e7ebf5c95: refs #4126 moved inline css to less files

@tsteur commented on October 24th 2013 Member

In 0379e1efb1bfea59e3f281b79f4dd4fe06d475a8: refs #4126 coding style skip

@tsteur commented on October 25th 2013 Member

In d467c9a46d2ca36f459e59d9a496be24c759836d: refs #4126 added some tests, fixed some bugs and moved some methods where they belong to not have a circular dependency

@tsteur commented on October 25th 2013 Member

In ac87e0111fde59c4a16bf5e53ca690a172c65517: refs #4126 added another test to make sure user settings do not overwrite each other

@tsteur commented on October 25th 2013 Member

In ab66ccbf20223943d4d8dfacb68dd39f666f75c0: refs #4126 make sure a user cannot read/change settings of another user

@tsteur commented on October 25th 2013 Member

In d058dbf95c7d7587b2ee50e653e8a81d9ee8eeca: refs #4126 make sure to list settings by order

@tsteur commented on October 25th 2013 Member

In 82ad929b48339b75ade5b124c1f0f8c42ab14834: refs #4126 display a headline for super user settings

@tsteur commented on October 25th 2013 Member

In dd4cbb28cc9b8fd76701759c31ca8d71fdc5eb95: refs #4126 added possibility to call getValue directly on the setting

@tsteur commented on October 25th 2013 Member

In 29446185192f6e24b640e681214054497b08caeb: refs #4126 this should fix the test

@tsteur commented on October 25th 2013 Member

In 1d44cdcb315b23d6191a23065e1157df94d41871: refs #4126 cleanup

@tsteur commented on October 31st 2013 Member

In b3dfd3409f661ef27d5916d80a5ffc9c87fbe87a: refs #4126 added possibility to define radio boxes

@tsteur commented on October 31st 2013 Member

In 0229659c89e97717b836e30a03f1f2e3e70229ad: refs #4126 display radio boxes a bit nicer

@mattab commented on November 7th 2013 Member

Very nice work & feature for developers! this saves writing so much HTML, javascript, php code... well done.

Is there any work left before closing ticket?

This Issue was closed on November 7th 2013
Powered by GitHub Issue Mirror