Skip navigation
Currently Being Moderated

RSS Feeds on a webpage

Jun 16, 2013 10:09 PM

Tags: #cs4 #feeds #rss #xslt #fragment #mm_xsltransform

Hi DW people am trana have feeds from many different sources included on pages in the website that I am working on.

 

What I want to achieve: I am looking to have one row with three columns that display the feed headlines in a 220px by 220px div container (you know all those headlines with pics). So am also trana make each container display like 5 headlines each from one source(usually feeds providers have more than one headline sometimes up to 20)

So far I have created an XSLT Fragment and I have an XML data source binded to it. The thing is when it is displayed in the browser I have no control over it ie it just lists out all the feeds in several rows from the top of the page to the bottom. Then when I tried giving it some style to make it align in a row they just overlap one on top of the other.

 

When I tried including the Fragment on my dynamic page DW automatically created MM_XSLTransform.class.php file and attached it to my page. I dont want to bore anyone but I have issues with this particular MM_XSLTransform.class.php file. I have tried including some functions of my own in it so as to give it more capabilty but really its a very long story...

 

I have also experimented with Spry but then without the XSL style it just gives the raw data as output in the browser. When I tried having the XSL style along with the Spry it gives several errors at the start of the page like so:

 

( ! ) Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\wamp\www\parseXMLs\includes\MM_XSLTransform\MM_XSLTransform.class. php on line 208

 

( ! ) Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\wamp\www\parseXMLs\includes\MM_XSLTransform\MM_XSLTransform.class. php on line 215

 

at the bottom list out the feeds!!!!

 

The error appears on several lines (listing them all out here wont make sense).

 

Am using DW CS4 on a windows 7 OS..

 

Pls DW people I need some help with this one.. Speedy and valid response appreciated

 
Replies
  • Currently Being Moderated
    Jun 16, 2013 10:23 PM   in reply to HJWJ

    Hello,

     

    it's Ben Pleysier (Gramps) who answered many of the questions in this field. Here some links from my collection:

     

    Create RSS feed in Dreamweaver CS6
    http://forums.adobe.com/message/4516440#4516440

     

    How to add RSS feed to website?
    http://forums.adobe.com/message/3551844#3551844

     

    How to Add RSS Feed to Dreamweaver html page
    http://forums.adobe.com/message/3920309#3920309

     

    Sort rss feeds by date??:
    http://forums.adobe.com/message/4231762#4231762

     

    RSS implementation: error  MM_XSLTransform error.
    http://forums.adobe.com/message/3064170#3064170

     

    V/G!

    Hans-Günter

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2013 12:02 AM   in reply to HJWJ

    Hello HJWJ,

     

    Ben probably has not seen your question. Usually he responds/helps immediately. Maybe he will set the page again "in power", esp. when you ask him in a personal message.

     

    Hans-Günter

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2013 2:08 AM   in reply to HJWJ

    Hello HJWJ,

     

    on the other hand you can try some of these tutorials or download links:

     

    Use download the DreamReader Extension:
    http://webdesign.about.com/od/dreamweaverhowtos/ss/dwrss.htm

    How to Create RSS feeds with Dreamweaver:
    http://www.htmlgoodies.com/beyond/xml/article.php/3698976/How-to-Creat e-RSS-feeds-with-Dreamweaver.htm

    Get External Feed Dreamweaver Extension:
    http://linecraft.com/dreamweaver-get-external-feed/extension.php

    How to Make an RSS Feed for your Dreamweaver Website:
    http://www.dreamweavertutorial.co.uk/dreamweaver/articles/rss-feed-dre amweaver.htm

     

    V/G

    Hans-Günter

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2013 4:44 AM   in reply to HJWJ

    @ Hans-Günter,

     

    Sorry, I have been snowed under, far too much work.

     

    @HJWJ

     

    Have a look here http://pleysier.com.au/rss_example/. If you have a look at the source code you will see that I have used SpryDataSets to retrieve the data from http://feeds.bbci.co.uk/news/rss.xml. The source can be changed to whatever and the output can be organised to your personal taste.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2013 5:40 AM   in reply to HJWJ

    This is the source code

    <!DOCTYPE html>

    <html>

    <head>

    <meta charset="UTF-8">

    <title>RSS Reader Example</title>

    <link href="css/layout.css" rel="stylesheet">

    <link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet">

    </head>

    <body>

    <h1>Cross-Domain RSS Reader Demo</h1>

    <div class="MasterDetail">

      <div spry:region="dsItem" id="MasterContainer" class="MasterContainer">

        <div spry:repeat="dsItem" spry:test="{ds_RowID}<15" spry:choose="choose">

          <div class="MasterColumn" spry:when="{ds_RowID} == {ds_CurrentRowID}" spry:select="MasterColumnSelected" spry:selectgroup="master" spry:selected="MasterColumnSelected" spry:hover="MasterColumnHover" spry:setrow="dsItem">{title}</div>

          <div class="MasterColumn" spry:default="default" spry:select="MasterColumnSelected" spry:selectgroup="master" spry:hover="MasterColumnHover" spry:setrow="dsItem">{title}</div>

        </div>

      </div>

      <div spry:detailregion="dsItem" class="DetailContainer">

        <div class="DetailColumn">Published:<span>{pubDate}</span></div>

        <div class="DetailColumn">Author:<span>{author}</span></div>

        <div class="DetailColumn">Description:<br><button onClick="document.getElementById('RSSItemContentIFrame').src='{link}' ;">More...</button><span>{description}</span></div>

      </div>

      <div id="RSSItemContent">

        <iframe id="RSSItemContentIFrame" src=""></iframe>

      </div>

      <br style="clear:both" />

    </div>

    <script src="SpryAssets/SpryData.js"></script>

    <script src="SpryAssets/SpryDataYQLDataSet.js"></script>

    <script>

    var dsItem = new Spry.Data.YQLDataSet(

        'select * from xml where url="http://feeds.bbci.co.uk/news/rss.xml"',

        false,

        {

            format:"xml",

            preparseFunc: function( strxml ){

                var xml = Spry.Utils.stringToXMLDoc( strxml ), ds = Spry.Data.XMLDataSet.getRecordSetFromXMLDoc( xml, "rss/channel/item" );

                return ds.data;

            }

        }

    );

    </script>

    </body>

    </html>

    The orange coloured part is the CSS that you can change to suit.

     

    The blue coloured part is the markup that you can change to suit.

     

    The green coloured part is the link to the JS files. The contents can be copied and pasted into a document on your server.

     

    The red coloured part needs to reflect the source of the feed.

     

    The YQLDataSet does not belong to the original SpryDataSets, yet is a mixture of Spry and a cross domain script from Yahoo. Without this you would not be able to obtain data from a distant domain.

     

    As such, the above source code does not need any XSLT, the YQLDataSet performs all of the hard work.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2013 8:38 AM   in reply to Ben Pleysier

    Hello Ben,

     

    as I am sure you can imagine, that I - in this case - tried out your source code at once AND I was quite successful, even though I changed to a feed from Germany.

     

    And as an information: the "More..." button works fine in DW's Live View and in my FF, but not in my IE10.

     

    All the best!

    Hans-Günter

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 23, 2013 9:50 AM   in reply to HJWJ
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 26, 2013 12:02 PM   in reply to HJWJ

    I am sorry, but I do not understand the code that you have supplied us with. I did give you a working feed that you could use, the page markup is very simple.

     

    Jus a couple of hours ago DMXZone sent me the following message

    Dear Ben,

     

    Today we are extremely happy to announce the official release of HTML5 Data Bindings http://www.dmxzone.com/go/21863/html5-data-bindings! This powerful tool is all you need in order to build dynamic web apps and interactive pages in no time, directly in Dreamweaver.

     

    Check out the user manual and the video tutorials http://www.dmxzone.com/go/21873/html5-data-bindings-manual/ that we created, and download it, because...it's FREE!

    I have not tested it yet, but if you want my advice, forget what you have done and start using the DMXZone extension after having viewed the tutorials.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 2, 2013 3:31 PM   in reply to HJWJ

    I have done what you have described and get the following

    capture.png

     

    I do not have the time to figure out what has gone wrong. Which brings me back to where I started and which works. I have adjusted http://pleysier.com.au/rss_example/hjwj.php to reflect the source feed from Yahoo.

     

    In DWCC the XSLT-fragment option has been removed as in

    capture.png

    The choice is yours, spend time on the method that does not work or adopt a method that does work.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 3, 2013 12:37 AM   in reply to Ben Pleysier

    Hello HJWJ,

     

    Ben's opinion I want to support: please do not make any unnecessary experiments! Esp. as I wrote above: "I tried out your source code at once AND I was quite successful, even though I changed to a feed from Germany's TV." You may have a look here: http://hansgd.de/rss/index.html. It works like a charm, esp in FF.

     

    Hans-Günter

     

    P.S.

    Many thanks Ben!

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 3, 2013 5:21 AM   in reply to hans-g.

    Thank you Hans-Günter. As you have noticed, the markup is easily modified to suit. All it needs is a change of the feed URL to change the dataset. The rest can be changed with CSS.

     

    I had a look at DMXZone's HTML5 Data Bindings and found it to be unsuitable for XML-feeds.

     

    A product worth looking is External Feed, a Dreamweaver extension, which will set you back a mere US$19.95

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 3, 2013 6:35 AM   in reply to HJWJ

    As I have previously stated, I have changed http://pleysier.com.au/rss_example/hjwj.php. If you click on the image ....

     

    You could change this behaviour to anywhere you like.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Incoming Links

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points