Fullscreen
[Show/Hide Left Column]
[Show/Hide Right Column]

Print

Dynamic Preferences

Table of contents



What

Dynamic preferences is a new feature of Tiki4, part of the Workspace which
  • Makes it possible to create custom admin panels
  • Makes it possible to have a Perspective admin interface (where each preference can be overridden per perspective
  • Makes management of current admin panels (tiki-admin.php) easier.

Benefits


About

Code name: "lesser magic"

Started in lesser-magic (external link) branch and later added to trunk for release in Tiki 4.0 Work is started to migrate all the 1000+ preferences from the old system to the new and is expected to be completed by Tiki5.

Magic didn't succeed. It was probably too ambitious because it was trying to make all preferences dynamic (that's good), but to also automagically generate all admin panels (very hard because of exceptions)

For Workspace Ideas / Perspectives, we need a way to set preferences in a workspace which are different than the global. We also want a way to provide workspace admins to set some of the prefs. But of course, not all 1000+ prefs! Only the ones that are relevant (turn wiki on/off, change theme, etc.)

So we need a dynamic admin panel per workspace. What is configurable by the workspace admin should be defined in the profile

Normal admin panels (tiki-admin.php) will remain so UX can have full control of how things are positioned, and to hide/show features depending on another setting. However, for the settings that are defined, the html can be generated dynamically (like a Smarty plugin)


Help needed

All the previous preferences need to be converted to this new system. Here is a good example migration:
http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki?view=rev&revision=21418 (external link)


How to hide options with dependencies


Just add id="feature_xyz_childcontainer" where feature_xyz is the name of the parent features. So if parent feature is off...

For a radio field use id="fgal_use_db_childcontainer_1" for the first radio button, id="fgal_use_db_childcontainer_2" for the second radio button ...

<div class="adminoptionboxchild" id="feature_multilingual_childcontainer">
This text will just appear if feature_multilingual is activated
</div>


http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/trunk/templates/tiki-admin-include-i18n.tpl?view=markup&pathrev=21821 (external link)

Templates

The templates to modify the look & feel of the preferences:
http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/trunk/templates/prefs/ (external link)

Field types


Dynamic preferences are dealing with 6 different field types:
  • flag: shows a checkbox
  • text: shows a textfield. This field type accepts 2 properties:
    • size: the size of the input field (in characters). Default size is "80"
    • filter: the type of data (digits or .....). Default is "accept everything"
  • textarea: shows a textarea. This field type accepts 2 properties:
    • size: the amount of lines displayed in the textarea.
    • filter: the type of data (digits or .....). Default is "accept everything"
  • list: prints a dropdown with a single selection. This field type requires the options array
  • multilist: prints a dropdown with multiple choice possible. This field requires, too, the options array.
  • radio: radio

name and description are indexed for searching. The quality of the text will impact the usefulness of the search.

hint can be used on any preference. The text will be displayed as a note below close to the field.
shorthint can be used on text. The text will be displayed on the right of the text box

An example. It's a list definition:

'wiki_page_regex' => array(
      'name' => tra('Wiki link format'),
      'description' => tra('Character set used when detecting wiki links within pages.'),
      'type' => 'list',
      'options' => array(
        'complete' => tra('Complete'),
        'full' => tra('Latin'),
        'strict' => tra('English'),
      ),
    ),

For this preference, as the name begin with wiki_, the definition will be put in lib/prefs/wiki.php
Preference name without _ must go in lib/prefs/global.php

Perspectives

Preferences can be overridden per perspective. But when this is not wanted/suitable/logical/safe:
To make it impossible to change a preference per perspective
'perspective' => false,




Wishlist

Alias



Contributors to this page: marclaporte31730 points  , sylvie2406 points  , lphuberdeau1025 points  and pkdille611 points  .
Page last modified on Tuesday 23 February, 2010 03:13:18 UTC by marclaporte31730 points .

Main Menu [toggle]


Bugs and Wishes
  1. Report a Bug (or suggest a feature enhancement)

  2. Search Bugs

  3. List yours



About Development

Mailing lists

Extra Stuff

Teams

External Links

Full list of Wiki Pages

TikiWiki on Social Networks


To register [toggle]

To have an account at this site, please register at Tikiwiki.org (external link), and then use that user name and password to log in here.

Search a Wiki Page [toggle]

Exact match

Search Tracker Items Subject [toggle]

Keywords [toggle]

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI – 508)
Action log 2.x
Administration
Ajax 2.x
Alert 3.x
Articles & Submissions
Backlinks
Banner
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution 2.x
Cookie
Copyright
Custom Home (and Group Home Page)
Database independence
Database MySQL
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tikiwiki.org (Help System)
DogFood
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Group
Help System
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interaction
Inter-User Messages
InterTiki
jQuery
Karma
Live Support
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tag
Missing features
MindMap 3.x
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Payment 5.x
Performance Speed / Load / Compression / Cache
Permission
Poll
Profile Manager
Quiz
Rating
RSS
Score
Search engine optimization (SEO)
Search
Security
Semantic links 3.x
Shoutbox
Site Identity
Slideshow
Smarty Template
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
System log
Tags 2.x
Task
Tell a Friend + Social Bookmarking 2.x
TikiTests 2.x
Theme
Toolbar (Quicktags)
Trackers
TRIM
User Administration
User Files
User Menu
Watch
WebHelp
Webmail and Groupmail
WebServices 3.x
Wiki 3D
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace Ideas 4.x
WYSIWTSN 4.x
WYSIWYCA
WYSIWYG 2.x
XMLRPC

Last Comments [toggle]

  1. Working on it !
  2. Hack attached doesn´t work
  3. Possible reason and solution
  4. Another URL