예제 #1
0
파일: text.php 프로젝트: vicpril/rep_bidqa
        // under certain strange conditions it could create a P of entirely whitespace
        $pee = preg_replace('!<p>([^<]+)</(div|address|form)>!', "<p>\$1</p></\$2>", $pee);
        $pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)\\s*</p>!', "\$1", $pee);
        // don't pee all over a tag
        $pee = preg_replace("|<p>(<li.+?)</p>|", "\$1", $pee);
        // problem with nested lists
        $pee = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote\$1><p>", $pee);
        $pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);
        $pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)!', "\$1", $pee);
        $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*</p>!', "\$1", $pee);
        if ($br) {
            $pee = preg_replace_callback('/<(script|style).*?<\\/\\1>/s', 'N2SSPluginItemText::_autop_newline_preservation_helper', $pee);
            $pee = preg_replace('|(?<!<br />)\\s*\\n|', "<br />\n", $pee);
            // optionally make line breaks
            $pee = str_replace('<WPPreserveNewline />', "\n", $pee);
        }
        $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*<br />!', "\$1", $pee);
        $pee = preg_replace('!<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);
        $pee = preg_replace("|\n</p>\$|", '</p>', $pee);
        if (!empty($pre_tags)) {
            $pee = str_replace(array_keys($pre_tags), array_values($pre_tags), $pee);
        }
        return $pee;
    }
    public static function _autop_newline_preservation_helper($matches)
    {
        return str_replace("\n", "<WPPreserveNewline />", $matches[0]);
    }
}
N2Plugin::addPlugin('ssitem', 'N2SSPluginItemText');
N2Pluggable::addAction('smartsliderDefault', 'N2SSPluginItemText::onSmartsliderDefaultSettings');
예제 #2
0
파일: posts.php 프로젝트: MBerguer/wp-demo
<?php

if (N2Platform::$isWordpress) {
    N2Loader::import('libraries.plugins.N2SliderGeneratorPluginAbstract', 'smartslider');
    class N2SSPluginGeneratorPosts extends N2SliderGeneratorPluginAbstract
    {
        public static $_group = 'posts';
        public static $groupLabel = 'WordPress';
        function onGeneratorList(&$group, &$list)
        {
            $group[self::$_group] = 'Posts';
            if (!isset($list[self::$_group])) {
                $list[self::$_group] = array();
            }
            $list[self::$_group]['posts'] = N2GeneratorInfo::getInstance(self::$groupLabel, n2_('Posts by filter'), $this->getPath() . 'posts')->setType('article');
            $list[self::$_group]['postsbyids'] = N2GeneratorInfo::getInstance(self::$groupLabel, n2_('Posts by IDs'), $this->getPath() . 'postsbyids')->setType('article');
        }
        function getPath()
        {
            return dirname(__FILE__) . DIRECTORY_SEPARATOR;
        }
    }
    N2Plugin::addPlugin('ssgenerator', 'N2SSPluginGeneratorPosts');
}
예제 #3
0
파일: google.php 프로젝트: MBerguer/wp-demo
                N2Pluggable::addAction('fontFamily', array($this, 'onFontFamily'));
            }
        }
    }
    function onFontManagerLoadBackend()
    {
        N2JS::addInline('new NextendFontServiceGoogle("' . implode(',', self::$styles) . '","' . implode(',', self::$subsets) . '", ' . json_encode(self::$fonts) . ');');
    }
    function addStyle($parameters, $weight)
    {
        if ($parameters->get('google-style-' . $weight, 0)) {
            self::$styles[] = $weight;
        }
    }
    function addSubset($parameters, $subset)
    {
        if ($parameters->get('google-set-' . $subset, 0)) {
            self::$subsets[] = $subset;
        }
    }
    function onFontFamily($family)
    {
        if (in_array($family, self::$fonts)) {
            foreach (self::$styles as $style) {
                N2GoogleFonts::addFont($family, $style);
            }
        }
    }
}
N2Plugin::addPlugin('fontservices', 'N2SystemPluginFontServiceGoogle');
예제 #4
0
<?php

class N2SSPluginWidgetThumbnail extends N2PluginBase
{
    private static $group = 'thumbnail';
    function onWidgetList(&$list)
    {
        $list[self::$group] = array(n2_('Thumbnails'), $this->getPath(), 6);
    }
    function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . self::$group . DIRECTORY_SEPARATOR;
    }
}
N2Plugin::addPlugin('sswidget', 'N2SSPluginWidgetThumbnail');
예제 #5
0
파일: image.php 프로젝트: MBerguer/wp-demo
        self::initDefaultStyle();
        return array('image' => '$system$/images/placeholder/image.png', 'alt' => n2_('Image is not available'), 'title' => '', 'link' => '#|*|_self', 'size' => '100%|*|auto', 'style' => self::$style, 'cssclass' => '', 'image-optimize' => 1);
    }
    function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . $this->_identifier . DIRECTORY_SEPARATOR;
    }
    public function getFilled($slide, $data)
    {
        $data->set('image', $slide->fill($data->get('image', '')));
        $data->set('alt', $slide->fill($data->get('alt', '')));
        $data->set('title', $slide->fill($data->get('title', '')));
        $data->set('link', $slide->fill($data->get('link', '#|*|')));
        return $data;
    }
    public function prepareExport($export, $data)
    {
        $export->addImage($data->get('image'));
        $export->addVisual($data->get('style'));
        $export->addLightbox($data->get('link'));
    }
    public function prepareImport($import, $data)
    {
        $data->set('image', $import->fixImage($data->get('image')));
        $data->set('style', $import->fixSection($data->get('style')));
        $data->set('link', $import->fixLightbox($data->get('link')));
        return $data;
    }
}
N2Plugin::addPlugin('ssitem', 'N2SSPluginItemImage');
N2Pluggable::addAction('smartsliderDefault', 'N2SSPluginItemImage::onSmartsliderDefaultSettings');
예제 #6
0
        });');
        return N2Html::tag('div', array('id' => $itemId, 'style' => 'position: absolute; top: 0; left: 0; width: 100%; height: 100%;' . $style));
    }
    function _renderAdmin($data, $itemId, $slider, $slide)
    {
        return N2Html::tag('div', array("style" => 'width: 100%; height: 100%; background: url(' . N2ImageHelper::fixed($data->getIfEmpty('image', '$system$/images/placeholder/video.png')) . ') no-repeat 50% 50%; background-size: cover;'));
    }
    function parseYoutubeUrl($youTubeUrl)
    {
        preg_match('/^.*((youtu.be\\/)|(v\\/)|(\\/u\\/\\w\\/)|(embed\\/)|(watch\\?))\\??v?=?([^#\\&\\?]*).*/', $youTubeUrl, $matches);
        if ($matches && isset($matches[7]) && strlen($matches[7]) == 11) {
            return $matches[7];
        }
        return $youTubeUrl;
    }
    function getValues()
    {
        return array('code' => 'qesNtYIBDfs', 'youtubeurl' => 'https://www.youtube.com/watch?v=MKmIwHAFjSU', 'image' => '$system$/images/placeholder/video.png', 'autoplay' => 0, 'controls' => 1, 'defaultimage' => 'maxresdefault', 'related' => '0', 'vq' => 'default', 'center' => 0, 'loop' => 0);
    }
    function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . $this->_identifier . DIRECTORY_SEPARATOR;
    }
    public function getFilled($slide, $data)
    {
        $data->set('youtubeurl', $slide->fill($data->get('youtubeurl', '')));
        return $data;
    }
}
N2Plugin::addPlugin('ssitem', 'N2SSPluginItemYouTube');
예제 #7
0
<?php

/**
* @author    Roland Soos
* @copyright (C) 2015 Nextendweb.com
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die('Restricted access');
class N2SSPluginWidgetAutoplay extends N2PluginBase
{
    private static $group = 'autoplay';
    function onWidgetList(&$list)
    {
        $list[self::$group] = array(n2_('Autoplay'), $this->getPath(), 3);
    }
    function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . self::$group . DIRECTORY_SEPARATOR;
    }
}
N2Plugin::addPlugin('sswidget', 'N2SSPluginWidgetAutoplay');
예제 #8
0
파일: image.php 프로젝트: MBerguer/wp-demo
            list($color, $opacity) = N2Color::colorToSVG($pauseColor);
            $pause = 'data:image/svg+xml;base64,' . base64_encode(str_replace(array('fill="#FFF"', 'opacity="1"'), array('fill="#' . $color . '"', 'opacity="' . $opacity . '"'), N2Filesystem::readFile(N2ImageHelper::fixed($pause, true))));
        } else {
            $pause = N2ImageHelper::fixed($pause);
        }
        if ($play && $pause) {
            N2CSS::addFile(N2Filesystem::translate(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'image' . DIRECTORY_SEPARATOR . 'style.css'), $id);
            N2JS::addFile(N2Filesystem::translate(dirname(__FILE__) . '/image/autoplay.js'), $id);
            list($displayClass, $displayAttributes) = self::getDisplayAttributes($params, self::$key);
            $styleClass = N2StyleRenderer::render($params->get(self::$key . 'style'), 'heading', $slider->elementId, 'div#' . $slider->elementId . ' ');
            list($style, $attributes) = self::getPosition($params, self::$key);
            N2JS::addInline('new NextendSmartSliderWidgetAutoplayImage("' . $id . '", ' . floatval($params->get(self::$key . 'responsive-desktop')) . ', ' . floatval($params->get(self::$key . 'responsive-tablet')) . ', ' . floatval($params->get(self::$key . 'responsive-mobile')) . ');');
            $html = N2Html::tag('div', $displayAttributes + $attributes + array('class' => $displayClass . $styleClass . 'nextend-autoplay nextend-autoplay-image', 'style' => $style), N2Html::image($play, '', array('class' => 'nextend-autoplay-play n2-ow')) . N2Html::image($pause, '', array('class' => 'nextend-autoplay-pause n2-ow')));
        }
        return $html;
    }
    public static function prepareExport($export, $params)
    {
        $export->addImage($params->get(self::$key . 'play-image', ''));
        $export->addImage($params->get(self::$key . 'pause-image', ''));
        $export->addVisual($params->get(self::$key . 'style'));
    }
    public static function prepareImport($import, $params)
    {
        $params->set(self::$key . 'play-image', $import->fixImage($params->get(self::$key . 'play-image', '')));
        $params->set(self::$key . 'pause-image', $import->fixImage($params->get(self::$key . 'pause-image', '')));
        $params->set(self::$key . 'style', $import->fixSection($params->get(self::$key . 'style', '')));
    }
}
N2Plugin::addPlugin('sswidgetautoplay', 'N2SSPluginWidgetAutoplayImage');
예제 #9
0
**/
defined('_JEXEC') or die('Restricted access');
class N2SSPluginResponsiveFullWidth extends N2PluginBase
{
    private static $name = 'fullwidth';
    function onResponsiveList(&$list, &$labels)
    {
        $list[self::$name] = $this->getPath();
        $labels[self::$name] = n2_x('Fullwidth', 'Slider responsive mode');
    }
    static function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . self::$name . DIRECTORY_SEPARATOR;
    }
}
N2Plugin::addPlugin('ssresponsive', 'N2SSPluginResponsiveFullWidth');
class N2SSResponsiveFullWidth
{
    private $params, $responsive;
    /**
     * @param $params
     * @param $responsive N2SmartSliderFeatureResponsive
     */
    public function __construct($params, $responsive)
    {
        $this->params = $params;
        $this->responsive = $responsive;
        $this->responsive->scaleDown = 1;
        $this->responsive->scaleUp = 1;
        $this->responsive->minimumHeight = intval($this->params->get('responsiveSliderHeightMin', 0));
        $this->responsive->maximumHeight = intval($this->params->get('responsiveSliderHeightMax', 3000));
예제 #10
0
파일: bullet.php 프로젝트: MBerguer/wp-demo
<?php

class N2SSPluginWidgetBullet extends N2PluginBase
{
    private static $group = 'bullet';
    function onWidgetList(&$list)
    {
        $list[self::$group] = array(n2_('Bullets'), $this->getPath(), 2);
    }
    function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . self::$group . DIRECTORY_SEPARATOR;
    }
}
N2Plugin::addPlugin('sswidget', 'N2SSPluginWidgetBullet');
예제 #11
0
파일: simple.php 프로젝트: MBerguer/wp-demo
<?php

class N2SSPluginTypeSimple extends N2PluginBase
{
    private static $name = 'simple';
    function onTypeList(&$list, &$labels)
    {
        $list[self::$name] = $this->getPath();
        $labels[self::$name] = n2_x('Simple', 'Slider type');
    }
    static function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . self::$name . DIRECTORY_SEPARATOR;
    }
}
N2Plugin::addPlugin('sstype', 'N2SSPluginTypeSimple');
예제 #12
0
파일: auto.php 프로젝트: MBerguer/wp-demo
<?php

class N2SSPluginResponsiveAuto extends N2PluginBase
{
    private static $name = 'auto';
    function onResponsiveList(&$list, &$labels)
    {
        $list[self::$name] = $this->getPath();
        $labels[self::$name] = n2_x('Auto', 'Slider responsive mode');
    }
    static function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . self::$name . DIRECTORY_SEPARATOR;
    }
}
N2Plugin::addPlugin('ssresponsive', 'N2SSPluginResponsiveAuto');
class N2SSResponsiveAuto
{
    private $params, $responsive;
    public function __construct($params, $responsive)
    {
        $this->params = $params;
        $this->responsive = $responsive;
        $this->responsive->scaleDown = intval($this->params->get('responsiveScaleDown', 1));
        $this->responsive->scaleUp = intval($this->params->get('responsiveScaleUp', 0));
        $this->responsive->minimumHeight = intval($this->params->get('responsiveSliderHeightMin', 0));
        $this->responsive->maximumHeight = intval($this->params->get('responsiveSliderHeightMax', 3000));
        $this->responsive->maximumSlideWidth = intval($this->params->get('responsiveSlideWidthMax', 3000));
    }
}
예제 #13
0
<?php

/**
* @author    Roland Soos
* @copyright (C) 2015 Nextendweb.com
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die('Restricted access');
N2Loader::import('libraries.plugins.N2SliderGeneratorPluginAbstract', 'smartslider');
class N2SSPluginGeneratorJoomlaContent extends N2PluginBase
{
    public static $group = 'joomlacontent';
    public static $groupLabel = 'Joomla content';
    function onGeneratorList(&$group, &$list)
    {
        $group[self::$group] = self::$groupLabel;
        if (!isset($list[self::$group])) {
            $list[self::$group] = array();
        }
        $list[self::$group]['article'] = N2GeneratorInfo::getInstance(self::$groupLabel, n2_('Articles'), $this->getPath() . 'article')->setType('article');
        $list[self::$group]['category'] = N2GeneratorInfo::getInstance(self::$groupLabel, n2_('Categories'), $this->getPath() . 'category')->setType('article');
    }
    function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR;
    }
}
N2Plugin::addPlugin('ssgenerator', 'N2SSPluginGeneratorJoomlaContent');
예제 #14
0
            if ($shadow == -1) {
                $shadow = null;
            }
        }
        if (!$shadow) {
            return '';
        }
        N2JS::addFile(N2Filesystem::translate(dirname(__FILE__) . '/shadow/shadow.js'), $id);
        list($displayClass, $displayAttributes) = self::getDisplayAttributes($params, self::$key);
        list($style, $attributes) = self::getPosition($params, self::$key);
        $width = $params->get(self::$key . 'width');
        if (is_numeric($width) || substr($width, -1) == '%' || substr($width, -2) == 'px') {
            $style .= 'width:' . $width . ';';
        } else {
            $attributes['data-sswidth'] = $width;
        }
        $parameters = array('overlay' => $params->get(self::$key . 'position-mode') != 'simple' || 0, 'area' => intval($params->get(self::$key . 'position-area')));
        N2JS::addInline('new NextendSmartSliderWidgetShadow("' . $id . '", ' . json_encode($parameters) . ');');
        return N2Html::tag('div', $displayAttributes + $attributes + array('class' => $displayClass . "nextend-shadow", 'style' => $style), N2Html::image(N2ImageHelper::fixed($shadow), 'Shadow', array('style' => 'display: block; width:100%;max-width:none;', 'class' => 'n2-ow nextend-shadow-image')));
    }
    public static function prepareExport($export, $params)
    {
        $export->addImage($params->get(self::$key . 'shadow-image', ''));
    }
    public static function prepareImport($import, $params)
    {
        $params->set(self::$key . 'shadow-image', $import->fixImage($params->get(self::$key . 'shadow-image', '')));
    }
}
N2Plugin::addPlugin('sswidgetshadow', 'N2SSPluginWidgetShadowShadow');
예제 #15
0
파일: arrow.php 프로젝트: MBerguer/wp-demo
<?php

class N2SSPluginWidgetArrow extends N2PluginBase
{
    private static $group = 'arrow';
    function onWidgetList(&$list)
    {
        $list[self::$group] = array(n2_('Arrows'), $this->getPath(), 1);
    }
    function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . self::$group . DIRECTORY_SEPARATOR;
    }
}
N2Plugin::addPlugin('sswidget', 'N2SSPluginWidgetArrow');
예제 #16
0
            if ($showDescription && !empty($description)) {
                $slides[$i] .= N2Html::tag('span', array('class' => $fontDescription), $separator . $description);
            }
        }
        $parameters = array('overlay' => $params->get(self::$key . 'position-mode') != 'simple' || $params->get(self::$key . 'overlay'), 'area' => intval($params->get(self::$key . 'position-area')), 'animate' => intval($params->get(self::$key . 'animate')));
        N2JS::addInline('new NextendSmartSliderWidgetBarHorizontal("' . $id . '", ' . json_encode($slides) . ', ' . json_encode($parameters) . ');');
        return N2Html::tag("div", $displayAttributes + $attributes + array("class" => $displayClass . "nextend-bar nextend-bar-horizontal", "style" => $style), N2Html::tag("div", array("class" => $styleClass, "style" => $innerStyle), $slides[$slider->_activeSlide]));
    }
    public static function prepareExport($export, $params)
    {
        $export->addVisual($params->get(self::$key . 'style'));
        $export->addVisual($params->get(self::$key . 'font-title'));
        $export->addVisual($params->get(self::$key . 'font-description'));
    }
    public static function prepareImport($import, $params)
    {
        $params->set(self::$key . 'style', $import->fixSection($params->get(self::$key . 'style', '')));
        $params->set(self::$key . 'font-title', $import->fixSection($params->get(self::$key . 'font-title', '')));
        $params->set(self::$key . 'font-description', $import->fixSection($params->get(self::$key . 'font-description', '')));
    }
}
class N2SSPluginWidgetBarHorizontalFull extends N2SSPluginWidgetBarHorizontal
{
    var $_name = 'horizontalFull';
    static function getDefaults()
    {
        return array_merge(N2SSPluginWidgetBarHorizontal::getDefaults(), array('widget-bar-position-offset' => 0, 'widget-bar-style' => 'eyJuYW1lIjoiU3RhdGljIiwiZGF0YSI6W3siYmFja2dyb3VuZGNvbG9yIjoiMDAwMDAwYWIiLCJwYWRkaW5nIjoiMjB8KnwyMHwqfDIwfCp8MjB8KnxweCIsImJveHNoYWRvdyI6IjB8KnwwfCp8MHwqfDB8KnwwMDAwMDBmZiIsImJvcmRlciI6IjB8Knxzb2xpZHwqfDAwMDAwMGZmIiwiYm9yZGVycmFkaXVzIjoiMCIsImV4dHJhIjoiIn1dfQ==', 'widget-bar-full-width' => 1, 'widget-bar-align' => 'left'));
    }
}
N2Plugin::addPlugin('sswidgetbar', 'N2SSPluginWidgetBarHorizontalFull');
예제 #17
0
파일: bar.php 프로젝트: vicpril/rep_bidqa
<?php

class N2SSPluginWidgetBar extends N2PluginBase
{
    private static $group = 'bar';
    function onWidgetList(&$list)
    {
        $list[self::$group] = array(n2_('Bar'), $this->getPath(), 5);
    }
    function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . self::$group . DIRECTORY_SEPARATOR;
    }
}
N2Plugin::addPlugin('sswidget', 'N2SSPluginWidgetBar');
예제 #18
0
    {
        $export->addImage($params->get(self::$key . 'previous-image', ''));
        $export->addImage($params->get(self::$key . 'next-image', ''));
        $export->addVisual($params->get(self::$key . 'style'));
    }
    public static function prepareImport($import, $params)
    {
        $params->set(self::$key . 'previous-image', $import->fixImage($params->get(self::$key . 'previous-image', '')));
        $params->set(self::$key . 'next-image', $import->fixImage($params->get(self::$key . 'next-image', '')));
        $params->set(self::$key . 'style', $import->fixSection($params->get(self::$key . 'style', '')));
    }
}
class N2SSPluginWidgetArrowImageSmallRectangle extends N2SSPluginWidgetArrowImage
{
    var $_name = 'imageSmallRectangle';
    static function getDefaults()
    {
        return array_merge(N2SSPluginWidgetArrowImage::getDefaults(), array('widget-arrow-responsive-desktop' => 0.8, 'widget-arrow-previous' => '$ss$/plugins/widgetarrow/image/image/previous/full.svg', 'widget-arrow-next' => '$ss$/plugins/widgetarrow/image/image/next/full.svg', 'widget-arrow-style' => 'eyJuYW1lIjoiU3RhdGljIiwiZGF0YSI6W3siYmFja2dyb3VuZGNvbG9yIjoiMDAwMDAwYWIiLCJwYWRkaW5nIjoiMnwqfDJ8KnwyfCp8MnwqfHB4IiwiYm94c2hhZG93IjoiMHwqfDB8KnwwfCp8MHwqfDAwMDAwMGZmIiwiYm9yZGVyIjoiMHwqfHNvbGlkfCp8MDAwMDAwZmYiLCJib3JkZXJyYWRpdXMiOiIzIiwiZXh0cmEiOiIifSx7ImJhY2tncm91bmRjb2xvciI6IjAxYWRkM2Q5In1dfQ=='));
    }
}
N2Plugin::addPlugin('sswidgetarrow', 'N2SSPluginWidgetArrowImageSmallRectangle');
class N2SSPluginWidgetArrowImageEmpty extends N2SSPluginWidgetArrowImage
{
    var $_name = 'imageEmpty';
    static function getDefaults()
    {
        return array_merge(N2SSPluginWidgetArrowImage::getDefaults(), array('widget-arrow-previous' => '$ss$/plugins/widgetarrow/image/image/previous/thin-horizontal.svg', 'widget-arrow-next' => '$ss$/plugins/widgetarrow/image/image/next/thin-horizontal.svg', 'widget-arrow-style' => ''));
    }
}
N2Plugin::addPlugin('sswidgetarrow', 'N2SSPluginWidgetArrowImageEmpty');
예제 #19
0
파일: vimeo.php 프로젝트: MBerguer/wp-demo
        if (!empty($image)) {
            $style = 'cursor:pointer; background: url(' . N2ImageHelper::fixed($data->get('image')) . ') no-repeat 50% 50%; background-size: cover';
            $hasImage = 1;
            $playImage = '<img class="n2-video-play n2-ow" src="' . N2ImageHelperAbstract::SVGToBase64('$ss$/images/play.svg') . '"/>';
        }
        N2JS::addInline('window["' . $slider->elementId . '"].ready(function() {
                var vimeo = new NextendSmartSliderVimeoItem(this, "' . $itemId . '", "' . $slider->elementId . '", ' . $data->toJSON() . ', ' . $hasImage . ');
            });
        ');
        return N2Html::tag('div', array('id' => $itemId, 'style' => 'position: absolute; top: 0; left: 0; width: 100%; height: 100%;' . $style), $playImage);
    }
    function _renderAdmin($data, $itemId, $slider, $slide)
    {
        return N2Html::tag('div', array("style" => 'width: 100%; height: 100%; background: url(' . N2ImageHelper::fixed($data->getIfEmpty('image', '$system$/images/placeholder/video.png')) . ') no-repeat 50% 50%; background-size: cover;'), '<img class="n2-video-play n2-ow" src="' . N2ImageHelperAbstract::SVGToBase64('$ss$/images/play.svg') . '"/>');
    }
    function getValues()
    {
        return array('vimeourl' => '75251217', 'image' => '$system$/images/placeholder/video.png', 'center' => 0, 'autoplay' => 0, 'title' => 1, 'byline' => 1, 'portrait' => 0, 'color' => '00adef', 'loop' => 0);
    }
    function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . $this->_identifier . DIRECTORY_SEPARATOR;
    }
    public function getFilled($slide, $data)
    {
        $data->set('vimeourl', $slide->fill($data->get('vimeourl', '')));
        return $data;
    }
}
N2Plugin::addPlugin('ssitem', 'N2SSPluginItemVimeo');
예제 #20
0
            $area = $params->get(self::$key . 'position-area');
            switch ($area) {
                case '5':
                case '6':
                case '7':
                case '8':
                    $attributes['data-sstop'] = '0';
                    break;
            }
        }
        return N2Html::tag('div', $displayAttributes + $attributes + array('class' => $displayClass . 'nextend-thumbnail nextend-thumbnail-default nextend-thumbnail-' . $orientation, 'style' => $style), $previous . $next . N2Html::tag('div', array('class' => 'nextend-thumbnail-inner'), N2Html::tag('div', array('class' => $barStyle . 'nextend-thumbnail-scroller'), $slides)));
    }
    public static function prepareExport($export, $params)
    {
        $export->addVisual($params->get(self::$key . 'style-bar'));
        $export->addVisual($params->get(self::$key . 'style-slides'));
        $export->addVisual($params->get(self::$key . 'title-style'));
        $export->addVisual($params->get(self::$key . 'title-font'));
        $export->addVisual($params->get(self::$key . 'description-font'));
    }
    public static function prepareImport($import, $params)
    {
        $params->set(self::$key . 'style-bar', $import->fixSection($params->get(self::$key . 'style-bar', '')));
        $params->set(self::$key . 'style-slides', $import->fixSection($params->get(self::$key . 'style-slides', '')));
        $params->set(self::$key . 'title-style', $import->fixSection($params->get(self::$key . 'title-style', '')));
        $params->set(self::$key . 'title-font', $import->fixSection($params->get(self::$key . 'title-font', '')));
        $params->set(self::$key . 'description-font', $import->fixSection($params->get(self::$key . 'description-font', '')));
    }
}
N2Plugin::addPlugin('sswidgetthumbnail', 'N2SSPluginWidgetThumbnailDefault');
예제 #21
0
                if ($orientation == 'vertical') {
                    $position = 'right';
                } else {
                    $position = 'bottom';
                }
            }
            $parameters['thumbnailPosition'] = $position;
        }
        $parameters['thumbnails'] = $thumbnails;
        $parameters['action'] = $params->get(self::$key . 'action');
        $parameters['numeric'] = 0;
        N2JS::addInline('new NextendSmartSliderWidgetBulletTransition("' . $id . '", ' . json_encode($parameters) . ');');
        $fullSize = intval($params->get(self::$key . 'bar-full-size'));
        if ($fullSize) {
            $displayClass .= "n2-bullet-bar-full-size ";
        }
        return N2Html::tag("div", $displayAttributes + $attributes + array("class" => $displayClass . $barStyle . "nextend-bullet-bar nextend-bullet-bar-" . $orientation, "style" => "text-align: " . $params->get(self::$key . 'align') . ";" . $style), $html);
    }
    public static function prepareExport($export, $params)
    {
        $export->addVisual($params->get(self::$key . 'style'));
        $export->addVisual($params->get(self::$key . 'bar'));
    }
    public static function prepareImport($import, $params)
    {
        $params->set(self::$key . 'style', $import->fixSection($params->get(self::$key . 'style')));
        $params->set(self::$key . 'bar', $import->fixSection($params->get(self::$key . 'bar')));
    }
}
N2Plugin::addPlugin('sswidgetbullet', 'N2SSPluginWidgetBulletTransition');
예제 #22
0
    {
        self::initDefaultFont();
        self::initDefaultStyle();
        return array('content' => n2_('MORE'), 'nowrap' => 1, 'fullwidth' => 0, 'link' => '#|*|_self', 'font' => self::$font, 'style' => self::$style, 'class' => '');
    }
    function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . $this->_identifier . DIRECTORY_SEPARATOR;
    }
    public function getFilled($slide, $data)
    {
        $data->set('content', $slide->fill($data->get('content', '')));
        $data->set('link', $slide->fill($data->get('link', '#|*|')));
        return $data;
    }
    public function prepareExport($export, $data)
    {
        $export->addVisual($data->get('font'));
        $export->addVisual($data->get('style'));
        $export->addLightbox($data->get('link'));
    }
    public function prepareImport($import, $data)
    {
        $data->set('font', $import->fixSection($data->get('font')));
        $data->set('style', $import->fixSection($data->get('style')));
        $data->set('link', $import->fixLightbox($data->get('link')));
        return $data;
    }
}
N2Plugin::addPlugin('ssitem', 'N2SSPluginItemButton');
N2Pluggable::addAction('smartsliderDefault', 'N2SSPluginItemButton::onSmartsliderDefaultSettings');
예제 #23
0
    {
        self::initDefaultFont();
        self::initDefaultStyle();
        return array('priority' => '2', 'fullwidth' => 1, 'nowrap' => 1, 'heading' => n2_('Heading layer'), 'title' => '', 'link' => '#|*|_self', 'font' => self::$font, 'style' => self::$style, 'split-text-transform-origin' => '50|*|50|*|0', 'split-text-backface-visibility' => 1, 'split-text-animation-in' => '', 'split-text-delay-in' => 0, 'split-text-animation-out' => '', 'split-text-delay-out' => 0, 'class' => '');
    }
    function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . $this->_identifier . DIRECTORY_SEPARATOR;
    }
    public function getFilled($slide, $data)
    {
        $data->set('heading', $slide->fill($data->get('heading', '')));
        $data->set('link', $slide->fill($data->get('link', '#|*|')));
        return $data;
    }
    public function prepareExport($export, $data)
    {
        $export->addVisual($data->get('font'));
        $export->addVisual($data->get('style'));
        $export->addLightbox($data->get('link'));
    }
    public function prepareImport($import, $data)
    {
        $data->set('font', $import->fixSection($data->get('font')));
        $data->set('style', $import->fixSection($data->get('style')));
        $data->set('link', $import->fixLightbox($data->get('link')));
        return $data;
    }
}
N2Plugin::addPlugin('ssitem', 'N2SSPluginItemHeading');
N2Pluggable::addAction('smartsliderDefault', 'N2SSPluginItemHeading::onSmartsliderDefaultSettings');