Blog AddOn

Note: release 1.6 and onwards works on Foswiki 1.2 and newer.
When upgrading, make sure not to overwrite any existing topic BlogCategory.
A simple weblog application based on Data Forms.

Screenshots

Example list view:

screenshot_list.png

Example post:

screenshot_post.png

Features

Working with BlogAddOn

To update the instructions on this page to point to your blog web, enter the name of the blog web:
 
Once you have copied the topics from _BlogAddOn (temporary) web to the web you want the blog to appear:

Putting the blog post list in a different topic

To put the overview in a topic, write:
%INCLUDE{"yourblogweb.BlogPost"}%

This will show all posts, grouped (paginated) by 10, the most recent first.

It will also include the filter and sort options above the blog posts.

List display options

Use display="posts" to show the blog posts without filter/short dropdown controls (but with author/category/tag filters):
%INCLUDE{
"yourblogweb.BlogPost"
display="posts"
}%

Use display="list" to show only the posts, without filter/sort dropdown controls and without author/category/tag filters.
%INCLUDE{
"yourblogweb.BlogPost"
display="list"
}%
NOTE: because author/category/tag filters are not displayed, users will not be able to remove filtering. Use this display variant only in specific places.

Summary options

Use parameter outline to control the contents of the summary text. Possible values:

Value Will show
formfield(Summary) (default) Contents of form field Summary. If the field does not exist or is empty, summary(200) is used instead.
summary Topic summary, just the plain text, all formatting and line breaks removed; up to 162 characters. You can use other notations for summary, such as summary(n) and summary(n, noheader) - see FormattedSearch.
text The full topic text.

Example
%INCLUDE{
"yourblogweb.BlogPost"
display="posts"
outline="summary(450, noheader)"
}%

Images in list view

Each post can show these images:

You can define the sizes with these INCLUDE settings (values in pixels):
Name Default value
picsizeauthor 50
picsizesummary 85
picsizecommenter 20

For example:
%INCLUDE{
"yourblogweb.BlogPost"
picsizeauthor="30"
}%

Create button

To add the "Create a new post" button, write:
%INCLUDE{
"yourblogweb.BlogPost"
section="createButton"
}%
Set a different button label with param label:
%INCLUDE{
"yourblogweb.BlogPost"
section="createButton"
label="Write up!"
}%

Filtering and sorting options

You may set display defaults, for example for category and sort field, using additional parameters. Possible values are:

Parameter Possible values Default value
category (categories are defined in yourblogweb.BlogCategory) none
tag Any tag (set in each blog post, comma separated) none
sort formfield(Title), formfield(Category), formfield(Author), formfield(PublishingDate), modified created (fallback)
sortdirection ascending, descending ascending, when sorting on dates: descending
pagesize How many posts are displayed per screen; can be any number 10

If you are upgrading from a previous version (before 1.6.0), and your blog posts do not have the form field PublishingDate, set sort to created or modified:
%INCLUDE{
"yourblogweb.BlogPost"
sort="created"
}%

Showing the latests post, 15 posts per screen
To show the latest posts (date defined by form field PublishingDate), latest post on top (is the default setting), 15 per screen, write:
%INCLUDE{
"yourblogweb.BlogPost"
sort="formfield(PublishingDate)"
pagesize="15"
}%

Showing blog posts in 1 category

To show a list of blog posts in category "Interesting", write:
%INCLUDE{
"yourblogweb.BlogPost"
sort="formfield(PublishingDate)"
category="Interesting"
}%

Creating filter links

You may want to have a list of links that lead to a filtered blog post list. For instance, the link named "Interesting" would lead to a list of blog posts of that category.

Here's how:
%SEARCH{"   *\s*.*?" topic="BlogCategory" web="yourblogweb" type="regex" multiple="on" casesensitive="on" nonoise="on" format="<a href='%SCRIPTURL{view}%/yourblogweb/BlogPost?sort=created;pagesize=10;sortdirection=descending;category=$pattern(.*   \*\s*([^\n]*).*)'>$pattern(.*   \*\s*([^\n]*).*)</a>"}%

Settings

Installation Instructions

Note: release 1.6 and onwards works on Foswiki 1.2 and newer.
When upgrading, make sure not to overwrite any existing topic BlogCategory.

Reference for administrators

To update the instructions on this page to point to your blog web, enter the name of the blog web:
 

Note: Care must be taken when:

AddOn Info

Authors: Foswiki:Main.ArthurClemens
Copyright ©: 2006-2011 Arthur Clemens
License: GPL
Dependencies:
NameVersionDescription
Foswiki::Plugins::ZonePlugin>=3.1Required. required for Foswiki < 1.1
Foswiki::Plugins::CommentPlugin>=6512Required
Foswiki::Plugins::SpreadSheetPlugin>=1Required
Version: 10818 (2011-02-27)
Release: 1.9.0
Change History:  
26 Feb 2011 1.9.0 Added setting outline to control the summary text. Added form field SummmaryImage to choose the attachment name to be displayed in the summary. Improved display of comments in list view. Added options to define image sizes.
24 Feb 2011 1.8.0 Added settings BLOGADDON_HIDE_COMMENTS and BLOGADDON_DENY_COMMENTING. Foswikitask:Item10407 - now saves comments to the correct web if BLOGADDON_COMMENTS_WEB is set. Fixes tag links in blog post.
24 Feb 2011 1.7.0 Fixed sorting on dates. Added INCLUDE param display instead of section. Added setting BLOGADDON_COMMENTS_WEB. Documentation update. Foswikitask:Item10378 - make sure the existing value of Category field is not lost.
19 Feb 2011 1.6.0 Re-arranged sort and filter options to fit on smaller screens. Improved filter interaction for categories, tags and authors. Moved documentation from BlogAddOnHome to BlogAddOn (this topic) and updated documentation. Added setting BLOGADDON_LIST_TOPIC. Changed BLOGPOSTADDON_AUTHOR_PICTURE_FIELD to BLOGADDON_AUTHOR_PICTURE_FIELD.
13 Feb 2011 1.5.1 Simplified disply of author pictures: now use preference setting BLOGPOSTADDON_AUTHOR_PICTURE_FIELD. Added options to close or hide comments, publishing date, tags and a blog specific rss feed.
06 Oct 2010 1.4 Foswikitask:Item9804 - Fix dependencies file and packaging issues on Foswiki 1.1
10 Jan 2009 1.3 Foswiki release
07 Apr 2008 1.2 Added optional inclusion of author pictures from Foswiki:Extensions/PersonalInfoAddOn. Important upgrade notice: this version uses WIKINAME instead of WIKIUSERNAME in the Author form field. This change is not compatible with existing blog topics. If you have existing posts, you must change all author names from Main.UserName to UserName.
26 Jan 2008 1.1 Adds the creation date to blog post topic names. Adds an Edit link to the Comments header in a blog post. Increases the height of the comment box. Bug fix: allow topic names with periods.
26 Jun 2007 1.0.9 Fixed html bug in BlogPost; added comment count to BlogPost; improved styling of form elements.
08 Apr 2007 1.0.8 Show link to latest comment in BlogPost listing. Improved readability for comments. This version relies on CommentPlugin svn release number 13313 and PatternSkin svn release number 13320, but BlogAddOn will now play nicely with other skins as well.
06 Feb 2007 1.0.7 Added no-javascript fallback to BlogPost and BlogPostCreator (so that topic can actually be created without javascript). Fixed a javascript bug that was introduced when a Core function was renamed.
25 Feb 2007 1.0.6 URL param for limit setting now overrides INCLUDE parameter.
25 Feb 2007 1.0.5 Prevents recreation/overwriting of existing topics. Added "No limit" label to filter dropdown.
15 Feb 2007 1.0.4 Removed my name from the templates.
16 Dec 2006 1.0.3 The comment topic will automatically be created as child topic of the blog post. Changed parameter reverse to sortdirection.
15 Dec 2006 1.0.2 RSS feed link to category filter, fixes to sorting/filtering.
14 Dec 2006 1.0.1 Option to set defaults when including BlogPost.
12 Dec 2006 1.0 First release.
Home: http://foswiki.org/Extensions/BlogAddOn
Feedback: http://foswiki.org/Extensions/BlogAddOnDev
Support: http://foswiki.org/Support/BlogAddOn

I Attachment Action Size Date Who Comment
icon_tag_delete_btn.pngpng icon_tag_delete_btn.png manage 3.0 K 27 Feb 2011 - 13:24 AdminUser  
screenshot_list.pngpng screenshot_list.png manage 136.9 K 27 Feb 2011 - 13:24 AdminUser  
screenshot_post.pngpng screenshot_post.png manage 213.7 K 27 Feb 2011 - 13:24 AdminUser  
silhouette.gifgif silhouette.gif manage 1.1 K 27 Feb 2011 - 13:24 AdminUser  

This topic: System > BlogAddOn
Topic revision: 10 Mar 2011, AdminUser
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback