Esempio n. 1
0
 function fetchElement()
 {
     $db = JFactory::getDBO();
     $lang = JFactory::getLanguage()->getTag();
     $query = "SELECT m.category_id AS id, `name_{$lang}` AS title, `name_{$lang}` AS name, m.category_parent_id AS parent_id, m.category_parent_id as parent\r\n              FROM #__jshopping_categories AS m\r\n              LEFT JOIN #__jshopping_products_to_categories AS f\r\n              ON m.category_id = f.category_id\r\n              WHERE m.category_publish = 1\r\n              ORDER BY ordering";
     $db->setQuery($query);
     $menuItems = $db->loadObjectList();
     $children = array();
     if ($menuItems) {
         foreach ($menuItems as $v) {
             $pt = $v->parent_id;
             $list = isset($children[$pt]) ? $children[$pt] : array();
             array_push($list, $v);
             $children[$pt] = $list;
         }
     }
     jimport('joomla.html.html.menu');
     $options = JHTML::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0);
     $this->_xml->addChild('option', 'Root')->addAttribute('value', 0);
     $optgroup = $this->_xml->addChild('optgroup', '');
     $optgroup->addAttribute('label', 'Categories');
     if (count($options)) {
         foreach ($options as $option) {
             $optgroup->addChild('option', htmlspecialchars($option->treename))->addAttribute('value', $option->id);
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
Esempio n. 2
0
 function fetchElement()
 {
     $this->_xml->addChild('option', 'Please choose')->addAttribute('value', 0);
     ob_start();
     $api = getNextendFacebook();
     $list = array();
     if ($api) {
         try {
             $result = $api->api('/me/albums');
             if (count($result['data'])) {
                 foreach ($result['data'] as $album) {
                     $list[$album['id']] = $album['name'];
                 }
             }
         } catch (Exception $e) {
             $list = null;
         }
     }
     if ($list) {
         ob_end_clean();
         if (count($list)) {
             foreach ($list as $id => $name) {
                 $this->_xml->addChild('option', htmlentities($name))->addAttribute('value', $id);
             }
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     if (!$list) {
         $html .= ob_get_clean();
     }
     return $html;
 }
Esempio n. 3
0
 function fetchElement()
 {
     $db = JFactory::getDBO();
     $query = 'SELECT 
                 m.id, 
                 m.title AS name, 
                 m.title, 
                 m.parent_id AS parent, 
                 m.parent_id
             FROM #__categories m
             WHERE m.published = 1 AND (m.extension = "com_content" OR m.extension = "system")
             ORDER BY m.lft';
     $db->setQuery($query);
     $menuItems = $db->loadObjectList();
     $children = array();
     if ($menuItems) {
         foreach ($menuItems as $v) {
             $pt = $v->parent_id;
             $list = isset($children[$pt]) ? $children[$pt] : array();
             array_push($list, $v);
             $children[$pt] = $list;
         }
     }
     jimport('joomla.html.html.menu');
     $options = JHTML::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0);
     if (count($options)) {
         foreach ($options as $option) {
             $this->_xml->addChild('option', $option->treename)->addAttribute('value', $option->id);
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
 function fetchElement()
 {
     $v = (array) NextendParse::parse($this->parent->_value);
     $_REQUEST['fbpage'] = $v[0];
     $this->_xml->addChild('option', 'Please choose')->addAttribute('value', 0);
     $js = NextendJavascript::getInstance();
     $js->addLibraryJsAssetsFile('dojo', 'element.js');
     $js->addLibraryJsFile('dojo', dirname(__FILE__) . '/facebookalbumsbypage.js');
     $js->addLibraryJs('dojo', '
         new NextendElementFacebookAlbumsbyPage({
             val: "' . $v[0] . '",
             hidden: "' . $this->parent->_id . '",
             listhidden: "' . $this->_id . '",
             group: "nextendslidergenerator",
             method: "onNextendFacebookPageAlbums"
         });
     ');
     ob_start();
     $list = null;
     NextendPlugin::callPlugin('nextendslidergenerator', 'onNextendFacebookPageAlbums', array(&$list));
     if ($list) {
         ob_end_clean();
         if (count($list)) {
             foreach ($list as $id => $name) {
                 $this->_xml->addChild('option', htmlentities($name))->addAttribute('value', $id);
             }
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     if (!$list) {
         $html .= ob_get_clean();
     }
     return $html;
 }
Esempio n. 5
0
 function fetchElement()
 {
     $css = NextendCss::getInstance();
     $css->addCssLibraryFile('element/subform.css');
     $html = "<div class='nextend-subform " . NextendXmlGetAttribute($this->_xml, 'class') . "' style='" . NextendXmlGetAttribute($this->_xml, 'style') . "'>";
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $options = $this->getOptions();
     $this->_form->set($this->_name, $this->_value);
     if (count($options) === 0) {
         return 'No sub form exists...';
     }
     if (!in_array($this->_form->get($this->_name), $options)) {
         $this->_form->set($this->_name, $options[0]);
         $this->_value = $this->_form->get($this->_name, $this->_default);
     }
     $this->setOptions($options);
     $html .= parent::fetchElement();
     $name = $this->_name;
     $js = NextendJavascript::getInstance();
     $js->addLibraryJsAssetsFile('dojo', 'element.js');
     $js->addLibraryJsAssetsFile('dojo', 'element/subform.js');
     $html .= $this->decorateBefore();
     $html .= $this->decorateAfter();
     $html .= '</div>';
     return $html;
 }
 function fetchElement()
 {
     $db = JFactory::getDBO();
     $query = 'SELECT m.category_id AS id, m.category_name AS name, m.category_name as title, m.category_parent_id AS parent,  m.category_parent_id as parent_id
           FROM #__hikashop_category m
           WHERE (m.category_published =1 AND m.category_type="product") OR (m.category_type="root" AND m.category_published =0)
           ORDER BY m.category_ordering';
     $db->setQuery($query);
     $menuItems = $db->loadObjectList();
     $children = array();
     if ($menuItems) {
         foreach ($menuItems as $v) {
             $pt = $v->parent_id;
             $list = isset($children[$pt]) ? $children[$pt] : array();
             array_push($list, $v);
             $children[$pt] = $list;
         }
     }
     jimport('joomla.html.html.menu');
     $options = JHTML::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0);
     if (count($options)) {
         foreach ($options as $option) {
             $this->_xml->addChild('option', htmlspecialchars($option->treename))->addAttribute('value', $option->id);
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
Esempio n. 7
0
 function fetchElement()
 {
     $db = JFactory::getDBO();
     $query = 'SELECT m.* FROM #__easyblog_category m WHERE published = 1 ORDER BY parent_id, ordering';
     $db->setQuery($query);
     $menuItems = $db->loadObjectList();
     $children = array();
     if ($menuItems) {
         foreach ($menuItems as $v) {
             $pt = $v->parent_id;
             $list = isset($children[$pt]) ? $children[$pt] : array();
             array_push($list, $v);
             $children[$pt] = $list;
         }
     }
     jimport('joomla.html.html.menu');
     $options = JHTML::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0);
     if (count($options)) {
         foreach ($options as $option) {
             $this->_xml->addChild('option', $option->treename)->addAttribute('value', $option->id);
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
Esempio n. 8
0
 function fetchElement()
 {
     $menu = explode('|*|', $this->parent->_value);
     $currentsection = $this->parent->sections[$menu[0]];
     $query = "SELECT DISTINCT \r\n            id, \r\n            title,\r\n            title AS name,\r\n            parent_id,\r\n            parent_id AS parent\r\n            FROM #__js_res_categories\r\n            WHERE section_id = " . intval($currentsection->id) . " AND published = 1\r\n            ORDER BY name ASC\r\n        ";
     $db = JFactory::getDBO();
     $db->setQuery($query);
     $this->_categories = $db->loadObjectList();
     $children = array();
     if ($this->_categories) {
         foreach ($this->_categories as $v) {
             $pt = $v->parent_id;
             $list = isset($children[$pt]) ? $children[$pt] : array();
             array_push($list, $v);
             $children[$pt] = $list;
         }
     }
     jimport('joomla.html.html.menu');
     $options = JHTML::_('menu.treerecurse', 1, '', array(), $children, 9999, 0, 0);
     $this->_xml->addChild('option', 'Root')->addAttribute('value', 0);
     if (count($options)) {
         foreach ($options as $option) {
             $this->_xml->addChild('option', htmlspecialchars($option->treename))->addAttribute('value', $option->id);
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
 function fetchElement()
 {
     $this->_xml->addChild('option', 'Please choose')->addAttribute('value', 0);
     ob_start();
     $api = getNextendYoutube();
     $list = array();
     if ($api) {
         $google = $api[0];
         $youtube = $api[1];
         try {
             $playlists = $youtube->playlists->listPlaylists('id,snippet', array('mine' => true));
             foreach ($playlists['items'] as $k => $item) {
                 $list[$item['id']] = $item['snippet']['title'];
             }
         } catch (Google_ServiceException $e) {
             echo sprintf('<p>A service error occurred: <code>%s</code></p>', htmlspecialchars($e->getMessage()));
         } catch (Google_Exception $e) {
             echo sprintf('<p>An client error occurred: <code>%s</code></p>', htmlspecialchars($e->getMessage()));
         }
     }
     if ($list) {
         ob_end_clean();
         if (count($list)) {
             foreach ($list as $id => $name) {
                 $this->_xml->addChild('option', htmlentities($name))->addAttribute('value', $id);
             }
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     if (!$list) {
         $html .= ob_get_clean();
     }
     return $html;
 }
Esempio n. 10
0
 function fetchElement()
 {
     $db = JFactory::getDBO();
     $query = '';
     require JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_virtuemart' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'config.php';
     VmConfig::loadConfig();
     $query = 'SELECT a.virtuemart_category_id AS id, b.category_parent_id AS parent_id, b.category_parent_id AS parent, c. category_name AS title ' . 'FROM #__virtuemart_categories AS a ' . 'LEFT JOIN #__virtuemart_category_categories AS b ON a.virtuemart_category_id = b.category_child_id ' . 'LEFT JOIN #__virtuemart_categories_' . VMLANG . ' AS c ON a.virtuemart_category_id = c.virtuemart_category_id ' . 'WHERE a.published = 1 ' . 'ORDER BY a.ordering';
     $db->setQuery($query);
     $menuItems = $db->loadObjectList();
     $children = array();
     if ($menuItems) {
         foreach ($menuItems as $v) {
             $pt = $v->parent_id;
             $list = isset($children[$pt]) ? $children[$pt] : array();
             array_push($list, $v);
             $children[$pt] = $list;
         }
     }
     jimport('joomla.html.html.menu');
     $options = JHTML::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0);
     $this->_xml->addChild('option', 'Root')->addAttribute('value', 0);
     if (count($options)) {
         foreach ($options as $option) {
             $this->_xml->addChild('option', htmlspecialchars(' - ' . $option->treename))->addAttribute('value', $option->id);
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     return parent::fetchElement();
 }
 function fetchElement()
 {
     $easings = array("linear" => "Linear", "easeInQuad" => "Quad In", "easeOutQuad" => "Quad Out", "easeInOutQuad" => "Quad In Out", "easeInCubic" => "Cubic In", "easeOutCubic" => "Cubic Out", "easeInOutCubic" => "Cubic In Out", "easeInQuart" => "Quart In", "easeOutQuart" => "Quart Out", "easeInOutQuart" => "Quart In Out", "easeInQuint" => "Quint In", "easeOutQuint" => "Quint Out", "easeInOutQuint" => "Quint In Out", "easeInSine" => "Sine In", "easeOutSine" => "Sine Out", "easeInOutSine" => "Sine In Out", "easeInExpo" => "Expo In", "easeOutExpo" => "Expo Out", "easeInOutExpo" => "Expo In Out", "easeInCirc" => "Circ In", "easeOutCirc" => "Circ Out", "easeInOutCirc" => "Circ In Out", "easeInElastic" => "Elastic In", "easeOutElastic" => "Elastic Out", "easeInOutElastic" => "Elastic In Out", "easeInBack" => "Back In", "easeOutBack" => "Back Out", "easeInOutBack" => "Back In Out", "easeInBounce" => "Bounce In", "easeOutBounce" => "Bounce Out", "easeInOutBounce" => "Bounce In Out");
     foreach ($easings as $k => $easing) {
         $this->_xml->addChild('option', ucfirst($easing))->addAttribute('value', $k);
     }
     return parent::fetchElement();
 }
Esempio n. 12
0
 function fetchElement()
 {
     $easings = array("dojo.fx.easing.linear" => "Linear", "dojo.fx.easing.quadIn" => "Quad_In", "dojo.fx.easing.quadOut" => "Quad_Out", "dojo.fx.easing.quadInOut" => "Quad_In_Out", "dojo.fx.easing.cubicIn" => "Cubic_In", "dojo.fx.easing.cubicOut" => "Cubic_Out", "dojo.fx.easing.cubicInOut" => "Cubic_In_Out", "dojo.fx.easing.quartIn" => "Quart_In", "dojo.fx.easing.quartOut" => "Quart_Out", "dojo.fx.easing.quartInOut" => "Quart_In_Out", "dojo.fx.easing.quintIn" => "Quint_In", "dojo.fx.easing.quintOut" => "Quint_Out", "dojo.fx.easing.quintInOut" => "Quint_In_Out", "dojo.fx.easing.sineIn" => "Sine_In", "dojo.fx.easing.sineOut" => "Sine_Out", "dojo.fx.easing.sineInOut" => "Sine_In_Out", "dojo.fx.easing.expoIn" => "Expo_In", "dojo.fx.easing.expoOut" => "Expo_Out", "dojo.fx.easing.expoInOut" => "Expo_In_Out", "dojo.fx.easing.circIn" => "Circ_In", "dojo.fx.easing.circOut" => "Circ_Out", "dojo.fx.easing.circInOut" => "Circ_In_Out", "dojo.fx.easing.backIn" => "Back_In", "dojo.fx.easing.backOut" => "Back_Out", "dojo.fx.easing.backInOut" => "Back_In_Out", "dojo.fx.easing.bounceIn" => "Bounce_In", "dojo.fx.easing.bounceOut" => "Bounce_Out", "dojo.fx.easing.bounceInOut" => "Bounce_In_Out");
     foreach ($easings as $k => $easing) {
         $this->_xml->addChild('option', NextendText::_($easing))->addAttribute('value', $k);
     }
     return parent::fetchElement();
 }
Esempio n. 13
0
 function fetchElement()
 {
     foreach ($this->parent->sections as $section) {
         $this->_xml->addChild('option', htmlspecialchars(ucfirst($section->name)))->addAttribute('value', $section->id);
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
Esempio n. 14
0
 function fetchElement()
 {
     $vmversion = 0;
     if (!class_exists('VmConfig') && file_exists(JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_virtuemart' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'config.php')) {
         $vmversion = 2;
     } else {
         if (file_exists(JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_virtuemart' . DIRECTORY_SEPARATOR . 'compat.joomla1.5.php')) {
             $vmversion = 1;
         }
     }
     $db = JFactory::getDBO();
     $query = '';
     if ($vmversion == 1) {
         require_once JPATH_SITE . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_virtuemart' . DIRECTORY_SEPARATOR . 'virtuemart_parser.php';
         $query = 'SELECT 
                 a. category_id AS id, 
                 b.category_parent_id AS parent_id, 
                 b.category_parent_id AS parent,
                 a.category_name AS title,
                 a.category_name AS name
             FROM #__vm_category AS a
             LEFT JOIN #__vm_category_xref AS b ON a.category_id = b.category_child_id
             WHERE a.category_publish LIKE "Y"
             ORDER BY a.list_order';
     } else {
         if ($vmversion == 2) {
             require JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_virtuemart' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'config.php';
             VmConfig::loadConfig();
             $query = 'SELECT a.virtuemart_category_id AS id, b.category_parent_id AS parent_id, b.category_parent_id AS parent, c. category_name AS title ' . 'FROM #__virtuemart_categories AS a ' . 'LEFT JOIN #__virtuemart_category_categories AS b ON a.virtuemart_category_id = b.category_child_id ' . 'LEFT JOIN #__virtuemart_categories_' . VMLANG . ' AS c ON a.virtuemart_category_id = c.virtuemart_category_id ' . 'WHERE a.published = 1 ' . 'ORDER BY a.ordering';
         } else {
             return "Virtuemart not found!";
         }
     }
     $db->setQuery($query);
     $menuItems = $db->loadObjectList();
     $children = array();
     if ($menuItems) {
         foreach ($menuItems as $v) {
             $pt = $v->parent_id;
             $list = isset($children[$pt]) ? $children[$pt] : array();
             array_push($list, $v);
             $children[$pt] = $list;
         }
     }
     jimport('joomla.html.html.menu');
     $options = JHTML::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0);
     $this->_xml->addChild('option', 'Root')->addAttribute('value', 0);
     if (count($options)) {
         foreach ($options as $option) {
             $this->_xml->addChild('option', htmlspecialchars($option->treename))->addAttribute('value', $option->id);
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
Esempio n. 15
0
 function fetchElement()
 {
     $this->_xml->addChild('option', 'Choose a slider')->addAttribute('value', 0);
     $options = $this->getOptions();
     for ($i = 0; $i < count($options); $i++) {
         $this->_xml->addChild('option', htmlspecialchars($options[$i]['title']))->addAttribute('value', $options[$i]['id']);
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     return parent::fetchElement();
 }
Esempio n. 16
0
 function fetchElement()
 {
     $js = NextendJavascript::getInstance();
     $js->addLibraryJsAssetsFile('dojo', 'element.js');
     $js->addLibraryJsAssetsFile('dojo', 'element/skin.js');
     $html = parent::fetchElement();
     $js->addLibraryJs('dojo', '
         new NextendElementSkin({
           hidden: "' . $this->_id . '",
           preid: "' . str_replace($this->parent->_name, '', $this->parent->_id) . '",
           skins: ' . json_encode($this->skins) . '
         });
     ');
     return $html;
 }
Esempio n. 17
0
 function fetchElement()
 {
     if (version_compare(JVERSION, '1.6.0', 'ge')) {
         require_once JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php';
     } else {
         require_once JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_menus' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'helper.php';
     }
     $options = MenusHelper::getMenuTypes();
     for ($i = 0; $i < count($options); $i++) {
         $this->_xml->addChild('option', htmlspecialchars(ucfirst($options[$i])))->addAttribute('value', $options[$i]);
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
Esempio n. 18
0
 function fetchElement()
 {
     $query = "SELECT\r\n            id,\r\n            name\r\n            FROM #__js_res_sections\r\n            ORDER BY ordering ASC\r\n            ";
     $db = JFactory::getDBO();
     $db->setQuery($query);
     $sections = $db->loadObjectList();
     $this->_xml->addChild('option', 'Any Section')->addAttribute('value', '0');
     if (count($sections)) {
         foreach ($sections as $option) {
             $this->_xml->addChild('option', htmlspecialchars($option->name))->addAttribute('value', $option->id);
         }
     }
     $html = parent::fetchElement();
     return $html;
 }
Esempio n. 19
0
 function fetchElement()
 {
     $db = JFactory::getDBO();
     $query = "SELECT id, name FROM #__js_res_sections ORDER BY name ASC";
     $db->setQuery($query);
     $options = $db->loadObjectList();
     if (count($options)) {
         foreach ($options as $option) {
             $this->_xml->addChild('option', htmlspecialchars($option->name))->addAttribute('value', $option->id);
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
Esempio n. 20
0
 function fetchElement()
 {
     static $options;
     if (!$options) {
         $options = array(0 => 'No_animation', 'fade' => 'Fade', 'slidelefttoright' => 'Slide_left_to_right', 'sliderighttoleft' => 'Slide_right_to_left', 'slidetoptobottom' => 'Slide_top_to_bottom', 'slidebottomtotop' => 'Slide_bottom_to_top', 'flipx' => 'Flip_X', 'fadeup' => 'Fade_up', 'fadedown' => 'Fade_down', 'fadeleft' => 'Fade_left', 'faderight' => 'Fade_right', 'bounce' => 'Bounce', 'rotate' => 'Rotate', 'rotateupleft' => 'Rotate_up_left', 'rotatedownleft' => 'Rotate_down_left', 'rotateupright' => 'Rotate_up_right', 'rotatedownright' => 'Rotate_down_right', 'rollin' => 'Roll_in', 'rollout' => 'Roll_out', 'scale' => 'Scale');
         NextendPlugin::callPlugin('nextendslider', 'onNextendSliderLayerAnimations', array(&$options));
     }
     if (count($options)) {
         foreach ($options as $k => $v) {
             $this->_xml->addChild('option', $v)->addAttribute('value', $k);
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
Esempio n. 21
0
 function fetchElement()
 {
     static $options;
     if (!$options) {
         $options = array(0 => 'No_animation', '1' => 'Fade - full', '2' => 'Slide left to right - full', '3' => 'Slide right to left - full', '4' => 'Slide top to bottom - full', 'slidebottomtotop' => 'Slide bottom to top', '5' => 'Flip X - full', '6' => 'Fade up - full', 'fadedown' => 'Fade down', '8' => 'Fade left - full', '9' => 'Fade right - full', '10' => 'Bounce - full', '11' => 'Rotate - full', '12' => 'Rotate up left - full', '13' => 'Rotate down left - full', '13' => 'Rotate up right - full', '14' => 'Rotate down right - full', 'rollin' => 'Roll in', '15' => 'Roll out - full', '16' => 'Scale - full');
         NextendPlugin::callPlugin('nextendslider', 'onNextendSliderLayerAnimations', array(&$options));
     }
     if (count($options)) {
         foreach ($options as $k => $v) {
             $this->_xml->addChild('option', $v)->addAttribute('value', $k);
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
 function fetchElement()
 {
     if (isset($_REQUEST['get'])) {
         $get = json_decode(get_magic_quotes_gpc() || nextendIsWordPress() ? stripslashes($_REQUEST['get']) : $_REQUEST['get'], true);
         if (isset($get['sliderid'])) {
             nextendimportsmartslider2('nextend.smartslider.settings');
             NextendSmartSliderFontSettings::initAdminFonts(intval($get['sliderid']));
         }
     }
     $this->_xml->addChild('option', 'None')->addAttribute('value', '');
     if (isset($GLOBALS['nextendfontmatrix']) && count($GLOBALS['nextendfontmatrix'])) {
         foreach ($GLOBALS['nextendfontmatrix'] as $k => $v) {
             $this->_xml->addChild('option', $v)->addAttribute('value', $k);
         }
     }
     return parent::fetchElement();
 }
Esempio n. 23
0
 function fetchElement()
 {
     $db = JFactory::getDBO();
     $query = 'SELECT language_id, name
             FROM #__mijoshop_language
             WHERE status = 1';
     $db->setQuery($query);
     $lngs = $db->loadObjectList();
     $this->_xml->addChild('option', 'Automatic')->addAttribute('value', '');
     if (count($lngs)) {
         foreach ($lngs as $lng) {
             $this->_xml->addChild('option', $lng->name)->addAttribute('value', $lng->language_id);
         }
     }
     $this->_value = $this->_form->get($this->_name, '');
     $html = parent::fetchElement();
     return $html;
 }
Esempio n. 24
0
 function fetchElement()
 {
     global $wpdb;
     $galleries = $wpdb->get_results("SELECT * FROM " . $wpdb->base_prefix . "ngg_gallery ORDER BY name");
     $value = 0;
     foreach ($galleries as $gallery) {
         if ($this->_value == $gallery->gid) {
             $value = $gallery->gid;
         }
         $this->_xml->addChild('option', htmlspecialchars($gallery->name))->addAttribute('value', $gallery->gid);
     }
     if (!$value && isset($galleries[0])) {
         $this->_form->set($this->_name, $galleries[0]->gid);
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
Esempio n. 25
0
 function fetchElement()
 {
     $db = JFactory::getDBO();
     require_once JPATH_SITE . "/components/com_jshopping/lib/factory.php";
     $lang = JSFactory::getLang();
     $query = "SELECT id, `" . $lang->get('name') . "` AS name\r\n              FROM #__jshopping_product_labels\r\n              ORDER BY name";
     $db->setQuery($query);
     $menuItems = $db->loadObjectList();
     $this->_xml->addChild('option', 'None')->addAttribute('value', 0);
     if (count($menuItems)) {
         foreach ($menuItems as $option) {
             $this->_xml->addChild('option', $option->name)->addAttribute('value', $option->id);
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
 function fetchElement()
 {
     $args = array('type' => 'post', 'child_of' => 0, 'parent' => '', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => 0, 'hierarchical' => 1, 'exclude' => '', 'include' => '', 'number' => '', 'taxonomy' => 'category', 'pad_counts' => false);
     $categories = get_categories($args);
     $new = array();
     foreach ($categories as $a) {
         $new[$a->category_parent][] = $a;
     }
     $list = array();
     $options = $this->createTree($list, $new, 0);
     $this->_xml->addChild('option', 'Root')->addAttribute('value', 0);
     if (count($options)) {
         foreach ($options as $option) {
             $this->_xml->addChild('option', htmlspecialchars(' - ' . $option->treename))->addAttribute('value', $option->cat_ID);
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     return parent::fetchElement();
 }
Esempio n. 27
0
 function fetchElement()
 {
     $db = JFactory::getDBO();
     $lang = '';
     $config = MijoShop::get('opencart')->get('config');
     if (is_object($config)) {
         $lang = ' AND cd.language_id = ' . $config->get('config_language_id');
     }
     $query = 'SELECT 
                 m.category_id AS id, 
                 cd.name AS name, 
                 cd.name AS title, 
                 m.parent_id AS parent, 
                 m.parent_id as parent_id
             FROM #__mijoshop_category m
             LEFT JOIN #__mijoshop_category_description AS cd ON cd.category_id = m.category_id
             WHERE m.status = 1 ' . $lang . '
             ORDER BY m.sort_order';
     $db->setQuery($query);
     $menuItems = $db->loadObjectList();
     $children = array();
     if ($menuItems) {
         foreach ($menuItems as $v) {
             $pt = $v->parent_id;
             $list = isset($children[$pt]) ? $children[$pt] : array();
             array_push($list, $v);
             $children[$pt] = $list;
         }
     }
     jimport('joomla.html.html.menu');
     $options = JHTML::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0);
     $this->_xml->addChild('option', 'Root')->addAttribute('value', 0);
     $optgroup = $this->_xml->addChild('optgroup', '');
     $optgroup->addAttribute('label', 'Categories');
     if (count($options)) {
         foreach ($options as $option) {
             $optgroup->addChild('option', $option->treename)->addAttribute('value', $option->id);
         }
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }
Esempio n. 28
0
 function fetchElement()
 {
     $menus = get_terms('nav_menu');
     $ids = array();
     foreach ($menus as $menu) {
         $this->_xml->addChild('option', $menu->name)->addAttribute('value', $menu->term_id);
         $ids[] = $menu->term_id;
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     if (!in_array($this->_value, $ids)) {
         $this->_value = $ids[0];
         $this->_form->set($this->_name, $this->_value);
         $a = explode('|*|', $this->parent->_value);
         $a[0] = $this->_value;
         $this->parent->_value = implode('|*|', $a);
     }
     $html = parent::fetchElement();
     return $html;
 }
Esempio n. 29
0
 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();
 }
Esempio n. 30
0
 function fetchElement()
 {
     $menu = explode('|*|', $this->parent->_value);
     $currentapp = $this->parent->apps[$menu[0]];
     $this->_categories = $currentapp->getCategories(true, null, true);
     $this->_xml->addChild('option', 'Root')->addAttribute('value', 0);
     $this->cats = array();
     if (count($this->_categories)) {
         foreach ($this->_categories as $category) {
             if (!isset($this->cats[$category->parent])) {
                 $this->cats[$category->parent] = array();
             }
             $this->cats[$category->parent][] = $category;
         }
         $this->renderCategory(0, '');
     }
     $this->_value = $this->_form->get($this->_name, $this->_default);
     $html = parent::fetchElement();
     return $html;
 }