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


PHP NextendFilesystem::translateToMediaPath方法代码示例

本文整理汇总了PHP中NextendFilesystem::translateToMediaPath方法的典型用法代码示例。如果您正苦于以下问题:PHP NextendFilesystem::translateToMediaPath方法的具体用法?PHP NextendFilesystem::translateToMediaPath怎么用?PHP NextendFilesystem::translateToMediaPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NextendFilesystem的用法示例。


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

示例1: 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

示例2: generateOptions

 function generateOptions(&$xml)
 {
     $template = (string) $this->_xml;
     $cssfile = NextendFilesystem::translateToMediaPath(str_replace(DIRECTORY_SEPARATOR, '/', dirname($this->_form->_xmlfile)) . '/style.');
     $css = NextendCss::getInstance();
     if (NextendFilesystem::fileexists($cssfile . 'less')) {
         $css->enableLess();
         $cssfile .= 'less';
         $css->addCssFile(array($cssfile, $cssfile, array('id' => 'body')));
     } else {
         $cssfile .= 'css';
         $css->addCssFile($cssfile);
     }
     $prefix = NextendXmlGetAttribute($this->_xml, 'prefix');
     $this->_values = array();
     $html = '';
     foreach ($xml->option as $option) {
         $v = NextendXmlGetAttribute($option, 'value');
         $this->_values[] = $v;
         if ($v != -1) {
             $info = pathinfo($v);
             $class = $prefix . basename($v, '.' . $info['extension']);
             $html .= '
             <div class="nextend-radio-option nextend-imagelist-option' . $this->isSelected($v) . '">
                 ' . str_Replace('{image}', NextendUri::pathToUri($v), str_Replace('{class}', $class, $template)) . '
             </div>';
         } else {
             $html .= '<div class="nextend-radio-option' . $this->isSelected($v) . '">' . (string) $option . '</div>';
         }
     }
     return $html;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:32,代码来源:cssimagelist.php

示例3: render

 static function render($slider, $id, $params)
 {
     $html = '';
     $previous = $params->get('previous', false);
     $next = $params->get('next', false);
     $enabled = $previous && $previous != -1 || $next && $next != -1;
     if ($enabled) {
         $displayclass = self::getDisplayClass($params->get('widgetarrowdisplay', '0|*|always|*|0|*|0'), true);
         $css = NextendCss::getInstance();
         $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'image' . DIRECTORY_SEPARATOR . 'style.css'));
         if ($previous && $previous != -1) {
             list($style, $data) = self::getPosition($params->get('previousposition', ''));
             $info = pathinfo($previous);
             $class = 'nextend-arrow-previous nextend-image nextend-image-previous nextend-image-previous-' . basename($previous, '.' . $info['extension']);
             $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'previous\');" class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '></div>';
         }
         if ($next && $next != -1) {
             list($style, $data) = self::getPosition($params->get('nextposition', ''));
             $info = pathinfo($next);
             $class = 'nextend-arrow-next nextend-image nextend-image-next nextend-image-next-' . basename($next, '.' . $info['extension']);
             $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'next\');" class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '></div>';
         }
     }
     return $html;
 }
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:25,代码来源:image.php

示例4: 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

示例5: 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

示例6: render

 static function render($slider, $id, $params)
 {
     $html = '';
     $autoplayimage = $params->get('autoplayimage', false);
     if ($autoplayimage && $autoplayimage != -1) {
         $displayclass = self::getDisplayClass($params->get('widgetautoplaydisplay', '0|*|always|*|0|*|0'), true);
         $css = NextendCss::getInstance();
         $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'image' . DIRECTORY_SEPARATOR . 'style.css'));
         list($style, $data) = self::getPosition($params->get('autoplayimageposition', ''));
         $info = pathinfo($autoplayimage);
         $class = 'nextend-autoplay-button nextend-autoplay-image nextend-autoplay-' . basename($autoplayimage, '.' . $info['extension']);
         $html .= '<div onclick="njQuery(this).hasClass(\'paused\') ? njQuery(\'#' . $id . '\').smartslider(\'startautoplay\') : njQuery(\'#' . $id . '\').smartslider(\'pauseautoplay\');" class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '></div>';
     }
     return $html;
 }
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:15,代码来源:image.php

示例7: 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

示例8: render

 static function render($slider, $id, $params)
 {
     $html = '';
     $previous = $params->get('previous', false);
     $next = $params->get('next', false);
     $enabled = $previous && $previous != -1 || $next && $next != -1;
     $fontsize = intval($slider->_sliderParams->get('globalfontsize', '12'));
     if ($enabled) {
         $displayclass = self::getDisplayClass($params->get('widgetarrowdisplay', '0|*|always|*|0|*|0'), true);
         list($colorhex, $rgbacss) = NextendColor::colorToCss($params->get('arrowtextbackground', '00ff00ff'));
         list($colorhexhover, $rgbacsshover) = NextendColor::colorToCss($params->get('arrowtextbackgroundhover', '000000ff'));
         $css = NextendCss::getInstance();
         $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'text' . DIRECTORY_SEPARATOR . 'style.css'));
         if ($previous && $previous != -1) {
             list($style, $data) = self::getPosition($params->get('previousposition', ''));
             $style .= 'font-size: ' . $fontsize . 'px;';
             $info = pathinfo($previous);
             $class = 'nextend-arrow-previous nextend-arrow-text nextend-arrow-text-previous nextend-arrow-text-previous-' . basename($previous, '.' . $info['extension']);
             $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'previous\');" class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '>
                         <span class="' . $params->get('fontclassprev', 'sliderfont7') . '">' . $params->get('contentprev', 'Prev') . '</span>
                       </div>';
         }
         if ($next && $next != -1) {
             list($style, $data) = self::getPosition($params->get('nextposition', ''));
             $style .= 'font-size: ' . $fontsize . 'px;';
             $info = pathinfo($next);
             $class = 'nextend-arrow-next nextend-arrow-text nextend-arrow-text-next nextend-arrow-text-next-' . basename($next, '.' . $info['extension']);
             $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'next\');" class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '>
                         <span class="' . $params->get('fontclassnext', 'sliderfont7') . '">' . $params->get('contentnext', 'Next') . '</span>
                       </div>';
         }
         $css->addCssFile('
             #' . $id . ' .nextend-arrow-text-next,
             #' . $id . ' .nextend-arrow-text-previous{
                 background-color:' . $rgbacss . ';
             }
             #' . $id . ' .nextend-arrow-text-next:HOVER,
             #' . $id . ' .nextend-arrow-text-previous:HOVER{
                 background-color:' . $rgbacsshover . ';
             }', $id);
     }
     return $html;
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:43,代码来源:text.php

示例9: render

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

示例10: render

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

示例11: render

 static function render($slider, $id, $params)
 {
     $html = '';
     $previous = $params->get('previous', false);
     $next = $params->get('next', false);
     $enabled = $previous && $previous != -1 || $next && $next != -1;
     if ($enabled) {
         $displayclass = self::getDisplayClass($params->get('widgetarrowdisplay', '0|*|always|*|0|*|0'), true);
         list($colorhex, $rgbacss) = NextendColor::colorToCss($params->get('arrowbackground', '00ff00ff'));
         list($colorhexhover, $rgbacsshover) = NextendColor::colorToCss($params->get('arrowbackgroundhover', '000000ff'));
         $css = NextendCss::getInstance();
         $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'transition' . DIRECTORY_SEPARATOR . 'style.css'));
         if ($previous && $previous != -1) {
             list($style, $data) = self::getPosition($params->get('previousposition', ''));
             $info = pathinfo($previous);
             $class = 'nextend-arrow-previous nextend-transition nextend-transition-previous nextend-transition-previous-' . basename($previous, '.' . $info['extension']);
             $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'previous\');" class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '><div class="smartslider-outer"></div><div class="smartslider-inner"></div></div>';
         }
         if ($next && $next != -1) {
             list($style, $data) = self::getPosition($params->get('nextposition', ''));
             $info = pathinfo($next);
             $class = 'nextend-arrow-next nextend-transition nextend-transition-next nextend-transition-next-' . basename($next, '.' . $info['extension']);
             $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'next\');" class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '><div class="smartslider-outer"></div><div class="smartslider-inner"></div></div>';
         }
         $css->addCssFile('
             #' . $id . ' .nextend-transition.nextend-transition-previous .smartslider-outer,
             #' . $id . ' .nextend-transition.nextend-transition-next .smartslider-outer{
                 background-color:' . $rgbacss . ';
             }
             #' . $id . ' .nextend-transition.nextend-transition-previous .smartslider-inner,
             #' . $id . ' .nextend-transition.nextend-transition-next .smartslider-inner{
                 background-color:' . $rgbacsshover . ';
             }', $id);
     }
     return $html;
 }
开发者ID:AndyHuntDesign,项目名称:andyhuntdesign,代码行数:36,代码来源:transition.php

示例12: render

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

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

示例14: generateDynamicSliderThumbs

function generateDynamicSliderThumbs($controller, $image, $sliderid, $id, $data)
{
    global $layout, $sliderpreset;
    ?>

    <div class="smartslider-dynamic-thumb <?php 
    echo $sliderpreset == $id ? 'selected' : 'notselected';
    ?>
" onclick="location.href='<?php 
    echo $controller->route('controller=sliders&view=sliders_slider&action=changedynamiclayout&fontset=' . NextendRequest::getInt('fontset', 0) . '&type=' . NextendRequest::getVar('type', '') . '&sliderid=' . $sliderid . '&sliderpreset=' . ($sliderpreset == $id ? '' : $id) . '&layout=' . $layout);
    ?>
'">
        <div><?php 
    echo $data['title'];
    ?>
</div>
        <img src="<?php 
    echo NextendUri::pathToUri(NextendFilesystem::translateToMediaPath($image));
    ?>
" />
    </div>
    <?php 
}
开发者ID:sangikumar,项目名称:IP,代码行数:23,代码来源:changedynamiclayout.php

示例15: foreach

</div>
<?php 
}
?>


<?php 
if (count($notavailable)) {
    ?>

<h2>Not available</h2>
<div class="blue-container">
<?php 
    foreach ($notavailable as $group => $sources) {
        foreach ($sources as $type => $data) {
            generateDynamicThumbs($this, NextendFilesystem::translateToMediaPath($data[1] . '../dynamic.png'), $group, $type, NextendText::_($groups[$group]) . ': ' . $data[0], $data[2], $data[3], $data[4]);
        }
    }
    ?>

</div>
<?php 
}
?>


<?php 
$this->loadFragment('secondcolend');
?>

开发者ID:sangikumar,项目名称:IP,代码行数:29,代码来源:createdynamic.php


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