DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:settingstree

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:settingstree [2015-07-22 09:48] – [settingstree Plugin] 194.138.39.61plugin:settingstree [2022-07-30 00:10] (current) Klap-in
Line 6: Line 6:
 email      : jan@fjan.eu email      : jan@fjan.eu
 type       : helper type       : helper
-lastupdate : 2015-07-20 +lastupdate : 2015-08-10 
-compatible : hrun +compatible : Hrun 
-depends    : config, explorertree, (memcache)+depends    : config, explorertree, memcache
 conflicts  conflicts 
 similar    : config, acl similar    : config, acl
-tags       : embed settings config admin+tags       : admin embed settings config admin hierarchy
  
 downloadurl: https://github.com/fajan/settingstree/archive/master.zip downloadurl: https://github.com/fajan/settingstree/archive/master.zip
-bugtracker : # eg. http://github.com//dokuwiki-plugin-settingstree/issues+bugtracker : https://github.com/fajan/settingstree/issues
 sourcerepo : https://github.com/fajan/settingstree sourcerepo : https://github.com/fajan/settingstree
 donationurl:  donationurl: 
Line 21: Line 21:
 ---- ----
  
-**This plugin is currently in development status! You can play around with it, but wait till it becomes stable before using it to prod sites!** +**This plugin is currently in RC!** 
-Stable version should be out in less than a month.+Current version is in testing, with a few limitations (only the common settings types are tested/implemented, no special cases yet). 
 +Stable version should be out after some more testing.
  
 ===== Installation ===== ===== Installation =====
Line 30: Line 31:
 This plugin **requires** a html5 browser to work! If you need to use the admin pages via commandline- or pre-html5  browsers (e.g. lynx or ie7), do not use plugins which depends on this one. This plugin **requires** a html5 browser to work! If you need to use the admin pages via commandline- or pre-html5  browsers (e.g. lynx or ie7), do not use plugins which depends on this one.
  
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 ===== Overview ===== ===== Overview =====
Line 52: Line 53:
     * settings are manually editable there with a json editor, but be sure remove cached value.     * settings are manually editable there with a json editor, but be sure remove cached value.
   * settings meta, default values are stored with a "version" (timestamp) so if you update the plugin's config meta/defaults, they will be applied.   * settings meta, default values are stored with a "version" (timestamp) so if you update the plugin's config meta/defaults, they will be applied.
-    * example code checks/sets version by the timestamp of the latest file modification time of the plugin's ''conf/meta.php'', ''conf/default.php'' and ''conf/extend.php''+    * example code checks/sets version by the timestamp of the latest file modification time of the plugin's ''conf/metadata.php'', ''conf/default.php'' and ''conf/extend.php''
   * settings in the admin may overlap settings in config:   * settings in the admin may overlap settings in config:
     * plugins's configs (what you see in config manager) can be included as is     * plugins's configs (what you see in config manager) can be included as is
Line 84: Line 85:
 <code php> <code php>
 class admin_plugin_<yourplugin> extends DokuWiki_Admin_Plugin { class admin_plugin_<yourplugin> extends DokuWiki_Admin_Plugin {
-  
  private $settings_helper = null;  private $settings_helper = null;
  private $settings_registered = false;  private $settings_registered = false;
-  
  function get_settings_helper(){  function get_settings_helper(){
  if (!$this->settings_helper){  if (!$this->settings_helper){
Line 121: Line 120:
  function __construct(){  function __construct(){
  $this->init_settingstree();  $this->init_settingstree();
-         
     }     }
-  
-  
-  
  function handle() {  function handle() {
  // changes are handled with ajax, so nothing to do here.  // changes are handled with ajax, so nothing to do here.
     }     }
- 
-  
  function html(){  function html(){
         echo '<h1>'.$this->getLang('admin_set_options').'</h1>'.NL;         echo '<h1>'.$this->getLang('admin_set_options').'</h1>'.NL;
Line 137: Line 130:
  }  }
  echo $e->showAdmin('<yourplugin>',':'); // yeah... that's it. we embedded it to our admin. YAAY!!  echo $e->showAdmin('<yourplugin>',':'); // yeah... that's it. we embedded it to our admin. YAAY!!
-  
  }  }
- 
     function forAdminOnly() { // for only superusers (true) or also for managers (false)?     function forAdminOnly() { // for only superusers (true) or also for managers (false)?
         return $this->getConf('admin_only_setoptions');         return $this->getConf('admin_only_setoptions');
     }     }
-  
-  
  function getMenuText($language) {  function getMenuText($language) {
         return $this->getLang('admin_set_options');         return $this->getLang('admin_set_options');
Line 162: Line 151:
  
 Current status: Current status:
-  * admin interface is almost done: usable, triable +  * feature freeze, prepare to stable 
-  * ''getSettingsFor'' similar to plugin's ''getConf'' is not bound yet+    * unplanned, but required feature before stable: "export-config", which will be merged in a week. 
-  * helper method exports / docs are not done yet.+    * "export-config" feature added, returning to feature freeze. 
 +  * documentation needs to be extended added here. 
 +  * admin interface is done. 
 +  * export-modal interface is done
 +  * helper methods added 
 +    * helper methods currently only documented by getMethod (see methods parameters there) 
 +  * test for all setting types.
  
  
Line 172: Line 167:
   * **2015-07-20**   * **2015-07-20**
     * Beta / demo release     * Beta / demo release
 +  * **2015-07-22**
 +    * minor fixes.
 +      * script / gui cosmetic fixes.
 +    * testing/RC release
 +  * **2015-07-23**
 +    * disable caching if it's emulated
 +    * trigger error on unmet dependency
 +    * clean up commented out codes
 +  * **2015-07-27**
 +    * removed explorertree's js callbacks, instead listening to explorertree's events (this to preparation for export-config feature)
 +    * added id to explorertree, but currently hardcoded.
 +    * removed global functions, now instead listening to events:
 +      * ''settingstree_selectlevel'' -> listen to explorertree's ''tree_selected'' event instead
 +      * ''settingstree_show_in_hierarchy'' -> listen to ''show_in_hierarchy'' event on root instead.
 +    * exploded ''settingslevel''-'s and ''settingswrapper''-'s ''showHtml'' method to smaller parts (in preparation for export-config feature)
 +  * **2015-07-29**
 +    * added 'export-config' feature:
 +       * display modal to set temporary settings override. can be used for changing configuration temorarly for a process (such as exporting, hence the name)
 +       * export-modal has much more similar interface to config plugin, as area is wider and protection checkbox is not present.
 +       * added ``_ignore_for_export`` meta option to hide settings from export-config modal.
 +    * fixed: if invalid value prevented save, all changed values remain changed
 +    * fixed: in update info, "updated from '[default value]'" now displays the effective value and displays '(default value)' behind it.
 +    * fixed: lost event when selecting root after initialization.
 +  * **2015-07-30**
 +    * minor fixes.
 +  * **2015-07-30**
 +    * fix: modal placement and size on low resolution devices
  
 === Known Bugs and Issues === === Known Bugs and Issues ===
  
-... this is just beta yet XD+I currently don't have much time to test with all possible setting-type, and browsers... 
 +The current release (07-29) works with Chrome, FF, and IE10. 
  
 === ToDo/Wish List === === ToDo/Wish List ===
  
 ... ...
- 
- 
 ===== Discussion ===== ===== Discussion =====
- 
  
plugin/settingstree.1437551305.txt.gz · Last modified: 2015-07-22 09:48 by 194.138.39.61

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki