/silverstripe-mypswd-blog-tweaks

Tweaks to a range of modules to make a great SilverStripe blog solution

Primary LanguagePHPBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Custom SilverStripe Blog Tweaks

Introduction

My ideal SilverStripe blogging solution consists of the following modules:

This module contains a variety of tweaks to these modules that further perfect the solution. I add this module to every SilverStripe blog I do.

Maintainer Contact

Requirements

  • Silverstripe 3.1+

Tweaks Included

  • Blog: Hides the redundant dropdown next to the "Add Blog Post" button (using CSS).
  • Blog: Added $description static.
  • Blog: Sets canCreate so only one blog can be created (keeps page type list tidy for non-admins)
  • Blog: Adds custom page icon.
  • Blog: Adds default frontend templates & CSS (which can be disabled in config).
  • Blog Post: Removed the "MenuTitle" field, as not usually required for blog posts.
  • Blog Post: Added a "Manage Posts" button to the top of the CMS EditForm, to allow the user an obvious way back to the posts Gridfield.
  • Blog Post: Sets a custom upload location for Featured Image files.
  • Blog Post: Hides to the Featured Image upload location.
  • Blog Post: Removed the Settings > Visibility section, as not normally applicable to blog posts.
  • Blog Post: Adds custom page icon.
  • Blog Post: Adds a message below the categories and tags fields telling the user where to go to add them if none exist.
  • Blog Post: Adds ability to enable/disable tags/categories/featuredimage in config.
  • Blog Post: Adds default frontend templates & CSS (which can be disabled in config).
  • Comments Admin: Removes the bulk action dropdown, and re-adds it with a new "Mark as Moderated" action, and a delete action.
  • Comment: Removes the "Is Spam?" field. (Not neccecary for Mollom module)
  • Comment: Removes the "URL" field.
  • Comment: Makes the comment e-mail address readonly.
  • Comment: Adds a readonly "ParentTitle" field to display the name of the page that comment was left on.
  • Comment: Removes the "Spam?" summary field.
  • Comment: Renamed comment form field labels to keep them short and simple.
  • Comment: Moved the line "Your e-mail address will not be published." from the main label, into a "RightTitle".
  • Templates: Minor tweaks to remove rarely used features such as RSS feed links.
  • CSS: Added some basic CSS to make the default comment styles a bit nicer.
  • Custom E-mail Template: Including message if comment needs to be approved, and links to immediately approve/delete the comment from the e-mail.

Installation

Feel free to pick out any tweaks for use in your own projects, or if you really wish you can install this module as is. (Although be warned I shall be making further adjustments/improvments to the whole solution as time goes on).

To install:

This module requires Mollom, which currently hasn't been added to Packagist, but does have a composer.json file. To avoid an error when installing this module, add the following to your composer.json file first:

{
	"repositories": [
        {
            "type": "git",
            "url": "https://github.com/Mollom/MollomPHP.git"
        }
    ]
}

Add the module using Composer:

composer require purplespider/mypswd-blog-tweaks *

Add the following to /mysite/_config/config.yml to enable spam protection:

CommentingController:
  extensions:
      - CommentSpamProtection
FormSpamProtectionExtension:
  default_spam_protector: MollomSpamProtector
Mollom:
  public_key: <Get from mollom.com>
  private_key: <Get from mollom.com>
  dev: false

Create a new page of type Blog.

Add a Comment Notification Email address in Settings if required.