コード例 #1
0
<?php

/**
* @version 			SEBLOD 3.x Core ~ $Id: edit_fields_compact.php sebastienheraud $
* @package			SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder)
* @url				http://www.seblod.com
* @editor			Octopoos - www.octopoos.com
* @copyright		Copyright (C) 2013 SEBLOD. All Rights Reserved.
* @license 			GNU General Public License version 2 or later; see _LICENSE.php
**/
defined('_JEXEC') or die;
$bar = $this->uix == 'full' ? 'on' : 'off';
$data = Helper_Workshop::getParams('search', $this->item->master, $this->item->client);
$positions = array();
?>

<div class="seb-wrapper <?php 
echo $this->uix;
?>
">
    <div class="width-70 fltlft" id="seblod-main">
        <div class="seblod">
            <div class="legend top left"><?php 
echo JText::_('COM_CCK_CONSTRUCTION_' . $this->uix) . '<span class="mini">(' . JText::_('COM_CCK_FOR_VIEW_' . $this->item->client) . ')</span>';
?>
</div>
            <?php 
$style = array('1' => '', '2' => ' hide', '3' => ' hide', '4' => ' hide', '5' => ' hide', '6' => ' hide');
Helper_Workshop::displayHeader('search', $this->item->master);
echo '<ul class="sortable connected" id="sortable1" myid="1">';
if ($this->item->client == 'order') {
コード例 #2
0
 public function ajax_field_li($field = NULL, $client = '')
 {
     $app = JFactory::getApplication();
     $lang = JFactory::getLanguage();
     if (is_object($field)) {
         $return = true;
         $element = 'type';
         $master = $client == 'content' || $client == 'intro' ? 'content' : 'form';
         require_once JPATH_COMPONENT . '/helpers/helper_admin.php';
     } else {
         $return = false;
         $fieldname = $app->input->get('fieldname', '');
         $element = $app->input->get('element', 'type');
         $client = $app->input->get('client', 'admin');
         if ($element == 'search') {
             $master = $client == 'order' ? 'order' : ($client == 'list' || $client == 'item' ? 'content' : 'search');
             $lang->load('plg_cck_field_field_x');
             $lang->load('plg_cck_field_group_x');
         } else {
             $master = $client == 'content' || $client == 'intro' ? 'content' : 'form';
         }
         $field = JCckDatabase::loadObject('SELECT a.id, a.title, a.name, a.folder, a.type, a.label FROM #__cck_core_fields AS a WHERE a.name="' . $fieldname . '"');
         if (!is_object($field)) {
             return;
         }
         require_once JPATH_COMPONENT . '/helpers/helper_admin.php';
         require_once JPATH_COMPONENT . '/helpers/helper_workshop.php';
     }
     require_once JPATH_SITE . '/plugins/cck_field/' . $field->type . '/' . $field->type . '.php';
     $lang->load('plg_cck_field_' . $field->type);
     $style = array('1' => '', '2' => ' hide', '3' => ' hide', '4' => ' hide', '5' => ' hide', '6' => ' hide', '7' => ' hide');
     $data = Helper_Workshop::getParams($element, $master, $client);
     JCck::callFunc_Array('plgCCK_Field' . $field->type, 'onCCK_FieldConstruct_' . $element . $master, array(&$field, $style, $data));
     $json = array();
     ob_start();
     Helper_Workshop::displayField($field);
     $json["id"] = (int) $field->id;
     $json["html"] = ob_get_clean();
     if ($return !== false) {
         return JCckDev::toJSON($json);
     }
     echo JCckDev::toJSON($json);
 }