Example #1
0
 function NextendSliderWidgets($slider, $id)
 {
     $this->_slider = $slider;
     $this->_id = $id;
     $this->_widgets = array();
     $this->_enabledWidgets = array();
     $params = $this->_slider->_sliderParams;
     if ($slider->_backend) {
         return;
     }
     $plugins = array();
     NextendPlugin::callPlugin('nextendsliderwidget', 'onNextendSliderWidgetList', array(&$plugins));
     foreach ($plugins as $k => $v) {
         $widget = $params->get('widget' . $k);
         $display = NextendParse::parse($params->get('widget' . $k . 'display', '0|*|always|*|0|*|0'));
         if ($widget != '' && (isset($display[0]) && intval($display[0]) || isset($display[2]) && intval($display[2]) || isset($display[3]) && intval($display[3]))) {
             $this->_enabledWidgets[$k] = $widget;
         }
     }
     foreach ($this->_enabledWidgets as $k => $v) {
         if (nextendIsJoomla()) {
             JPluginHelper::importPlugin('nextendsliderwidget' . $k);
         }
         $class = 'plgNextendSliderWidget' . $k . $v;
         if (class_exists($class, false)) {
             $this->_widgets[$k] = call_user_func(array($class, 'render'), $slider, $id, $params);
         }
     }
 }
Example #2
0
 function getData($number)
 {
     $data = array();
     $api = getNextendInstagram();
     if (!$api) {
         return $data;
     }
     $username = NextendParse::parse($this->_data->get('Username', ''));
     $user = json_decode($api->searchUser($username));
     $userid = $user->data[0]->id;
     $result = json_decode($api->getUserRecent($userid), true);
     if ($result['meta']['code'] == 200) {
         $i = 0;
         foreach ($result['data'] as $image) {
             if ($image['type'] != 'image') {
                 continue;
             }
             $data[$i]['title'] = $data[$i]['caption'] = is_array($image['caption']) ? $image['caption']['text'] : '';
             $data[$i]['image'] = $data[$i]['standard_res_image'] = $image['images']['standard_resolution']['url'];
             $data[$i]['thumbnail'] = $data[$i]['thumbnail_image'] = $image['images']['thumbnail']['url'];
             $data[$i]['description'] = 'Description is not available for Intagram images.';
             $data[$i]['url'] = $image['link'];
             $data[$i]['url_label'] = 'View image';
             $data[$i]['author_name'] = $data[$i]['owner_full_name'] = $image['user']['full_name'];
             $data[$i]['author_url'] = $data[$i]['owner_website'] = $image['user']['website'] ? $image['user']['website'] : '#';
             $data[$i]['low_res_image'] = $image['images']['low_resolution']['url'];
             $data[$i]['owner_username'] = $image['user']['username'];
             $data[$i]['owner_profile_picture'] = $image['user']['profile_picture'];
             $data[$i]['owner_bio'] = $image['user']['bio'];
             $data[$i]['comment_count'] = $image['comments']['count'];
             $i++;
         }
     }
     return $data;
 }
Example #3
0
 static function render($slider, $id, $params)
 {
     $html = '';
     $indicatorstripe = $params->get('indicatorstripe', false);
     if ($indicatorstripe && $indicatorstripe != -1) {
         $displayclass = self::getDisplayClass($params->get('widgetindicatordisplay', '0|*|always|*|0|*|0'), true) . 'nextend-indicator ';
         $css = NextendCss::getInstance();
         $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stripe' . DIRECTORY_SEPARATOR . 'style.css'));
         list($style, $data) = self::getPosition($params->get('indicatorposition', ''));
         $style .= 'z-index:10;';
         $width = NextendParse::parse($params->get('indicatorwidth', '100%'));
         if (is_numeric($width) || $width == 'auto' || substr($width, -1) == '%') {
             $style .= 'width:' . $width . ';';
         } else {
             $data .= 'data-sswidth="' . $width . '" ';
         }
         $size = intval($params->get('indicatorsize', 50));
         list($colorhex, $rgbacss) = NextendColor::colorToCss($params->get('indicatorstripecolor', '000000cc'));
         list($colorhexbg, $rgbacssbg) = NextendColor::colorToCss($params->get('backgroundstripecolor', '7670c7ff'));
         $height = $params->get('indicatorstripeheight', '6');
         $info = pathinfo($indicatorstripe);
         $class = 'nextend-indicator nextend-indicator-stripe nextend-indicator-stripe-' . basename($indicatorstripe, '.' . $info['extension']);
         $html = '<div class="' . $displayclass . 'nextend-indicator-stripe-container" style="' . $style . 'background-color:' . $colorhexbg . '; background-color:' . $rgbacssbg . '; height: ' . $height . 'px;" ' . $data . '><div class="' . $class . '" style="width: 0%; background-color:' . $colorhex . '; background-color:' . $rgbacss . '; height: ' . $height . 'px;"></div></div>';
         $html .= "\r\n              <script type='text/javascript'>\r\n                  njQuery(document).ready(function () {\r\n                      var stripe = window.njQuery('#" . $id . " .nextend-indicator-stripe');\r\n                       window['" . $id . "-indicator'] = {\r\n                          hide: function(){\r\n                              stripe.hide();\r\n                          },\r\n                          show: function(){\r\n                              stripe.show();\r\n                          },\r\n                          refresh: function(val){\r\n                              stripe.css('width', val+'%');\r\n                          }\r\n                       };\r\n                  });\r\n              </script>\r\n            ";
     }
     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;
 }
Example #5
0
 function _renderAdmin($data, $id, $sliderid, $items)
 {
     $link = (array) NextendParse::parse($data->get('link', ''));
     if (!isset($link[1])) {
         $link[1] = '';
     }
     $fontsize = $data->get('fontsize', '');
     if (!empty($fontsize)) {
         $fontsize = 'font-size:' . $fontsize . '%;';
     }
     $fontcolors = (array) NextendParse::parse($data->get('fontcolor', ''));
     $fontcolor = '';
     if (isset($fontcolors[0]) && $fontcolors[0]) {
         if (!empty($fontcolors[1])) {
             $fontcolor = 'color:#' . $fontcolors[1] . ';';
         }
     }
     return '
         <h' . $data->get('priority', 1) . ' class="' . $data->get('fontclass', 'sliderfont2') . ' ' . $data->get('class', '') . '" style="' . $fontsize . $fontcolor . htmlspecialchars($data->get('css', '')) . '">
             ' . ($link[0] != '#' ? '<a href="' . $link[0] . '" target="' . $link[1] . '" style="' . $fontcolor . '">' : '') . '
               ' . $data->get('heading', '') . '
             ' . ($link[0] != '#' ? '</a>' : '') . '
         </h' . $data->get('priority', 1) . '>
     ';
 }
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 parseTshadow($v)
 {
     $v = NextendParse::parse($v);
     $rgba = NextendColor::hex2rgba($v[3]);
     if ($v[0] == 0 && $v[1] == 0 && $v[2] == 0) {
         return 'text-shadow: none;';
     }
     return 'text-shadow: ' . $v[0] . 'px ' . $v[1] . 'px ' . $v[2] . 'px RGBA(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . round($rgba[3] / 127, 2) . ');';
 }
 function getData($number)
 {
     global $post;
     $tmpPost = $post;
     $data = array();
     $order = NextendParse::parse($this->_data->get('postsorder', 'post_date|*|desc'));
     $args = array('posts_per_page' => $number, 'offset' => 0, 'orderby' => $order[0], 'order' => $order[1], 'include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => $this->posttype, 'post_mime_type' => '', 'post_parent' => '', 'post_status' => 'publish', 'suppress_filters' => false);
     $posts_array = get_posts($args);
     $i = 0;
     foreach ($posts_array as $mypost) {
         $post = $mypost;
         setup_postdata($mypost);
         $data[$i] = array();
         $data[$i]['id'] = $mypost->ID;
         $data[$i]['url'] = get_permalink();
         $data[$i]['title'] = apply_filters('the_title', get_the_title());
         $data[$i]['description'] = $data[$i]['content'] = apply_filters('the_content', get_the_content());
         $data[$i]['author_name'] = $data[$i]['author'] = get_the_author();
         $data[$i]['author_url'] = get_the_author_meta('url');
         $data[$i]['featured_image'] = wp_get_attachment_url(get_post_thumbnail_id($mypost->ID));
         if (!$data[$i]['featured_image']) {
             $data[$i]['featured_image'] = '';
         }
         $data[$i]['thumbnail'] = $data[$i]['image'] = $data[$i]['featured_image'];
         $data[$i]['url_label'] = 'View';
         $customs = get_post_custom($mypost->ID);
         if ($customs && count($customs)) {
             foreach ($customs as $k => $v) {
                 if (is_array($v)) {
                     if (isset($v[0])) {
                         $v = $v[0];
                     } else {
                         continue;
                     }
                 }
                 $data[$i][$k] = $v;
             }
         }
         if (class_exists('acf')) {
             $fields = get_fields($mypost->ID);
             if (count($fields) && $fields) {
                 foreach ($fields as $k => $v) {
                     $data[$i][$k] = $v;
                 }
             }
         }
         $i++;
     }
     wp_reset_postdata();
     $post = $tmpPost;
     if ($post) {
         setup_postdata($post);
     }
     return $data;
 }
Example #9
0
 function _render($data, $id, $sliderid, $items)
 {
     $size = (array) NextendParse::parse($data->get('size', ''));
     if (!isset($size[0])) {
         $size[0] = '100%';
     }
     if (!isset($size[1])) {
         $size[1] = '100%';
     }
     return '<iframe frameborder="0" width="' . $size[0] . '" height="' . $size[0] . '" src="' . $data->get('url', '') . '" scrolling="' . $data->get('scroll', '') . '"></iframe>';
 }
Example #10
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 #11
0
    static function render($slider, $id, $params)
    {
        $html = '';
        $thumbnail = $params->get('thumbnail', false);
        if ($thumbnail && $thumbnail != '-1') {
            $displayclass = self::getDisplayClass($params->get('widgetthumbnaildisplay', '0|*|always|*|0|*|0'), true);
            $css = NextendCss::getInstance();
            $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'horizontal' . DIRECTORY_SEPARATOR . 'style.css'));
            $js = NextendJavascript::getInstance();
            $js->addLibraryJsFile('jquery', dirname(__FILE__) . '/horizontal/script.js');
            list($colorhexthumbnailactivebackground, $rgbacssthumbnailactivebackground) = NextendColor::colorToCss($params->get('thumbnailactivebackground', '00000080'));
            $info = pathinfo($thumbnail);
            $class = 'nextend-thumbnail nextend-thumbnail-horizontal nextend-thumbnail-horizontal-' . basename($thumbnail, '.' . $info['extension']);
            $style = '';
            $thumbnailsize = NextendParse::parse($params->get('thumbnailsize', '100|*|54'));
            $thumbnailperpage = $params->get('thumbnailperpage', 2);
            $style .= 'width:' . $thumbnailsize[0] . 'px; height:' . $thumbnailsize[1] . 'px;';
            list($positionstyle, $data) = self::getPosition($params->get('thumbnailposition', ''));
            $positionstyle .= 'z-index:10; width: 100%;';
            $html .= '<div id="' . $id . '-thumbnail" class="' . $displayclass . '" style="' . $positionstyle . '" ' . $data . '>';
            $html .= '<div class="nextend-thumbnail-container ' . $class . ' nextend-clearfix">
            <div class="nextend-arrow-left" style="height:' . $thumbnailsize[1] . 'px"></div>';
            $html .= '<div class="nextend-thumbnail-strip-hider"><div class="nextend-thumbnail-strip">';
            for ($i = 0; $i < count($slider->_slides); $i++) {
                if (!$slider->_slides[$i]['thumbnail'] && $slider->_slides[$i]['bg']['desktop']) {
                    $im = new NextendImage();
                    $slider->_slides[$i]['thumbnail'] = $im->resizeImage($slider->_slides[$i]['bg']['desktop'], $thumbnailsize[0], $thumbnailsize[1]);
                }
                $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'goto\',' . $i . ',false);" class="' . $class . ($slider->_slides[$i]['first'] ? ' active' : '') . '" style="' . $style . 'background-image: url(\'' . $slider->_slides[$i]['thumbnail'] . '\')"></div>';
            }
            $html .= '</div></div>';
            $html .= '<div class="nextend-arrow-right" style="height:' . $thumbnailsize[1] . 'px"></div>

            </div>
            <style>
            .nextend-thumbnail-container.nextend-thumbnail-horizontal-horizontal1 .nextend-thumbnail:HOVER,            
            .nextend-thumbnail-container.nextend-thumbnail-horizontal-horizontal1 .nextend-thumbnail.active{            
                box-shadow: inset 0 0 0 6px ' . $rgbacssthumbnailactivebackground . ';
            }
            .nextend-thumbnail-container.nextend-thumbnail-horizontal-horizontal-dark .nextend-thumbnail:HOVER,            
            .nextend-thumbnail-container.nextend-thumbnail-horizontal-horizontal-dark .nextend-thumbnail.active{
                box-shadow: 0 0 3px 1px RGBA(0,0,0,0.6), 0 0 0 6px ' . $rgbacssthumbnailactivebackground . ' inset;
            }
            </style>
            ';
            $html .= '</div>';
            $html .= "\r\n              <script type='text/javascript'>\r\n                  njQuery(document).ready(function () {\r\n                      window['" . $id . "-thumbnail'] = new smartSliderHorizontal({\r\n                          id: '" . $id . "',\r\n                          node: window.njQuery('#" . $id . "-thumbnail'),\r\n                          thumbnailperpage: '" . $thumbnailperpage . "',\r\n                          thumbnailanimation: '" . $params->get('thumbnailanimation', 700) . "'\r\n                      });\r\n                  });\r\n              </script>\r\n            ";
        }
        return $html;
    }
Example #12
0
 static function render($slider, $id, $params)
 {
     $html = '';
     $thumbnail = $params->get('thumbnail', false);
     if ($thumbnail && $thumbnail != '-1') {
         $displayclass = self::getDisplayClass($params->get('widgetthumbnaildisplay', '0|*|always|*|0|*|0'), true);
         $css = NextendCss::getInstance();
         $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'gallery' . DIRECTORY_SEPARATOR . 'style.css'));
         $js = NextendJavascript::getInstance();
         $js->addLibraryJsFile('jquery', dirname(__FILE__) . '/gallery/script.js');
         $info = pathinfo($thumbnail);
         $class = 'nextend-thumbnail nextend-thumbnail-gallery nextend-thumbnail-gallery-' . basename($thumbnail, '.' . $info['extension']);
         $style = '';
         $thumbnailsize = NextendParse::parse($params->get('thumbnailgallerysize', '100|*|54'));
         $thumbnailperpage = $params->get('thumbnailperpage', 2);
         $style .= 'width:' . $thumbnailsize[0] . 'px; height:' . $thumbnailsize[1] . 'px;';
         list($positionstyle, $data) = self::getPosition($params->get('thumbnailgalleryposition', ''));
         $positionstyle .= 'z-index:10;';
         $thumbnailgalleryoutersize = NextendParse::parse($params->get('thumbnailgalleryoutersize', '100%|*|auto'));
         if (is_numeric($thumbnailgalleryoutersize[0]) || $thumbnailgalleryoutersize[0] == 'auto' || substr($thumbnailgalleryoutersize[0], -1) == '%') {
             $positionstyle .= 'width:' . $thumbnailgalleryoutersize[0] . ';';
         } else {
             $data .= 'data-sswidth="' . $thumbnailgalleryoutersize[0] . '" ';
         }
         if (is_numeric($thumbnailgalleryoutersize[1]) || $thumbnailgalleryoutersize[1] == 'auto' || substr($thumbnailgalleryoutersize[1], -1) == '%') {
             $positionstyle .= 'height:' . $thumbnailgalleryoutersize[1] . ';';
         } else {
             $data .= 'data-ssheight="' . $thumbnailgalleryoutersize[1] . '" ';
         }
         list($colorhexthumbnailgallerybackground, $rgbacssthumbnailgallerybackground) = NextendColor::colorToCss($params->get('thumbnailgallerybackground', 'eeeeeefff'));
         $positionstyle .= 'background: #' . $colorhexthumbnailgallerybackground . '; background: ' . $rgbacssthumbnailgallerybackground . ';';
         $br = NextendParse::parse($params->get('thumbnailgalleryborderradius', '0|*|0|*|0|*|0'));
         $positionstyle .= 'border-radius: ' . $br[0] . 'px ' . $br[1] . 'px ' . $br[2] . 'px ' . $br[3] . 'px; overflow: auto;';
         $html .= '<div id="' . $id . '-thumbnail" class="' . $displayclass . '" style="opacity: 0.9999; ' . $positionstyle . '" ' . $data . '>';
         $p = NextendParse::parse($params->get('thumbnailgallerypadding', '5|*|5|*|5|*|5'));
         $html .= '<div class="nextend-thumbnail-container ' . $class . '" style="padding: ' . $p[0] . 'px ' . $p[1] . 'px ' . $p[2] . 'px ' . $p[3] . 'px;">';
         $m = NextendParse::parse($params->get('thumbnailgallerymargin', '0|*|1|*|1|*|0'));
         for ($i = 0; $i < count($slider->_slides); $i++) {
             if (!$slider->_slides[$i]['thumbnail'] && $slider->_slides[$i]['bg']) {
                 $im = new NextendImage();
                 $slider->_slides[$i]['thumbnail'] = $im->resizeImage($slider->_slides[$i]['bg'], $thumbnailsize[0], $thumbnailsize[1]);
             }
             $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'goto\',' . $i . ',false);" class="' . $class . ($slider->_slides[$i]['first'] ? ' active' : '') . '" style="' . $style . 'background-image: url(\'' . $slider->_slides[$i]['thumbnail'] . '\'); margin: ' . $m[0] . 'px ' . $m[1] . 'px ' . $m[2] . 'px ' . $m[3] . 'px;"></div>';
         }
         $html .= '</div></div>';
         $html .= "\r\n              <script type='text/javascript'>\r\n                  njQuery(document).ready(function () {\r\n                      window['" . $id . "-thumbnail'] = new smartSliderGallery({\r\n                          id: '" . $id . "',\r\n                          node: window.njQuery('#" . $id . "-thumbnail')\r\n                      });\r\n                  });\r\n              </script>\r\n            ";
     }
     return $html;
 }
 function _renderAdmin($data, $id, $sliderid, $items)
 {
     $fontsize = $data->get('fontsize', '');
     if (!empty($fontsize)) {
         $fontsize = 'font-size:' . $fontsize . '%;';
     }
     $fontcolors = (array) NextendParse::parse($data->get('fontcolor', ''));
     $fontcolor = '';
     if (isset($fontcolors[0]) && $fontcolors[0]) {
         if (!empty($fontcolors[1])) {
             $fontcolor = 'color:#' . $fontcolors[1] . ';';
         }
     }
     return '<p class="' . $data->get('fontclass', '') . ' ' . $data->get('class', '') . '" style="' . $fontsize . $fontcolor . htmlspecialchars($data->get('css', '')) . '">' . $data->get('content', '') . '</p>';
 }
Example #14
0
 static function render($slider, $id, $params)
 {
     $html = '';
     $barcolored = $params->get('barcolored', false);
     if ($barcolored && $barcolored != -1) {
         $displayclass = self::getDisplayClass($params->get('widgetbardisplay', '0|*|always|*|0|*|0'), true);
         list($colorhex, $rgbacss) = NextendColor::colorToCss($params->get('barbackground', '00000080'));
         $css = NextendCss::getInstance();
         $css->enableLess();
         $cssfile = NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'colored' . DIRECTORY_SEPARATOR . 'style.less');
         $css->addCssFile(array($cssfile, $cssfile, array('id' => '~"#' . $id . '"')), $id);
         list($style, $data) = self::getPosition($params->get('barcoloredposition', ''));
         $style .= 'background-color:' . $rgbacss . ';';
         $width = NextendParse::parse($params->get('barcoloredwidth', '20'));
         if (is_numeric($width)) {
             $style .= 'width:' . $width . '%;';
         } else {
             $data .= 'data-sswidth="' . $width . '" ';
         }
         /*$height = NextendParse::parse($params->get('barcoloredheight', '100'));
                  if(is_numeric($height)){
                      $style.= 'height:'.$height.'px;';
                  }else{
                      $data.= 'data-ssheight="'.$height.'" ';
                  }
                  
                  $style .= 'font-size: '.intval($slider->_sliderParams->get('globalfontsize', '12')).'px;';
           */
         $style .= 'padding: ' . NextendParse::parse($params->get('barcoloredpadding', '0')) . '% 0;';
         $borderradius = NextendParse::parse($params->get('barcoloredborderradius', '0|*|0|*|0|*|0'));
         $style .= '-webkit-border-radius: ' . $borderradius[0] . 'px ' . $borderradius[1] . 'px ' . $borderradius[2] . 'px ' . $borderradius[3] . 'px;';
         $style .= '-moz-border-radius: ' . $borderradius[0] . 'px ' . $borderradius[1] . 'px ' . $borderradius[2] . 'px ' . $borderradius[3] . 'px;';
         $style .= 'border-radius: ' . $borderradius[0] . 'px ' . $borderradius[1] . 'px ' . $borderradius[2] . 'px ' . $borderradius[3] . 'px;';
         $info = pathinfo($barcolored);
         $class = 'nextend-bar nextend-bar-c nextend-bar-c-' . basename($barcolored, '.' . $info['extension']);
         $html .= '<div class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '>';
         for ($i = 0; $i < count($slider->_slides); $i++) {
             $html .= '<div class="nextend-bar-slide ' . ($slider->_slides[$i]['first'] ? ' active' : '') . '">';
             $html .= '<h6 class="' . $params->get('barcoloredtitlefont', '') . '">' . $slider->_slides[$i]['title'] . '</h6>';
             if ($slider->_slides[$i]['description']) {
                 $html .= '<p class="' . $params->get('barcoloreddescriptionfont', '') . '">' . $slider->_slides[$i]['description'] . '</p>';
             }
             $html .= '<div style="clear: both;"></div></div>';
         }
         $html .= '</div>';
     }
     return $html;
 }
Example #15
0
 function _renderAdmin($data, $id, $sliderid, $items)
 {
     $link = (array) NextendParse::parse($data->get('link', ''));
     if (!isset($link[1])) {
         $link[1] = '';
     }
     return '
     <div style="line-height:0; width:' . $data->get('width', '') . '; ' . htmlspecialchars($data->get('css', '')) . '" class="nextend-smartslider-flip-container ' . $data->get('flipclass', '') . '">
       ' . ($link[0] != '#' ? '<a href="' . $link[0] . '" target="' . $link[1] . '" style="background: none !important;display: block;">' : '') . '
         <div class="nextend-smartslider-flip">
             <img alt="' . htmlspecialchars($data->get('alt', '')) . '" src="' . NextendUri::fixrelative($data->get('imagefront', '')) . '" style="width: 100%;" class="nextend-smartslider-flip-front-img" > 
             <img alt="' . htmlspecialchars($data->get('alt', '')) . '" src="' . NextendUri::fixrelative($data->get('imageback', '')) . '" style="width: 100%;" class="nextend-smartslider-flip-back-img" >
         </div>
       ' . ($link[0] != '#' ? '</a>' : '') . '
     </div>
     ';
 }
Example #16
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;
 }
 function NextendSmartsliderGenerator($generator, $slide, $sliderid)
 {
     $this->_generator = $generator;
     $this->_slide = $slide;
     $this->_sliderid = $sliderid;
     if (class_exists('Tidy', false)) {
         $this->_tidy = true;
     }
     $this->_tidyInputEncoding = NextendSmartSliderSettings::get('tidy-input-encoding', 'utf8');
     $this->_tidyOutputEncoding = NextendSmartSliderSettings::get('tidy-output-encoding', 'utf8');
     $this->_generateslides = NextendParse::parse($this->_generator->get('generateslides'));
     $this->_number = intval($this->_generateslides[0]);
     $this->_generatorgroup = intval($this->_generator->get('generatorgroup', 1));
     if ($this->_generatorgroup < 1) {
         $this->_generatorgroup = 1;
     }
     $this->loadList();
 }
Example #18
0
 static function getPosition($value)
 {
     $data = '';
     $style = 'position: absolute;';
     $position = NextendParse::parse($value);
     if (count($position)) {
         if (!is_numeric($position[1])) {
             $data .= 'data-ss' . $position[0] . '="' . $position[1] . '" ';
         } else {
             $style .= $position[0] . ':' . $position[1] . $position[2] . ';';
         }
         if (!is_numeric($position[4])) {
             $data .= 'data-ss' . $position[3] . '="' . $position[4] . '" ';
         } else {
             $style .= $position[3] . ':' . $position[4] . $position[5] . ';';
         }
     }
     return array($style, $data);
 }
Example #19
0
 static function render($slider, $id, $params)
 {
     $html = '';
     $shadowcss = $params->get('shadowcss', false);
     if ($shadowcss && $shadowcss != -1) {
         $displayclass = self::getDisplayClass($params->get('widgetshadowdisplay', '0|*|always|*|0|*|0'), false);
         list($style, $data) = self::getPosition($params->get('shadowposition', ''));
         $width = NextendParse::parse($params->get('shadowwidth', 'width'));
         if (is_numeric($width) || $width == 'auto' || substr($width, -1) == '%') {
             $style .= 'width:' . $width . ';';
         } else {
             $data .= 'data-sswidth="' . $width . '" ';
         }
         $css = NextendCss::getInstance();
         $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'shadow' . DIRECTORY_SEPARATOR . 'style.css'));
         $info = pathinfo($shadowcss);
         $class = 'nextend-shadow nextend-shadow-' . basename($shadowcss, '.' . $info['extension']);
         $html .= '<div class="' . $displayclass . $class . '" style="line-height:0;' . $style . '" ' . $data . '><img src="' . (nextendIsWordpress() ? plugins_url('shadow/shadow/' . $info['basename'], __FILE__) : NextendUri::pathToUri(NextendFilesystem::getBasePath() . $shadowcss)) . '"/></div>';
     }
     return $html;
 }
Example #20
0
 function _renderAdmin($data, $id, $sliderid, $items)
 {
     $link = (array) NextendParse::parse($data->get('link', ''));
     if (!isset($link[1])) {
         $link[1] = '';
     }
     $colors = NextendColor::colorToCss($data->get('color2', '357cbdff'));
     $hovercolors = NextendColor::colorToCss($data->get('hovercolor2', '01add3ff'));
     return '
     <div class="' . $data->get('fontclass') . '">
     ' . ($link[0] != '#' ? '<a href="' . $link[0] . '" target="' . $link[1] . '">' : '') . '
           <span class="nextend-smartslider-tag-' . $data->get('tagclass') . ' ' . $data->get('class') . '">
                 ' . $data->get('content') . '
           </span>
       ' . ($link[0] != '#' ? '</a>' : '') . '
     
       <style>
       ' . $this->getCSS($sliderid, $data->get('tagclass'), $colors[1], $colors[0], $hovercolors[1], $hovercolors[0]) . '
       </style>
     </div>
     ';
 }
Example #21
0
 function getData($number)
 {
     $data = array();
     $api = getNextendFacebook();
     if (!$api) {
         return $data;
     }
     $facebookalbumsbypage = (array) NextendParse::parse($this->_data->get('facebookalbumsbypage', 'nextendweb|*|'));
     try {
         $result = $api->api($facebookalbumsbypage[1] . '/photos');
         $i = 0;
         foreach ($result['data'] as $post) {
             $data[$i]['author_name'] = $data[$i]['title'] = $data[$i]['from_name'] = $post['from']['name'];
             $data[$i]['image'] = $post['images'][0]['source'];
             $data[$i]['thumbnail'] = $post['images'][count($post['images']) - 1]['source'];
             $data[$i]['description'] = isset($post['name']) ? $this->makeClickableLinks($post['name']) : '';
             $data[$i]['url'] = $data[$i]['link'] = $post['link'];
             $data[$i]['url_label'] = 'View image';
             $data[$i]['author_url'] = 'https://www.facebook.com/' . $post['from']['id'];
             $data[$i]['likes'] = isset($post['likes']) && isset($post['likes']['data']) ? count($post['likes']['data']) : 0;
             $data[$i]['comments'] = isset($post['comments']) && isset($post['comments']['data']) ? count($post['comments']['data']) : 0;
             $data[$i]['icon'] = $post['icon'];
             $data[$i]['picture'] = $post['picture'];
             $data[$i]['source'] = $post['source'];
             $x = 1;
             foreach ($post['images'] as $img) {
                 if ($x == 2 && $img["height"] < 960 && $img["width"] < 960) {
                     $data[$i]['image' . $x] = $img['source'];
                     $x++;
                 }
                 $data[$i]['image' . $x] = $img['source'];
                 $x++;
             }
             $i++;
         }
     } catch (Exception $e) {
     }
     return $data;
 }
Example #22
0
    function _renderAdmin($data, $id, $sliderid, $items)
    {
        $link = (array) NextendParse::parse($data->get('link', ''));
        if (!isset($link[1])) {
            $link[1] = '';
        }
        return '<div class="nextend-smartslider-button-' . $data->get('buttonclass', '') . '-container ' . $data->get('fontclass', '') . '" style="cursor:pointer; width: 100%;">
    <a href="' . $link[0] . '" ' . ($link[0] == '#' ? 'onclick="return false;" ' : '') . ' style="display: block;" class="nextend-smartslider-button-' . $data->get('buttonclass', '') . ' ' . $data->get('class', '') . '">
        ' . $data->get('content', '') . '
    </a>
</div>
<style type="text/css">
    div#nextend-smart-slider-0 div.nextend-smartslider-button-' . $data->get('buttonclass', '') . '-container a.nextend-smartslider-button-' . $data->get('buttonclass', '') . '{
        ' . $data->get('css', '') . '
    }
    
    div#nextend-smart-slider-0 div.nextend-smartslider-button-' . $data->get('buttonclass', '') . '-container a.nextend-smartslider-button-' . $data->get('buttonclass', '') . ':HOVER,
    div#nextend-smart-slider-0 div.nextend-smartslider-button-' . $data->get('buttonclass', '') . '-container a.nextend-smartslider-button-' . $data->get('buttonclass', '') . ':FOCUS,
    div#nextend-smart-slider-0 div.nextend-smartslider-button-' . $data->get('buttonclass', '') . '-container a.nextend-smartslider-button-' . $data->get('buttonclass', '') . ':ACTIVE{
        ' . $data->get('csshover', '') . '
    }
</style>';
    }
 static function render($slider, $id, $params)
 {
     $html = '';
     $bargradient = $params->get('bargradient', false);
     if ($bargradient && $bargradient != -1) {
         $displayclass = self::getDisplayClass($params->get('widgetbardisplay', '0|*|always|*|0|*|0'), true);
         $css = NextendCss::getInstance();
         $css->enableLess();
         $cssfile = NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'gradient' . DIRECTORY_SEPARATOR . 'style.less');
         $css->addCssFile(array($cssfile, $cssfile, array('id' => '~"#' . $id . '"')), $id);
         list($style, $data) = self::getPosition($params->get('bargradientposition', ''));
         $width = NextendParse::parse($params->get('bargradientwidth', '100%'));
         if (is_numeric($width) || $width == 'auto' || substr($width, -1) == '%') {
             $style .= 'width:' . $width . ';';
         } else {
             $data .= 'data-sswidth="' . $width . '" ';
         }
         $height = $params->get('bargradientheight', '30');
         $style .= 'height: ' . $height . 'px;';
         $style .= 'font-size: ' . intval($slider->_sliderParams->get('globalfontsize', '12')) . 'px;';
         $info = pathinfo($bargradient);
         $class = 'nextend-bar nextend-bar-g nextend-bar-g-' . basename($bargradient, '.' . $info['extension']);
         $html .= '<div class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '>';
         $html .= '<div class="inner" style="height:' . ($height - 2) . 'px;">';
         for ($i = 0; $i < count($slider->_slides); $i++) {
             $html .= '<div class="nextend-bar-slide ' . ($slider->_slides[$i]['first'] ? ' active' : '') . '">';
             $html .= '<h6 class="' . $params->get('bargradienttitlefont', '') . '" style="line-height: ' . $height . 'px;">' . $slider->_slides[$i]['title'] . '</h6>';
             if ($slider->_slides[$i]['description']) {
                 $html .= '<p class="' . $params->get('bargradientdescriptionfont', '') . '" style="line-height: ' . $height . 'px;"> - ' . $slider->_slides[$i]['description'] . '</p>';
             }
             $html .= '</div>';
         }
         $html .= '</div></div>';
     }
     return $html;
 }
Example #24
0
 function ss_showcase_anim_prop($params, $prop)
 {
     $a = NextendParse::parse($params->get($prop, '0|*|0|*|0|*|0'));
     if ($a[0] != 1) {
         return null;
     } else {
         return array('before' => intval($a[1]), 'active' => intval($a[2]), 'after' => intval($a[3]));
     }
 }
Example #25
0
 static function render($slider, $id, $params)
 {
     $html = '';
     $bullet = $params->get('bullet', false);
     if ($bullet && $bullet != -1) {
         $displayclass = self::getDisplayClass($params->get('widgetbulletdisplay', '0|*|always|*|0|*|0'), true) . 'nextend-widget-bullet ';
         $css = NextendCss::getInstance();
         $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'numbers' . DIRECTORY_SEPARATOR . 'style.css'));
         list($colorhex, $rgbacss) = NextendColor::colorToCss($params->get('bulletbackground', '00000060'));
         list($colorhexhover, $rgbacsshover) = NextendColor::colorToCss($params->get('bulletbackgroundhover', '7670C7ff'));
         list($colorhexborderbar, $rgbacssborderbar) = NextendColor::colorToCss($params->get('bulletbarcolor', '00000060'));
         list($colorhexthumbnail, $rgbacssthumbnail) = NextendColor::colorToCss($params->get('bulletthumbnail', '00000060'));
         list($style, $data) = self::getPosition($params->get('bulletposition', ''));
         $style .= 'visibility: hidden;z-index:10; line-height: 0;';
         $width = NextendParse::parse($params->get('bulletwidth', 'width'));
         if (is_numeric($width) || $width == 'auto' || substr($width, -1) == '%') {
             $style .= 'width:' . $width . ';';
         } else {
             $data .= 'data-sswidth="' . $width . '" ';
         }
         $bulletalign = $params->get('bulletalign', 'center');
         if ($bulletalign) {
             $style .= 'text-align:' . $bulletalign . ';';
         }
         $info = pathinfo($bullet);
         $class = 'nextend-bullet nextend-bullet-numbers nextend-bullet-numbers-' . basename($bullet, '.' . $info['extension']);
         $class .= ' nextend-bullet-' . $params->get('bulletorientation', 'horizontal');
         $shadow = $params->get('bulletshadow', 'none');
         switch ($shadow) {
             case 'inner':
                 $class .= ' bullet-shadow-inner';
                 break;
             case 'outer':
                 $class .= ' bullet-shadow-outer';
                 break;
         }
         $bar = $params->get('bulletbar', 'none');
         switch ($bar) {
             case 'simplerounded':
                 $class .= ' bullet-bar-simple-rounded';
                 break;
             case 'elegantrounded':
                 $class .= ' bullet-bar-elegant-rounded';
                 break;
             case 'simple':
                 $class .= ' bullet-bar-simple';
                 break;
             case 'elegant':
                 $class .= ' bullet-bar-elegant';
                 break;
         }
         $html .= '<div style="' . $style . '" class="' . $displayclass . '" ' . $data . '><div class="nextend-bullet-container ' . $class . '">';
         $i = 0;
         foreach ($slider->_slides as $slide) {
             $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'goto\',' . $i . ',false);" data-thumbnail="' . $slide['thumbnail'] . '"  class="' . $class . ($slide['first'] ? ' active' : '') . '"><span class="' . $params->get('fontclassnumber', 'sliderfont7') . '">
             ' . ($i + 1) . '
             </span></div>';
             $i++;
         }
         $html .= '</div></div>';
         self::tooltip($id, NextendParse::parse($params->get('bullethumbnail', false), '0|*|top'), "nextend-bullet-numbers-thumbnail");
         $thumbnailsize = NextendParse::parse($params->get('thumbnailsizebullet', false), '100|*|60');
         $css->addCssFile('
             #' . $id . ' .nextend-bullet-container .nextend-bullet-numbers.nextend-bullet{                
               background:' . $rgbacss . ';
             }
             #' . $id . ' .nextend-bullet-container .nextend-bullet-numbers.nextend-bullet.active,
             #' . $id . ' .nextend-bullet-container .nextend-bullet-numbers.nextend-bullet:HOVER{
               background:' . $rgbacsshover . ';
             }
             #' . $id . ' .nextend-bullet-container.nextend-bullet.nextend-bullet-numbers.bullet-bar-simple-rounded,              
             #' . $id . ' .nextend-bullet-container.nextend-bullet.nextend-bullet-numbers.bullet-bar-elegant-rounded,
             #' . $id . ' .nextend-bullet-container.nextend-bullet.nextend-bullet-numbers.bullet-bar-simple,              
             #' . $id . ' .nextend-bullet-container.nextend-bullet.nextend-bullet-numbers.bullet-bar-elegant{              
               background:' . $rgbacssborderbar . ';
             }
             #' . $id . ' .nextend-bullet-numbers-thumbnail .qtip-content{
               width:' . $thumbnailsize[0] . 'px;                
               height:' . $thumbnailsize[1] . 'px;
               padding: 4px;
             }         
             #' . $id . ' .nextend-bullet-numbers-thumbnail .qtip-content img{
               box-shadow: 0 0px 0px 1px RGBA(255,255,255,.2);
             }
             #' . $id . ' .nextend-bullet-numbers-thumbnail{
               background: ' . $rgbacssthumbnail . ';
             }', $id);
     }
     return $html;
 }
Example #26
0
$params = $this->_sliderParams;
$width = intval($context['width']);
$height = intval($context['height']);
$context['bgsize'] = NextendParse::parse($params->get('simplebackgroundimagesize', 'auto'));
$border = NextendParse::parse($params->get('simpleborder', '0|*|3E3E3Eff'));
$border1 = intval($border[0]);
$padding = NextendParse::parse($params->get('simplepadding', '0|*|0|*|0|*|0'));
$context['paddingt'] = $padding[0] . 'px';
$context['paddingr'] = $padding[1] . 'px';
$context['paddingb'] = $padding[2] . 'px';
$context['paddingl'] = $padding[3] . 'px';
if ($context['canvas']) {
    $width += 2 * $border1 + $padding[1] + $padding[3];
    $height += 2 * $border1 + $padding[0] + $padding[2];
    $context['width'] = $width . "px";
    $context['height'] = $height . "px";
}
$context['border'] = $border1 . 'px';
$rgba = NextendColor::hex2rgba($border[1]);
$context['borderrgba'] = 'RGBA(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . round($rgba[3] / 127, 2) . ')';
$context['borderhex'] = '#' . substr($border[1], 0, 6);
$borderradius = NextendParse::parse($params->get('simpleborderradius', '0|*|0|*|0|*|0'));
$context['tl'] = $borderradius[0] . 'px';
$context['tr'] = $borderradius[1] . 'px';
$context['br'] = $borderradius[2] . 'px';
$context['bl'] = $borderradius[3] . 'px';
$width = $width - ($padding[1] + $padding[3]) - $border1 * 2;
$height = $height - ($padding[0] + $padding[2]) - $border1 * 2;
$context['inner1height'] = $height . 'px';
$context['canvaswidth'] = $width . "px";
$context['canvasheight'] = $height . "px";
Example #27
0
 function _renderAdmin($data, $id, $sliderid, $items)
 {
     $link = (array) NextendParse::parse($data->get('link', ''));
     if (!isset($link[1])) {
         $link[1] = '';
     }
     $attr = '';
     $click = $data->get('onmouseclick', '');
     if (!empty($click)) {
         $attr = ' data-click="' . htmlspecialchars($click) . '"';
     }
     $enter = $data->get('onmouseenter', '');
     if (!empty($enter)) {
         $attr = ' data-enter="' . htmlspecialchars($enter) . '"';
     }
     $leave = $data->get('onmouseleave', '');
     if (!empty($leave)) {
         $attr = ' data-leave="' . htmlspecialchars($leave) . '"';
     }
     $size = (array) NextendParse::parse($data->get('size', ''));
     if (!isset($size[0])) {
         $size[0] = 'auto';
     }
     if (!isset($size[1])) {
         $size[1] = 'auto';
     }
     $kenburns = (array) NextendParse::parse($data->get('kenburns', ''));
     $style = '';
     if (isset($kenburns[0]) && $kenburns[0]) {
         $data->set('kenburnsclass', 'haskenburns');
     }
     return $style . '<div ' . $attr . '>
         ' . ($link[0] != '#' ? '<a href="' . $link[0] . '" style="display: block;background: none !important;">' : '') . '
             <img id="' . $id . '" class="' . $data->get('cssclass', '') . '" src="' . NextendUri::fixrelative($data->get('image', '')) . '" style="display: block; max-width: 100%; ' . htmlspecialchars($data->get('css', '')) . ';width:' . $size[0] . ';height:' . $size[1] . ';" class="' . $data->get('kenburnsclass', '') . ' ' . $data->get('cssclass', '') . '" />
         ' . ($link[0] != '#' ? '</a>' : '') . '
     </div>';
 }
 static function render($slider, $id, $params)
 {
     $html = '';
     $thumbnail = $params->get('thumbnail', false);
     if ($thumbnail && $thumbnail != '-1') {
         $displayclass = self::getDisplayClass($params->get('widgetthumbnaildisplay', '0|*|always|*|0|*|0'), true);
         $css = NextendCss::getInstance();
         $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'vertical' . DIRECTORY_SEPARATOR . 'style.css'));
         $js = NextendJavascript::getInstance();
         $js->addLibraryJsLibraryFile('jquery', 'jquery.mousewheel.js');
         $js->addLibraryJsFile('jquery', dirname(__FILE__) . '/vertical/script.js');
         $thumbnailactivebackground = $params->get('thumbnailactivebackground', '00000080');
         $rgbathumbnailactivebackground = NextendColor::hex2rgba($thumbnailactivebackground);
         $rgbacssthumbnailactivebackground = 'RGBA(' . $rgbathumbnailactivebackground[0] . ',' . $rgbathumbnailactivebackground[1] . ',' . $rgbathumbnailactivebackground[2] . ',' . round($rgbathumbnailactivebackground[3] / 127, 2) . ')';
         $colorhexthumbnailactivebackground = substr($thumbnailactivebackground, 0, 6);
         $info = pathinfo($thumbnail);
         $class = 'nextend-thumbnail nextend-thumbnail-vertical nextend-thumbnail-vertical-' . basename($thumbnail, '.' . $info['extension']);
         $thumbnailsize = array(NextendParse::parse($params->get('thumbnailsize', '300')));
         $thumbnailcolumn = $params->get('thumbnailcolumn', '30');
         $thumbnailperpage = $params->get('thumbnailperpage', 2);
         list($positionstyle, $data) = self::getPosition($params->get('thumbnailposition', ''));
         $positionstyle .= 'z-index:10; font-size: ' . intval($slider->_sliderParams->get('globalfontsize', '12')) . 'px;';
         $html .= '<div id="' . $id . '-thumbnail" class="' . $displayclass . '" style="width: ' . $thumbnailsize[0] . 'px;height: 100%;' . $positionstyle . '" ' . $data . '>';
         $html .= '<div class="nextend-thumbnail-container ' . $class . ' nextend-clearfix">
         <div class="nextend-arrow-top"></div>';
         $html .= '<div class="nextend-thumbnail-strip-hider"><div class="nextend-thumbnail-strip">';
         $thumbnailtitlelink = $params->get('thumbnailtitlelink', 0);
         for ($i = 0; $i < count($slider->_slides); $i++) {
             $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'goto\',' . $i . ',false);" class="' . $class . ($slider->_slides[$i]['first'] ? ' active' : '') . '">';
             if ($thumbnailcolumn != 0) {
                 if (!$slider->_slides[$i]['thumbnail'] && $slider->_slides[$i]['bg']['desktop']) {
                     $slider->_slides[$i]['thumbnail'] = $slider->_slides[$i]['bg']['desktop'];
                 }
                 $html .= '<div class="nextend-thumbnail-vertical-image" style="float:left;width:' . $thumbnailcolumn . '%; background-image:url(\'' . $slider->_slides[$i]['thumbnail'] . '\');"></div>';
             }
             $html .= '<div class="nextend-thumbnail-vertical-content" style="width:' . (100 - $thumbnailcolumn) . '%;">';
             $link = NextendParse::parse($slider->_slides[$i]['params']->get('link'));
             if ($thumbnailtitlelink && $link[0] != '' && $link[0] != '#') {
                 $html .= '<h4 class="' . $params->get('thumbnailfontclasstitle') . '"><a href="' . $link[0] . '" target="' . $link[1] . '">' . $slider->_slides[$i]['title'] . '</a></h4>';
             } else {
                 $html .= '<h4 class="' . $params->get('thumbnailfontclasstitle') . '">' . $slider->_slides[$i]['title'] . '</h4>';
             }
             $html .= '<p class="' . $params->get('thumbnailfontclassdescription') . '">' . $slider->_slides[$i]['description'] . '</p>
                 </div></div>';
         }
         $html .= '</div></div></td>';
         $html .= '<div class="nextend-arrow-bottom"></div></div></div>';
         $html .= "\n              <script type='text/javascript'>\n                  njQuery(document).ready(function () {\n                      window['" . $id . "-thumbnail'] = new smartSliderVertical({\n                          id: '" . $id . "',\n                          node: window.njQuery('#" . $id . "-thumbnail'),\n                          thumbnailperpage: '" . $thumbnailperpage . "',\n                          thumbnailanimation: '" . $params->get('thumbnailanimation', 700) . "'\n                      });\n                  });\n              </script>\n            ";
         $css->addCssFile('
             #' . $id . ' .nextend-thumbnail-container .nextend-thumbnail-vertical-vertical1:HOVER,            
             #' . $id . ' .nextend-thumbnail-container .nextend-thumbnail-vertical-vertical1.active,                      
             #' . $id . ' .nextend-thumbnail-container.nextend-thumbnail-vertical-vertical1 .nextend-arrow-top:HOVER,
             #' . $id . ' .nextend-thumbnail-container.nextend-thumbnail-vertical-vertical1 .nextend-arrow-bottom:HOVER,
             #' . $id . ' .nextend-thumbnail-container .nextend-thumbnail-vertical-vertical-light:HOVER,            
             #' . $id . ' .nextend-thumbnail-container .nextend-thumbnail-vertical-vertical-light.active,                      
             #' . $id . ' .nextend-thumbnail-container.nextend-thumbnail-vertical-vertical-light .nextend-arrow-top:HOVER,
             #' . $id . ' .nextend-thumbnail-container.nextend-thumbnail-vertical-vertical-light .nextend-arrow-bottom:HOVER{            
                 background-color:' . $rgbacssthumbnailactivebackground . ';
             }', $id);
     }
     return $html;
 }
Example #29
0
$border1 = $border[0];
$context['border1'] = $border1 . 'px';
$rgba = NextendColor::hex2rgba($border[1]);
$context['border1rgba'] = 'RGBA(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . round($rgba[3] / 127, 2) . ')';
$context['border1hex'] = '#' . substr($border[1], 0, 6);
$border2 = $border[2];
$context['border2'] = $border2 . 'px';
$rgba = NextendColor::hex2rgba($border[3]);
$context['border2rgba'] = 'RGBA(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . round($rgba[3] / 127, 2) . ')';
$context['border2hex'] = '#' . substr($border[3], 0, 6);
$borderradius = NextendParse::parse($params->get('accordionverticalborderradius', '6|*|6|*|6|*|6'));
$context['tl'] = $borderradius[0] . 'px';
$context['tr'] = $borderradius[1] . 'px';
$context['bl'] = $borderradius[3] . 'px';
$context['br'] = $borderradius[2] . 'px';
$tagmargin = NextendParse::parse($params->get('accordionverticaltagmargin', '10|*|10'));
$context['tagmarginleft'] = $tagmargin[0] . 'px';
$context['tagmarginright'] = $tagmargin[1] . 'px';
$tabbg = $params->get('accordionverticaltabbg', '3E3E3E');
$context['tabbg'] = '#' . $tabbg;
$tabbgactive = $params->get('accordionverticaltabbgactive', '87B801');
$context['tabbgactive'] = '#' . $tabbgactive;
$slidemargin = 2;
$context['slidemargin'] = $slidemargin . 'px';
$context['slidemarginneg'] = -$slidemargin . 'px';
$titleheights = $titleheight * $context['count'];
$context['inner1margin'] = '0';
if ($context['canvas']) {
    $width += 2 * ($border1 + $border2) + $slidemargin * 2;
    $height += 2 * ($border1 + $border2 + $slidemargin * $context['count']) + $titleheights;
    $context['width'] = $width . "px";
Example #30
0
 function _renderAdmin($data, $id, $sliderid, $items)
 {
     $link = (array) NextendParse::parse($data->get('link', ''));
     if (!isset($link[1])) {
         $link[1] = '';
     }
     $colors = NextendColor::colorToCss($data->get('color', '00000080'));
     $size = (array) NextendParse::parse($data->get('size', ''));
     if (!isset($size[0])) {
         $size[0] = '100';
     }
     if (!isset($size[1])) {
         $size[1] = '100';
     }
     return '
       <div id="' . $id . '">
         ' . ($link[0] != '#' ? '<a href="' . $link[0] . '" target="' . $link[1] . '" style="display: block; background: none !important;">' : '') . '
       		<div class="nextend-smartslider-caption ' . $data->get('customcaptionclass', '') . '" style="width:' . $size[0] . 'px; height:' . $size[1] . 'px;">
       			<img alt="' . htmlspecialchars($data->get('alt', '')) . '" src="' . $data->get('image', '') . '" class="img-' . $data->get('captionclass', '') . '" />
       				<div class="caption nextend-smartslider-caption-' . $data->get('captionclass', '') . '" style="background:#' . $colors[0] . ';background:' . $colors[1] . ';">
       				  <h4 class="' . $data->get('fontclasstitle', '') . '">' . $data->get('content', '') . '</h4>
       					<p class="' . $data->get('fontclass', '') . '">' . $data->get('description', '') . '</p>
       				</div>
       		</div>
         ' . ($link[0] != '#' ? '</a>' : '') . '
 
       	<script type="text/javascript">
             ' . $this->getJs($sliderid, $id) . '
       	</script>
     </div>
     ';
 }