Table of contents
  1. 1. new interface 
  1. crucial: lazy load expensive variables (nav pane!)
  2. allow parameters for skinning $this->html('variable', $var1, $var2)
  3. split up tagging output into tags / related
    1. return items as a list element, not a comma separated list
  4. convert table outputs to DomTable
  5. maxm: convert any extensions which use tables to domtable format
  6. deprecate styles which use old classes
  7. prefix functionality id attributes with dw- to prevent collisions
  8. use classes for editor callbacks for hiding/editing/adding classes
    1. change #topic to #dw-pagetext (fck updated, need to update tinymce + xinha)
    2. update all skin styles

new interface 

use cases for skinvars:

  1. need to know if it exists ($this->exists('var'))
  2. need to grab its value ($this->html('var'))
  3. need to get value ($this->get('var')) - used for lazy loading?
  4. need to grab it's textual value ($this->text('var')) - this would be htmlspecialchared() so it's safe to output (where is it useful? titles ...)

considerations: should we always return strings? (i think, yes. forces consistency and reduces the # of interfaces)

  • register skinning variables as callbacks (g's idea)

sample code: 

function html($key, $ereturn= '', /* $var3, $var4, $var5 */) 
{
   $val = $this->get($key, /* $var3, $var4, $var5 */ );
   return empty($val) ? $ereturn: $val;
}

function text($key, $ereturn= '', /* $var3, $var4, $var5 */) 
{
   return htmlspecialchars($this->html($key, /* $var3, $var4, $var5 */);
}

function exists($key, $strict = true) 
{
   if (!$strict) { 
      return !empty($this->get($key));
   }
   return !is_null($this->get($key));
}

function get($key, /* $var3, $var4, $var5 */) 
{
   if (is_loaded($key)) {
     return cached($key);
   }
   return executed($key);
}

   

   

Tag page
You must login to post a comment.