Dashboard > blojsom 3.0 > ... > Plugins > Delicious Daily Posting Plugin
  blojsom 3.0 Log In   View a printable version of the current page.  
  Delicious Daily Posting Plugin
Added by David Czarnecki, last edited by David Czarnecki on Jul 10, 2007
Labels: 
(None)

The Delicious Daily Posting plugin is available in the blojsom add-on bundle. This is a separate download from the blojsom.war file.

Availability

Available as of blojsom 2.25.

Description

Posts your daily links from del.icio.us as an entry to your blog. The plugin makes use of the delicious-java library.

Installation and Setup

Plugin Setup and Configuration

After downloading the blojsom add-on bundle, copy the blojsom-addon-plugins-{version}.jar, commons-httpclient-3.0.jar, and delicious-2.0.jar file into your /WEB-INF/lib directory.

In your /WEB-INF/classes/blojsom-plugins.xml file, add the following:

<bean id="delicious-daily-posting" class="org.blojsom.plugin.delicious.DailyPostingPlugin" init-method="init" destroy-method="destroy">
        <property name="servletConfig">
            <ref bean="servletConfigFactoryBean"/>
        </property>
        <property name="eventBroadcaster">
            <ref bean="eventBroadcaster"/>
        </property>
        <property name="fetcher">
            <ref bean="fetcher"/>
        </property>
    </bean>

Individual Blog Settings

The following table describes the parameters that are set on a per-blog basis. All parameters are required except for the daily-posting-title parameter. The following properties can be set from Weblog Settings | Properties | Set Property

Configuration Parameter Default Value Description
daily-posting-username   Your del.icio.us username
daily-posting-password   The password for the del.icio.us username
daily-posting-category   Category name to post the blog entry to
daily-posting-hour   Hour (0-23) indicating when to post the blog entry if any links are available
daily-posting-title del.icio.us links for {0} Title of the blog entry. There are two values that you can use, the date in YYYY-MM-DD format {0} or your del.icio.us username {1}. For example, "del.icio.us links for {1} on {0}", would title entries as "del.icio.us links for SOMEUSER on 2005-05-01"

Daily Posting Template Setup

The default daily posting template is located in a file, org/blojsom/plugin/delicious/daily-posting-template.vm, within the addon plugins JAR file. The default template looks as follows.

<ul class="delicious">
#foreach ($post in $DAILY_POSTING_POSTS)
<li>
<div class="delicious-link" ><a href="$!post.getHref()">$!post.getDescription()</a> </div>
#if ($post.getExtended())<div class="delicious-extended"> $!post.getExtended() </div>#end
#set ($postTags = $post.getTagsAsArray(' '))
<div class="delicious-tags"> (tags: #foreach ($tag in $postTags)<a href="http://del.icio.us/$DAILY_POSTING_USERNAME/$tag">$tag</a> #end ) </div>
</li>
#end
</ul>

The context variables available to the daily posting template are indicated in the following table.

Context Variable Description
DAILY_POSTING_USERNAME del.icio.us username
DAILY_POSTING_POSTS List of Post objects

If you would like to override the daily posting template, you may do so by adding a page org/blojsom/plugin/delicious/daily-posting-template.vm under your blog's templates directory. You may do this through the web administration console or through the command-line.

Usage and URL Parameters

The plugin will run at its prescribed poll time and if there is a blog that is set to post its links for that hour, the plugin will automatically create an entry for the blog.

Site running on a free Atlassian Confluence Open Source Project License granted to blojsom. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators