Simple Blog written with Slim Framework

Overview

SlimBlog

Join the chat at https://gitter.im/fdisotto/SlimBlog

Demo

Demo

Dependencies

Install

  • Run 'php composer.phar install' in root directory
  • Run every *.sql files located in src/SQL and src/SQL/updates
  • Rename the config/database.config.php.install file to config/database.config.php and edit it with your database settings
  • Login with username:password
  • Enjoy

Features

  • Create new post with live markdown editor
  • Edit/Delete posts and manage users
  • Manage settings
  • Template system
  • Multilanguage support

ToDo List

  • Error manager
  • Different user level (Super admin, writers, other)
  • Template system
  • Installation more user friendly
  • I18n support

Screenshots

Home Live editor Post list

Author

Fabio Di Sotto

Contributors

Andrew Smith

mnlg

Comments
  • updates?

    updates?

    hello again

    this git is really great, any plans for updating with this:

    • Different user level (Super admin, writers, other)
    • I18n support

    would be some great features to have :-)

    Martin

    opened by jespersgaard 11
  • Error :

    Error :

    When i try to disable / enable and edit a post, I get this:

    Details
    
    Type: Illuminate\Database\Eloquent\MassAssignmentException
    Message: active
    File: /Users/oscargacitua/Documents/Dev/slimblog/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php
    Line: 333
    Trace
    
    #0 /Users/oscargacitua/Documents/Dev/slimblog/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php(1231): Illuminate\Database\Eloquent\Model->fill(Array)
    #1 /Users/oscargacitua/Documents/Dev/slimblog/src/routes/admin.route.php(278): Illuminate\Database\Eloquent\Model->update(Array)
    #2 [internal function]: {closure}('4')
    #3 /Users/oscargacitua/Documents/Dev/slimblog/vendor/slim/slim/Slim/Route.php(441): call_user_func_array(Object(Closure), Array)
    #4 /Users/oscargacitua/Documents/Dev/slimblog/vendor/slim/slim/Slim/Slim.php(1314): Slim\Route->dispatch()
    #5 /Users/oscargacitua/Documents/Dev/slimblog/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call()
    #6 /Users/oscargacitua/Documents/Dev/slimblog/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
    #7 /Users/oscargacitua/Documents/Dev/slimblog/vendor/slim/slim/Slim/Middleware/SessionCookie.php(110): Slim\Middleware\MethodOverride->call()
    #8 /Users/oscargacitua/Documents/Dev/slimblog/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\SessionCookie->call()
    #9 /Users/oscargacitua/Documents/Dev/slimblog/vendor/slim/slim/Slim/Slim.php(1261): Slim\Middleware\PrettyExceptions->call()
    #10 /Users/oscargacitua/Documents/Dev/slimblog/public/index.php(75): Slim\Slim->run()
    #11 {main}
    

    Is there any solution? Thanks ! :D :smiley:

    opened by ogacitua 6
  • Strange bug when truncate is actived

    Strange bug when truncate is actived

    I have a post with this text: Strange world.

    What I see in the home page is: strange world

    I think it's a problem with preg_replace() calling in first_n_words() function.

    opened by DavidePastore 6
  • after update

    after update

    hello again

    i have installed your update, and now i get this error: Slim Application Error The application could not run because of the following error:

    Details

    Type: Twig_Error_Loader Message: Unable to find template "posts.html" (looked into: C:\wamp\www\SlimBlog-master\templates). File: C:\wamp\www\SlimBlog-master\vendor\twig\twig\lib\Twig\Loader\Filesystem.php Line: 202

    rgds Martin

    opened by jespersgaard 5
  • error with twig

    error with twig

    hello

    i get this error: ( ! ) Strict standards: Declaration of Slim\Views\Twig::render() should be compatible with Slim\View::render($template, $data = NULL) in C:\wamp\www\SlimBlog\vendor\slim\views\Slim\Views\Twig.php on line 46 Call Stack

    Time Memory Function Location

    1 0.0016 252064 {main}( ) ..\index.php:0 2 0.0265 701832 Composer\Autoload\ClassLoader->loadClass( ) ..\index.php:0 3 0.0281 719976 include( 'C:\wamp\www\SlimBlog\vendor\slim\views\Slim\Views\Twig.php' ) ..\ClassLoader.php:185

    opened by jespersgaard 5
  • DEMO 404

    DEMO 404

    http://slimblog.fabiodisotto.it

    "404 Page Not Found The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.

    Visit the Home Page"

    opened by lupuxyz 3
  • Error : Password field (User edit)

    Error : Password field (User edit)

    There is an error that occurs when the user edits their information but does not change the password, the value of the password is changed to an empty

    Line 212 in /src/routes/admin.route.php

     $password = hash('sha512', $app->request->post('password'));
    

    Then

    $password = hash('sha512', "");
    

    The solution is to check if the field is empty

      $app->post('/users/edit/:id', $authenticate($app, $settings), function($id) use ($app, $settings) {
            $username   = $app->request->post('username');
            $pass       = $app->request->post('password');
            $password   = hash('sha512', $pass );
            $email  = $app->request->post('email');
    
            if($username == "") {
                $app->flash('error', 1);
                $app->redirect($settings->base_url . '/admin/users/new');
            }
            if($email == "" OR !filter_var($email, FILTER_VALIDATE_EMAIL)) {
                $app->flash('error', 2);
                $app->redirect($settings->base_url . '/admin/users/new');
            }
    
            $redirect = $settings->base_url . '/admin/users';
            if (!$pass == "") {
                Users::where('id', '=', $id)->update(array('username' => $username, 'password' => $password, 'email' => $email));
            } else {
                Users::where('id', '=', $id)->update(array('username' => $username, 'email' => $email));
            }
            $app->render('success.html', array('redirect' => $redirect));
        })->conditions(array('id' => '\d+'));
    
    

    What do you think?

    opened by ogacitua 2
  • .SQL bug

    .SQL bug

    Hello,

    I cloned the repo and when I try to import the slimblog.sql in phpmyadmin, I got an error :

    Error

    SQL query:

    CREATE TABLE IF NOT EXISTS comments ( id int(11) NOT NULL AUTO_INCREMENT, username varchar(50) NOT NULL, url varchar(50) NOT NULL, email varchar(50) NOT NULL, text text NOT NULL, posts_id int(11) NOT NULL, created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY FK__posts (posts_id), CONSTRAINT FK__posts FOREIGN KEY (posts_id) REFERENCES posts (id) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1

    MySQL said: Documentation #1215 - Cannot add foreign key constraint

    I don't know what's wrong, but please fix it :D

    opened by Selenuix 1
  • failed to open stream

    failed to open stream

    ( ! )
    Warning: require_once(G:\xampp\htdocs\SlimBlog\languages\.php): failed to open stream: No such file or directory in G:\xampp\htdocs\SlimBlog\src\bootstrap.php on line 61
    Call Stack
    #	Time	Memory	Function	Location
    1	0.2000	157808	{main}( )	..\index.php:0
    2	0.2170	397072	require_once( 'G:\xampp\htdocs\SlimBlog\src\bootstrap.php' )	..\index.php:24
    
    ( ! )
    Fatal error: require_once(): Failed opening required 'G:\xampp\htdocs\SlimBlog\languages\.php' (include_path='G:\xampp\php\PEAR') in G:\xampp\htdocs\SlimBlog\src\bootstrap.php on line 61
    Call Stack
    #	Time	Memory	Function	Location
    1	0.2000	157808	{main}( )	..\index.php:0
    2	0.2170	397072	require_once( 'G:\xampp\htdocs\SlimBlog\src\bootstrap.php' )	..\index.php:24
    
    
    opened by tranquangchau 1
  • Move database config to its own file

    Move database config to its own file

    Move the database settings to its own file. This makes it easier if we want to create a web based installer.

    I also added the new config file to .gitignore so we don't have to worry about pushing our own settings while developing.

    opened by StJudeWasHere 1
  • Use getUrl and getScriptName instead of a hardcoded URL

    Use getUrl and getScriptName instead of a hardcoded URL

    Use getUrl and getScriptName instead of a hardcoded URL in the database. This makes the installation a bit easier as the SQL file doesn't have to be modified.

    The Site URL field should also be removed from the settings view and the settings table as it's not needed anymore.

    opened by StJudeWasHere 1
  • Demo site is broken

    Demo site is broken

    ( ! ) Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Connection refused' in /var/www/slimblog/vendor/illuminate/database/Connectors/Connector.php on line 55
    ( ! ) PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/slimblog/vendor/illuminate/database/Connectors/Connector.php on line 55
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0004	234896	{main}( )	.../index.php:0
    2	0.0041	280160	require_once( '/var/www/slimblog/src/bootstrap.php' )	.../index.php:24
    3	0.0153	934464	Illuminate\Database\Eloquent\Builder->first( )	.../bootstrap.php:40
    4	0.0154	935184	Illuminate\Database\Eloquent\Builder->get( )	.../Builder.php:286
    5	0.0154	935344	Illuminate\Database\Eloquent\Builder->getModels( )	.../Builder.php:316
    6	0.0154	935432	Illuminate\Database\Query\Builder->get( )	.../Builder.php:624
    7	0.0154	935528	Illuminate\Database\Query\Builder->runSelect( )	.../Builder.php:1569
    8	0.0159	937184	Illuminate\Database\Connection->select( )	.../Builder.php:1583
    9	0.0159	938200	Illuminate\Database\Connection->run( )	.../Connection.php:342
    10	0.0159	938272	Illuminate\Database\Connection->reconnectIfMissingConnection( )	.../Connection.php:661
    11	0.0159	938320	Illuminate\Database\Connection->getPdo( )	.../Connection.php:776
    12	0.0159	938368	call_user_func:{/var/www/slimblog/vendor/illuminate/database/Connection.php:908} ( )	.../Connection.php:908
    13	0.0159	938416	Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}( )	.../Connection.php:908
    14	0.0169	950504	Illuminate\Database\Connectors\MySqlConnector->connect( )	.../ConnectionFactory.php:61
    15	0.0170	951544	Illuminate\Database\Connectors\Connector->createConnection( )	.../MySqlConnector.php:24
    16	0.0178	995832	Illuminate\Database\Connectors\Connector->tryAgainIfCausedByLostConnection( )	.../Connector.php:59
    
    
    opened by francislavoie 0
  • Please update composer.json

    Please update composer.json

    This blog framework should update require for slim ~2.x instead of leave as slim *. No way for this blog framework compatible with Recent Slim (3.x).

    one more thing. please include static page as as feature instead of just blog at least we can make about and contact page and can CRUD those page in the admin area

    enhancement 
    opened by mexantos 1
Releases(v1.1.2)
Owner
Fabio Di Sotto
Solidity, PHP, Java, NodeJS, Python, VueJS, NuxtJS, Redis, SQL
Fabio Di Sotto
Magento 2 Blog Extension - FREE, fully featured, powerful Blog solution for your online store!

Blog MX | Magento 2 Blog Module by Mirasvit FREE, fully featured, powerful Blog solution for your online store! Magento 2 Blog MX allows you to open a

Mirasvit 71 Dec 7, 2022
Magento 2 Blog is an extension that allows you to manage your store and blog

Magento 2 Blog Extension by Magefan Magento 2 Blog is an extension that allows you to manage your store and blog from one place without having to rely

Magefan 243 Dec 21, 2022
Magento 2 Blog Extension is a better blog extension for Magento 2 platform. These include all useful features of Wordpress CMS

Magento 2 Blog extension FREE Magento 2 Better Blog by Mageplaza is integrated right into the Magento backend so you can manage your blog and your e-c

Mageplaza 113 Dec 14, 2022
Sample application to bookmark links, where interface build with Angular.js + Twitter Bootstrap and server powered by PHP with Slim Framework

RESTful Bookmarks PHP Slim TODO: review and update FrontEnd Sample application to bookmark links, where interface build with Angular.js + Twitter Boot

Erko Bridee 50 Dec 15, 2021
This library is an implementation of League\Event for Slim Framework

Slim Event Dispatcher This library is an implementation of League\Event for Slim Framework. This works with the latest version of Slim (V3). Installat

Aneek Mukhopadhyay 7 Aug 23, 2022
It is a simple blog application coded with PHP, HTML, CSS. You can develop, edit. You can see it as a skeleton. ⚡

PHP-BLOG-SYSTEM Simple blog system Features Adding Text Update Text Text Deletion User Login and register Bootstrap Design Profile Page How to use blo

Selçuk 2 Aug 21, 2022
Simple yet powerful, PSR-compliant, Symfony-driven PHP Blog engine.

brodaty-blog ✒️ Simple Blog Engine based on pure Markdown files. ?? Works without database, caches HTML templates from Markdown files. ?? Fast and ext

Sebastian 3 Nov 15, 2022
Bank API written in PHP 7.4 without framework

Bank API written in PHP 7.4 without framework

Denis 1 Mar 25, 2022
A simple Object Oriented wrapper for Linear API, written with PHP.

PHP Linear API A simple Object Oriented wrapper for Linear API, written with PHP. NOTE You should take a look Linear GraphQL API Schema for all nodes

Mustafa KÜÇÜK 6 Sep 2, 2022
A simple twitter-feed-style RSS aggregator written in PHP, Laravel, Inertia.js, Tailwind and Vue.js

RSS A simple, opinionated, RSS feed aggregator. Features The following features are built into the application: Supports RSS and ATOM formats. Regular

Dan Brown 257 Dec 24, 2022
Extracts information about web pages, like youtube videos, twitter statuses or blog articles.

Essence is a simple PHP library to extract media information from websites, like youtube videos, twitter statuses or blog articles. If you were alread

Essence 765 Dec 30, 2022
Re-skinning BotCloaker enables you to add a SMART button at the end of all posts on your blog.

Re-skinning BotCloaker Wordpress Plugin Re-skinning BotCloaker enables you to add a SMART button at the end of all posts on your blog. Re-skinning Bot

Mohammed cha 120 Nov 11, 2022
Projeto de um blog com funções de (criar, editar, deletar e dar update) em uma página web. Introdução ao Laravel 8.x.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Isabella 1 Nov 7, 2021
🖍 Write beautiful blog articles using Markdown inside your Laravel app.

Blogged Write beautiful blog articles using Markdown inside your Laravel app. Blogged ?? Blogged is a carefully designed Laravel package provides an e

Saleem Hadad 131 Dec 16, 2022
A Magento 2 dashboard to display installed extensions. Read the blog post on some of the thinking behind it:

Extension Dashboard for Magento 2 This module adds a dashboard to review all installed extensions in the Magento admin (Magento 2.3.0+ for now only).

ExtDN 36 Dec 24, 2022
Polonium is a world class old school ✍️ blog website made with Php and Tailwind 🌀

Polonium Polonium is a world class old school ✍️ blog website made with Php and Tailwind ?? to write dump articles about... Yeah I know, you should pr

Youness Idbakkasse 2 Jan 10, 2022
Universal extension installer for Magento 2, see introductory blog post here

ExtDN Installer for Magento 2 modules The installation of extensions for Magento 2 has a few scenarios to cover depending on your starting position (M

ExtDN 26 Apr 1, 2022
PluXml, Moteur de Blog et CMS à l'XML sans base de données

PluXml Créez un site web performant en toute simplicité et sans base de données. Télécharger PluXml 5.8.7 (zip) Version bugfix (5.8.8) en développemen

PluXml 192 Dec 14, 2022
The backend source code of Deverhub Blog.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Lê Chí Huy 0 Jul 2, 2022