Example #1
0
 function render($xmlpath, $data)
 {
     $css = NextendCss::getInstance();
     $js = NextendJavascript::getInstance();
     $css->addCssLibraryFile('common.css');
     $css->addCssLibraryFile('window.css');
     $css->addCssLibraryFile('configurator.css');
     $js->loadLibrary('dojo');
     nextendimport('nextend.form.form');
     $form = new NextendForm();
     $form->loadArray($data);
     $form->loadXMLFile($xmlpath);
     echo $form->render('settings');
     $js->addLibraryJsAssetsFile('dojo', 'form.js');
     $js->addLibraryJs('dojo', '
         new NextendForm({
           container: "smartslider-form",
           data: ' . json_encode($form->_data) . ',
           xml: "' . NextendFilesystem::toLinux(NextendFilesystem::pathToRelativePath($xmlpath)) . '",
           control_name: "settings",
           url: "' . NextendUri::ajaxUri('nextend', 'smartslider') . '",
           loadedJSS: ' . json_encode($js->generateArrayJs()) . ',
           loadedCSS: ' . json_encode($css->generateArrayCSS()) . '
         });
     ', true);
 }
Example #2
0
 function loadWordpressList()
 {
     nextendimport('nextend.plugin.plugin');
     require_once NEXTEND_ACCORDION_MENU . 'types' . DIRECTORY_SEPARATOR . 'loadplugin.php';
     $this->_list = array();
     NextendPlugin::callPlugin('nextendmenu', 'onNextendMenuList', array(&$this->_list));
 }
 function nextend_smart_slider2_load()
 {
     if (!defined('NEXTENDLIBRARY') && file_exists(dirname(__FILE__) . '/nextend/wp-library.php')) {
         require_once dirname(__FILE__) . '/nextend/wp-library.php';
     }
     if (defined('NEXTENDLIBRARY')) {
         add_action('wp_enqueue_scripts', 'nextend_ss2_jquery');
         if (is_admin()) {
             require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'admin.php';
         }
         require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'shortcode.php';
         require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'widget.php';
         if (!function_exists('nextend_plugin_api_call')) {
             nextendimport('nextend.wordpress.pluginupdatechecker');
             $updateChecker = new PluginUpdateChecker('http://www.nextendweb.com/update2/wordpress/index.php?action=get_metadata&slug=nextend-smart-slider2-full&api-key=' . get_option('nextend_smart_slider2_license', ''), __FILE__);
         } else {
             function nextend_smart_slider_plugin_notice()
             {
                 ?>
                 <div class="error">
                     <p>Please update the Nextend plugin to the latest version!</p>
                 </div>
                 <?php 
             }
             add_action('admin_notices', 'nextend_smart_slider_plugin_notice');
         }
     }
     require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tinymce' . DIRECTORY_SEPARATOR . 'shortcode.php';
 }
Example #4
0
 function onInitNextendLibrary()
 {
     nextendimport('nextend.data.data');
     $this->_data = new NextendData();
     $config = $this->params->toArray();
     if (!isset($config['config'])) {
         $config['config'] = array();
     }
     $this->_data->loadArray(version_compare(JVERSION, '1.6.0', 'l') ? $config : $config['config']);
     $cachetime = $this->_data->get('cachetime', 900);
     if ($cachetime != 0) {
         setNextend('cachetime', $cachetime);
     }
     $cachepath = '/' . trim($this->_data->get('cachepath', '/media/nextend/cache/'), '/') . '/';
     if ($cachepath != '') {
         $cachepath = rtrim(JPATH_SITE, DIRECTORY_SEPARATOR) . str_replace('/', DIRECTORY_SEPARATOR, $cachepath);
         setNextend('cachepath', $cachepath);
     }
     setNextend('gzip', $this->_data->get('gzip', 0));
     setNextend('debuglng', $this->_data->get('debuglng', 0));
     if (isset($_GET['nextendclearcache'])) {
         $app = JFactory::getApplication();
         if ($app->isAdmin()) {
             nextendimport('nextend.uri.uri');
             nextendimport('nextend.filesystem.filesystem');
             nextendimport('nextend.cache.cache');
             $cache = new NextendCache();
             $cache->deleteCacheFolder();
         }
     }
 }
Example #5
0
 function initConfig()
 {
     parent::initConfig();
     $this->loadposition = $this->_data->get('loadposition', 0);
     if ($this->loadposition) {
         nextendimport('nextend.accordionmenu.joomla.loadmodule');
     }
 }
Example #6
0
 function getData($number)
 {
     require_once JPATH_ADMINISTRATOR . '/components/com_igallery/defines.php';
     nextendimport('nextend.database.database');
     $db = NextendDatabase::getInstance();
     $data = array();
     $category = array_map('intval', explode('||', $this->_data->get('ignitegallerysourcecategory', '')));
     $query = 'SELECT ';
     $query .= 'con.id, ';
     $query .= 'con.filename, ';
     $query .= 'con.description, ';
     $query .= 'con.alt_text, ';
     $query .= 'con.link, ';
     $query .= 'con.hits, ';
     $query .= 'con.rotation, ';
     $query .= 'con.gallery_id, ';
     $query .= 'cat.name AS cat_title, ';
     $query .= 'cat.alias AS cat_alias ';
     $query .= 'FROM #__igallery_img AS con ';
     $query .= 'LEFT JOIN #__igallery AS cat ON cat.id = con.gallery_id ';
     $where = array();
     if (count($category) > 0 && !in_array('0', $category)) {
         $where[] = 'con.gallery_id IN (' . implode(',', $category) . ') ';
     }
     if ($this->_data->get('ignitegallerysourcepublished', 1)) {
         $where[] = 'con.published = 1 ';
     }
     if (count($where)) {
         $query .= ' WHERE ' . implode(' AND ', $where);
     }
     $order = NextendParse::parse($this->_data->get('ignitegalleryorder1', 'con.ordering|*|asc'));
     if ($order[0]) {
         $query .= 'ORDER BY ' . $order[0] . ' ' . $order[1] . ' ';
         $order = NextendParse::parse($this->_data->get('ignitegalleryorder2', 'con.ordering|*|asc'));
         if ($order[0]) {
             $query .= ', ' . $order[0] . ' ' . $order[1] . ' ';
         }
     }
     $query .= 'LIMIT 0, ' . $number . ' ';
     $db->setQuery($query);
     $result = $db->loadAssocList();
     for ($i = 0; $i < count($result); $i++) {
         $fileHashNoExt = JFile::stripExt($result[$i]['filename']);
         $fileHashNoRef = substr($fileHashNoExt, 0, strrpos($fileHashNoExt, '-'));
         $result[$i]['url'] = 'index.php?option=com_igallery&view=category&igid=' . $result[$i]['gallery_id'] . '#!' . $fileHashNoRef;
         $result[$i]['categoryurl'] = 'index.php?option=com_igallery&view=category&igid=' . $result[$i]['gallery_id'];
         $increment = igFileHelper::getIncrementFromFilename($result[$i]['filename']);
         $folderName = igFileHelper::getFolderName($increment);
         $sourceFile = IG_ORIG_PATH . '/' . $folderName . '/' . $result[$i]['filename'];
         $size = getimagesize($sourceFile);
         $fileArray = igFileHelper::originalToResized($result[$i]['filename'], $size[0], $size[1], 100, 0, $result[$i]['rotation'], 0, 0);
         $result[$i]['thumbnail'] = $result[$i]['image'] = IG_IMAGE_HTML_RESIZE . $fileArray['folderName'] . '/' . $fileArray['fullFileName'];
         $result[$i]['title'] = $result[$i]['alt_text'];
         $result[$i]['author_name'] = '';
         $result[$i]['author_url'] = '#';
     }
     return $result;
 }
Example #7
0
 function enableLess($group = null)
 {
     nextendimport('nextend.cache.less');
     if (!$group) {
         $this->_lesscache = new NextendCacheLess();
     } else {
         $this->_lesscacheGroup[$group] = new NextendCacheLess();
     }
 }
Example #8
0
 function generateFonts()
 {
     $file = $this->getFontUrl();
     if ($file) {
         nextendimport('nextend.css.css');
         $css = NextendCss::getInstance();
         $css->addCssFile($this->getFontUrl());
     }
 }
Example #9
0
 function fetchElement()
 {
     $css = NextendCss::getInstance();
     $css->addCssLibraryFile('element/mixed.css');
     $js = NextendJavascript::getInstance();
     $js->addLibraryJsAssetsFile('dojo', 'element.js');
     $js->addLibraryJsAssetsFile('dojo', 'element/mixed.js');
     $this->_translateable = NextendXmlGetAttribute($this->_xml, 'translateable');
     $this->_translateable = $this->_translateable === '0' ? false : true;
     $default = explode($this->_separator, $this->_default);
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $value = explode($this->_separator, $this->_value);
     $value = $value + $default;
     $html = "<div class='nextend-mixed' style='" . NextendXmlGetAttribute($this->_xml, 'style') . "'>";
     $this->_elements = array();
     $i = 0;
     foreach ($this->_xml->param as $element) {
         $html .= "<div class='nextend-mixed-group' style='" . NextendXmlGetAttribute($element, 'mixedstyle') . "'>";
         $type = NextendXmlGetAttribute($element, 'type');
         $class = 'NextendElement' . $type;
         if (!class_exists($class, false)) {
             if (!nextendimportpath($this->_form->_xmlfolder . 'element/' . $type)) {
                 nextendimport('nextend.form.element.' . $type);
             }
         }
         $element->addAttribute('name', $this->_name . '_' . $i);
         $element->addAttribute('hidename', 1);
         if (isset($value[$i])) {
             $element->addAttribute('default', $value[$i]);
         }
         $el = new $class($this->_form, $this, $element);
         $el->parent =& $this;
         $elementHtml = $el->render($this->_name . $this->control_name, $this->_translateable);
         $html .= "<div class='nextend-mixed-label'>";
         $html .= $elementHtml[0];
         $html .= "</div>";
         $html .= "<div class='nextend-mixed-element'>";
         $html .= $elementHtml[1];
         $html .= "</div>";
         $this->_elements[$i] = $el->_id;
         $i++;
         $html .= "</div>";
     }
     $this->_form->set($this->_name, $this->_value);
     $hidden = new NextendElementHidden($this->_form, $this->_tab, $this->_xml);
     $hiddenhtml = $hidden->render($this->control_name, false);
     $html .= $hiddenhtml[1];
     $html .= "</div>";
     $js->addLibraryJs('dojo', '
         new NextendElementMixed({
           hidden: "' . $this->_id . '",
           elements: ' . json_encode($this->_elements) . ',
           separator: "' . $this->_separator . '"
         });
     ');
     return $html;
 }
Example #10
0
 function loadLibrary($library)
 {
     if (!isset($this->_loadedLibraries[$library])) {
         nextendimport('nextend.javascript.' . $library . '.' . $library);
         $class = 'NextendJavascript' . $library;
         $class = new $class();
         $this->_loadedLibraries[$library] = $class->getInstance();
     }
 }
 function render()
 {
     if ($this->_form) {
         return;
     }
     $html = '';
     $css = NextendCss::getInstance();
     $css->addCssLibraryFile('fontmanager.css');
     $js = NextendJavascript::getInstance();
     nextendimport('nextend.form.form');
     $form = new NextendForm();
     $form->loadXMLFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'fontmanager' . DIRECTORY_SEPARATOR . 'form.xml');
     $this->_form =& $form;
     $js->addLibraryJsLibraryFile('dojo', 'dojo/window.js');
     $js->addLibraryJsAssetsFile('dojo', 'window.js');
     $js->addLibraryJsAssetsFile('dojo', 'element.js');
     $js->addLibraryJsAssetsFile('dojo', 'fontmanager.js');
     $id = 'nextend-fontmanager-lightbox-' . md5(time());
     $html .= '<div id="' . $id . '" class="gk_hack nextend-window ' . $this->_currentform->get('class', isset($_REQUEST['view']) && $_REQUEST['view'] == 'sliders_settings' ? 'smartslider' : '') . '">';
     $html .= '<div class="gk_hack nextend-window-container">';
     $html .= '<div class="gk_hack nextend-topbar"><div class="gk_hack nextend-topbar-logo"></div>';
     $manual = $this->_currentform->get('manual');
     if ($manual != "") {
         $html .= '<a href="' . $manual . '" target="_blank" class="gk_hack nextend-topbar-button nextend-topbar-manual">' . NextendText::_('Manual') . '</a>';
     }
     $support = $this->_currentform->get('support');
     if ($support != "") {
         $html .= '<a href="' . $support . '" target="_blank" class="gk_hack nextend-topbar-button nextend-topbar-support">' . NextendText::_('Support') . '</a>';
     }
     $html .= '<div id="nextend-fontmanager-save" class="nextend-window-save"><div class="NextendWindowSave">' . NextendText::_('APPLY') . '</div></div>';
     $html .= '</div>';
     $html .= '<div class="gk_hack nextend-window-container-inner">';
     $html .= '<fieldset id="nextend-fontmanager-panels" class="gk_hack panelform">';
     $html .= '<div id="nextend-fontmanager-tabs" class="gk_hack"></div>';
     $html .= '<div id="nextend-fontmanager-panel" class="gk_hack pane-sliders">';
     $html .= '<h3>' . NextendText::_('FONTMANAGER_Font_manager') . '</h3>';
     ob_start();
     //echo '<form method="post" name="nextend-fontmanager" id="nextend-fontmanager" action="" onsubmit="return false;">';
     $form->render('fontmanager');
     //echo '</form>';
     $html .= ob_get_clean();
     $html .= '</div>';
     $html .= '<p id="nextend-fontmanager-preview" style="background-color: #d0d0d0;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>';
     $html .= '<div class="fontcolorpickerinput"><div><input id="nextend-fontmanager-backgroundcolor" value="#d0d0d0" name="nextend-fontmanager-backgroundcolor" /></div></div>';
     $html .= '<div id="nextend-fontmanager-cleartab" style="float:right;">' . NextendText::_('FONTMANAGER_Clear_this_tab') . '</div>';
     $html .= '</fieldset>';
     $html .= '</div>';
     $html .= '</div>';
     $html .= '</div>';
     $js->addLibraryJs('dojo', '
         new NextendFontmanager({
           node: "' . $id . '"
         });
     ');
     return $html;
 }
Example #12
0
File: tab.php Project: 01J/bealtine
 function initElements()
 {
     $this->_elements = array();
     foreach ($this->_xml->param as $element) {
         $type = NextendXmlGetAttribute($element, 'type');
         $name = NextendXmlGetAttribute($element, 'name');
         nextendimport('nextend.form.element.' . $type);
         $class = 'NextendElement' . ucfirst($type);
         $this->_elements[$name] = new $class($this->_form, $this, $element);
     }
 }
Example #13
0
 function getData($number)
 {
     nextendimport('nextend.database.database');
     $db = NextendDatabase::getInstance();
     require_once JPATH_ADMINISTRATOR . '/components/com_redshop/helpers/redshop.cfg.php';
     require_once JPATH_ADMINISTRATOR . '/components/com_redshop/helpers/configuration.php';
     require_once JPATH_ADMINISTRATOR . '/components/com_redshop/helpers/template.php';
     require_once JPATH_ADMINISTRATOR . '/components/com_redshop/helpers/stockroom.php';
     require_once JPATH_ADMINISTRATOR . '/components/com_redshop/helpers/economic.php';
     require_once JPATH_SITE . '/components/com_redshop/helpers/product.php';
     $Redconfiguration = new Redconfiguration();
     $data = array();
     $where = array();
     $category = array_map('intval', explode('||', $this->_data->get('redshopproductssourcecategory', '')));
     if (!in_array(0, $category) && count($category) > 0) {
         $where[] = 'pr_cat.category_id IN (' . implode(',', $category) . ') ';
     }
     if ($this->_data->get('redshopproductssourcepublished', 1)) {
         $where[] = ' pr.published = 1 ';
     }
     if ($this->_data->get('redshopproductssourcespecial', 0)) {
         $where[] = ' (pr.product_special =  1) ';
     }
     if ($this->_data->get('redshopproductssourceonsale', 0)) {
         $where[] = ' (pr.product_on_sale =  1) ';
     }
     $o = '';
     $order = NextendParse::parse($this->_data->get('redshopproductsorder1', 'pr.product_name|*|asc'));
     if ($order[0]) {
         $o .= 'ORDER BY ' . $order[0] . ' ' . $order[1] . ' ';
         $order = NextendParse::parse($this->_data->get('redshopproductsorder2', 'pr.product_name|*|asc'));
         if ($order[0]) {
             $o .= ', ' . $order[0] . ' ' . $order[1] . ' ';
         }
     }
     $query = "SELECT \r\n                        pr.product_id, \r\n                        pr.published, \r\n                        pr_cat.ordering, \r\n                        pr.product_name as name, \r\n                        pr.product_s_desc as short_description, \r\n                        pr.product_desc as description, \r\n                        man.manufacturer_name as man_name,\r\n                        pr.product_full_image as image, \r\n                        pr.product_thumb_image as image_thumbnail, \r\n                        pr.product_price,\r\n                        cat.category_id,\r\n                        cat.category_name, \r\n                        cat.category_short_description , \r\n                        cat.category_description\r\n                    FROM `#__redshop_product` AS pr\r\n                    LEFT JOIN `#__redshop_product_category_xref` AS pr_cat USING (product_id)\r\n                    LEFT JOIN `#__redshop_category` AS cat USING (category_id)\r\n                    LEFT JOIN `#__redshop_manufacturer` AS man USING(manufacturer_id)\r\n                    WHERE pr.product_parent_id=0 " . (count($where) ? ' AND ' . implode(' AND ', $where) : '') . " " . $o . " LIMIT 0, " . $number;
     $db->setQuery($query);
     $result = $db->loadAssocList();
     $uri = str_replace(array('http://', 'https://'), '//', NextendUri::getBaseUri());
     for ($i = 0; $i < count($result); $i++) {
         $product = new producthelper();
         $result[$i]['title'] = $result[$i]['name'];
         $result[$i]['price'] = $product->getProductFormattedPrice($product->getProductPrice($result[$i]['product_id']));
         $result[$i]['addtocart'] = $result[$i]['url'] = 'index.php?option=com_redshop&view=product&pid=' . $result[$i]['product_id'] . '&cid=' . $result[$i]['category_id'];
         $result[$i]['addtocart_label'] = 'View product';
         $result[$i]['category_url'] = 'index.php?option=com_redshop&view=category&cid=' . $result[$i]['category_id'] . '&layout=detail';
         $result[$i]['thumbnail'] = $result[$i]['image_thumbnail'] = $uri . REDSHOP_FRONT_IMAGES_ABSPATH . "product/" . $result[$i]['image_thumbnail'];
         $result[$i]['image'] = $uri . REDSHOP_FRONT_IMAGES_ABSPATH . "product/" . $result[$i]['image'];
     }
     return $result;
 }
Example #14
0
 function initTabs()
 {
     if (count($this->_tabs) == 0 && $this->_xml->params && count($this->_xml->params)) {
         foreach ($this->_xml->params as $tab) {
             $type = NextendXmlGetAttribute($tab, 'type');
             if ($type == '') {
                 $type = 'default';
             }
             nextendimport('nextend.form.tabs.' . $type);
             $class = 'NextendTab' . ucfirst($type);
             $this->_tabs[NextendXmlGetAttribute($tab, 'name')] = new $class($this, $tab);
         }
     }
 }
Example #15
0
 function renderForm($data = array())
 {
     $css = NextendCss::getInstance();
     $js = NextendJavascript::getInstance();
     $css->addCssLibraryFile('common.css');
     $css->addCssLibraryFile('window.css');
     $css->addCssLibraryFile('configurator.css');
     $configurationXmlFile = dirname(__FILE__) . '/forms/layer.xml';
     $js->loadLibrary('dojo');
     nextendimport('nextend.form.form');
     $form = new NextendForm();
     $form->loadArray($data);
     $form->loadXMLFile($configurationXmlFile);
     echo $form->render('layer');
 }
Example #16
0
 function initElements()
 {
     parent::initElements();
     foreach ($this->_form->_data as $k => $v) {
         preg_match('/sliderfontcustom([0-9]*)$/', $k, $matches);
         if (count($matches)) {
             nextendimport('nextend.form.element.fontmanager');
             $element = new SimpleXMLElement('<param type="fontmanager" base64="1" label="" name="' . $matches[0] . '" tabs="Text|Link|Link:Hover" />');
             $font = new NextendElementFontmanager($this->_form, $this, $element);
             $font->_editableName = true;
             $this->_elements[$matches[0]] = $font;
             if ($this->biggestindex < $matches[1]) {
                 $this->biggestindex = intval($matches[1]);
             }
         }
     }
 }
Example #17
0
 function editForm($data = array())
 {
     $css = NextendCss::getInstance();
     $js = NextendJavascript::getInstance();
     $css->addCssLibraryFile('common.css');
     $css->addCssLibraryFile('window.css');
     $css->addCssLibraryFile('configurator.css');
     $configurationXmlFile = dirname(__FILE__) . '/forms/slide.xml';
     $js->loadLibrary('dojo');
     nextendimport('nextend.form.form');
     $form = new NextendForm();
     $data['publishdates'] = isset($data['publishdates']) ? $data['publishdates'] : (isset($data['publish_up']) ? $data['publish_up'] : '') . '|*|' . (isset($data['publish_down']) ? $data['publish_down'] : '');
     $form->loadArray($data);
     $form->loadXMLFile($configurationXmlFile);
     $form->devicespecificimages = NextendSmartSliderSettings::get('devicespecificimages', 0);
     echo $form->render('slide');
 }
Example #18
0
 function NextendSliderJoomla(&$module, &$params, $path, $backend = false)
 {
     parent::NextendSlider($path, $backend);
     $sliderid = 0;
     if (is_numeric($params)) {
         $this->_module = new stdClass();
         $sliderid = $params;
         $this->_module->id = $sliderid;
     } else {
         $this->_data = new NextendData();
         $config = $params->toArray();
         $this->_data->loadArray(version_compare(JVERSION, '1.6.0', 'l') || !isset($config['config']) ? $config : $config['config']);
         nextendimport('nextend.externals.mobiledetect');
         $detect = new Mobile_Detect();
         $tablet = $detect->isTablet();
         $mobile = !$tablet && $detect->isMobile();
         if (intval($this->_data->get('showmobile', 1)) == 0) {
             if ($mobile) {
                 $this->_norender = true;
                 return;
             }
         }
         $custommobile = NextendParse::parse($this->_data->get('showcustommobile', '0|*|'));
         if ($custommobile[0] == 1) {
             if ($mobile) {
                 $this->_data->set('slider', $custommobile[1]);
             }
         }
         if (intval($this->_data->get('showtablet', 1)) == 0) {
             if ($tablet) {
                 $this->_norender = true;
                 return;
             }
         }
         $customtablet = NextendParse::parse($this->_data->get('showcustomtablet', '0|*|'));
         if ($customtablet[0] == 1) {
             if ($tablet) {
                 $this->_data->set('slider', $customtablet[1]);
             }
         }
         $this->_module = $module;
         $sliderid = $this->_data->get('slider');
     }
     $this->_sliderid = $sliderid;
 }
Example #19
0
 function renderForm($type, $item, $data = array())
 {
     $css = NextendCss::getInstance();
     $js = NextendJavascript::getInstance();
     $js->addLibraryJsFile('jquery', NEXTEND_SMART_SLIDER2_ASSETS . 'admin/js/itemparser.js');
     $js->addLibraryJsFile('jquery', $item[4] . 'parser.js');
     $css->addCssLibraryFile('common.css');
     $css->addCssLibraryFile('window.css');
     $css->addCssLibraryFile('configurator.css');
     $configurationXmlFile = $item[4] . 'configuration.xml';
     $js->loadLibrary('dojo');
     nextendimport('nextend.form.form');
     $form = new NextendForm();
     $form->loadArray($data);
     $form->loadXMLFile($configurationXmlFile);
     $form->devicespecificimages = NextendSmartSliderSettings::get('devicespecificimages', 0);
     echo $form->render('item_' . $type);
 }
Example #20
0
 function initElements()
 {
     $this->_elements = array();
     foreach ($this->_xml->param as $element) {
         $test = NextendXmlGetAttribute($element, 'test');
         if (!empty($test) && (!isset($this->_form->{$test}) || !$this->_form->{$test})) {
             continue;
         }
         $type = NextendXmlGetAttribute($element, 'type');
         $name = NextendXmlGetAttribute($element, 'name');
         $class = 'NextendElement' . $type;
         if (!class_exists($class, false)) {
             if (!nextendimportpath($this->_form->_xmlfolder . 'element/' . $type)) {
                 nextendimport('nextend.form.element.' . $type);
             }
         }
         $this->_elements[$name] = new $class($this->_form, $this, $element);
     }
 }
function smart_slider2_shortcode($atts)
{
    extract(shortcode_atts(array('id' => md5(time()), 'slider' => 0, 'tablet' => -1, 'phone' => -1), $atts));
    $loadCheck = false;
    if ($tablet >= 0 || $phone >= 0) {
        $loadCheck = true;
    }
    if ($loadCheck) {
        nextendimport('nextend.externals.mobiledetect');
        $detect = new Mobile_Detect();
        $istablet = $detect->isTablet();
        $ismobile = !$istablet && $detect->isMobile();
        if ($istablet) {
            if ($tablet == 0) {
                return '';
            }
            if ($tablet > 0) {
                $slider = intval($tablet);
            }
        }
        if ($ismobile) {
            if ($phone == 0) {
                return '';
            }
            if ($phone > 0) {
                $slider = intval($phone);
            }
        }
    }
    if ($slider == 0) {
        return '';
    }
    $params = array();
    nextendimportsmartslider2('nextend.smartslider.slidercache');
    nextendimportsmartslider2('nextend.smartslider.wordpress.slider');
    ob_start();
    new NextendSliderCache(new NextendSliderWordpress(intval($slider), $params, dirname(__FILE__)));
    return ob_get_clean();
}
Example #22
0
 function subform()
 {
     $response = array();
     if (!isset($_POST['data'])) {
         echo json_encode(array('error' => 'Post not OK!'));
         exit;
     }
     if (get_magic_quotes_gpc() || nextendIsWordPress()) {
         $_POST['data'] = stripslashes($_POST['data']);
     }
     $data = json_decode($_POST['data'], true);
     $configurationXmlFile = rtrim(NextendFilesystem::getBasePath(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $data['xml'];
     if (NextendFilesystem::fileexists($configurationXmlFile)) {
         nextendimport('nextend.css.css');
         nextendimport('nextend.javascript.javascript');
         $css = NextendCSS::getInstance();
         $js = NextendJavascript::getInstance();
         $js->loadLibrary('dojo');
         nextendimport('nextend.form.form');
         $form = new NextendForm();
         $form->loadArray($data['orig']);
         $form->loadArray(array($data['name'] => $data['value']));
         $form->loadXMLFile($configurationXmlFile);
         ob_start();
         $subform = $form->getSubform($data['tab'], $data['name']);
         $subform->initAjax($data['control_name']);
         echo $subform->renderForm();
         echo "<style>";
         echo $css->generateAjaxCSS($data['loadedCSS']);
         echo "</style>";
         $scripts = $js->generateAjaxJs($data['loadedJSS']);
         $html = ob_get_clean();
         $response = array('html' => $html, 'scripts' => $scripts);
     } else {
         $response = array('error' => 'Configuration file not found');
     }
     echo json_encode($response);
     exit;
 }
Example #23
0
 function createAction()
 {
     if ($this->canDo('layout.create')) {
         if (NextendRequest::getInt('save')) {
             $layoutsModel = $this->getModel('layouts');
             if ($layoutid = $layoutsModel->create(NextendRequest::getVar('layout'))) {
                 if (NextendRequest::getVar('ajax')) {
                     nextendimport('nextend.parse.parse');
                     nextendimportsmartslider2('nextend.smartslider.items');
                     $items = new NextendSliderItems('nextend-smart-slider-0', true);
                     NextendSliderItems::$i['nextend-smart-slider-0'] = time();
                     $layout = $layoutsModel->getLayout($layoutid);
                     echo $items->render($layout['slide']);
                     exit;
                 }
                 header('LOCATION: ' . $this->route('controller=layouts&view=sliders_layouts&action=edit&layoutid=' . $layoutid));
                 exit;
             }
         }
         $this->display('edit', 'create');
     } else {
         $this->noaccess();
     }
 }
 function NextendSmartsliderAdminController($key)
 {
     global $smartslidercontroller;
     $smartslidercontroller = $this;
     parent::NextendController($key);
     if (!$this->canDo('core.manage')) {
         $this->access = 0;
         $this->message(NextendText::_('Access not allowed to this resource.'));
         return;
     }
     nextendimport('nextend.css.css');
     $css = NextendCss::getInstance();
     $css->addCssLibraryFile('ni.css');
     $this->_baseControllerPath = dirname(__FILE__);
     $this->_routeMap = array('sliders' => array('sliders_slider' => array('default', 'create', 'edit', 'full'), 'sliders_generator' => array('default', 'edit')), 'slides' => array('sliders_slides' => array('default', 'create', 'edit', 'order')), 'layouts' => array('sliders_layouts' => array('default', 'create', 'edit')), 'settings' => array('sliders_settings' => array('default', 'layout', 'font')), 'help' => array('sliders_help' => array('default')));
     $this->init();
     if (nextendIsJoomla()) {
         $this->_router->_baseurl = 'index.php?option=com_smartslider2';
     } else {
         if (nextendIsWordpress()) {
             $this->_router->_baseurl = 'admin.php?page=nextend-smart-slider2';
         }
     }
 }
Example #25
0
File: uri.php Project: 01J/bealtine
    {
        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');
}
Example #26
0
<?php

class NextendAclAbstract
{
    function authorise($array)
    {
        return true;
    }
}
if (nextendIsJoomla()) {
    nextendimport('nextend.acl.joomla');
} else {
    nextendimport('nextend.acl.default');
}
Example #27
0
<?php

nextendimport('nextend.plugin.plugin');
class plgNextendMenuWordpress
{
    var $_name = 'wordpress';
    function onNextendMenuList(&$list)
    {
        $list[$this->_name] = $this->getPath();
    }
    function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wordpress' . DIRECTORY_SEPARATOR;
    }
}
NextendPlugin::addPlugin('nextendmenu', 'plgNextendMenuWordpress');
<?php

nextendimport('nextend.form.element.fontmanager');
nextendimport('nextend.form.element.hidden');
class NextendElementFontmanagerWithLabel extends NextendElementFontmanager
{
    function fetchElement()
    {
        $element = new SimpleXMLElement('<param type="hidden" label="' . NextendText::_($this->_label) . '" default="' . NextendText::_($this->_label) . '" name="' . $this->_name . 'customlabel" />');
        $customlabel = new NextendElementHidden($this->_form, $this, $element);
        $h = $customlabel->render($this->control_name, false);
        return $h[1] . parent::fetchElement();
    }
}
Example #29
0
<?php

nextendimport('nextend.form.tab');
class NextendTabRaw extends NextendTab
{
    function decorateGroupStart()
    {
    }
    function decorateGroupEnd()
    {
        echo "</div>";
    }
    function decorateElement(&$el, $out, $i)
    {
        echo $out[1];
    }
}
Example #30
0
<?php

nextendimport('nextend.cache.cache');
class NextendCacheCss extends NextendCache
{
    function __construct()
    {
        $this->_subfolder = 'css' . DIRECTORY_SEPARATOR;
        parent::__construct();
        $this->_filetype = 'css';
        $this->_gzip = getNextend('gzip', 0);
    }
    function parseFile($content, $path, $i)
    {
        $this->path = $path;
        return preg_replace_callback('#url\\([\'"]([^"\'\\)]+)[\'"]\\)#', array($this, 'makeUrl'), $content);
    }
    function makeUrl($matches)
    {
        if (substr($matches[1], 0, 5) == 'data:') {
            return $matches[0];
        }
        if (substr($matches[1], 0, 4) == 'http') {
            return $matches[0];
        }
        if (substr($matches[1], 0, 2) == '//') {
            return $matches[0];
        }
        return 'url(' . str_replace(array('http://', 'https://'), '//', NextendFilesystem::pathToAbsoluteURL(dirname($this->path))) . '/' . $matches[1] . ')';
    }
    function parseCached($cached)