Add Project-Pro Blog module with initial SQL setup, CSS styles, and template files

- Created SQL installation scripts for categories and posts tables.
- Added uninstall scripts to drop the created tables.
- Introduced CSS styles for blog layout, including responsive design for posts and categories.
- Implemented PHP redirection in index files to prevent direct access.
- Developed Smarty templates for blog category tree, post list, and individual post details.
- Ensured proper caching headers in PHP files to enhance performance.
This commit is contained in:
2026-03-03 15:24:51 +01:00
parent 8d14e5d95c
commit 5f93428041
35 changed files with 3128 additions and 2 deletions

View File

@@ -0,0 +1,8 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,49 @@
CREATE TABLE IF NOT EXISTS `PREFIX_projectproblog_category` (
`id_category` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_parent` INT(10) UNSIGNED NOT NULL DEFAULT 0,
`active` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
`position` INT(10) UNSIGNED NOT NULL DEFAULT 0,
`date_add` DATETIME NOT NULL,
`date_upd` DATETIME NOT NULL,
PRIMARY KEY (`id_category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `PREFIX_projectproblog_category_lang` (
`id_category` INT(10) UNSIGNED NOT NULL,
`id_lang` INT(10) UNSIGNED NOT NULL,
`name` VARCHAR(255) NOT NULL,
`description` TEXT,
`link_rewrite` VARCHAR(255) NOT NULL,
`meta_title` VARCHAR(255),
`meta_keywords` VARCHAR(255),
`meta_description` VARCHAR(512),
PRIMARY KEY (`id_category`, `id_lang`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `PREFIX_projectproblog_post` (
`id_post` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`active` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
`thumbnail` VARCHAR(255) DEFAULT NULL,
`date_add` DATETIME NOT NULL,
`date_upd` DATETIME NOT NULL,
PRIMARY KEY (`id_post`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `PREFIX_projectproblog_post_lang` (
`id_post` INT(10) UNSIGNED NOT NULL,
`id_lang` INT(10) UNSIGNED NOT NULL,
`title` VARCHAR(255) NOT NULL,
`intro` TEXT,
`content` LONGTEXT,
`link_rewrite` VARCHAR(255) NOT NULL,
`meta_title` VARCHAR(255),
`meta_keywords` VARCHAR(255),
`meta_description` VARCHAR(512),
PRIMARY KEY (`id_post`, `id_lang`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `PREFIX_projectproblog_post_category` (
`id_post` INT(10) UNSIGNED NOT NULL,
`id_category` INT(10) UNSIGNED NOT NULL,
PRIMARY KEY (`id_post`, `id_category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

View File

@@ -0,0 +1,5 @@
DROP TABLE IF EXISTS `PREFIX_projectproblog_post_category`;
DROP TABLE IF EXISTS `PREFIX_projectproblog_post_lang`;
DROP TABLE IF EXISTS `PREFIX_projectproblog_post`;
DROP TABLE IF EXISTS `PREFIX_projectproblog_category_lang`;
DROP TABLE IF EXISTS `PREFIX_projectproblog_category`;