/** * When PHP shuts down, we have to save our session's data if the data changed */ public function shutdown() { N2Pluggable::doAction('beforeSessionSave'); if ($this->storageChanged) { $this->store(); } }
function n2_exit($exit = false) { N2Pluggable::doAction('exit'); if ($exit) { exit; } }
public static function init() { static $inited = false; if (!$inited) { N2Pluggable::addAction('afterApplicationContent', 'N2Browse::load'); $inited = true; } }
public static function init() { static $inited = false; if (!$inited) { N2Pluggable::addAction('afterApplicationContent', 'N2BackgroundAnimationManager::load'); $inited = true; } }
public static function init() { static $inited = false; if (!$inited) { self::$model = new N2StorageImage(); N2Pluggable::addAction('afterApplicationContent', 'N2ImageManager::load'); $inited = true; } }
public static function init() { N2Pluggable::addAction('fontStorage', 'N2SmartSliderStorage::fontStorage'); N2Pluggable::addAction('styleStorage', 'N2SmartSliderStorage::styleStorage'); N2Pluggable::addAction('animationStorage', 'N2SmartSliderStorage::animationStorage'); N2Pluggable::addAction('splitTextAnimationStorage', 'N2SmartSliderStorage::splitTextAnimationStorage'); N2Pluggable::addAction('backgroundAnimationStorage', 'N2SmartSliderStorage::backgroundAnimationStorage'); N2Pluggable::addAction('postBackgroundAnimationStorage', 'N2SmartSliderStorage::postBackgroundAnimationStorage'); N2Pluggable::addAction('layoutStorage', 'N2SmartSliderStorage::layoutStorage'); }
public static function getAll($application, $section, $referenceKey = null) { $attributes = array("application" => $application, "section" => $section); if ($referenceKey !== null) { $attributes['referencekey'] = $referenceKey; } $rows = self::$model->db->findAllByAttributes($attributes, array("id", "referencekey", "value", "system", "editable")); N2Pluggable::doAction($application . $section, array($referenceKey, &$rows)); return $rows; }
protected function addManifestData(&$manifestData) { $manifestData['nextCacheRefresh'] = N2Pluggable::applyFilters('SSNextCacheRefresh', $this->parameters['slider']->slidesBuilder->getNextCacheRefresh(), array($this->parameters['slider'])); $variations = 1; $params = $this->parameters['slider']->params; if ($params->get('randomize', 0) || $params->get('randomizeFirst', 0)) { $variations = intval($params->get('variations', 5)); if ($variations < 1) { $variations = 1; } } N2Filesystem::createFile($this->getManifestFilePath('variations'), $variations); }
public function renderDefaultsForm() { $settings = array('font' => array(), 'style' => array()); N2Pluggable::doAction('smartsliderDefault', array(&$settings)); $xmlString = '<root>'; $this->defaultsAddTab($xmlString, $settings['font'], 'font', 'Font'); $this->defaultsAddTab($xmlString, $settings['style'], 'style', 'Style'); $xmlString .= '</root>'; $form = new N2Form(); $xml = simplexml_load_string($xmlString); $form->setXML($xml); $form->render('defaults'); }
private static function load() { static $loaded; if (!$loaded) { N2Pluggable::doAction('backgroundAnimationStorage', array(&self::$sets, &self::$animation)); for ($i = 0; $i < count(self::$animation); $i++) { if (!isset(self::$animationBySet[self::$animation[$i]['referencekey']])) { self::$animationBySet[self::$animation[$i]['referencekey']] = array(); } self::$animationBySet[self::$animation[$i]['referencekey']][] =& self::$animation[$i]; self::$animationById[self::$animation[$i]['id']] =& self::$animation[$i]; } $loaded = true; } }
private static function load() { static $loaded; if (!$loaded) { N2Pluggable::doAction('layoutStorage', array(&self::$sets, &self::$visual)); for ($i = 0; $i < count(self::$visual); $i++) { if (!is_array(self::$visualBySet[self::$visual[$i]['referencekey']])) { self::$visualBySet[self::$visual[$i]['referencekey']] = array(); } self::$visualBySet[self::$visual[$i]['referencekey']][] =& self::$visual[$i]; self::$visualById[self::$visual[$i]['id']] =& self::$visual[$i]; } $loaded = true; } }
private static function animation($force = false) { static $once; if ($once != null && !$force) { return; } $once = true; if (N2Pluggable::hasAction('animationFramework')) { N2Pluggable::doAction('animationFramework'); } else { if (N2Settings::get('gsap')) { N2JS::addFiles(N2LIBRARYASSETS . "/js/core/gsap", array("gsap.js"), "nextend-frontend"); } else { if (N2Platform::$isAdmin) { N2JS::addFiles(N2LIBRARYASSETS . "/js/core/gsap", array("gsap.js"), "nextend-gsap"); } else { N2JS::addFiles(N2LIBRARYASSETS . "/js/core/gsap", array("NextendTimeline.js"), "nextend-gsap"); } } } }
function onFontManagerLoad($force = false) { static $loaded; if (!$loaded || $force) { $loaded = true; $settings = N2Fonts::loadSettings(); $parameters = $settings['plugins']; $parameters->fillDefault(self::getDefaults()); if ($parameters->get('google-enabled', 1)) { N2GoogleFonts::$enabled = 1; for ($i = 100; $i < 1000; $i += 100) { $this->addStyle($parameters, $i); $this->addStyle($parameters, $i . 'italic'); } if (empty(self::$styles)) { self::$styles[] = '400'; } $this->addSubset($parameters, 'latin'); $this->addSubset($parameters, 'latin-ext'); $this->addSubset($parameters, 'greek'); $this->addSubset($parameters, 'greek-ext'); $this->addSubset($parameters, 'cyrillic'); $this->addSubset($parameters, 'devanagari'); $this->addSubset($parameters, 'arabic'); $this->addSubset($parameters, 'khmer'); $this->addSubset($parameters, 'telugu'); $this->addSubset($parameters, 'vietnamese'); if (empty(self::$subsets)) { self::$subsets[] = 'latin'; } foreach (self::$subsets as $subset) { N2GoogleFonts::addSubset($subset); } N2Pluggable::addAction('fontFamily', array($this, 'onFontFamily')); } } }
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');
self::$success = array(); } self::loadSessionNotice(); if (is_array(self::$notice) && count(self::$notice)) { $messages['notice'] = array(); foreach (self::$notice as $notice) { $messages['notice'][] = $notice; } self::$notice = array(); } self::$flushed = true; if (count($messages)) { return $messages; } return false; } public static function storeInSession() { if (self::$flushed) { N2Session::delete('error'); N2Session::delete('success'); N2Session::delete('notice'); } else { N2Session::set('error', self::$error); N2Session::set('success', self::$success); N2Session::set('notice', self::$notice); } } } N2Pluggable::addAction('beforeSessionSave', 'N2Message::storeInSession');
* @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'); ?> <!-- End Content --> </div> </div> </div> <?php N2Pluggable::doAction('afterApplicationContent'); ?> </div> <?php N2Message::show(); N2JS::addInline("new NextendExpertMode('smartslider', " . N2SSPRO . ");");
private function getFamily($family) { static $cache = array(); if (!isset($cache[$family])) { N2Pluggable::doAction('fontFamily', array($family)); $cache[$family] = ''; } return "'" . $family . "'"; }
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html **/ defined('_JEXEC') or die('Restricted access'); if (!defined("N2_PLATFORM_LIBRARY")) { define('N2_PLATFORM_LIBRARY', dirname(__FILE__)); } define('N2WORDPRESS', 0); define('N2JOOMLA', 1); define('N2MAGENTO', 0); define('N2NATIVE', 0); if (!defined('N2PRO')) { define('N2PRO', 0); } if (!defined('JPATH_NEXTEND_IMAGES')) { define('JPATH_NEXTEND_IMAGES', '/' . trim(JComponentHelper::getParams('com_media')->get('image_path', 'images'), "/")); } require_once N2_PLATFORM_LIBRARY . '/../library/library.php'; N2Base::registerApplication(N2_PLATFORM_LIBRARY . '/../library/applications/system/N2SystemApplicationInfo.php'); function N2JoomlaExit() { if (N2Platform::$isAdmin) { $lifetime = JFactory::getConfig()->get('lifetime'); if (empty($lifetime)) { $lifetime = 60; } $lifetime = min(max(intval($lifetime) - 1, 9), 60 * 24); N2JS::addInline('setInterval(function(){$.ajax({url: "' . JURI::current() . '", cache: false});}, ' . $lifetime * 60 * 1000 . ');'); } } N2Pluggable::addAction('exit', 'N2JoomlaExit');
public function __construct() { N2Loader::addPath($this->getName(), $this->getPath()); $platformPath = N2Filesystem::realpath($this->getPath() . '/../' . N2Platform::getPlatform()); if ($platformPath) { N2Loader::addPath($this->getName() . '.platform', $platformPath); } $this->loadLocale(); $filterClass = 'N2' . ucfirst($this->getName()) . 'ApplicationInfoFilter'; N2Loader::import($filterClass, $this->getName() . '.platform'); $callable = $filterClass . '::filter'; if (is_callable($callable)) { call_user_func($filterClass . '::filter', $this); } if (N2Base::$isReady) { $this->onNextendBaseReady(); } else { N2Pluggable::addAction('nextendBaseReady', array($this, 'onNextendBaseReady')); } }
protected function onCreate() { N2Pluggable::doAction('ssSlide', array($this)); }
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ if (!class_exists('N2_SMARTSLIDER_3')) { define('N2PRO', 0); define('N2SSPRO', 0); define('N2GSAP', 0); define('NEXTEND_SMARTSLIDER_3__FILE__', __FILE__); define('NEXTEND_SMARTSLIDER_3', dirname(__FILE__) . DIRECTORY_SEPARATOR); define('NEXTEND_SMARTSLIDER_3_URL_PATH', 'smart-slider-3'); require_once dirname(NEXTEND_SMARTSLIDER_3__FILE__) . DIRECTORY_SEPARATOR . 'includes/smartslider3.php'; add_action('activated_plugin', 'N2_SMARTSLIDER_3_DEACTIVATE_ON_PRO'); function N2_SMARTSLIDER_3_DEACTIVATE_ON_PRO($plugin) { if (strstr($plugin, 'nextend-smart-slider3-pro.php') !== false) { deactivate_plugins(__FILE__); } } add_filter("plugin_action_links_" . plugin_basename(__FILE__), 'N2_SMARTSLIDER_3_UPGRADE_TO_PRO'); 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; } N2Pluggable::addAction('animationFramework', 'N2AssetsPredefined::custom_animation_framework'); }