first commit

This commit is contained in:
2026-02-08 21:16:11 +01:00
commit e17b7026fd
8881 changed files with 1160453 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
<access component="com_smartslider3">
<section name="component">
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC"/>
<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC"/>
<action name="smartslider.config" title="Smart Slider - Config" description=""/>
<action name="smartslider.edit" title="Smart Slider - Edit" description=""/>
<action name="smartslider.delete" title="Smart Slider - Delete" description=""/>
</section>
</access>

View File

@@ -0,0 +1,6 @@
<config>
<fieldset name="permissions" label="JCONFIG_PERMISSIONS_LABEL" description="JCONFIG_PERMISSIONS_DESC">
<field name="rules" type="rules" label="JCONFIG_PERMISSIONS_LABEL" class="inputbox" validate="rules"
filter="rules" component="com_smartslider3" section="component"/>
</fieldset>
</config>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,192 @@
<?php
define('NEXTEND_INSTALL', true);
class com_SmartSlider3InstallerScript {
/**
* The minimum PHP version required to install this extension
*
* @var string
*/
protected $minimumPHPVersion = '7.0.0';
/**
* The minimum Joomla! version required to install this extension
*
* @var string
*/
protected $minimumJoomlaVersion = '3.9.0';
/**
* Joomla! pre-flight event. This runs before Joomla! installs or updates the package. This is our last chance to
* tell Joomla! if it should abort the installation.
*
* In here we'll try to install FOF. We have to do that before installing the component since it's using an
* installation script extending FOF's InstallScript class. We can't use a <file> tag in the manifest to install FOF
* since the FOF installation is expected to fail if a newer version of FOF is already installed on the site.
*
* @param string $type Installation type (install, update, discover_install)
* @param JInstallerAdapterPackage $parent Parent object
*
* @return boolean True to let the installation proceed, false to halt the installation
*/
public function preflight($type, $parent) {
// Check the minimum PHP version
if (!version_compare(PHP_VERSION, $this->minimumPHPVersion, 'ge')) {
$msg = "<p>You need PHP $this->minimumPHPVersion or later to install this package</p>";
JLog::add($msg, JLog::WARNING, 'jerror');
return false;
}
// Check the minimum Joomla! version
if (!version_compare(JVERSION, $this->minimumJoomlaVersion, 'ge')) {
$msg = "<p>You need Joomla! $this->minimumJoomlaVersion or later to install this component</p>";
JLog::add($msg, JLog::WARNING, 'jerror');
return false;
}
}
/**
*
* @param JInstallerAdapterPackage $parent
*/
public function install($parent) {
$this->installOrUpdate($parent);
$parent->getParent()
->setRedirectURL('index.php?option=com_smartslider3');
}
/**
*
* @param JInstallerAdapterPackage $parent
*/
public function uninstall($parent) {
}
/**
*
* @param JInstallerAdapterPackage $parent
*/
public function update($parent) {
$this->installOrUpdate($parent);
$parent->getParent()
->setRedirectURL('index.php?option=com_smartslider3');
}
/**
*
* @param JInstallerAdapterPackage $parent
*/
protected function installOrUpdate($parent) {
$sourcePath = $parent->getParent()
->getPath('source');
$this->installFromPath($sourcePath . '/lib_smartslider3');
$this->installFromPath($sourcePath . '/mod_smartslider3');
$this->installFromPath($sourcePath . '/plugins/installer/smartslider3');
$this->installFromPath($sourcePath . '/plugins/system/smartslider3');
if (!file_exists(JPATH_LIBRARIES . '/smartslider3/joomla.php')) {
$this->deleteFolder(JPATH_LIBRARIES . '/smartslider3/');
}
$this->cleanup();
}
/**
* Cleanup old version
*/
private function cleanup() {
$db = JFactory::getDBO();
$db->setQuery("DELETE FROM #__assets WHERE name LIKE 'com_nextend2'")
->execute();
$db->setQuery("DELETE FROM #__assets WHERE name LIKE 'com_nextend_installer'")
->execute();
$db->setQuery("DELETE FROM #__extensions WHERE type='component' AND element LIKE 'com_nextend2'")
->execute();
$db->setQuery("DELETE FROM #__extensions WHERE type='plugin' AND folder LIKE 'system' AND element LIKE 'nextendsmartslider3'")
->execute();
$db->setQuery("DELETE FROM #__extensions WHERE type='plugin' AND folder LIKE 'system' AND element LIKE 'nextend2'")
->execute();
$this->deleteFolder(JPATH_SITE . '/libraries/nextend2');
$this->deleteFolder(JPATH_SITE . '/components/com_nextend2');
$this->deleteFolder(JPATH_SITE . '/media/n2');
$this->deleteFolder(JPATH_SITE . '/plugins/system/nextendsmartslider3');
$this->deleteFolder(JPATH_SITE . '/plugins/system/nextend2');
$this->deleteFolder(JPATH_ADMINISTRATOR . '/components/com_nextend2');
$this->deleteFolder(JPATH_ADMINISTRATOR . '/components/com_nextend_installer');
$proInvert = 1;
// We must delete the stucked update sites if upgrade to pro or downgrade to free
$updateSites = $db->setQuery("SELECT update_site_id FROM #__update_sites WHERE location LIKE '%product=smartslider3%'")
->loadAssocList();
if (!empty($updateSites)) {
foreach ($updateSites as $updateSite) {
$db->setQuery("DELETE FROM #__update_sites_extensions WHERE update_site_id = '" . $updateSite['update_site_id'] . "'")
->execute();
$db->setQuery("DELETE FROM #__update_sites WHERE update_site_id = '" . $updateSite['update_site_id'] . "'")
->execute();
}
}
}
protected function installFromPath($path) {
$installer = new JInstaller();
$installer->setOverwrite(true);
if ($success = $installer->install($path)) {
return true;
}
$error = JText::sprintf('JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION', 'Smart Slider 3', $path) . ' Please <a href="https://smartslider3.com/contact-us/support/" target="_blank">contact us</a> with this error!</p>';
throw new RuntimeException($error);
return false;
}
/**
* Runs after install, update or discover_update. In other words, it executes after Joomla! has finished installing
* or updating your component. This is the last chance you've got to perform any additional installations, clean-up,
* database updates and similar housekeeping functions.
*
* @param string $type install, update or discover_update
* @param JInstallerAdapterComponent $parent Parent object
*/
public function postflight($type, $parent) {
$db = JFactory::getDBO();
$db->setQuery("UPDATE #__extensions SET enabled=1 WHERE type='plugin' AND folder LIKE 'system' AND element LIKE 'smartslider3'")
->execute();
$db->setQuery("UPDATE #__extensions SET enabled=1 WHERE type='plugin' AND folder LIKE 'installer' AND element LIKE 'smartslider3'")
->execute();
$pro = 0;
}
private function deleteFolder($path) {
if (JFolder::exists($path)) {
JFolder::delete($path);
}
}
}

View File

@@ -0,0 +1,19 @@
<?php
use Joomla\CMS\Factory;
use Nextend\SmartSlider3\Platform\Joomla\AdministratorComponent;
if (!version_compare(PHP_VERSION, '7.0', '>=')) {
Factory::getApplication()
->enqueueMessage('Smart Slider 3 requires 7.0+, extension is currently NOT RUNNING.', 'warning');
} else if (!version_compare(JVERSION, '3.9', '>=')) {
Factory::getApplication()
->enqueueMessage('Smart Slider 3 requires Joomla 3.9+. Because you are using an earlier version, the extension is currently NOT RUNNING.', 'warning');
} else {
jimport("smartslider3.joomla");
if (class_exists('\Nextend\SmartSlider3\Platform\Joomla\AdministratorComponent')) {
new AdministratorComponent();
}
}

View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="2.9.0" method="upgrade">
<name>Smart Slider 3</name>
<author>Nextendweb</author>
<creationDate>2022-11-10</creationDate>
<copyright>Copyright (C) 2020 Nextendweb.com. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-3.0.txt GNU General Public License</license>
<authorEmail>roland@nextendweb.com</authorEmail>
<authorUrl>https://smartslider3.com</authorUrl>
<version>3.5.1.12</version>
<scriptfile>script.smartslider3.php</scriptfile>
<install> <!-- Runs on install -->
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
</sql>
</install>
<uninstall> <!-- Runs on uninstall -->
<sql>
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file>
</sql>
</uninstall>
<media folder="media">
<folder>smartslider3</folder>
</media>
<files folder="frontend">
<filename>smartslider3.php</filename>
</files>
<administration>
<menu>COM_SMARTSLIDER3</menu>
<files folder="backend">
<folder>sql</folder>
<filename>smartslider3.php</filename>
<filename>icon16.png</filename>
<filename>config.xml</filename>
<filename>access.xml</filename>
<filename>index.html</filename>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.com_smartslider3.ini</language>
<language tag="en-GB">en-GB/en-GB.com_smartslider3.sys.ini</language>
<language tag="en-GB">en-GB/en-GB.com_smartslider3.menu.ini</language>
</languages>
</administration>
<updateservers>
<server type="extension" name="Smart Slider 3 Updates">
<![CDATA[https://api.nextendweb.com/v1/?action=joomla_version&platform=joomla&product=smartslider3&pro=0&channel=stable]]>
</server>
</updateservers>
</extension>

View File

@@ -0,0 +1,90 @@
CREATE TABLE IF NOT EXISTS `#__nextend2_image_storage`
(
`id` INT(11) NOT NULL AUTO_INCREMENT,
`hash` VARCHAR(32) NOT NULL,
`image` TEXT NOT NULL,
`value` MEDIUMTEXT NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `hash` (`hash`)
)
DEFAULT CHARSET = utf8mb4
DEFAULT COLLATE = utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__nextend2_section_storage`
(
`id` INT(11) NOT NULL AUTO_INCREMENT,
`application` VARCHAR(20) NOT NULL,
`section` VARCHAR(128) NOT NULL,
`referencekey` VARCHAR(128) DEFAULT '',
`value` MEDIUMTEXT NOT NULL,
`system` INT(11) NOT NULL DEFAULT '0',
`editable` INT(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `application` (`application`, `section`(50), `referencekey`(50)),
KEY `application_2` (`application`, `section`(50))
)
AUTO_INCREMENT = 10000
DEFAULT CHARSET = utf8mb4
DEFAULT COLLATE = utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__nextend2_smartslider3_generators`
(
`id` INT(11) NOT NULL AUTO_INCREMENT,
`group` VARCHAR(254) NOT NULL,
`type` VARCHAR(254) NOT NULL,
`params` TEXT NOT NULL,
PRIMARY KEY (`id`)
)
DEFAULT CHARSET = utf8mb4
DEFAULT COLLATE = utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__nextend2_smartslider3_sliders`
(
`id` INT(11) NOT NULL AUTO_INCREMENT,
`alias` VARCHAR(255) NULL DEFAULT NULL,
`title` VARCHAR(200) NOT NULL,
`type` VARCHAR(30) NOT NULL,
`params` MEDIUMTEXT NOT NULL,
`status` VARCHAR(50) NOT NULL DEFAULT 'published',
`time` DATETIME NOT NULL,
`thumbnail` VARCHAR(255) NOT NULL,
`ordering` INT NOT NULL DEFAULT '0',
INDEX (`status`),
PRIMARY KEY (`id`)
)
DEFAULT CHARSET = utf8mb4
DEFAULT COLLATE = utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__nextend2_smartslider3_sliders_xref`
(
`group_id` int(11) NOT NULL,
`slider_id` int(11) NOT NULL,
`ordering` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`group_id`, `slider_id`)
)
DEFAULT CHARSET = utf8mb4
DEFAULT COLLATE = utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__nextend2_smartslider3_slides`
(
`id` INT(11) NOT NULL AUTO_INCREMENT,
`title` VARCHAR(200) NOT NULL,
`slider` INT(11) NOT NULL,
`publish_up` DATETIME NOT NULL default '1970-01-01 00:00:00',
`publish_down` DATETIME NOT NULL default '1970-01-01 00:00:00',
`published` TINYINT(1) NOT NULL,
`first` INT(11) NOT NULL,
`slide` LONGTEXT,
`description` TEXT NOT NULL,
`thumbnail` VARCHAR(255) NOT NULL,
`params` TEXT NOT NULL,
`ordering` INT(11) NOT NULL,
`generator_id` INT(11) NOT NULL,
PRIMARY KEY (`id`)
)
DEFAULT CHARSET = utf8mb4
DEFAULT COLLATE = utf8mb4_unicode_ci;