MenuCoranto Docs
Coranto LinksPmWiki Home |
Addons /
Feed Builder - Build RSS 2.0 Feeds with CorantoOn this page... (hide) Addon Author: Dale Ray What It DoesFeed 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. DiscussionRSS 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. Entering SettingsSome 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 SettingsEach RSS feed has a header section that contains the channel information. The channel information describes where the feed comes from. Required Elements
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. Optional Channel Elements Supported
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
Optional Elements
Item Elements
TitleThe 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. LinkThis 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. DescriptionThe 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 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 AddonIf 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: In Snipper: 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. Description Options
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. EnclosuresEnclosures are media objects that are attached to the item. There are three required attributes:
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. CSS URLYou 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. Time ZoneYou 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 ReadingRSS 2.0 Specification You can leave comments using this form. |