DW MX, MX2004 and DW8. PHP_MySQL Server Model: With this extension you can add RSS Readers to your documents without writing a single line of code.
There are lots of excellent classes to parse RSS files, but I wanted something that could be used with DW in design view, to keep full control of the design. Well, here it is. The only steps are:
- Create a new RSS Reader
- Add RSS elements to your document
- Repeat the region where you have placed your items
Requirements: To use this extension, you must have php with XML support
As you can see, the steps are quite familiar: they are the same you follow to insert a Recordset.
What is a RSS?
RSS is a web content syndication format. It has a defined standard (which must conform the XML 1.0 specification) and it's used by lots of sites, so users can link to their content without worrying about updates. You can find quite a lot of them here.
How the extension works:
The steps are quite simple if you're used to work with Recordsets. This is what you will see in your Server Behaviors panel when the extension has been installed:
As you can see, there are lots of elements to work with. Those marked as "Optional" are not always present in the RSS feeds, so you must check if they exist first.
Alternatively, you can choose the RSS Insertbar, added by the extension: It has the same features as the Server Behaviors, but it's a bit more visual:
The Channel Elements define the RSS properties and they're common to the whole file. The Item Elements are repeated across the file (they are the articles).
Let's see the steps:
1.- Create a new RSS Reader: You must give it a name and add the URL where the RSS file is located:
2.- Add channel elements to your document: for example the RSS image (I know that the RSS file has one). Note that I must use the same name that I defined when I created the New RSS Reader:
3.- Add more elements: When you have finished, you can have something like this (we placed them in a table)
Note that DW can translate them as if they were recordset items. This way you can apply styles to them or whatever you want. The image is just a placeholder, so don't worry about it:
4.- Add a link to the Item's title: This way, when the user clicks on it, it will be redirected to the URL where the full article is located:
5.- Select the Table Rows that contain the Item's title and description and apply 'RSS Item Repeat Region': You can choose how items should be displayed.
6.- It's over!: This is a finished RSS Reader without writing a line of code:
7.- See it in action: Click here to see a RSS Reader built with this extension
- v 1.2.0 (July, 24 2006):Improved Translators and Insertbar added
- Current Version: 1.3.0 (Dec,21 2006):Fix for international Characters (support for UTF-8 and ISO-8859-1 documents)
You can download the extension here