TIP BlogAddOn is not installed on Foswiki.org.

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

  • Integrates blog posts with Foswiki topics.
  • Uses editable categories to filter or group posts. Categories can also be used to distinguish multiple blogs with separate 'owners'.
  • Offers tags to further filter blog posts.
  • Offers comments and options to hide or close comments.
  • Provides a handy interface with sorting and filtering options that can be INCLUDEd in any topic in the same Web.
  • Optionally displays user pictures; see Settings below

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:
  • Visit yourblogweb.BlogPost for the overview of blog posts
  • Visit yourblogweb.BlogPostCreator to create new blog entries
  • Visit yourblogweb.BlogCategories to edit the categories

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:
  • author picture: if setting BLOGADDON_AUTHOR_PICTURE_FIELD points to a form field in the user profile that contains the name of an attached file - see Settings below
  • summary picture: if the blog post has a value for form field SummaryImage that contains the name of an attached file
  • commenter picture: see author picture

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 latest posts, 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"
}%

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

  • To show user pictures:
    • In WebPreferences or SitePreferences: point preference setting BLOGADDON_AUTHOR_PICTURE_FIELD to the field name of the user topic that contains the filename of the user picture. For example, for PersonalInfoAddOn that field is named "Picture", so you would write:
         * Set BLOGADDON_AUTHOR_PICTURE_FIELD = Picture
  • To use a different list topic (default is yourblogweb.BlogPost):
    • In WebPreferences or SitePreferences, or in the list topic itself, write:
         * Set BLOGADDON_LIST_TOPIC = yourblogweb.thelisttopic
    • Note: if you wish to use the topic macro, write BASETOPIC instead of TOPIC; do not forget to add the Web. This is correct: Set BLOGADDON_LIST_TOPIC = %BASEWEB%.%BASETOPIC%
  • To let comments be posted to a different Web:
    • In WebPreferences or SitePreferences: point preference setting BLOGADDON_COMMENTS_WEB to the Web you want to get comments. By default this is the current Web.
      For example:
         * Set BLOGADDON_COMMENTS_WEB = Comments
  • To hide comments for a user or all members of a group:
    • In WebPreferences or SitePreferences, or in the list topic itself, write:
         * Set BLOGADDON_HIDE_COMMENTS = WikiName or GroupName
    • Note that you cannot add multiple names or groups, only one user or group name.
    • To hide all comments and comment box from not logged-in users, use:
         * Set BLOGADDON_HIDE_COMMENTS = WikiGuest
  • To disallow a user or all members of a group to give comments:
    • In WebPreferences or SitePreferences, or in the list topic itself, write:
         * Set BLOGADDON_DENY_COMMENTING = WikiName or GroupName
    • Note that you cannot add multiple names or groups, only one user or group name.
    • To show existing comments, but hide the comment box from not logged-in users, use:
         * Set BLOGADDON_DENY_COMMENTING = WikiGuest
  • BLOGADDON_ALLOW_GUEST_COMMENTS - to allow guest comments. Experimental feature.

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.
  • Download the ZIP file from the Plugin web (see below)
  • Unzip BlogAddOn.zip in your ($FOSWIKI_ROOT) directory.
  • Copy the topics from /data/_BlogAddOn to the web you want the blog to appear
  • Alternatively,
    • Manually resolve the dependencies listed below.
      NameVersionDescription
      Foswiki::Plugins::ZonePlugin>=3.1Required. required for Foswiki < 1.1
      Foswiki::Plugins::CommentPlugin>=6512Required
      Foswiki::Plugins::SpreadSheetPlugin>=1Required

Reference for administrators

To update the instructions on this page to point to your blog web, enter the name of the blog web:
 
  • yourblogweb.BlogPost - overview of all posts with filtering and sorting options
  • yourblogweb.BlogPostCreator - form to start new posts
  • yourblogweb.BlogCategory - editable list of blog categories
  • yourblogweb.BlogPostForm - form definition with post data fields
  • yourblogweb.BlogPostTemplate - every new post gets settings from this topic
  • yourblogweb.BlogPostViewTemplate - every post is displayed through this view template
  • yourblogweb.BlogPostCommentTemplate - form template for comment box (see CommentPlugin)
  • yourblogweb.BlogRss - RSS feed topic with filters for category, tags and author
  • yourblogweb.BlogPostExample - example blog post; delete when everything works

Note: Care must be taken when:
  • Renaming post topics: the comment topic needs to be renamed as well
    • The comment topic is created automatically when the first comment is submitted, using the syntax topic name + Comment.
  • Renaming categories: the comment topics are not updated automatically

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.1
Change History:  
31 May 2011 1.9.1 Encodes quotes in displayed summary text.
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

Topic attachments
I Attachment Action Size Date Who Comment
BlogAddOn.md5md5 BlogAddOn.md5 manage 150 bytes 31 May 2011 - 20:14 ArthurClemens  
BlogAddOn.sha1sha1 BlogAddOn.sha1 manage 174 bytes 31 May 2011 - 20:15 ArthurClemens  
BlogAddOn.tgztgz BlogAddOn.tgz manage 364 K 31 May 2011 - 20:14 ArthurClemens  
BlogAddOn.zipzip BlogAddOn.zip manage 373 K 31 May 2011 - 20:14 ArthurClemens  
BlogAddOn_installerEXT BlogAddOn_installer manage 4 K 31 May 2011 - 20:14 ArthurClemens  
icon_tag_delete_btn.pngpng icon_tag_delete_btn.png manage 2 K 31 May 2011 - 20:13 ArthurClemens  
screenshot_list.pngpng screenshot_list.png manage 136 K 31 May 2011 - 20:14 ArthurClemens  
screenshot_post.pngpng screenshot_post.png manage 213 K 31 May 2011 - 20:13 ArthurClemens  
silhouette.gifgif silhouette.gif manage 1 K 31 May 2011 - 20:14 ArthurClemens  
Topic revision: r2 - 22 Oct 2012, RichMorin - This page was cached on 24 Jul 2016 - 15:00.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License