Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews Feedsyoutube rss feeds?youtube rss feeds?
Previous
 
Next
New Post
8/28/2007 6:23 PM
 

i'm trying to figure out a way to take a youtube rss feed (which displays nicely in ie & firefox) and show it on a dotnetnuke page using the news feeds module.  i'm not sure what stylesheet (it's not referenced in the returned xml) is being used by ie or firefox (i can't see any default setting for this), so i'm not sure how this is being done. 

here's an example:

http://youtube.com/rss/user/youtube/video.rss

and the xml:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
 <channel>
  <title>YouTube :: Videos by youtube</title>
  <link>http://www.youtube.com/rss/user/youtube/videos.rss</link>
  <image>
   <url>http://youtube.com/img/pic_youtubelogo_123x63.gif</url>
   <link>http://youtube.com</link>
   <title>YouTube</title>
   <height>63</height>
   <width>123</width>
  </image>
  <description>Videos uploaded by youtube hosted at http://www.youtube.com.</description>
  <item>
   <author>rss@youtube.com (YouTube)</author>
   <title>YouTube Status Module</title>
   <link>http://youtube.com/?v=sqHI2JAiVUA</link>
   <description>
    <![CDATA[
    <img src="http://img.youtube.com/vi/sqHI2JAiVUA/default.jpg" align="right" border="0" width="120" height="90" vspace="4" hspace="4" />
    <p>
    Misty, from the YouTube support team, talks about our new project, the Status Module! Check out all the recent Status Module posts at: http://youtubestatus.blogspot.com/ . This will be used to broadcast any major site issues or new features you should be aware of. When new issues arise, we'll write about them in the blog, which will then feed into a bright red module on the right side of the help center (http://www.google.com/support/youtube/ ). This module will appear for 24 hours during a system issue and will be updated when it's fixed or if we have more information to share with you. We know you've been waiting for this -- hopefully, it'll help you with any future site issues!
    </p>
    <p>
     Author: <a href="http://youtube.com/profile?user=YouTube">YouTube</a><br/>
     Keywords:  <a href="/results?search_query=YouTube">YouTube</a> <a href="/results?search_query=Status">Status</a> <a href="/results?search_query=Module">Module</a><br/>
     Added: June 25, 2007<br/>
    </p>
]]>
   </description>
   <guid isPermaLink="true">http://youtube.com/?v=sqHI2JAiVUA</guid>
   <pubDate>Mon, 25 Jun 2007 17:13:43 -0700</pubDate>

   <media:player url="http://youtube.com/?v=sqHI2JAiVUA" />
   <media:thumbnail url="http://img.youtube.com/vi/sqHI2JAiVUA/default.jpg" width="120" height="90" />
   <media:title>YouTube Status Module</media:title>
   <media:category label="Tags">YouTube Status Module</media:category>
   <media:credit>YouTube</media:credit>
   <enclosure url="http://youtube.com/v/sqHI2JAiVUA.swf" duration="36" type="application/x-shockwave-flash"/>
  </item>
.......

does anyone have any ideas on how i could get this to display nicely (with the videos, that is) in the news feeds module?

 

 
New Post
8/29/2007 11:32 AM
 

Well, both IE and Firefox have method in their code that's more flexible in their support of newer types of feeds, more akin to standalone news agregattors and readers.  Those apps, generally take a feed disassemble it into component parts and restructure it, transforming it according to their proprietary methods.  Newsfeeds don't have to include xsl references. 

The default DNN Newsfeeds (RSs) module is a basic flavor that supports the basic tags contained in an RSS v0.91 feed.  Inspecting the example, you'll see that this feed is an RSS v2.0 feed with a custom Yahoo namespace.  Also, looking at it, you can see that the description contains CDATA sections with HTML.  The bad news - the feed is not supported with the basic DNN v0.91 xsl. 

You will need to develop a custom xsl that supports RSSv2.0,  the Yahoo namespace, and HTML encoding.  I might have something, I could throw together.  Give us a few ticks, and we'll get back to you, or maybe someone else, already has one and will kindly post it for all to enjoy.

 

 
New Post
8/29/2007 11:54 AM
 

Ok, here's one i had almost done, doesn't have the Yahoo tags displaying, but you get the basic idea.  Should work, I used it just now on my test dnn v4.05.05 site.  If not, well, let me know, but hey, there's no charge.

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- xmlns:xsl="http://www.w3.org/TR/WD-xsl" -->
<!-- RSSv2YouTube XSL by Phil 'iwonder' Guerra -->

<xsl:output method="html" indent="yes"/>
<xsl:param name="TITLE"/>
<xsl:template match="rss">

  <xsl:apply-templates select="channel" />

  <xsl:apply-templates select="channel/item" />

</xsl:template>

    <xsl:template match="channel">
  <strong><a href="{link}"><xsl:value-of select="title"/></a></strong><br/>
  <font size="-3">
  <xsl:value-of select="description" disable-output-escaping="yes"/>

<!--  <strong>Language: </strong><xsl:value-of select="language"/><br/> -->
  (<xsl:value-of select="copyright"/>)
<!--  <strong>WebMaster: </strong><xsl:value-of select="webMaster"/> -->
  </font>
  <hr/>
 </xsl:template>

 <xsl:template match="channel/item">

   <strong><a href="{link}">
   <xsl:value-of select="title"/></a></strong>
      <br/>
      <xsl:value-of select="description" disable-output-escaping="yes"/><br/>
   <xsl:if test="enclosure/@type='image/jpeg'">
   <img src="{enclosure/@url}"  />
    </xsl:if>
   <xsl:if test="enclosure/@type='application/x-shockwave-flash'">
   <a href="{enclosure/@url}">See it Now Here </a>
    </xsl:if>
   <font size="-3">(<xsl:value-of select="pubDate"/>)</font><br/>

    <hr/>
 </xsl:template>
</xsl:stylesheet>

 

 
New Post
8/29/2007 2:39 PM
 

 

thanks for the responses- i knew the format wasn't early rss format, but i'm surprised this hasn't been brought up before, being as how popular youtube is. 

awesome- this works....  thanks a lot- that does a great job of displaying the thumbnails.  i don't even know what the yahoo tags are there for.

this should be announced or posted somewhere where more people could get at it- i'd bet a ton of people would want this (again, i'm surprised this hasn't been brought up before!).

one addition...?  i also see an enclosure url:

<enclosure url="http://youtube.com/v/sqHI2JAiVUA.swf" duration="36" type="application/x-shockwave-flash"/>

could that be used to embed the .swf into the page?  this is the actual video itself. 

...or can you embed the url only (i think whacking off the .swf)?

 

 
New Post
8/29/2007 4:28 PM
 

The Yahoo tags just give some additional info and links to some items.  The example really was sitting around in my folder, as I started working on this a bit back and lost track of it.  The Yahoo tags may allow for a bit more control over display of some tag info, so I'll play around with it a bit more.

The enclosure tag is being transformed in this snippet:

   <xsl:if test="enclosure/@type='application/x-shockwave-flash'">
   <a href="{enclosure/@url}">See it Now Here </a>
    </xsl:if>

It might be better to change it round as you like, as in:

   <xsl:if test="enclosure/@type='application/x-shockwave-flash'">
   <a href="{enclosure/@url}"> Click Here To View </a>
    </xsl:if>
Again, it all could be cleaned up more, but it gives the general idea.

As far as using it to embed into a page, you would need to provide some code to do it.  The basic chores of making the http  request, and transforming the result is what the module does.  I think someone did a YouTube module, but I'm not sure what the link or cost would be.  To embed it, you would need to download it, and make it available in some fashion, and that's not possible with the Newfeeds (RSS) module as it is. One thought would be to take that feed using codebehind to download the enclosure, and present it on a page as a module.  Sounds like an interesting challenge, anyway.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews Feedsyoutube rss feeds?youtube rss feeds?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out