Beispiel #1
0
 static function &geTtoolbarParams($editor, $args = array())
 {
     if (count($args) > 1) {
         $row = $args[1];
     }
     if (is_a($args[0], 'JParameter')) {
         $params = $args[0];
     } else {
         if ($row) {
             $params = new JParameter($row->params);
         } else {
             $row =& JCKHelper::getTable('toolbar');
             // load the row from the db table
             $row->load($args[0]);
             //get toolbar parameter
             $params = new JParameter($row->params);
         }
     }
     $editor_params = new JParameter($editor->params);
     $toolbar = $params->get('toolbar', $row->name);
     $skins = $params->get('skin', $editor_params->def('skin', 'office2003'));
     $width = $params->get('wwidth', $editor_params->def('wwidth', '100%'));
     $editor_params->set('toolbar', $toolbar);
     $editor_params->set('skin', $skins);
     $editor_params->set('wwidth', $width);
     $editor_params->Set('hheight', 300);
     return $editor_params;
 }