Coder Social home page Coder Social logo

ph-7 / php-mvc-blog-system Goto Github PK

View Code? Open in Web Editor NEW
145.0 13.0 80.0 23 KB

:fire: Simple PHP blog system application based on the MVC pattern and written in PHP 5.5. This project can be used as a Base MVC "framework" to start your PHP project easily under good development patterns and good development practice and organization.

Home Page: http://github.com/pH-7/PHP-MVC-Blog-System

License: GNU Lesser General Public License v3.0

PHP 96.39% CSS 3.61%
mvc php-blog mvc-pattern blog-article mvc-framework blog php-mvc mvc-blog mvcblog php

php-mvc-blog-system's Introduction

Simple PHP MVC Blog System

Description

This PHP Blog System has an MVC pattern, uses Traits (PHP 5.4), Namespace (PHP 5.3), Singleton pattern, PDO (PHP 5.1) and the new PHP Password Hashing feature (PHP 5.5).

The project was a PHP Challenge Project I have done.

Why this MVC Blog System can be very Useful for You?

If you need to code a simple website under a Professional and very nice/clean code (as I really enjoy doing), this script will be very useful in order to start on good basis and save time and money.

However, if you need to build a blog system, again this project can be used as a framework to start your project easily under a good development pattern and good development practice and organization.

Requirements that were Requested for the Project

Requirements

  • The project should be written in object-oriented PHP targeting version 5.5 or higher
  • It should be all self-written, no existing frameworks or libraries
  • It should have good security (e.g., hashed passwords, protect against SQL injection, shouldn't have any error when we try to change URL query strings or to hack it, etc)
  • Should use a MySQL database to store admin account and article data

Specification

Build a simple blog with the following functionalities

The Frontend

  • List of blog articles showing the title, body truncated to 100 characters, and date. It should show only the latest 5 articles
  • Single blog article showing the title, full body, and the date

The Backend

  • List of all the blog articles
  • Possibility to add a new blog article with a title and body. The title should allow a maximum of 50 characters
  • Possibility to edit an existing blog article
  • Possibility to delete an article
  • Logout feature for the admin user

HTML and CSS code should be kept to the minimum needed to make the website functional โ€“ This project is purely to assess how you approach the problem and not how good it looks.

Server Requirements of the Web App

  • Application Server PHP 5.5.0 or higher.

  • PHP Extension mbstring

  • Database MySQL/MariaDB 5 or higher.

The Author

Pierre-Henry Soria

Contact the Author

By email at: phy [AT] hizup [D0T] uk

License

This blog system (PHP script) is under Lesser General Public License (LGPL); See the LICENSE.txt file for more information.

php-mvc-blog-system's People

Contributors

ph-7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-mvc-blog-system's Issues

Add section pager

I think it would be a good step to add a pager and a search engine. You dare?

Error in password_verify

I installed this and it worked right away, that is until I tried the login. I struggled with it for awhile as the login failed with "Incorrect Login!" message. As I dug into the code I found a posting about the use of "password_verify." It made it clear that un-encrypted password from the form needed to be the first parameter in the function's argument list. I swapped the encrypted password with the form's input password and it worked right away.

if(password_verify($_POST['password'], $sDbPassword ))

Security Issue for login

You have a serious security issue for login admin. when you want to log the admin in you have not to fetch password from database because it is in danger of sniffing data by MITM attach.

You should add Comments

It is very good code.
I like it.
Next step would add a comments feature.
Think the script deserves this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.