Dashboard > blojsom > ... > Available Plugins > Blog Times Plugin
  blojsom Log In   View a printable version of the current page.  
  Blog Times Plugin
Added by David Czarnecki, last edited by Cliffano Subagio on Dec 14, 2006  (view change)
Labels: 
(None)

Availability

The BlogTimes plugin can be downloaded from the blojsom plugins download page.

Overview

BlogTimes Plugin generates a graph image summary of the blog post times. The graph's color and size are configurable.

Screenshot

Changelog

v0.1 (19-06-2005): Initial release. Requires Blojsom 2.21 or later.

Build

BlogTimes Plugin uses Ant to build the source.

ant jar-pkg

Installation

By default, BlogTimes Plugin will generate the graph only for the blog posts on the current page. If you want to generate the graph for all entries, then you must install All Entries plugin.

Place the blogtimesplugin-version.jar in your WEB-INF/lib directory.

In your global /WEB-INF/plugin.properties file, add the following line:

blogtimes=com.mbledug.blojsom.plugin.blogtimes.BlogTimesPlugin

You may then add "blogtimes" to one of the flavor-based plugin chains. These plugin chains can be found in the individual user's plugin.properties file. Note that blogtimes should be placed somewhere at the end of the chain. If you have the All Entries plugin installed, make sure all-entries is chained before blogtimes:

html.blojsom-plugin-chain=..., all-entries, ..., blogtimes

Add the BlogTimesServlet that will generate the dynamic graph image. This is referenced in /WEB-INF/web.xml.

<servlet>
  <servlet-name>BlogTimes</servlet-name>
  <servlet-class>com.mbledug.blojsom.plugin.blogtimes.BlogTimesServlet</servlet-class>
  <init-param>
    <param-name>plugin-blogtimes</param-name>
    <param-value>blogtimes.properties</param-value>
  </init-param>
</servlet>

<servlet-mapping>
  <servlet-name>BlogTimes</servlet-name>
  <url-pattern>/blogtimes</url-pattern>
</servlet-mapping>

Place the blogtimes.properties file in the respective /WEB-INF/blog-id directory.

On environment without display make sure the following property is set:

-Djava.awt.headless=true

Usage

Copy paste the following snippet to your template.

Note that the img tag must have its src attribute set to "blogtimes" (after your context path).

Blog post times (hour of day):<br/><br/>
<img src="$BLOJSOM_BLOG.getBlogBaseURL()/blogtimes" alt="Blog Times Graph"/>

It will generate the graph with the post times of the entries on the page, and the time unit is hour of day (i.e. displaying hours from 0 to 24 on the graph).

In order to graph the post times of all entries (requires All Entries plugin), add the request parameter entries=all.

<img src="$BLOJSOM_BLOG.getBlogBaseURL()/blogtimes?entries=all" alt="Blog Times Graph"/>

You can also display a different time unit. Currently there are 3 options of time unit: hourofday (default), minuteofhour, and secondofminute. Simply add a flavor request parameter to the url.

<img src="$BLOJSOM_BLOG.getBlogBaseURL()/blogtimes?flavor=minuteofhour" alt="Blog Times Graph"/>

The entries and flavor parameters can be combined.

Configuration

You can configure the color and size of the graph. The default properties are:

image-background-color = ffffff
bar-border-color = 000000
bar-background-color = ebebeb
bar-timeline-color = 666666
bar-timeinterval-color = 333333
font-color = 000000
bar-width = 350
bar-height = 15

image-background-color, bar-border-color, bar-background-color, bar-timeline-color, bar-timeinterval-color, and font-color are hex colors. E.g. red is represented as ff0000, green is 00ff00, blue is 0000ff.

bar-width, and bar-height are size in pixels.

Configuration

A demo is available at Melbourne Photoblog.

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