feat(main): Add slider block type

This commit is contained in:
2026-08-25 14:32:21 +02:00
parent 06e98a429b
commit be9a676d9d
28 changed files with 729 additions and 120 deletions
+25
View File
@@ -69,7 +69,15 @@ trait Install
`description` TEXT,
`extra_description` TEXT,
`link` VARCHAR(512) NOT NULL DEFAULT \'\',
`link_text` VARCHAR(128) NOT NULL DEFAULT \'\',
`image` VARCHAR(255) NOT NULL DEFAULT \'\',
`alert_type` VARCHAR(16) NOT NULL DEFAULT \'info\',
`timeout` INT(11) NOT NULL DEFAULT 0,
`slider_mode` VARCHAR(16) NOT NULL DEFAULT \'always\',
`slides_per_view_mobile` DECIMAL(4,2) NOT NULL DEFAULT 1,
`slides_per_view_tablet` DECIMAL(4,2) NOT NULL DEFAULT 2,
`slides_per_view_desktop` DECIMAL(4,2) NOT NULL DEFAULT 3,
`autoplay_delay` INT(11) NOT NULL DEFAULT 0,
`active` TINYINT(1) NOT NULL DEFAULT 1,
`show_title` TINYINT(1) NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
@@ -92,6 +100,23 @@ trait Install
);
';
$sqlToExec[] = '
CREATE TABLE IF NOT EXISTS ' . _DB_PREFIX_ . 'ws_customhtml_slide (
`id_ws_customhtml_slide` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`id_ws_customhtml` INT(11) NOT NULL,
`title` VARCHAR(256) NOT NULL DEFAULT \'\',
`description` TEXT,
`extra_description` TEXT,
`link` VARCHAR(512) NOT NULL DEFAULT \'\',
`link_text` VARCHAR(128) NOT NULL DEFAULT \'\',
`image` VARCHAR(255) NOT NULL DEFAULT \'\',
`ordering` INT(11) NOT NULL DEFAULT 0,
`date_add` DATETIME NOT NULL,
`date_upd` DATETIME NOT NULL,
KEY `id_ws_customhtml` (`id_ws_customhtml`)
);
';
foreach ($sqlToExec as $sqlBlock) {
Db::getInstance()->execute(trim($sqlBlock));
}