Go to file
2014-02-27 15:52:27 +13:00
_config NEW Show "post" date and author in CMS list view for blog entries 2013-03-18 14:09:28 +01:00
.tx Transifex translation support 2013-07-08 11:58:21 +02:00
code BUG Fix BlogHolder::requireDefaultRecords not respecting SiteTree.create_default_pages config 2014-02-27 15:52:27 +13:00
css API Moved "SideBar" widget relation to "widgets" module 2013-04-16 16:04:44 +02:00
docs MINOR: update Requirements in README 2012-05-21 14:58:26 +12:00
images ENHANCEMENT: UI Improvements 2012-08-17 14:08:43 +12:00
javascript MINOR: resolve conflicts after merging 2012-05-21 15:58:40 +12:00
lang Danish translations updated from Transifex 2013-11-01 08:06:46 +01:00
templates BUG Fixing template errors (brackets not closed) introduced in fe5a978 2013-07-12 18:02:02 +12:00
tests API Remove Trackback support 2013-04-11 01:21:04 +02:00
thirdparty/xmlrpc MINOR: resolve conflicts after merging 2012-05-21 15:58:40 +12:00
_config.php API Moved "SideBar" widget relation to "widgets" module 2013-04-16 16:04:44 +02:00
.gitignore Update .gitignore 2012-08-29 11:21:48 +12:00
.travis.yml Travis support 2013-03-29 10:02:11 +01:00
ChangeLog MINOR: update Requirements in README 2012-05-21 14:58:26 +12:00
composer.json Change dependency versions to work for 3.1.0-rc1. 2013-08-13 13:47:17 +12:00
LICENSE Create LICENSE 2013-09-02 21:22:03 +12:00
README.md Transifex translation support 2013-07-08 11:58:21 +02:00

Blog Module

Build Status

Introduction

The blog module allows you to post blogs on your SilverStripe. It includes the ability to post blogs using a site front-end form. Blogs are summarised on the blog holder page type, with more detail viewable when a specific blog is clicked.

Maintainer Contact

  • Saophalkun Ponlu (phalkunz at silverstripe dot com)
  • Carlos Barberis (carlos at silverstripe dot com)

Requirements

  • Silverstripe 3.1
  • silverstripe-widgets module

Feature Overview

  • Front-end blog post form
  • Posts allow bbcode
  • RSS feed for blog and also feeds for comments on posts
  • Easily customizable
  • Tag cloud widget
  • Archive widget
  • Blog management widget
  • RSS widget (will likely move in future)

Configuration Options

Use WYSIWYG editing instead of bbcode

Out of the box the blog module uses bbcode, just like the forum module. If you want to go back to using the standard page editing toolbar you need to add the following code to your mysite/_config.php file

:::php
BlogEntry::allow_wysiwyg_editing();

Page types

We have chosen to go with the following page types to include with the blog module:

  • BlogHolder: The BlogHolder shows BlogEntrys, and provides a way to search etc.It would also contain methods to post new blogs.

  • BlogEntry: This is simply an entry/post for the blog.

Simple form for adding a post

There is a blog management widget, that includes a link "Post new blog entry", which takes the user to [site/CurrentBlogHolder]/post (this is a good url to bookmark if you will be using it to blog regularly). This shows a blog entry form, which requires a subject and some content at the least. Clicking "Post blog entry" takes the user back to the blog. A login form will show if the user is not logged in. The entered author name is stored in a cookie. Initially the shown name will be the user's name.

BBcode support

  • BBCode can be entered into the form.

  • A bbcode tags help box shows when the "BBCode help" link is clicked. Javascript is required for this to work.

See :PEAR:BBCodeParser for more details.

Modifying the blog entry form

You may want to add or remove certain fields from the blog entry form. This can be done in BlogHolder.php. You will need to modify the $fields FieldSet object in the BlogEntryForm function. tutorial 3 shows you how to do this.

You will likely need to play around with the form and associated css to get the form looking how you want it.

View Archived Blogs

Blog archives can be viewed by year/month by appending the year, followed by a forward slash, then the numerical month, to the end of the blogholder URL. Alternately, just the year can be appended to view entries for that year.

for example: mysite/blog/2007/6 would show blog entries for June 2007

or: mysite/blog/2007 would show blog entries for 2007

Comments and Spam Protection

See :pagecomment for creating Askimet-protected comments for every page.

Widgets

The module comes with a couple of default widgets, which rely on the "silverstripe/widgets" module being installed. Since widgets are based on database records and relations to pages, they need to be enabled through an Extension class in your config.yml:

:::yml
BlogTree:
  extensions:
    - WidgetPageExtension
BlogEntry:
  extensions:
    - WidgetPageExtension

Alternatively, you can simply enable the extension on your Page records to have it available globally.

Working with the theme

The blog comes set up to use the \themes\blackcandy_blog\ directory by default.

Contributing

Translations

Translations of the natural language strings are managed through a third party translation interface, transifex.com. Newly added strings will be periodically uploaded there for translation, and any new translations will be merged back to the project source code.

Please use https://www.transifex.com/projects/p/silverstripe-blog/ to contribute translations, rather than sending pull requests with YAML files.