ProcessBlog by kongondo

A Blog Module for ProcessWire consisting of a backend Blog manager (ProcessBlog) and a frontend Blog generator (MarkupBlog).

Blog

This Blog module enables you to easily create and manage a Blog in ProcessWire. It is based on the Blog Profile module by Ryan Cramer. The module consists of three separate modules:

ProcessBlog: Manage Blog in the backend/Admin. MarkupBlog: Display Blog in the frontend. BlogPublishDate: Automatically sets a publish date when you publish a Blog Post.

Features


ProcessBlog

  • Dashboard with quick stats about your Blog.
  • Quick post.
  • Full view, create, edit, delete, update (CRUD) Posts, Categories and Tags within a single interface.
  • Bulk actions.
  • Edit Blog settings.
  • Blog Authors' stats.
  • Turn widgets on/off (publish/unpublish).
  • Fully uninstall/cleanup Blog templates, fields, pages and optionally template files.

MarkupBlog

  • Easily output your Blog in the frontend, where and how you wish (e,g, only output part of the Blog).
  • Use any CSS framework (or not!) you wish.
  • PocketGrid CSS included with the demo Template Files (fully responsive).

screenshot-demo-frontend.png

How to Install


Install via ProcessWire modules' screen. Once installed, there's two steps involved to finalise the install:

A. Configure Blog settings in its module's configuration screen.

Here you will have to choose from 4 Blog styles to match the Blog URL structure you want:

  1. Blog style 1: /mysite/blog/posts/example-post/
  2. Blog style 2: /mysite/blog/example-post/
  3. Blog style 3: /mysite/posts/example-post/
  4. Blog style 4: /mysite/example-post/

On this screen, you also select:

  • Whether you want to enable the commenting feature;
  • The auto-publish/unpublish posts feature (for which you would need the module SchedulePages;
  • Whether to install 'no template files', 'blank template files', or 'demo template files'; and
  • Optionally specify a tag for grouping Blog Templates and Fields in their respective ProcessWire admin pages
B. Install Blog Templates, Pages, Fields, Role and optionally Template Files.
  • In this second step, via the Blog dashboard (admin/blog/), you will see an overview of the settings you selected in the first step above. Here you install Blog's components. Before you click the button to run the install wizard, nothing will happen yet. You can still go back and change the module configuration settings. Until you run the install wizard in this second step, you will have no Blog Pages, Fields, Templates, etc.

  • On this page, you will also be able to rename your Blog’s main pages before they are created. If you don’t do it at this stage, you can also rename them post-install in the ProcessWire pages' tree. If you are happy with your settings, click the install wizard to proceed. Blog will be fully installed with your settings within a few seconds and you will then be presented with the Blog dashboard.

  • Only Templates, Pages and Fields necessary for your selected 'Blog style' will be installed. For instance, if you did not enable the commenting feature, related Templates, Pages, etc. will not be created.

  • Note that non-enabled features cannot be enabled once the second part of the install is complete. However, using the 'Cleanup' feature (see below) you can return Blog to the first-step of the installer stage and enable a feature you want or even select a different Blog style.

  • If you chose to install the demo Template Files, also manually copy over the /css/ and /scripts/ folders present in Blog module's folder to your /site/templates/ folder.

Please note:

If you need to change some configurations, you can go back to the module settings and do it BEFORE you finalise step two of the installation. It is important that once the installation is finalised, in case you had left the ProcessBlog's module configuration's browser window open, NOT to press submit again. Otherwise, MarkupBlog may not function as expected. However, if you reload the module configurations screen once the second-part of the installer has finished, you will not be able to change the configuration settings. Instead, you will be presented with an overview of your installed settings.

How to Use


Full documentation is available here.

Notes


  • The module Dashboard will not work with Blog Profile installs!
  • MarkupBlog replicates the Blog Profile. Hence, the 'items' Fields, Templates, Template Files and a couple of Pages are installed where such, with similar names, do not already exist, i.e., installation is non-destructive.
  • With the exception of Template Files, note that if even one item with a similar name (and path for Page items) already exists on your site, NONE of the items will be installed. Instead, step two of the installation will be aborted.
  • For Template Files, if you did not select the 'no template files' option, these are only copied over to /site/templates/ where no template with an identical name already exists. This means that no Template File gets overwritten.
  • Fields and Templates are prefixed with blog_ and blog- respectively.
  • The module also adds 3 Fields (biography [blog_body], image [blog_images] and title) to the user template. These are needed for the Blog Author biography.
  • Role blog-author and permission blog are created on install.
  • Until you set 'author titles' for your Blog Authors (in Admin > Access > Users), a generic 'Author Name' will be used as their display names.
  • In order to use the Recent Tweets Widget, you will need to separately install and setup the module MarkupTwitterFeed.

Uninstall


Uninstalling Blog is a two-step process. If you are logged in as a superuser, you will see a Blog menu item called Cleanup. It will lead to a screen with info about all the Fields, Templates, Pages and Role you are about to delete. It will also list the Blog Template Files that, if you wish, you can also delete. This utility is also useful when you want to try out the different Blog styles without uninstalling the whole Blog module. It returns Blog to the state similar to when you first installed the module. Of course, in case you want to remove Blog as well, just go ahead and uninstall in the normal way but AFTER you have cleaned-up.

Changelog


Version 2.4.6

  1. Fix bug in add new 'blog-author' role that threw fatal error.
  2. Various other minor fixes.
  3. Better error message after blog cleanup.

Version 2.4.5

  1. Add option to getArchives() that allows ordering of post months in descending order.
  2. Fixed illegal offset warnings bug in template blog-archives.php.
  3. Refactored array empty/not empty checks.

Version 2.4.4

  1. Fixed bug that caused blog settings not to save.

Version 2.4.3

  1. Code refactoring.
  2. Added method to find embedded images for use as featured image(s), for example.

Version 2.4.2

  1. Support for namespaced ProcessWire only (ProcessWire 3.x).
  2. All ProcessWire Comments Form Options can now be passed as as options to renderComments(). See the options here

Version 2.4.1

  1. New, cleaner UI.
  2. Better sorting of Posts, Categories and Tags in their dashboards.
  3. New option for posts: post_edit. Allows top or bottom placement of link to edit post for logged in users or non-display of link for all users.
  4. Code refactoring.

Version 2.4.0

  1. Fixed sql error thrown when comments disabled and accessed blog dashboard.
  2. Added capability to copy demo JS and CSS files on blog install as well as remove them on uninstall.
  3. Full compatibility with ProcessWire 2.8.x and ProcessWire 3.x. See PR.

Version 2.3.9

  1. Fixed bug where comments' date was being output as a raw timestamp (owing to a miss during the last commit).

Version 2.3.8

  1. Fixed bug where comments' date were not being correctly output.

Version 2.3.7

  1. All MarkupPageNav (used in renderPosts()) options can now be passed to renderPosts() to customise pagination of posts.

Version 2.3.6

  1. Added option to use Rich Text Editor (CKEditor) in Quick Post. Setting is configurable in ProcessBlog module settings (both pre- and post-install).

Version 2.3.5

  1. Fixed issue where dashboards were loading very slowly on sites with lots of posts.
  2. Added some missing translation strings.
  3. Some code optimisations.

Version 2.3.4

Preserve all line breaks as paragraphs for posts created via ProcessBlog's quickpost.

Version 2.3.3

Added a very visible reminder in Blog's module configuration screen not to uninstall the module BEFORE running the in-built Cleanup Utility.

Version 2.3.2

Added a renderRelatedPosts() method.

Version 2.3.1

  1. Fixed Posts/Categories/Tags dashboard html rendering issue on multilingual sites.
  2. Added 'post_small_tag' option to renderPosts() to specify html tag to wrap summary blog posts (small).
  3. Some code optimisations.

Version 2.3.0

  1. Use Blog authors' display names in author pages url/links rather than their usernames
  2. Fixed renderNextPrevPosts() not sorting/displaying previous/next posts properly

Version 2.2.2

  1. All main methods that render HTML output are now configurable via a parameter/argument $options.
  2. Ability to add a featured image to a post

Version 2.0.2

  1. Minor updates to demo template files.

Version 2.0.1

  1. Fixed a comments' visibility issue.
  2. Enhancement to comments' visibility status (added status HIDDEN).

Version 2.0

  1. Four Blog styles (URL structures).
  2. Two-step installer/uninstaller.
  3. Configurable module.
  4. Cleaner utility (for Blog fields, templates, template files, etc.).
  5. Auto-(un)publish feature.
  6. Commenting feature - enable/disable.
  7. Other various enhancements.

Version 1.3.0

  1. Added new small autoload module BlogPublishDate as part of the Blog module suite, that saves a Blog Post's publication date.
  2. Enhancements to Posts, Categories and Tags Dashboards: Customisable number of posts/categories/tags to show per page (via a drop-down select). Selected value is preserved via a cookie per context (i.e. can have different values for posts, categories and tags dashboard) and per user.
  3. Date column: shows 'Pending' for unpublished posts (never before published ones), 'Expired' (published then unpublished posts) and published Date for currently published posts.
  4. Date shown is formatted according to the format set in 'blog_date'.
  5. Fixed sorting by date column.

Version 1.2.2

  1. Changes to renderComments(). Added a 4th Array $options argument for customising the texts describing the various comments' statuses.

Version 1.2.1

  1. Minor styling issues updates.

Version 1.2

  1. Added comments visibility settings at post and global level.
  2. Added Posts' Bulk Actions.

Version 1.1

  1. Added new widget 'Post Author'. The widget allows to add a post's author's biography with each post (above or below the post).
  2. Made 'posts truncate length' configurable.

Version 1.0.1

  1. Several strings made translatable

Resources


Upgrading from Blog version 1 to version 2


Please refer to this post for full instructions and an upgrade script.

License


GPL2

Credits


Ryan Cramer

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #553
    In the 553rd issue of ProcessWire Weekly we'll check out the latest weekly update from Ryan, introduce a new third party module called Text Synthesis, and more. Read on!
    Weekly.pw / 14 December 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer