WordPress.org

Ready to get started?Download WordPress

Forums

Can someone write a widget for this Flickr rss script? (5 posts)

  1. nolageek
    Member
    Posted 7 years ago #

    After searching for months, I found a script that you can run on your server to create a rss feed from your (or anyone's) flickr favorites! I can't seem to get it to work as a widget... I tried hacking the Flickrss widget and the rss widget and it's clear I'm not going to get it to work.

    I think there's a HUGE demand for this (look at the flickr forums for rss favorites)

    Anyone?
    Script can be found here:

    http://www.b3co.com/?c=blog&mode=entry&id=617

    <?
    if($_GET["user"] == ""){
    die("user is required");
    }
    $u = $_GET["user"];
    header("Content-type: application/xml");
    echo '<?xml version="1.0" encoding="iso-8859-1"?>';
    ?>
    <rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
    <language>es-mx</language>
    <title><?=$u?>'s favorite pictures</title>
    <link>http://flickr.com/<?=$u?>/favorites/</link>
    <description><?=$u?>'s favorite pictures from flickr, script by b3co.com</description>
    <pubDate><?=date("D, j M Y H:i:s")?> -0400</pubDate>
    <copyright>b3co.com</copyright>
    <managingEditor>root@b3co.com</managingEditor>
    <image>
    <title>b3co.com</title>
    <url>http://b3co.com/base/logos/b3_flickr.jpg</url>
    <link>http://b3co.com/</link>
    </image>

    <?
    $data = implode("",file("http://www.flickr.com/photos/$u/favorites"));
    $regexp = "/<a href=\"/photos/(.*)/\" title=\"From (.+)\"><img src=\"(.*)\" border/i";
    preg_match_all($regexp, $data, $matches, PREG_SET_ORDER);
    for($i = 0; $i < count($matches); $i++){
    ?>
    <item>
    <title>Foto de <?=$matches[$i][2]?></title>
    <link>http://www.flickr.com/photos/<?=$matches[$i][1]?>/</link>
    <content:encoded><![CDATA[<img src="<?=str_replace("_s.jpg","_m.jpg",$matches[$i][3])?>"/>]]></content:encoded>
    <pubDate><?=date("D, j M Y H:i:s")?> -0400</pubDate>
    <author><?=$matches[$i][2]?> @ flickr.com</author>
    </item>
    <?
    }
    ?>
    </channel>
    </rss>

  2. nolageek
    Member
    Posted 7 years ago #

    bump

  3. driverkt
    Member
    Posted 6 years ago #

    I wrote one. I'll make it available soon on my site and post about it on flickr.

  4. driverkt
    Member
    Posted 6 years ago #

  5. driverkt
    Member
    Posted 6 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.