当前位置: 首页>>代码示例>>PHP>>正文


PHP nextendIsMagento函数代码示例

本文整理汇总了PHP中nextendIsMagento函数的典型用法代码示例。如果您正苦于以下问题:PHP nextendIsMagento函数的具体用法?PHP nextendIsMagento怎么用?PHP nextendIsMagento使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了nextendIsMagento函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fetchElement

 function fetchElement()
 {
     global $smartslidercontroller, $ss2sliderafterform;
     $this->_value = htmlspecialchars($this->_form->get($this->_name, $this->_default), ENT_QUOTES);
     $this->_form->set($this->_name, $this->_value);
     $html = '<div style="display:none;">' . parent::fetchElement() . '</div>';
     $slider = null;
     $params = new NextendData();
     if (nextendIsJoomla()) {
         nextendimportsmartslider2('nextend.smartslider.joomla.slider');
         $module = new stdClass();
         $module->id = 0;
         $params->loadArray(array('slider' => intval($_GET['sliderid'])));
         $slider = new NextendSliderJoomla($module, $params, dirname(__FILE__), true);
     } else {
         if (nextendIsWordpress()) {
             nextendimportsmartslider2('nextend.smartslider.wordpress.slider');
             $slider = new NextendSliderWordpress(intval($_GET['sliderid']), $params, dirname(__FILE__), true);
         } else {
             if (nextendIsMagento()) {
                 nextendimportsmartslider2('nextend.smartslider.magento.slider');
                 $slider = new NextendSliderMagento(intval($_GET['sliderid']), $params, dirname(__FILE__), true);
             }
         }
     }
     ob_start();
     echo "<div id='smartslider-adjust-height' style='overflow:auto; margin: 5px; padding: 5px;'>";
     $slider->render();
     echo "</div>";
     echo "<div id='smart-slider-layer-dummy' class='smart-slider-layer'></div>";
     echo '<div class="smartslider-slide-advanced-layers" style="min-width: 1600px;"></div>';
     $ss2sliderafterform = ob_get_clean();
     $css = NextendCss::getInstance();
     $css->addCssLibraryFile('jqueryui/jquery.ui.resizable.css');
     $css->addCssFile(NEXTEND_SMART_SLIDER2_ASSETS . 'admin/css/layer.css');
     $js = NextendJavascript::getInstance();
     $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.core.min.js');
     $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.widget.min.js');
     $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.mouse.min.js');
     $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.resizable.min.js');
     $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.draggable.min.js');
     $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.sortable.min.js');
     $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.droppable.min.js');
     $js->addLibraryJsFile('jquery', NEXTENDLIBRARYASSETS . 'js' . DIRECTORY_SEPARATOR . 'base64.js');
     $js->addLibraryJsFile('jquery', NEXTENDLIBRARYASSETS . 'js' . DIRECTORY_SEPARATOR . 'sortable.js');
     $js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'console.js');
     $js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'slide.js');
     $js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'slide.layer.js');
     $js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'slide.item.js');
     $js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'slide.layout.js');
     $js->addLibraryJs('jquery', "\r\n            njQuery(document).ready(function(){\r\n                var el = \$('#smartslider-adjust-height');\r\n                el.height(el[0].scrollHeight+10);\r\n                \$(window).trigger('resize');\r\n            });\r\n            ndojo.addOnLoad(function(){\r\n                SmartSliderAdminSlide('" . $slider->getId() . "','" . $slider->_activeSlide . "','" . $this->_id . "', '" . $smartslidercontroller->route('controller=layouts&action=create') . "');\r\n            });\r\n        ");
     if (NextendSmartSliderSettings::get('slideeditoralert', 1)) {
         $js->addLibraryJs('jquery', "\r\n                njQuery(window).on('beforeunload', function() {\r\n                    if (njQuery.now()-window.nextendtime > 60000 && !window.nextendsave) { // 1 min\r\n                        return '" . NextendText::_('Your_slide_settings_has_not_been_submitted_yet') . "';\r\n                    } else {\r\n                        return;\r\n                    }\r\n                });\r\n            ");
     }
     return $html;
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:56,代码来源:slide.php

示例2: loadList

 function loadList()
 {
     if ($this->_list == null) {
         if (nextendIsJoomla()) {
             $this->loadJoomlaList();
         } else {
             if (nextendIsMagento()) {
                 $this->loadOtherList();
             } else {
                 if (nextendIsWordpress()) {
                     $this->loadWordpressList();
                 }
             }
         }
     }
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:16,代码来源:menutype.php

示例3: getInstance

 static function getInstance()
 {
     static $instance;
     if (!is_object($instance)) {
         if (nextendIsJoomla()) {
             nextendimport('nextend.javascript.joomla');
             $instance = new NextendJavascriptJoomla();
         } elseif (nextendIsWordPress()) {
             nextendimport('nextend.javascript.wordpress');
             $instance = new NextendJavascriptWordPress();
         } elseif (nextendIsMagento()) {
             nextendimport('nextend.javascript.magento');
             $instance = new NextendJavascriptMagento();
         }
     }
     return $instance;
 }
开发者ID:Gordondalos,项目名称:smart-event,代码行数:17,代码来源:javascript.php

示例4: fetchElement

 function fetchElement()
 {
     $folder = NextendXmlGetAttribute($this->_xml, 'folder');
     if ($folder === 'systemimages') {
         if (nextendIsJoomla()) {
             $folder = JPATH_SITE . '/images/';
         } else {
             if (nextendIsWordpress()) {
                 $folder = wp_upload_dir();
                 $folder = $folder['basedir'] . '/';
             } else {
                 if (nextendIsMagento()) {
                     $folder = Mage::getBaseDir('media') . '/';
                 }
             }
         }
     }
     $this->addFolder($folder);
     return parent::fetchElement();
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:20,代码来源:folders.php

示例5: NextendUri

    {
        static $instance;
        if (!is_object($instance)) {
            $instance = new NextendUri();
        }
        // if
        return $instance;
    }
    static function setBaseUri($uri)
    {
        $i = NextendUri::getInstance();
        $i->_baseuri = $uri;
    }
    static function getBaseUri()
    {
        $i = NextendUri::getInstance();
        return $i->_baseuri;
    }
    static function pathToUri($path)
    {
        $i = NextendUri::getInstance();
        return $i->_baseuri . str_replace(array(NextendFilesystem::getBasePath(), DIRECTORY_SEPARATOR), array('', '/'), str_replace('/', DIRECTORY_SEPARATOR, $path));
    }
}
if (nextendIsJoomla()) {
    nextendimport('nextend.uri.joomla');
} elseif (nextendIsWordPress()) {
    nextendimport('nextend.uri.wordpress');
} elseif (nextendIsMagento()) {
    nextendimport('nextend.uri.magento');
}
开发者ID:01J,项目名称:bealtine,代码行数:31,代码来源:uri.php

示例6: fetchElement

    function fetchElement()
    {
        $html = parent::fetchElement();
        if (nextendIsJoomla()) {
            JHtml::_('behavior.modal');
            $user = JFactory::getUser();
            $link = 'index.php?option=com_media&amp;view=images&amp;tmpl=component&amp;e_name=com_smartslider2&amp;author=' . $user->id;
            $html .= '<div class="button2-left" style="margin: 2px 0 2px 10px; float: left;">
                    <div class="image">
                        <a onclick="window.jInsertEditorText = function(tag, editor){njQuery(\'#' . $this->_id . '\').val((window.nextendimageurl == 0 ? \'' . NextendUri::getBaseUri() . '\' : \'\')+njQuery(tag).attr(\'src\')); NfireEvent(document.getElementById(\'' . $this->_id . '\'),\'change\'); };return false;" rel="{handler: \'iframe\', size: {x: 900, y: 520}}" href="' . $link . '" title="Image" class="modal btn modal-button"><i class="icon-picture"></i>' . NextendText::_('Image') . '</a>
                    </div>
                  </div>';
        } else {
            if (nextendIsWordPress()) {
                add_thickbox();
                wp_enqueue_script('media-upload');
                wp_print_styles('editor-buttons');
                $html .= '
              <div class="wp-media-buttons" style="float: left; margint-top:1px;">
                <a title="Add Media" onclick="window.send_to_editor = function(html){var inp = njQuery(\'#' . $this->_id . '\'); setFromWPLibrary(html, inp); };tb_show(\'\', \'' . admin_url('media-upload.php?type=image&TB_iframe=true&width=800&height=800') . '\');return false;" data-editor="content" class="button insert-media add_media" href="#"><span class="wp-media-buttons-icon"></span> Add Media</a>
              </div>
              <script>
                  function setFromWPLibrary(html, el){
                      if( Object.prototype.toString.call( html) === \'[object Array]\' ) {
                          el.val(html[0]);
                      }else{
                          var html = jQuery(html);
                          var img = html;
                          if(html[0].tagName != \'IMG\'){
                        		img = jQuery(\'img\',html);
                      		}
                      		el.val(img.attr(\'src\'));
                      }
                      NfireEvent(el[0], \'change\');
                      
                  		tb_remove();
                  }
              </script>
              ';
            } else {
                if (nextendIsMagento()) {
                    static $loaded;
                    ob_start();
                    if ($loaded == null) {
                        $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'extjs/ext-tree.js"></script>';
                        $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'extjs/ext-tree-checkbox.js"></script>';
                        $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'extjs/fix-defer.js"></script>';
                        $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'mage/adminhtml/variables.js"></script>';
                        $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'mage/adminhtml/wysiwyg/widget.js"></script>';
                        $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'lib/flex.js"></script>';
                        $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'lib/FABridge.js"></script>';
                        $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'mage/adminhtml/flexuploader.js"></script>';
                        $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'mage/adminhtml/browser.js"></script>';
                        $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'prototype/window.js"></script>';
                        $html .= '<link rel="stylesheet" type="text/css" href="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'prototype/windows/themes/default.css" media="screen"/>';
                        $html .= '<link rel="stylesheet" type="text/css" href="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . 'adminhtml/default/default/lib/prototype/windows/themes/magento.css" media="screen"/>';
                        ?>
<script type="text/javascript">
njQuery(window).ready(function(){
Mediabrowser.prototype.insert = Mediabrowser.prototype.insert.wrap(function(parentMethod, event) {
    var div;
    if (event != undefined) {
        div = $(Event.findElement(event, 'DIV'));
    } else {
        $$('div.selected').each(function (e) {
            div = jQuery('#'+e.id);
        });
    }
    if (div.length == 0) {
        return false;
    }
    var targetEl = this.getTargetElement();
    if (! targetEl) {
        alert("Target element not found for content update");
        Windows.close('browser_window');
        return;
    }
    div = div[0];
    var params = {filename:div.id, node:this.currentNode.id, store:this.storeId};

    if (targetEl.tagName.toLowerCase() == 'textarea') {
        params.as_is = 1;
    }

    new Ajax.Request(this.onInsertUrl, {
        parameters: params,
        onSuccess: function(transport) {
            try {
                this.onAjaxSuccess(transport);
                if (this.getMediaBrowserOpener()) {
                    self.blur();
                }
                Windows.close('browser_window');
                if (targetEl.tagName.toLowerCase() == 'input') {
                    targetEl.value = transport.responseText;
                    NfireEvent(targetEl, 'change');
                    // AntoineK overload START
                    if (varienGlobalEvents) {
                        varienGlobalEvents.fireEvent('mediachooserChange' + targetEl.id, transport.responseText);
                    }
//.........这里部分代码省略.........
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:101,代码来源:image.php

示例7: NextendSliderCache

 function NextendSliderCache($slider)
 {
     nextendimportsmartslider2('nextend.smartslider.check');
     nextendimport('nextend.css.css');
     nextendimport('nextend.javascript.javascript');
     nextendimport('nextend.fonts.google');
     $this->slider = $slider;
     $sliderid = $slider->_sliderid;
     $recache = false;
     $cached = json_decode(NextendSmartSliderStorage::get('slidercache' . $sliderid), true);
     if (nextendIsWordpress()) {
         $time = current_time('timestamp');
     } else {
         $time = time();
     }
     nextendimportsmartslider2('nextend.smartslider.admin.models.slides');
     $slidesModel = new NextendSmartsliderAdminModelSlides(null);
     $slides = $slidesModel->getSlides($sliderid, '');
     $slideexpire = null;
     foreach ($slides as $s) {
         $publish_up = strtotime($s['publish_up']);
         if ($publish_up && $publish_up > $time && ($slideexpire == null || $publish_up < $slideexpire)) {
             $slideexpire = $publish_up;
         }
         $publish_down = strtotime($s['publish_down']);
         if ($publish_down && $publish_down > $time && ($slideexpire == null || $publish_down < $slideexpire)) {
             $slideexpire = $publish_down;
         }
     }
     if (is_array($cached)) {
         if (NextendSmartSliderStorage::get('sliderchanged' . $sliderid) == 1) {
             $recache = true;
         } else {
             if (isset($cached['time']) && isset($cached['expire']) && $cached['time'] < time() - $cached['expire'] * 60 * 60) {
                 $recache = true;
             } else {
                 if (isset($cached['slideexpire']) && $cached['slideexpire'] < $time) {
                     $recache = true;
                 }
             }
         }
     } else {
         $recache = true;
     }
     if (!$recache) {
         $data = $cached['data'];
         if (isset($data['css'])) {
             if (!NextendFilesystem::fileexists(NextendFilesystem::absoluteURLToPath($data['css']))) {
                 $recache = true;
             }
         } else {
             $recache = true;
         }
         if (!isset($data['libraries']) || !isset($data['libraries']['jquery']) || !isset($data['libraries']['jquery']['jsfiles']) || count($data['libraries']['jquery']['jsfiles']) == 0) {
             $recache = true;
         }
     }
     //$recache = true;
     if ($recache) {
         $data = $this->render();
         $cached = array('time' => time(), 'data' => $data);
         if ($this->slider->_generatorParams->get('enabled', 0)) {
             $generatorcached = json_decode(NextendSmartSliderStorage::get('generator' . $sliderid), true);
             if (is_array($generatorcached)) {
                 $cached['time'] = $generatorcached['time'];
                 $cached['expire'] = $this->slider->_generatorParams->get('cachetime', '24');
             }
         }
         if ($slideexpire) {
             $cached['slideexpire'] = $slideexpire;
         }
         NextendSmartSliderStorage::set('slidercache' . $sliderid, json_encode($cached));
         NextendSmartSliderStorage::set('sliderchanged' . $sliderid, '0');
     }
     $this->cssurl = $data['css'];
     if (nextendIsWordPress()) {
         add_action('nextend_css', array($this, 'addCSS'));
     } elseif (nextendIsMagento()) {
         Nextend_SmartSlider2_Model_Observer::$sliders[] = array($this, 'addCSS');
     } else {
         $this->addCSS();
     }
     $js = NextendJavascript::getInstance();
     foreach ($data['js']['core'] as $j) {
         $js->addJsFile($j);
     }
     if (isset($data['libraries']) && count($data['libraries'])) {
         foreach ($data['libraries'] as $library => $jss) {
             $js->loadLibrary($library);
             if (!empty($jss['js'])) {
                 $js->addLibraryJs($library, $jss['js']);
             }
             if (count($jss['jsfiles'])) {
                 foreach ($jss['jsfiles'] as $j) {
                     $js->addLibraryJsFile($library, $j);
                 }
             }
         }
     }
     if (isset($data['fonts']) && count($data['fonts'])) {
//.........这里部分代码省略.........
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:101,代码来源:slidercache.php

示例8: addExtra

 static function addExtra($data = array())
 {
     if (nextendIsMagento()) {
         $data['form_key'] = Mage::getSingleton('core/session')->getFormKey();
     }
     return json_encode($data);
 }
开发者ID:Gordondalos,项目名称:smart-event,代码行数:7,代码来源:form.php

示例9: render


//.........这里部分代码省略.........
                     $article->text = $slider;
                     $_p = array();
                     $dispatcher->trigger('onContentPrepare', array('com_smartslider2', &$article, &$_p, 0));
                     if (!empty($article->text)) {
                         $slider = $article->text;
                     }
                 }
             } elseif (nextendIsWordPress()) {
                 if (!function_exists('ss2_attr_shortcode')) {
                     function ss2_attr_shortcode($matches)
                     {
                         return 'data-' . $matches[1] . '="' . str_replace('"', '&quot;', do_shortcode(str_replace('&quot;', '"', $matches[2]))) . '"';
                     }
                 }
                 $slider = preg_replace_callback("/data-(click|enter|leave)=\"(.*?)\"/", "ss2_attr_shortcode", $slider);
                 $slider = do_shortcode($slider);
             }
         }
     }
     $slider = str_replace(array('{{id}}', 'nextend-smart-slider-0'), $this->getId(), $slider);
     if (!$this->_backend) {
         $translateurl = (array) NextendParse::parse(NextendSmartSliderSettings::get('translateurl', ''));
         if (isset($translateurl[0]) && isset($translateurl[1])) {
             $slider = str_replace($translateurl[0], $translateurl[1], $slider);
         }
     }
     $align = $this->_sliderParams->get('align', 'normal');
     $responsive = (array) NextendParse::parse($this->_sliderParams->get('responsive', '0|*|0'));
     if ($responsive[1] != 1 && $align != 'normal') {
         switch ($align) {
             case 'left':
                 echo "<div class='ss2-align' style='float:left;'>";
                 break;
             case 'center':
                 echo "<div class='ss2-align' style='margin: 0 auto; max-width: " . $size[0] . "px;'>";
                 break;
             case 'right':
                 echo "<div class='ss2-align' style='float:right;'>";
                 break;
         }
         $align = true;
     } else {
         echo "<div class='ss2-align'>";
     }
     echo $this->parseSlider($slider);
     if ($align === true) {
         echo "</div><div style='clear:both;'></div>";
     } else {
         echo "</div>";
     }
     if (!$this->_backend && $fadeonload[0] && (isset($responsive[0]) && $responsive[0] || isset($responsive[1]) && $responsive[1])) {
         $works = nextend_try_to_test_memory_limit();
         if ($works) {
             if ($size[0] + $size[3] > 0 && $size[1] > 0 && function_exists('imagecreatetruecolor')) {
                 echo '<div id="' . $id . '-placeholder" >';
                 $im = imagecreatetruecolor($size[0] + $size[3], $size[1]);
                 imagesavealpha($im, true);
                 imagealphablending($im, false);
                 $trans = imagecolorallocatealpha($im, 255, 0, 0, 127);
                 imagefilledrectangle($im, 0, 0, $size[0] + $size[3], $size[1], $trans);
                 ob_start();
                 imagepng($im);
                 imagedestroy($im);
                 $img = base64_encode(ob_get_clean());
                 echo '<img alt="" style="width:100%; max-width: ' . (intval($this->_sliderParams->get('simpleresponsivemaxwidth', 30000)) + $size[3]) . 'px;" src="data:image/png;base64,' . $img . '" />';
                 if ($size[2] > 0) {
                     $im = imagecreatetruecolor($size[0] + $size[3], $size[2]);
                     imagesavealpha($im, true);
                     imagealphablending($im, false);
                     $trans = imagecolorallocatealpha($im, 255, 0, 0, 127);
                     imagefilledrectangle($im, 0, 0, $size[0] + $size[3], $size[2], $trans);
                     ob_start();
                     imagepng($im);
                     imagedestroy($im);
                     $img = base64_encode(ob_get_clean());
                     echo '<img alt="" style="width:100%;" src="data:image/png;base64,' . $img . '" />';
                 }
                 echo '</div>';
             } else {
                 $css->addCssFile('#' . $id . ' .nextend-slider-fadeload{position: relative !important;}', $this->getId());
             }
         } else {
             if (NextendSmartSliderSettings::get('debugmessages', 1)) {
                 echo "It seems like the <a href='http://php.net/manual/en/ini.core.php#ini.memory-limit'>memory_limit</a> on the server is too low for the fade on load feature. Please set it minimum 60M and reload the page! You can disable this message in <a href='http://www.nextendweb.com/wiki/smart-slider-documentation/global-settings/'>global configuration</a> 'Frontend debug message' option.";
             }
         }
     } else {
         $css->addCssFile('#' . $id . '.nextend-slider-fadeload{position: relative !important;}', $this->getId());
     }
     NextendPlugin::callPlugin('nextendslider', 'onNextendSliderRenderAfter');
     if (!$cache) {
         if (nextendIsWordPress()) {
             add_action('nextend_css', array($this, 'wpAddCSS'));
         } elseif (nextendIsMagento()) {
             Nextend_SmartSlider2_Model_Observer::$sliders[] = $this->getId();
         } else {
             $css->generateCSS($this->getId());
         }
     }
 }
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:101,代码来源:slider.php

示例10: fetchElement

    function fetchElement()
    {
        $css = NextendCss::getInstance();
        $css->addCssFile(NEXTEND_SMART_SLIDER2_ASSETS . 'admin/css/createquick.css');
        $css->addCssLibraryFile('element/textarea.css');
        $js = NextendJavascript::getInstance();
        $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.core.min.js');
        $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.widget.min.js');
        $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.mouse.min.js');
        $js->addLibraryJsLibraryFile('jquery', 'ui/jquery.ui.sortable.min.js');
        $this->_value = $this->_form->get($this->_name, $this->_default);
        $images = json_decode($this->_value, true);
        $html = '<div id="selected-images-container" class="">';
        if (nextendIsWordpress()) {
            add_filter('media_view_strings', 'custom_media_uploader_tabs', 5);
            function custom_media_uploader_tabs($strings)
            {
                $strings['insertMediaTitle'] = "Image";
                $strings['insertIntoPost'] = "Add to slider";
                // remove options
                if (isset($strings['createGalleryTitle'])) {
                    unset($strings['createGalleryTitle']);
                }
                if (isset($strings['insertFromUrlTitle'])) {
                    unset($strings['insertFromUrlTitle']);
                }
                return $strings;
            }
            wp_enqueue_style('editor');
            if (function_exists('wp_enqueue_media')) {
                wp_enqueue_media();
            } else {
                wp_enqueue_style('thickbox');
                wp_enqueue_script('media-upload');
                wp_enqueue_script('thickbox');
            }
            $html .= '<a title="Add Image" data-editor="content" class="button add-image" href="#">
              <span class="wp-media-buttons-icon"></span> Add Image
          </a>
          <div style="clear: both;"></div>';
        } else {
            if (nextendIsMagento()) {
                $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'extjs/ext-tree.js"></script>';
                $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'extjs/ext-tree-checkbox.js"></script>';
                $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'extjs/fix-defer.js"></script>';
                $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'mage/adminhtml/variables.js"></script>';
                $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'mage/adminhtml/wysiwyg/widget.js"></script>';
                $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'lib/flex.js"></script>';
                $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'lib/FABridge.js"></script>';
                $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'mage/adminhtml/flexuploader.js"></script>';
                $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'mage/adminhtml/browser.js"></script>';
                $html .= '<script type="text/javascript" src="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'prototype/window.js"></script>';
                $html .= '<link rel="stylesheet" type="text/css" href="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'prototype/windows/themes/default.css" media="screen"/>';
                $html .= '<link rel="stylesheet" type="text/css" href="' . Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . 'adminhtml/default/default/lib/prototype/windows/themes/magento.css" media="screen"/>';
                $html .= '<a title="Add Image" data-editor="content" class="button add-image" href="#">
                <span class="wp-media-buttons-icon"></span> Add Image
            </a>
            <input type="hidden" id="magentohidden" />
            <div style="clear: both;"></div>';
            }
        }
        $html .= '<div id="delete-image"></div>
                <ul id="selected-images">';
        if (is_array($images)) {
            $i = 0;
            foreach ($images as $img) {
                $html .= '<li>';
                $html .= '<img src="' . NextendUri::fixrelative($img['image']) . '" data-src="' . $img['image'] . '" /><div class="field-container">';
                $html .= '
<div class="nextend-mixed-group">
  <div class="nextend-mixed-label">
    <label for="title' . $i . '" id="title' . $i . '-lbl">Title</label>
  </div>
  <div class="nextend-mixed-element">
    <div class="nextend-text ">
      <input type="text" autocomplete="off" style="width:390px;" value="' . $img['title'] . '" name="" id="title' . $i . '">
    </div>
  </div>
</div>';
                $html .= '
<div class="nextend-mixed-group" style="clear: both;">
  <div class="nextend-mixed-label">
    <label for="link' . $i . '" id="link' . $i . '-lbl">Link</label>
  </div>
  <div class="nextend-mixed-element">
    <div class="nextend-text">
      <input type="text" autocomplete="off" style="width:390px;" value="' . $img['url'] . '" name="" id="link' . $i . '">
    </div>
  </div>
</div>';
                $html .= '
<div class="nextend-mixed-group" style="clear: both;">
  <div class="nextend-mixed-label">
    <label for="description' . $i . '" id="description' . $i . '-lbl">Description</label>
  </div>
  <div class="nextend-mixed-element">
    <div class="nextend-textarea ">
      <textarea autocomplete="off" style="width:400px; height: 40px;" name="" id="description' . $i . '">' . $img['description'] . '</textarea>
    </div>
  </div>
//.........这里部分代码省略.........
开发者ID:pguilford,项目名称:vcomcc,代码行数:101,代码来源:imageselector.php

示例11: Copyright

# author Roland Soos
# copyright Copyright (C) Nextendweb.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-3.0.txt GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
$js = NextendJavascript::getInstance();
$accessSliderCreate = $this->canDo('slider.create');
$accessSliderEdit = $this->canDo('slider.edit');
$accessSliderDelete = $this->canDo('slider.delete');
$accessSlideCreate = $this->canDo('slide.create');
$accessSlideEdit = $this->canDo('slide.edit');
$accessSlideDelete = $this->canDo('slide.delete');
$accessCore = $this->canDo('core.admin');
$isJ = nextendIsJoomla();
$isWP = nextendIsWordPress();
$isMage = nextendIsMagento();
$j15 = !$isJ || version_compare(JVERSION, '1.6.0', 'ge') ? false : true;
?>

<div class="smartslider-button-wrap">
<?php 
$slidersModel = $this->getModel('sliders');
$sliderid = NextendRequest::getInt('sliderid');
if (NextendRequest::getCmd('action', '') == '' || NextendRequest::getCmd('view', 'sliders_slider') == 'sliders_slider' && NextendRequest::getCmd('action', 'create') == 'create') {
    $sliders = $slidersModel->getSliders();
    if ($accessSliderCreate) {
        ?>
            <div class="smartslider-button smartslider-import smartslider-button-grey smartslider-button-blue-active smartslider-icon-container <?php 
        echo NextendRequest::getCmd('view') == 'sliders_slider' && NextendRequest::getCmd('action') == 'import' ? 'active' : '';
        ?>
">
开发者ID:pguilford,项目名称:vcomcc,代码行数:31,代码来源:sliders.php


注:本文中的nextendIsMagento函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。