Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

members flickr feed

edited August 2006 in Vanilla 1.0 Help
Just something else which would kick ass, but I'm not able to do. Adding a field in the sign-up process for a flickr account, and then showing the (x) latest images for each member in their profile, as well as a possible 'group pool' of stuff from all the members. go on, you know you want to.
«1

Comments

  • Options
    lechlech Chicagoland
    Hmmm, I have no clue on how one would do this. Does flickr serve it's data via an easy to retrieve rss/xml feed per user account?
  • Options
    Yes. e.g. feed://www.flickr.com/services/feeds/photos_public.gne?id=87451428@N00&format=atom_03 there's an API too.
  • Options
    lechlech Chicagoland
    now all you need to do is find a relevant way to parse all of that into vanilla :D
  • Options
    bradybrady New
    edited August 2005
    If you have the ability to transform XML on your server... Get the RSS 2 feed: http://www.flickr.com/services/feeds/photos_public.gne?id=87451428@N00&format=rss_200 And below is an XSLT doc to get you started. Do the transform then, just include the resulting HTML snippet on your page of choice. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes" xmlns:media="http://search.yahoo.com/mrss" exclude-result-prefixes="fn xs xdt media"> <xsl:output method="html" indent="yes" encoding="UTF-8" /> <xsl:template match="/"> <div id="flickr"> <h2>Photos Recently Uploaded to Flickr</h2> <xsl:for-each select="rss"> <xsl:for-each select="channel"> <xsl:for-each select="item"> <a> <xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute> <img border="0" align="top" class="flickrphoto"> <xsl:attribute name="src"><xsl:value-of select="media:content/@url" /></xsl:attribute> <xsl:attribute name="height"><xsl:value-of select="media:content/@height" /></xsl:attribute> <xsl:attribute name="width"><xsl:value-of select="media:content/@width" /></xsl:attribute> <xsl:attribute name="alt"><xsl:value-of select="title" /></xsl:attribute> </img> </a> </xsl:for-each> <br /> <br /> </xsl:for-each> </xsl:for-each> </div> </xsl:template> </xsl:stylesheet>
  • Options

    Whoa great idea. It would be nice to throw a few square thumbnails of the latest flickr shots for each member into their profile.

  • Options
    very rad idea... could this be an extension?
  • Options
    I imagine it could. I personally don't have the time to do it, but... I nominate Lech :D He seems to have enough time. (Joking)
  • Options
    lechlech Chicagoland
    Haaaa! I wish I had that kind of time! I'll leave this one off to someone who does have that kind of time and probably some better XML parsing skills than myself.
  • Options
    edited August 2005
    I hate XML. I don't know why, but I have always had trouble with it. *crazy stabbing jesture*
  • Options
    lechlech Chicagoland
    I've had no need for it either, basically because there were no simple methods to really parsing it all. I'll have to change my ways one of these days as XML data is becoming more and more the norm of how to pass stuff around.
  • Options
    is this the same lech who was going on about xml parsing etc in the dictionary thread? :P I have plenty of time but i'm really very lazy and i dont know xml...so.....anyone else?
  • Options
    lechlech Chicagoland
    writing out is totally different from reading in and manipulating said xml, sir!
  • Options
    I've used MagpieRSS for a couple things like this before. If you understand PHP (or can figure out how to hack their sample code at least) it shouldn't be difficult to get up and running.
  • Options

    Well, it seems I'm the opposite - PHP drives me nuts, but I live in XML land. That XSLT doc should get you 99% where you want to be if you just call that a URL that parses the XML against it and include the snippet of HTML returned in the page.

    It seems the main problem is web hosts don't typically enable XSLT in PHP by default? Because, yeah, parsing XML with code is tedious. So, I could write a module, but it sounds like the dependencies would limit most people's ability to use.

  • Options
    lechlech Chicagoland
    brady, xml parsing also tends to really screw you up if you have short-tags enabled for your php install. I think that was what pissed me off the first time around, while they should be off, my host has them on, I should probably ask around the next upgrade cycle to have them disabled.
  • Options
    The way I was looking at it, we could use the existing flickr badge maker, only having each member specify thier details in order to create the right code. Maybe I'm way off track, I'm better at making things look pretty, you could say, I'm the artisan painter, and you php/xml/jabbajabbadoodoo code monkeys are the plasterers ;)
  • Options
    lechlech Chicagoland
    architects > painters!
  • Options
    oh come on, painters > architects. How many buildings have ever fallen down because the painter did a bad job ;)
  • Options

    Considering the PHP limitations, you could always use Ajax and transform the XML on the client.

    Such as described here

  • Options
    stuart, how many buildings have ever been there because the painter did a good job?
This discussion has been closed.