예제 #1
0
 public function onCCK_FieldPrepareForm(&$field, $value = '', &$config = array(), $inherit = array(), $return = false)
 {
     if (self::$type != $field->type) {
         return;
     }
     self::$path = parent::g_getPath(self::$type . '/');
     parent::g_onCCK_FieldPrepareForm($field, $config);
     // Set
     $field->form = '';
     $field->value = '';
 }
예제 #2
0
 public function onCCK_FieldPrepareForm(&$field, $value = '', &$config = array(), $inherit = array(), $return = false)
 {
     if (self::$type != $field->type) {
         return;
     }
     self::$path = parent::g_getPath(self::$type . '/');
     parent::g_onCCK_FieldPrepareForm($field, $config);
     // Init
     $form = '';
     $value = '';
     // Prepare
     if ($field->defaultvalue) {
         $mode = $field->bool ? 'module' : 'position';
         $style = $field->style ? ',' . $field->style : '';
         $form = '{load' . $mode . ' ' . $field->defaultvalue . $style . '}';
         $value = $field->defaultvalue;
         if ($field->bool2) {
             $form = JHtml::_('content.prepare', $form);
         }
     }
     // Set
     $field->form = $form;
     $field->value = $value;
 }