Simple, beautiful, open source publishing.
:tada: Leafpub 1.1.0 :tada:
php v5.6+
!index.php
and source/
name: 'schemeVersion', value: 2
:tada: Leafpub 1.1.0-beta4 :tada:
index.php
and source/
database.php
and add 'driver' => 'Pdo_Mysql', 'charset' => 'utf8mb4'
to array/models
and /models/tables
/admin/regenerateThumbnails
: a simple hack to regenerate missing image thumbnails:tada: Leafpub 1.1.0-beta3 :tada:
Replace index.php
and source/
Attached you'll find db_upload_fix.php
. Copy this file into your Leafpub folder, open a terminal and execute the file via php pathToLeafpub/db_upload_fix.php
The file fixes the data in path
and filename
fields and generates the thumbnails.
:tada: Leafpub 1.1.0-beta2 :tada:
Replace index.php
and source/
ALTER TABLE __uploads ADD COLUMN `caption` VARCHAR(191) DEFAULT NULL AFTER id;
ALTER TABLE __uploads DROP INDEX `path`;
ALTER TABLE __uploads ADD UNIQUE INDEX `filename`(filename);
ALTER TABLE __tags ADD COLUMN `type` enum('post','upload') NOT NULL DEFAULT 'post';
CREATE TABLE IF NOT EXISTS `__upload_tags` (
`upload` int(11) NOT NULL,
`tag` int(11) NOT NULL,
KEY `upload` (`upload`),
KEY `tag` (`tag`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
CREATE VIEW __view_posts AS
SELECT
a.id, a.slug, a.created, a.pub_date, c.slug as author, a.title, a.content,
a.meta_title, a.meta_description, a.status, a.page, a.featured, a.sticky,
CONCAT_WS('.', CONCAT(b.path, b.filename), b.extension) as image
FROM
`__posts` a
LEFT JOIN
`__uploads` b
ON
a.image = b.id
INNER JOIN
`__users` c
ON
a.author = c.id
CREATE TABLE `__post_uploads` (
`post` int(11) NOT NULL,
`upload` int(11) NOT NULL,
KEY `post` (`post`),
KEY `upload` (`upload`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
As of the new media management your post image and your content images won't be shown. I'll give you later a script to fix your database.
:sparkles: Leafpub 1.1.0-beta1 :sparkles:
Replace index.php
and source/
and add folder 'content/plugins' to update.
CREATE TABLE IF NOT EXISTS `__plugins` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(51) NOT NULL,
`description` varchar(100) NOT NULL,
`author` varchar(51) NOT NULL,
`version` varchar(8) NOT NULL,
`requires` varchar(8) NOT NULL,
`license` varchar(8) NOT NULL,
`dir` varchar(51) NOT NULL,
`img` varchar(100) NOT NULL,
`link` varchar(100) DEFAULT NULL,
`isAdminPlugin` tinyint(1) NOT NULL DEFAULT '0',
`isMiddleware` tinyint(1) NOT NULL DEFAULT '0',
`install_date` datetime NOT NULL,
`enabled` tinyint(1) NOT NULL DEFAULT '0',
`enable_date` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `dir` (`dir`),
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;