Пример #1
0
 function N2_SMARTSLIDER_3_UPGRADE_TO_PRO($links)
 {
     if (function_exists('is_plugin_active') && !is_plugin_active('ml-slider-pro/ml-slider-pro.php')) {
         $links[] = '<a href="' . N2SS3::getProUrlPricing() . '" target="_blank">' . "Go Pro" . '</a>';
     }
     return $links;
 }
Пример #2
0
 public function update()
 {
     $posts = array('action' => 'update');
     $response = N2SS3::api($posts);
     if (is_string($response)) {
         if (N2Platform::updateFromZip($response, N2SS3::getUpdateInfo())) {
             return 'OK';
         }
         return 'UPDATE_ERROR';
     }
     return $response['status'];
 }
Пример #3
0
 public function actionUpdate()
 {
     if ($this->validateToken()) {
         $status = N2SmartsliderUpdateModel::getInstance()->update();
         $hasError = N2SS3::hasApiError($status);
         if (is_array($hasError)) {
             $this->redirect($hasError);
         } else {
             if ($hasError === false) {
                 N2Message::success(n2_('Smart Slider 3 updated to the latest version!'));
             }
         }
         $this->redirectToSliders();
     } else {
         $this->refresh();
     }
 }
 public function assetsFrontend()
 {
     N2JS::addInline('window.N2SSPRO=' . N2SSPRO . ';', true);
     N2JS::addInline('window.N2SSWHYPRO="' . N2SS3::getWhyProUrl() . '";', true);
     $path = $this->getAssetsPath();
     foreach (glob($path . "/js/*.js") as $file) {
         N2JS::addFile($file, 'smartslider-frontend');
     }
     foreach (glob($path . "/js/animation/*.js") as $file) {
         N2JS::addFile($file, 'smartslider-frontend');
     }
     foreach (glob($path . "/js/controls/*.js") as $file) {
         N2JS::addFile($file, 'smartslider-frontend');
     }
     foreach (glob($path . "/js/layers/*.js") as $file) {
         N2JS::addFile($file, 'smartslider-frontend');
     }
     foreach (glob($path . "/js/responsive/*.js") as $file) {
         N2JS::addFile($file, 'smartslider-frontend');
     }
     foreach (glob($path . "/js/item/*.js") as $file) {
         N2JS::addFile($file, 'smartslider-frontend');
     }
 }
Пример #5
0
                    ],
                    title: n2_('Discover Smart Slider 3'),
                    back: false,
                    close: true,
                    content: '<iframe style="margin:20px 10px 0;" width="854" height="480" src="https://www.youtube.com/embed/fjmENHah_oY?autoplay=1" frameborder="0" allowfullscreen></iframe>',
                    controls: ['<a href="#" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">' + n2_('Close') + '</a>'],
                    fn: {
                        show: function () {
                            this.createHeading(n2_("We've created a simple tutorial video to guide you through the basic steps of making your first slider. Good luck with the sliders!")).css({
                                width: '520px',
                                textAlign: 'center',
                                margin: '15px auto',
                                lineHeight: '24px'
                            }).appendTo(this.content);
                            this.controls.find('.n2-button-green')
                                .on('click', n2.proxy(function (e) {
                                    e.preventDefault();
                                    this.hide(e);
                                }, this));
                        }
                    }
                }
            }, true);

        });
    </script>

<?php 
}
N2SS3::showBeacon('Main page, Import, Update');
Пример #6
0
<?php

/**
 * @var $_class N2SmartsliderBackendSettingsView
 */
$this->widget->init('topbar', array("actions" => array(N2Html::tag('a', array('href' => '#', 'class' => 'n2-button n2-button-green n2-button-big n2-h4 n2-b n2-uc', 'onclick' => 'return NextendForm.submit("#n2-form");'), n2_('Save')))));
?>
<form id="n2-form" action="" method="post">
    <?php 
$_class->renderDefaultsForm();
?>
    <input name="save" value="1" type="hidden"/>
</form>
<?php 
N2SS3::showBeacon('Item defaults');
Пример #7
0
                break;
            case 'UPDATE_ERROR':
                N2Message::error('Update error, please update manually!');
                break;
            case 'PLATFORM_NOT_ALLOWED':
                N2Message::error(sprintf('Your license key is not valid for Smart Slider3 - %s!', N2Platform::getPlatformName()));
                break;
            case 'ERROR_HANDLED':
                break;
            case null:
                N2Message::error('Licensing server not reachable, try again later!');
                break;
            default:
                N2Message::error('Debug: ' . $status);
                N2Message::error('Licensing server not reachable, try again later!');
                break;
        }
        return true;
    }
    public static function showBeacon($search = '')
    {
        if (intval(N2SmartSliderSettings::get('beacon', 1))) {
            echo '<script>!function(e,o,n){window.HSCW=o,window.HS=n,n.beacon=n.beacon||{};var t=n.beacon;t.userConfig={},t.readyQueue=[],t.config=function(e){this.userConfig=e},t.ready=function(e){this.readyQueue.push(e)},o.config={docs:{enabled:!0,baseUrl:"//smart-slider-3.helpscoutdocs.com/"},contact:{enabled:!0,formId:"5bf2183c-77e2-11e5-8846-0e599dc12a51"}};var r=e.getElementsByTagName("script")[0],c=e.createElement("script");c.type="text/javascript",c.async=!0,c.src="https://djtflbt20bdde.cloudfront.net/",r.parentNode.insertBefore(c,r)}(document,window.HSCW||{},window.HS||{});HS.beacon.ready(function () {HS.beacon.search("' . $search . '");});</script>';
        }
    }
}
if (defined('SMARTSLIDER3AFFILIATE')) {
    N2SS3::$source = SMARTSLIDER3AFFILIATE;
}
N2SS3::$source = apply_filters('smartslider3_hoplink', N2SS3::$source);
Пример #8
0
 public function actionImportDemo()
 {
     $this->validateToken();
     $this->validatePermission('smartslider_edit');
     $key = 'http:' . base64_decode(N2Request::getVar('key'));
     if (strpos($key, 'http://smartslider3.com/') !== 0) {
         N2Message::error(sprintf(n2_('Import url is not valid: %s'), $key));
         $this->response->error();
     }
     $posts = array('action' => 'asset', 'asset' => $key);
     $result = N2SS3::api($posts);
     if (!is_string($result)) {
         $hasError = N2SS3::hasApiError($result['status'], array('key' => $key));
         if (is_array($hasError)) {
             $this->redirect($hasError);
         } else {
             if ($hasError !== false) {
                 $this->response->error();
             }
         }
     } else {
         N2Loader::import(array('models.Sliders', 'models.Slides'), 'smartslider');
         N2Loader::import('libraries.import', 'smartslider');
         $import = new N2SmartSliderImport();
         $sliderId = $import->import($result, 'clone', 1, false);
         if ($sliderId !== false) {
             N2Message::success(n2_('Slider imported.'));
             $this->response->redirect(array("slider/edit", array("sliderid" => $sliderId)));
         } else {
             N2Message::error(n2_('Import error!'));
             $this->response->error();
         }
     }
     $this->response->respond();
 }
Пример #9
0
<?php

/**
 * @var $_class N2SmartsliderBackendSettingsView
 */
$this->widget->init('topbar', array("actions" => array(N2Html::tag('a', array('href' => '#', 'class' => 'n2-button n2-button-green n2-button-big n2-h4 n2-b n2-uc', 'onclick' => 'return NextendForm.submit("#smartslider-form");'), n2_('Save')))));
?>

<form id="smartslider-form" action="" method="post">
    <?php 
$_class->_renderDefaultForm();
?>
    <input name="save" value="1" type="hidden"/>
</form>
<?php 
N2SS3::showBeacon('Global settings');
Пример #10
0
                isPreview = false;
            });


            new NextendHeadingScrollToPane(headings, [
                $('#n2-tab-slider, #n2-tab-slider-size, #n2-tab-slider-size-tablet, #n2-tab-slider-size-mobile, #n2-tab-slider-responsive, #nextend-responsive-mode-panel, #n2-tab-slides, #n2-tab-slider-layer, #n2-tab-autoplay, #n2-tab-slider-advanced'),
                $('#n2-tab-widgets'),
                $('#n2-tab-slider-responsive')
            ], 'ss-slider-edit');


            $('#n2-form-matrix-slider-settings .n2-form-matrix-views').fixTo('#n2-form-matrix-slider-settings', {
                top: $('#wpadminbar, .navbar-fixed-top').height() + $('.n2-main-top-bar').height()
            });

            $('#n2-form-matrix-sliderwidgets .n2-form-matrix-views').fixTo('#n2-form-matrix-sliderwidgets', {
                top: $('#wpadminbar, .navbar-fixed-top').height() + $('.n2-main-top-bar').height()
            });
        }
    );
</script>

    <form id="smartslider-form" action="" method="post">
    <?php 
$_class->renderForm($slider);
?>
        <input name="save" value="1" type="hidden"/>
</form>
<?php 
N2SS3::showBeacon('Slider settings');
Пример #11
0
<?php

$actions = array();
if (isset($slider)) {
    $actions[] = N2Html::tag('a', array('href' => $this->appType->router->createUrl(array("generator/create", array("sliderid" => $slider['id']))), 'class' => 'n2-button n2-button-red n2-button-big n2-h4 n2-b n2-uc'), n2_('Cancel'));
}
$actions[] = N2Html::tag('a', array('href' => '#', 'class' => 'n2-button n2-button-green n2-button-big n2-h4 n2-b n2-uc', 'onclick' => 'return NextendForm.submit("#smartslider-form");'), n2_('Save'));
$this->widget->init('topbar', array("actions" => $actions));
?>

<form id="smartslider-form" action="" method="post">
    <?php 
echo $configuration->render();
?>
    <input name="save" value="1" type="hidden"/>
</form>
<?php 
N2SS3::showBeacon(ucfirst(N2Request::getCmd('group')) . ' generator');
Пример #12
0
<form id="smartslider-form" enctype="multipart/form-data" action="" method="post">
    <?php 
$_class->renderImportByUploadForm();
?>
    <input name="save" value="1" type="hidden"/>
</form>

<div class="n2-form ">
    <div class="n2-form-tab ">
        <div class="n2-h2 n2-content-box-title-bg"><?php 
n2_e('Instructions');
?>
</div>

        <div class="n2-description">
            <p><?php 
n2_e('You can upload the files which exported by Smart Slider 3.');
?>
</p>

            <p><?php 
printf(n2_('Your server has an upload file limit at %s, so if you have bigger export file, please use the <a href="%s">alternate method</a>.'), @ini_get('post_max_size'), $this->appType->router->createUrl(array('sliders/importFromServer')));
?>
</p>
        </div>
    </div>
</div>
<?php 
N2SS3::showBeacon('Import slider');
Пример #13
0
* @copyright (C) 2015 Nextendweb.com
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die('Restricted access');
/* @var $this N2Layout */
?>

    <div id="n2-admin" class="n2 n2-border-radius">

        <?php 
$cmd = N2Request::getVar("nextendcontroller", "sliders");
/**
 * @see Nav
 */
$views = array(N2Html::tag('a', array('href' => $this->appType->router->createUrl("sliders/index"), 'class' => 'n2-h4 n2-uc ' . ($cmd == "sliders" ? "n2-active" : "")), n2_('Sliders')), N2Html::tag('a', array('href' => $this->appType->router->createUrl("settings/default"), 'class' => 'n2-h4 n2-uc ' . ($cmd == "settings" ? "n2-active" : "")), n2_('Settings')), N2Html::tag('a', array('href' => N2Base::getApplication('system')->router->createUrl("dashboard/index"), 'class' => 'n2-h4 n2-uc ' . ($cmd == "settings" ? "n2-active" : "")), n2_('Nextend')));
$views[] = N2Html::tag('a', array('href' => N2SS3::getProUrlPricing(), 'target' => '_blank', 'class' => 'n2-h4 n2-uc '), n2_('Go Pro!'));
$this->widget->init('nav', array('logoUrl' => $this->appType->router->createUrl("sliders/index"), 'logoImageUrl' => $this->appType->app->getLogo(), 'views' => $views, 'actions' => $this->getFragmentValue('actions')));
?>

        <div class="n2-table n2-table-fixed n2-content">
            <div class="n2-tr">
                <div class="n2-td n2-sidebar n2-sidebar-base-bg n2-border-radius-bl">
                    <?php 
$this->renderFragmentBlock('nextend_sidebar', '_sliders');
?>
                </div>

                <div class="n2-td n2-content-base-bg n2-content-area n2-border-radius-br">
                    <!-- Begin Content -->
                    <?php 
$this->renderFragmentBlock('nextend_content');
Пример #14
0
    <form id="smartslider-form" enctype="multipart/form-data" action="" method="post">
    <?php 
$_class->renderRestoreByUploadForm();
?>
        <input name="save" value="1" type="hidden"/>
</form>

    <div class="n2-form ">
    <div class="n2-form-tab ">
        <div class="n2-h2 n2-content-box-title-bg"><?php 
n2_e('Instructions');
?>
</div>

        <div class="n2-description">
            <p><?php 
n2_e('You can upload the files which exported by Smart Slider 3.');
?>
</p>

            <p><?php 
printf(n2_('Your server has an upload file limit at %s, so if you have bigger export file, please use the <a href="%s">alternate method</a>.'), @ini_get('post_max_size'), $this->appType->router->createUrl(array('sliders/importFromServer')));
?>
</p>
        </div>
    </div>
</div>
<?php 
N2SS3::showBeacon('Restore slider');
Пример #15
0
                N2SmartsliderLicenseModel::getInstance()->setKey('');
                return array("sliders/index");
                break;
            case 'UPDATE_ERROR':
                N2Message::error('Update error, please update manually!');
                break;
            case 'PLATFORM_NOT_ALLOWED':
                N2Message::error(sprintf('Your license key is not valid for Smart Slider3 - %s!', N2Platform::getPlatformName()));
                break;
            case 'ERROR_HANDLED':
                break;
            case null:
                N2Message::error('Licensing server not reachable, try again later!');
                break;
            default:
                N2Message::error('Debug: ' . $status);
                N2Message::error('Licensing server not reachable, try again later!');
                break;
        }
        return true;
    }
    public static function showBeacon($search = '')
    {
        if (intval(N2SmartSliderSettings::get('beacon', 1))) {
            echo '<script>!function(e,o,n){window.HSCW=o,window.HS=n,n.beacon=n.beacon||{};var t=n.beacon;t.userConfig={},t.readyQueue=[],t.config=function(e){this.userConfig=e},t.ready=function(e){this.readyQueue.push(e)},o.config={docs:{enabled:!0,baseUrl:"//smart-slider-3.helpscoutdocs.com/"},contact:{enabled:!0,formId:"5bf2183c-77e2-11e5-8846-0e599dc12a51"}};var r=e.getElementsByTagName("script")[0],c=e.createElement("script");c.type="text/javascript",c.async=!0,c.src="https://djtflbt20bdde.cloudfront.net/",r.parentNode.insertBefore(c,r)}(document,window.HSCW||{},window.HS||{});HS.beacon.ready(function () {HS.beacon.search("' . $search . '");});</script>';
        }
    }
}
if (defined('SMARTSLIDER3AFFILIATE')) {
    N2SS3::$source = SMARTSLIDER3AFFILIATE;
}