Addon Author: Dale Ray
Version: Beta 0.06a
Original Release Date: July 11, 2006
Last Release Date: August 24, 2006
Works with: Tested with Coranto v1.24 - Does not work with Coranto 1.31.5
Available at: coranto.org

What It Does

Feed Builder is used to create valid RSS 2.0 feeds. It does this by creating a new profile type. Users can enter Coranto fields into the settings of the Feed Builder RSS profile that equate with the elements of the RSS feed.

Discussion

RSS feeds are used to syndicate content that is regularly updated. Visitors who subscribe to your feeds can be notified when your site content is updated.

The use of Feed Builder automates the creation of your site feed.

If you have an enabled RSS profile whenever you build news your feed will be updated.

↑ Contents

Entering Settings

Some of the settings fields allow Coranto fields to be entered. These fields are processed at build time and checked for valid syntax. The same rules that apply in Coranto styles apply. So you could use:

<If: Field: Subject><Field: Subject><If: Else><Field: SomeOtherField></If>

Anything you enter here is processed in the same manner that code in a Coranto style would be. The contents of the fields that accept style code are processed when you build news. Error checking is done at that time. If you want to check you the code you enter into the settings you can create a dummy style and Coranto will report any errors in your code when you save it.

Channel Settings

Each RSS feed has a header section that contains the channel information. The channel information describes where the feed comes from.

Required Elements

  • title - The name of the channel
  • link - The URL of your website
  • description - A short description of the channel

In most cases the channel is your web site. You complete the settings in the RSS profile with information about your site. This is where the content of the feed will come from. Other feeds might include content from many sources.

↑ Contents

Optional Channel Elements Supported

  • language - the language your site is published in
  • copyright - the holder of the copyright to content included in the feed
  • managing editor - the e-mail of the person responsible for the feed's content
  • pubdate - the publication date of the feed
  • lastbuilddate - the last time the content of the feed changed
  • generator - the toll used to produce the feed
  • image - the information for an image that represents your feed

Each of the RSS channel elements listed above, except generator, has a corresponding setting on the RSS profile settings page.

The generator element is filled by the Feed Builder as: Coranto using the Feed Builder Addon

The image information consists of five fields. They are:

Required elements

  • Image URL - a complete URL to the image you want displayed
  • Image title - this is essentially the same as alt text in HTML, usually the same as the channel title
  • Image link - This is your site's URL, usually the same as the channel link

Optional Elements

  • image width - in pixels
  • image height - in pixels

↑ Contents

Item Elements

  • title - the tile of the individual item
  • link - the link to the item on your site
  • description - this should be a summary or brief excerpt of the item
  • enclosure - optional media object attached to the item

Title

The item title setting can use Coranto fields. The most common will probably be <Field: Subject>, but it can be any field or combination of fields depending on your needs.

Link

This is the link to the item on your site. This is also used for the items guid, which is supposed to be unique to the item.

Description

The Item Description is really intended as a summary of brief overview of the item's content. In many feeds this RSS field holds the entire content of the item. Remember that you want to use a Coranto style tag in this setting so that the description of each item is unique to that item. The description should be a summary, a short excerpt, or overview of the item especially if the item is long.

This setting accepts Coranto fields. You will probably use something like this:

<Field: Text> - would include all of the text field's contents
<Snip 150: Field: Text> - uses Coranto's native snip function
<WordSnip Field: Text> - requires the Snipper Addon

If you do not like the results obtained using the snip options available you can create a special custom field so that you can enter the content of the item's RSS description separately. Since you can use style code in the Item Description setting you could do this:

<If: Field: CustomField_RSS_Description><Field: CustomField_RSS_Description><If: Else><WordSnip Field: Text></If>

This way the RSS description filed will be used if it is filled in and a snipped version of the text field will be used if the RSS description is empty. This allows you to create a special RSS summary for some articles if needed.

Item Description and the Snipper Addon

If you want to include HTML in the item description of your RSS feed and you want to snip the content to provide just a summary the best solution is to use the Snipper addon. Snipper offers settings for the preservation of HTML tags and can be set to not snip your text in the middle of a sentence.

You need to read the the Snipper addon docs in order to see all of the possibilities that are available.

If you are attempting to include HTML in the description you should:

In Feed Builder:
set the Maximum Length to zero
set Allow HTML in Description to YES
set Item Description to the the proper style tag (ex: <WordSnip Field: Text>)

In Snipper:
set Strip HTML to NO
set Respect HTML to STRONG (suggested for HTML validity)
set Length as desired

What happens is that the field you use for the description will be processed by the Snipper addon and the result will be included in the RSS feed.

↑ Contents

Description Options
  • Allow HTML
  • Maximum Length
  • Read More String
  • Force Read More String

You can have HTML in the description of your item. Set Allow HTML to YES if want any html in your posts preserved.

The Maximum Length of Description allows you to truncate the length of the description. The entry here is the number of characters that will be used. This uses perl's substr()function and does not test for closed html tags, the end of a word, or the end of a sentence. This will count the characters and then chop off what's left. This is essentially the same way that Coranto's native snip function works. This setting only accepts numbers.

The Read More String allows you to enter a string that will be displayed at the end of your truncated description. This is really useful if you allow HTML in your description. You can use it to add another link to the item on your site. Example:

<a href="h**p://www.yoursite.com/pathto/viewnews.cgi?<Field: newsid>">Read More</a>

This may help you drive people to your site.

Whatever you enter here will be displayed at the end of your description if you truncate it with Feed Builder's maximum setting setting. If you do not allow HTML in the description it will also be stripped from this string.

The Force Read More String setting allows you to add the Read More string to your description if you use Coranto's native snip feature or the Snipper addon. This works well in conjunction with the Snipper Addon and HTML allowed. Snipper will preserve your HTML and you can add another link to your item.

↑ Contents

Enclosures

Enclosures are media objects that are attached to the item. There are three required attributes:

  • url - must be a complete URL, not relative
  • length - size in bytes
  • type - mime type (EX: audio/mpeg)

All three attributes must be present. It ends up looking like this:

<enclosure url="h**p://www.yoursite.com/files/your.mp3" length="2123500" type="audio/mpeg" />

Enclosures are simply links to the object. How they are displayed is up to the RSS reader. Some readers can be set to download specified types of enclosures automatically. This can be used to attach music, video, pictures, or documents to your item.

Your item may be an announcement of the release of a new song by your garage band and you can attach an mp3 with a sample of the song to the item.

The item could be a summary of a longer document and you could attach the document to the item.

The settings for enclosure accept Coranto fields. If you use MultiPart to upload files to your site you can use MultiPart fields. Example:

<FilePath: CustomField_Enclosure> - For URL

See the MultiPart documentation for details.

↑ Contents

CSS URL

You can specify the URL to a CSS file to be used if your XML file is displayed in a browser. The latest versions of Firefox and Opera will use this file. Here is a sample CSS file to use with an RSS feed:

*{
display: block;
}
:root {
margin: 50px;
}
channel > title {
font-size: x-large;
text-align: center;
color: red;
}
item {
margin: 25px 0 20px 0;
}
item > title {
font-size: medium;
margin-bottom: 20px;
}
item > link {
font-size: small;
margin-top: 6px;
margin-bottom: 6px;
}
item > description {
font-size: small;
}
item > pubDate {
font-size: small;
}
language {
   display: none;
}

This must be a complete URL. If you don't have a CSS file someone seeing your link in a browser will probably see the raw source code.

↑ Contents

Time Zone

You can use either the server time zone or GMT time in your feeds.

If you use the server time zone the string you have set in the Coranto date and time settings for the time zone will be used. The time zone will reflect whether the item was entered during daylight saving time or not. It is up to you to have the correct time zone abbreviations entered into you Coranto date and time settings.

Further Reading

RSS 2.0 Specification
Feed Builder Addon Release Topic Thread
RSS feed creation - Discussion and Solution

↑ Contents




Page last modified on February 02, 2009, at 07:14 AM