Skip to content

Leafpub 1.1.0-beta2

Pre-release
Pre-release

Choose a tag to compare

@karsasmus karsasmus released this 01 Feb 20:37
· 379 commits to develop since this release

πŸŽ‰ Leafpub 1.1.0-beta2 πŸŽ‰

Updating

Replace index.php and source/

Updating the database

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;

Notable changes

  • [enh] Media management
    • new menu item
    • overview of existing media files
    • generate tags
    • auto-generate thumbnails
    • insert an image into a post via media manager
    • save image to post relations

❗ ATTENTION ❗

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.