Dashboard > blojsom > ... > Available Plugins > Trackbacks
  blojsom Log In   View a printable version of the current page.  
  Trackbacks
Added by David Czarnecki, last edited by David Czarnecki on May 19, 2006  (view change)
Labels: 
(None)

About Trackback

The central idea behind TrackBack is the idea of a TrackBack ping, a request saying, essentially, resource A is related/linked to resource B. A TrackBack resource is represented by a TrackBack Ping URL, which is just a standard URI.

Using TrackBack, sites can communicate about related resources. For example, if Weblogger A wishes to notify Weblogger B that he has written something interesting/related/shocking, A sends a TrackBack ping to B. This accomplishes two things:

  1. Weblogger B can automatically list all sites that have referenced a particular post on his site, allowing visitors to his site to read all related posts around the web, including Weblogger A's.
  2. The ping provides a firm, explicit link between his entry and yours, as opposed to an implicit link (like a referrer log) that depends upon outside action (someone clicking on the link).

As of blojsom 1.6, trackback support has been added to blojsom. blojsom implements the Movable Type Trackback Specification.

As indicated in the installation documentation, the blog-trackbacks-directory parameter indicates the directory where blog trackbacks will be written to under the blog category directories. This directory is automatically added to the list of directories that get filtered by blojsom.

The blog entry listing templates have been modified to show the number of trackbacks for a particular blog entry alongside the number of comments. Clicking on the number of trackbacks will bring the user to a page that lists the trackbacks for that particular blog entry. There is also a link that other users may cut and paste into their blogging tool so that they can send a trackback ping to that particular blog entry. The following table lists the URL parameters that must be supplied for a trackback.

URL parameter Description
title The title of the entry.
excerpt An excerpt of the entry. blojsom adheres to the Movable Type implementation, in that if this string is longer than 255 characters, it will be cropped to 252 characters, and ... will be added to the end.
url The permalink for the entry. Like any permalink, this should point as closely as possible to the actual entry on the HTML page, as it will be used when linking to the entry in question.
blog_name The name of the blog in which the entry is posted.

Installation and Setup

The trackback plugin is enabled by default for blojsom. You may skip this section.

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

trackback=org.blojsom.plugin.trackback.TrackbackPlugin

You may then add "trackback" to one of the flavor-based plugin chains. Typically this would only be done for your "html" flavor.

html.blojsom-plugin-chain=..., trackback, ...

The trackback plugin requires the SMTP server be defined in /WEB-INF/web.xml. The parameter is smtp-server. For example:

<init-param>
    <param-name>smtp-server</param-name>
    <param-value>localhost</param-value>
</init-param>

Using a JNDI context for mail settings

Available in blojsom 2.21 and above.

If the value for the smtp-server parameter starts with java:comp/env, then blojsom will try to lookup the JNDI context for the mail settings. Look at your application server documentation for information on setting a JNDI. As an example, the Tomcat JDNI resources HOW-TO has a section on JavaMail sessions. From their example, if using a JDNI mail session, your smtp-server parameter value would be java:comp/env/mail/Session.

Using SMTP server authentication credentials

Available in blojsom 2.21 and above.

You can also define authentication credentials for your SMTP server. These parameters are also defined in /WEB-INF/web.xml. The parameter names are smtp-server-username and smtp-server-password.

For example:

<init-param>
    <param-name>smtp-server-username</param-name>
    <param-value>username</param-value>
</init-param>
<init-param>
    <param-name>smtp-server-password</param-name>
    <param-value>password</param-value>
</init-param>

Disabling trackbacks on individual entries

If trackbacks are enabled on your blog, but you do not want to allow users to trackback on an individual entry, you can do so by making that entry read-only. blojsom uses this to indicate whether or not it should allow users to trackback on an entry. If a blog entry is writable, users may trackback on that entry.

Trackbacks can also be disabled on individual entries throug the web administration console. If you are adding or editing an entry, you can check a box to indicate that trackbacks are not enabled on a single entry.

Finally, if you are running the Meta plugin before the Comments plugin, you can add metadata to the entry to disable trackbacks. The metadata key to disable trackbacks would be specified as "meta-blog-entry-trackbacks-disabled=y" in your blog entry. You would do this if you were not editing your blog through the web administration console or you edit your blog entries from the command-line.

Automatically disabling trackbacks on entries after a certain # of days

Trackbacks can also be automatically disabled on entries after a certain number of days. If you login to the web administration console, you can set the number of days after which trackbacks are no longer allowed on an entry.

Banning IP addresses from commenting

In blojsom 1.9.1, both the Comment and Trackback plugins can ban IP addresses from posting comments and trackbacks by specifying regular expressions for banned IP addresses. The list of banned IP addresses is controlled by the blog-banned-ip-addresses parameter in an individual /WEB-INF/(blog-id)/blog.properties file. As an example, the following will ban you from posting locally.

blog-banned-ip-addresses=127.0.0.1

Trackback throttling

As of blojsom 2.11, you can configure trackback throttling. If throttling is enabled, trackbacks left from a particular IP address must wait a certain number of minutes before another trackback can be posted. The tackback throttle parameter is controlled by the plugin-trackback-throttle parameter in an individual /WEB-INF/(blog-id)/blog.properties. The parameter is specified as minutes.

plugin-trackback-throttle=5

Setting a prefix for trackback e-mail messages

The default subject prefix for trackback e-mails is set to [blojsom] Trackback on: . If you would like to configure a different prefix for e-mail messages, set the plugin-trackback-email-prefix property in an individual /WEB-INF/(blog-id)/blog.properties. For example:

plugin-trackback-email-prefix=[your.blog.com] Trackback:

Trackback E-mail Templates

The trackback plugin uses Velocity templates to create the text for the e-mail that gets sent to the author of an entry when a comment is made to that entry. There are two templates, org/blojsom/plugin/trackback/trackback-plugin-email-template-html.vm and org/blojsom/plugin/trackback/trackback-plugin-email-template-text.vm. The HTML template is used for the HTML portion of the e-mail message, while the text template is used for the text portion of the e-mail message for mail clients that cannot display HTML e-mail.

They are located inside the blojsom plugins JAR file in the blojsom web applications /WEB-INF/lib directory.

You can change the templates on a per-blog basis. Under your blog's templates directory, create the directory hierarchy, org/blojsom/plugin/trackback/. Create either the trackback-plugin-email-template-html.vm or trackback-plugin-email-template-text.vm template file. You can use the original template files form the blojsom plugin JAR file as a basis for your new template.

The following table describes the objects available to the trackback e-mail templates.

Variable Type Description
BLOJSOM_BLOG org.blojsom.blog.Blog Blog information.
BLOJSOM_USER org.blojsom.blog.BlogUser BlogUser information.
BLOJSOM_TRACKBACK_PLUGIN_TRACKBACK org.blojsom.blog.Trackback Trackback.
BLOJSOM_TRACKBACK_PLUGIN_BLOG_ENTRY org.blojsom.blog.BlogEntry Entry.

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