Welcome, Registration, and other StartingPoints; TWiki history & Wiki style; All the docs...

Navigation

%MYSIDEBAR%
This site is powered by the TWiki collaboration platform

_wremoId0

BlogPlugin

This is the supplemental plugin for the BlogUp TWikiApplication. It bundles some of the features found in common blogging applications that are very hard or even impossible to implement using TWikiML. Note, that most of the tags are tightly related to the data model of BlogUp, i.e. it relies on its TopicType and TWikiForm definitions.

Syntax Rules

CITEBLOG

Format a link to another BlogEntry displaying its headline and date.

Syntax:

%CITEBLOG{"<topic>"}%
"<topic>" name of a BlogEntry topic, e.g. BlogEntry0

Example:

%CITEBLOG{"_BlogPlugin.BlogEntry0"}%

Welcome to BlogUp (20 Aug 2005)

COUNTCOMMENTS

Count the BlogComments that refer to a given topic recursively, that is the number of BlogComment topics that refer to a given BlogEntry and each BlogComment referring to the BlogComment found so far. Reference is expressed by the BlogRef formfield in the BlogCommentForm.

Syntax:

%COUNTCOMMENTS{"<topic>" ... }%
"<topic>" name of a BlogEntry or BlogComment topic, e.g. BlogEntry0
web="..." web where to search for references; defaults to the web specified as part of the "topic" parameter or the current one
format="..." format string used to display the count; the variable $count is replaced by the calculated references; defaults to "$count"
single="..." format string used to display a single hit; defaults to the "format" value (see above)
null="..." format string used to display a zero hit; defaults to "0"
hidenull="on,off" if set to "on" nohting is displayed if no references where found; defaults to "off"
offset="..." add an "offset" to the computed number of hits; so if offset="9" and 11 references where found the $count is set to 20

Following variables are expanded in format strings:

  • $percnt: % sign
  • $dollar: $ sign
  • $n: newline
  • $t: tab
  • $nop: "empty string"
  • $count: the calculated number of references (plus an optional offset)

PREVDOC, NEXTDOC

Display the previous/next topic in an ordered set. These tags can be used to establish a navigation within a set of related topics paging to the preceding or succeeding one. A set of related topics is defined using a "where" and an "order" clause which the given topic is supposed to be part of.

Syntax:

%PREVDOC{"<topic" where="..." ...}%, %NEXTDOC{"<topic" where="..." ...}%
"<topic>" topic which we search the predecessor/successor of
web="..." web where to search for related topics; defaults to the web given with the <topic> parameter or the current one
where="..." search clause, see documentation of the DBCacheContrib
order="..." document property used to sort the hit set; defaults to "created"
reverse="on,off" if set to on the sorting will be reversed, that is the logic of PREV and NEXT is inverted

RECENTCOMMENTS

Display an ordered list of most recent BlogComments, grouped by the referred BlogEntry.

Syntax:

%RECENTCOMMENTS{"<format>" ...}%
"<format>" format string used to display the hit results; each hit is displayed using the given format
header="..." format string to prepended to the list of hits being displayed
footer="..." format string to appended to the list of hits being displayed
separator="..." format string used to separate hits; defaults top "$n"; the special separator "none" disables separation
limit="..." restrict the number of hits being displayed; defaults to "-1" which means unlimited
age="..." restrict the age of comments being displayed; values must be given in epoch seconds, e.g. 5184000 being ca. 2 months; defaults to "0" which means unlimited
category="..." pattern that limits comments to those whose BlogEntries match the SubjectCategory; defaults to ".*"

(Each BlogEntry that is found given the above search parameters and limits is called a hit.)

Following variables are expanded in format strings:

  • $percnt: % sign
  • $dollar: $ sign
  • $n: newline
  • $t: tab
  • $nop: "empty string"
  • $count: the number of comments on the given BlogEntry
  • $topic: the topic name of the referring BlogEntry, e.g. BlogEntry0
  • $web: the web where the hit was found
  • $headline: the headline of the referring BlogEntry
  • $commenter: a list of links to the comments in the format [[BlogEntry0#BlogComment1][<author>]],... (author: name of commenter)
  • $date: date of the most recent comment on the current hit.

See also the interface TopicFunction "RenderRecentComments".

RELATEDENTRIES

Display a list of BlogEntries related to a given one. The Relationship is manually encoded in the data model using the "Related" formfield. The relation is computed transitively and reflexively ('til a configurable depth). That is, two BlogEntries A and B are related if A points to B or vice versa or A and B are connected by a series of related postings C1,...CN, where A is related to C1 and B CN is related to B.

Syntax:

%RELATEDENTRIES{"<topic>" ...}%
"<topic>" topic name of a BlogEntry related once are search for
web="..." web where to search for related topics; defaults to the web given with the <topic> parameter or the current one
format="..." format string to display a hit; defaults to "$topic"
header="..." format string to prepended to the list of hits
footer="..." format string to appended to the list of hits
separator="..." format string used to separate hits; defaults to "$n"; the special separator "none" disables separation
depth="..." depth of recursion (the number of hops from posting A to posting B); defaults to "2";

Note, that large "depth" values will very soon include your complete blog archive. The hit set also depends on the amount of direct relationships that you add to your BlogEntries. So either use a low "depth" value and add more direct relations based on your own judgment, or just specify one related entry and use a "depth" value of up to 3 for good results.

Following variables are expanded in format strings:

  • $percnt: % sign
  • $dollar: $ sign
  • $n: newline
  • $t: tab
  • $topic: topic name of a hit
  • $web: web name where the hit was found
  • $depth: distance to the given <topic> (depth in which this topic was found)
  • $headline: headline of the related BlogEntry

The relatedness feature here is a very naïve and purely manual one. We'd like to semi-automate this task using some automatic classificator on document similarities. Making use of weights following links is an option too to improve the hit set quality.

Read

And send me a patch if you've coded that into TWiki ;).

Plugin Settings

  • Set SHORTDESCRIPTION = Basic blogging features used to implement the BlogUp TWikiApplication

Plugin Installation Instructions

  • Download and install all additionally required plugins listed in the dependencies information below
  • Download the BlogPlugin ZIP file from the Plugin web (see below)
  • Unzip BlogPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/BlogPlugin.txt Plugin topic
    data/_BlogPlugin/*.txt blog template web
    data/Main/BlogAdminGroup.txt blog admin group
    data/Main/BlogAuthorGroup.txt blog author group
    lib/TWiki/Plugins/BlogPlugin.pm Plugin Perl module
    lib/TWiki/Plugins/BlogPlugin/WebDB.pm Plugin Perl module
  • Create a new Blog web using the _BlogPlugin template web
  • Edit the BlogAdminGroup and the BlogAuthorGroup to match your needs.

Plugin Info

Plugin Author: TWiki:Main.MichaelDaum
Copyright ©: 2006, Michael Daum
License: GPL (GNU General Public License)
Version: v0.61
Change History:  
03 Mar 2006: added easy way to add/remove tags in the BlogEntryForm; tags are displayed using a mini-tag cloud on the blog entry pages to sort them by weight and name (btw. you can weight each tag like mytag:2)
01 Mar 2006: grand rework of the BlogArchive; added BlogTags for BlogEntries; added dependency on TWiki:Plugins/TagCloudPlugin; added rel="tag" to links to tags and categories to make technorati happy; reworked category and archive in sidebar using the new DBSTATS tag of the recent DBCachePlugin resulting in a drastic speed improvement on the front pages; removed unused TopicFunctions
22 Feb 2006: tighter control of alias substitution; removed % in RenderBlogEntryButton;
21 Feb 2006: removed dependency on the NatSkin; added dependency on the IfDefinedPlugin; added PatternSkin specific styles for the blog web; lots of minor TopicFunction tweaks
14 Feb 2006: added and diverse rss and atom feeds; added comment syndication per blog entry; added TopicTypes BlogPage and TWikiTopic; added descriptive tooltips to all links; added reverse argument to PREVDOC, NEXTDOC; added header, footer arguments to COUNTCOMMENTS; renamed RELATEDENTRIES to RELATEDTOPICS to handle BlogPages with it too; added a filter argument to RELATEDTOPICS for more flexibility; preliminary BlogUp documentation and screenshots; reworked sidebar generation by removing BlogSideBar and adding; a proper RenderSideBar TopicFunction for it; added WebButtons to navigate inside the blog application; added nice rss feed icons everywhere; added scroll helper to blog entries (need more); moved most of the descriptive text in BlogAbout into a BlogHelpText and reuse the BlogAbout for a free-form "About" page that is added to the WebButtons; speed improvements rendering the front page by simplifying the navigation renderer; added a dedicated TopicFunction to render http-equivs, i.e. to list the feeds; added w3c validation button to the TWikiWorkbench; added example WebAggregation by rendering own feeds using the HeadlinesPlugin; added dependency to TWiki:Plugins/FilterPlugin for the FORMATLIST tag; unified redundant navigation renderer; improved admin tools using twisties; postings are owned by the author by default now; fixed print view to popup the print dialogue
30 Jan 2006: replaced NOPs with STARSECTIONs; fixed customized search view
27 Jan 2006: added permalink tooltips ; nicer autor and admin buttons; renamed SECTIONs to STARTSECTIONs; highlight current TopicFunction in sidebar list; added button to easily w3c validate a TopicFunction; lots of w3c fixes, mostly superfluous <p>s in the wrong place; css improvements
24 Jan 2006: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.1
CPAN Dependencies: CPAN:Time::Local
Other Dependencies: TWiki:Plugins/AliasPlugin, TWiki:Plugins/DBCachePlugin, TWiki:Plugins/ExtendedSelectPlugin, TWiki:Plugins/FilterPlugin TWiki:Plugins/GluePlugin, TWiki:Plugins/HeadlinesPlugin, TWiki:Plugins/IfDefinedPlugin, TWiki:Plugins/RedDotPlugin, TWiki:Plugins/SpreadSheetPlugin, TWiki:Plugins/TagCloudPlugin, TWiki:Plugins/TimeSincePlugin, TWiki:Plugins/TwistyPlugin, TWiki:Plugins/UserInfoPlugin (optional)
Perl Version: 5.8
Benchmarks: GoodStyle nn%, FormattedSearch nn%, BlogPlugin nn%
Plugin Home: TWiki:Plugins/BlogPlugin
Feedback: TWiki:Plugins/BlogPluginDev
Appraisal: TWiki:Plugins/BlogPluginAppraisal

-- TWiki:Main.MichaelDaum - 03 Mar 2006

r1 - 2006-02-08 - 08:58:04 - TWikiContributor
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding AVR32 Linux? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.BlogPlugin
Syndicate this site RSSATOM