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


PHP NextendParse类代码示例

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


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

示例1: NextendSliderWidgets

 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);
         }
     }
 }
开发者ID:sangikumar,项目名称:IP,代码行数:29,代码来源:widgets.php

示例2: getData

 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;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:35,代码来源:generator.php

示例3: render

 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;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:27,代码来源:stripe.php

示例4: fetchElement

 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;
 }
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:35,代码来源:facebookalbumsbypage.php

示例5: _renderAdmin

 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) . '>
     ';
 }
开发者ID:sangikumar,项目名称:IP,代码行数:25,代码来源:heading.php

示例6: getData

 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;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:58,代码来源:generator.php

示例7: parseTshadow

 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) . ');';
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:9,代码来源:font.php

示例8: getData

 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;
 }
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:55,代码来源:generator.php

示例9: _render

 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>';
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:11,代码来源:iframe.php

示例10: getData

 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;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:51,代码来源:generator.php

示例11: render

    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;
    }
开发者ID:pguilford,项目名称:vcomcc,代码行数:50,代码来源:horizontal.php

示例12: render

 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;
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:49,代码来源:gallery.php

示例13: _renderAdmin

 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>';
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:15,代码来源:paragraph.php

示例14: render

 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;
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:48,代码来源:colored.php

示例15: _renderAdmin

 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>
     ';
 }
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:17,代码来源:flipper.php


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