The popularity of blogs has exploded, both for reading blogs and actively updating one's own blog. A blog is simply a web-based journal that is updated frequently by the owner. Blog postings are usually arranged in chronological order, with the most recent appearing first in the list. The primary attraction of blogging software is that it removes the need for the user to know anything technical about maintaining web-based content. The user simply has to type within a form field, something that even the newest of web surfers can handle with ease.
SimpleBlog is a Plone add-on that enables users to maintain a blog within their member area of your Plone community. Providing a blogging tool to your members is yet another reason for them to actively participate in your Plone community and encourage others to join in. The process of installing SimpleBlog is similar to installing the other items described previously in this chapter, so you should have no problems.
SimpleBlog is available in the CMF Collective, so the first step toward installation is to download the SimpleBlog package. The current version is 1.2.1, but if you see a newer version in the Collective, by all means, install it. Next , use your unzip utility of choice (perhaps WinZip on Windows, gunzip on Linux/Unix) to extract the files into subfolders within the Data/Products folder in the Plone installation directory.
To finish the installation of SimpleBlog, use the Add/Remove Products option in the Plone setup section, available to the Plone administrator user only. For SimpleBlog to show up as an element to be added, you must restart Plone. After restarting, log in as the Plone administrator and follow the Plone Setup link in the navigation, then follow the Add/Remove Products link. You will see a list of available products to install, one of which should be SimpleBlog. Check its check box and then press the Install button. The installation actions occur, and you should see a message indicating a successful installation:
Installed Products ==================== SimpleBlog:ok:
That's all there is to it. Upon successful installation, three new content types are available to users:
Blog , which will be the container for all postings and subfolders
BlogEntry , individual posts within a blog
BlogFolder , a folder that can exist within the blog and contain postings
To create your Blog, navigate to your member folder and select Blog from the drop-down menu of available types, then press the Add New Item button. You will see a form like in Figure 4.14.
Figure 4.14. Creating your blog.
The fields for the blog creation form are straightforward, and only the Title field is required:
Short Name ” This becomes part of the URL to the blog, much like the Short Name field used in other content types. This short name should be relatively descriptive but should not contain underscores or be of mixed case. If you do not input your own short name, Plone creates one for you.
Title ” The title is used as the text for a link to your blog. It is required.
Description ” This is optional text that appears below the title of your blog.
Display mode ” The options are Full, Description Only, and Title Only; select the one that corresponds to how the front page of your Blog should be displayed.
Blog Entries to Display ” Enter a number corresponding to the maximum number of items to display on the front page of your blog. The default value is 20.
Possible categories ” Free text field in which you can enter one or more categories that can be used for subsequent blog entries.
When you have configured your blog to your liking, press the Save button to save changes. You will then see and have access to the main page of your blog, as shown in Figure 4.15. In this case, I have also configured some categories into which future posts might go.
Figure 4.15. Blog main page.
With a structure now in place, you're ready to add witty and informative blog entries ”within blog folders, if you want.
Adding a Blog Folder
If you created any categories during the configuration of the blog, you might want to add corresponding blog folders for those categories, just to keep items in order. However, this is not required because the association of blog entry to category is done during the creation of the entry and is independent of blog folders. In this section, you'll just add a simple blog folder called musings, which will eventually hold some blog entries.
From the blog main page, or within your member folder, select Blog Folder from the Add New Item drop-down menu. The form is quite simple, and only the Title field is required:
Short Name ” This becomes part of the URL to the blog folder, much like the Short Name field used in other content types. This short name should be relatively descriptive but should not contain underscores or be of mixed case. If you do not input your own short name, Plone creates one for you.
Title ” The title is used as the text for a link to your blog folder. It is required.
Description ” This is optional text that appears below the title of your blog folder.
Additional Categories ” You can create categories in addition to the ones defined for the blog itself that will be available only when adding a blog entry within this blog folder.
When you have configured your folder, press the Save button. You're now ready to populate this blog folder with blog entries.
Adding a Blog Entry
To add a blog entry, first determine in which blog folder you want to add it ”within the master blog folder or within a subfolder such as the musings folder you created earlier. After you make your selection, use the Add New Item drop-down list within the folder to add a new blog entry item. When you press the Add button, you will see a form containing the following fields:
Short Name ” This becomes part of the URL to the blog entry, much like the Short Name field used in other content types. This short name should be relatively descriptive but should not contain underscores or be of mixed case. If you do not input your own short name, Plone creates one for you.
Title ” The title is used as the text for a link to your blog entry. It is required.
Description ” This is optional text that appears below the title of your blog entry.
Body ” This is the contents of your blog entry. You can type in plain text, HTML, or structured text.
Text Format ” Select the format that corresponds to the text typed in the body ”for example, text/plain, text/structured, or text/html.
Upload a File ” If you wrote the contents of your blog entry in a text file, you can upload the file here; you should still select the corresponding text format.
Categories ” Select one or more categories to which your entry should be assigned.
Entry Is Always Listed on Top ” If this is selected, this blog entry will always appear at the top of the list, regardless of the date.
When you have finished creating your blog entry, press the Save button. Your entry is now created but is in the draft workflow and is not yet published for all users (just like other content types). In the next section, you'll publish your blog entries and also see how user commenting works.
Publishing Your Blog Entries
Your blog entries are not available to all users until you change their state to publish; until published, blog entries are only drafts. To change the state of a blog entry, view the entry and then select the State drop-down menu. Select the published item from the drop-down list, and the status automatically changes.
After you publish your blog entry, any member can view it. In addition, elements within the Blog slot are updated: The recent entries area shows a link to this entry, and the category to which it was assigned shows a 1 instead of a 0, representing the one item within it. Figure 4.16 shows a published blog entry, including these changes to the Blog slot.
Figure 4.16. A published blog entry.
Readers can also comment on published blog entries. Commenting is an important part of blogs because it allows discussion to take place between readers and the blog writer. When users click on the Add Comment button, they see a simple form containing two fields: subject and body text. The user completes these fields using plain text and then presses the Add Comment button. The comment is immediately added to the blog entry, with the personal attributes attached, as shown in Figure 4.17.
Figure 4.17. Commenting within a blog entry.
Other users can add their own comments or can reply to the comment just posted, resulting in a threaded discussion. Or, the site owner can remove the discussion altogether, if it becomes unsuitable for public viewing.
Additional SimpleBlog Configuration
SimpleBlog is one of my personal favorites when it comes to Plone add-ons. Not only does it work well, but the author of the tool provides a good deal of documentation in the installation package. You can find this documentation in the readme.txt file within the installation directory.
Use the instructions in the readme.txt file to learn more about the portlets that are available to users of SimpleBlog and how to configure the resulting slots. Additionally, this file explains some of the properties available for configuration within the SimpleBlog control panel, within the Zope Management Interface. As you've seen in this chapter, however, an out-of-the-box installation works quite well; you might find that you don't want or need to modify any core configuration.