예제 #1
0
$field->variation = '';
$field->variation_override = '';
$field->restriction = '';
if ($field->type == 'checkbox' || $field->type == 'radio') {
    $field->bool = 1;
}
// Set
$doc = JFactory::getDocument();
$doc->addStyleSheet(JURI::root(true) . '/media/cck/css/cck.admin.css');
$doc->addStyleDeclaration('div.cck_forms.cck_admin div.cck_form {float:none;}');
$doc->addScriptDeclaration('jQuery(document).ready(function($){ $("#titlebox").html("' . JText::_('COM_CCK_PREVIEW') . '"); $("#submitBox,#resetBox").hide(); });');
Helper_Include::addDependencies('box', 'edit');
?>

<div class="seblod preview">
	<div align="center" style="text-align:center;">
		<div class="cck_forms cck_admin cck_<?php 
echo $field->type;
?>
">
			<div class="cck_form cck_form_<?php 
echo $field->type;
?>
">
				<?php 
echo JCckDevField::getForm($field, '', $config);
?>
			</div>
		</div>
	</div>
</div>
예제 #2
0
 public function onCCK_FieldPrepareSearch(&$field, $value = '', &$config = array(), $inherit = array(), $return = false)
 {
     if (self::$type != $field->type) {
         return;
     }
     parent::g_onCCK_FieldPrepareSearch($field, $config);
     // Init
     $divider = $field->match_value ? $field->match_value : ' ';
     if (is_array($value)) {
         $value = implode($divider, $value);
     }
     // Prepare
     $form = JCckDevField::getForm('core_not_empty_image', $value, $config, array('id' => $field->id, 'name' => $field->name, 'variation' => $field->variation));
     // Set
     $field->form = $form;
     $field->match_mode = 'not_empty';
     $field->type = 'checkbox';
     $field->value = $value;
     // Return
     if ($return === true) {
         return $field;
     }
 }