2017 © Pedro Peláez
 

library mamuz-blog

Provides blog feature for ZF2 with Doctrine

image

mamuz/mamuz-blog

Provides blog feature for ZF2 with Doctrine

  • Thursday, August 20, 2015
  • by mamuz
  • Repository
  • 2 Watchers
  • 10 Stars
  • 1,100 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 23 Versions
  • 0 % Grown

The README.md

MamuzBlog

Build Status Coverage Status Scrutinizer Code Quality SensioLabsInsight HHVM Status Dependency Status, (*1)

Latest Stable Version Latest Unstable Version Total Downloads License, (*2)

Features

  • This module provides a blog based on ZF2 and Doctrine2.
  • Posts are rendered by a markdown parser.
  • Posts are taggable and searchable.
  • Post listing is provided, same is true for tags.
  • Hyperlinks to dedicated posts are secured by encrypted identities.
  • Hyperlinks also ends with slugified post titles to meet SEO.
  • Hyperlinks are Permalinks.
  • Views are twitter-Bootstrap compatible.
Screenshot
MamuzBlog

Installation

The recommended way to install mamuz/mamuz-blog is through composer by adding dependency to your composer.json:, (*3)

{
    "require": {
        "mamuz/mamuz-blog": "*"
    }
}

After that run composer update and enable this module for ZF2 by adding MamuzBlog to modules in ./config/application.config.php:, (*4)

// ...
    'modules' => array(
        'MamuzBlog',
    ),

This module is based on DoctrineORMModule and be sure that you have already configured database connection., (*5)

Create database tables with command line tool provided by DoctrineORMModule:, (*6)

./vendor/bin/doctrine-module orm:schema-tool:update

Configuration

Post identity encryption for hyperlinks

Encryption is supported by hashids/hashids and have to be configured by copy ./vendor/mamuz-blog/config/crypt.local.php.dist to ./config/autoload/crypt.local.php. Be sure that this file is not under version control. The only thing you have to do is changing salt value to any complex string., (*7)

Default configuration

Besides configuration for identity encryption this module is usable out of the box, but you can overwrite default configuration by adding a config file in ./config/autoload directory. For default configuration see module.config.php, (*8)

Pagination

Listings of posts and tags includes a pagination feature, which seperates views to a default range. Default range is overwritable by adding a config file in ./config/autoload directory., (*9)

Posts

Post listing is provided by route blogPublishedPosts and default range is two items., (*10)

Tags

Tag listing is provided by route blogTags and default range is 10 items., (*11)

Creating a new Post

Create an entity in MamuzBlogPost repository and tag it in related MamuzBlogTag., (*12)

Admin Module to provide an interface for that is planned., (*13)

Workflow

If routing to a dedicated post found by published flag and encrypted identity is successful, post content will be responsed in a new view model rendered as markdown, otherwise it will set a 404 status code to the http response object., (*14)

Events

For the sake of simplicity Event is used for FQN MamuzBlog\EventManager\Event., (*15)

The following events are triggered by Event::IDENTIFIER mamuz-blog:, (*16)

Name Constant Description
createPaginator.pre Event::PRE_PAGINATION_CREATE Before pagination creation for posts/tags listing
createPaginator.post Event::POST_PAGINATION_CREATE After pagination creation for posts/tags listing
findPublishedPost.pre Event::PRE_FIND_PUBLISHED_POST Before dedicated post retrieval
findPublishedPost.post Event::POST_FIND_PUBLISHED_POST After dedicated post retrieval

Terminology

  • Posts: Published articles about any issues which are listed chronological in a blog.
  • Tag: Category to group related posts to a specific issue.
  • Permalink: Human-readable and unchangeable hyperlink to a dedicated post or to a list of posts by a specific tag.

The Versions

29/07 2014

1.0.0

1.0.0.0 https://github.com/mamuz/MamuzBlog

Provides simple product owner blog feature for ZF2 with Doctrine

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marco Muths

zf2 doctrine markdown blog twitter-bootstrap mamuz

25/07 2014

0.2.2

0.2.2.0 https://github.com/mamuz/MamuzBlog

Provides simple product owner blog feature for ZF2 with Doctrine

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marco Muths

zf2 doctrine markdown blog twitter-bootstrap mamuz

21/07 2014

0.2.1

0.2.1.0 https://github.com/mamuz/MamuzBlog

Provides simple product owner blog feature for ZF2 with Doctrine

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marco Muths

zf2 doctrine markdown blog twitter-bootstrap mamuz

20/07 2014

0.2.0

0.2.0.0 https://github.com/mamuz/MamuzBlog

Provides simple product owner blog feature for ZF2 with Doctrine

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marco Muths

zf2 doctrine markdown blog twitter-bootstrap mamuz