Not signed in (Sign In)

Categories

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorstuart
    • CommentTimeAug 16th 2005
     # 1
    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.
    •  
      CommentAuthorlech
    • CommentTimeAug 16th 2005
     # 2
    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?
    •  
      CommentAuthorstuart
    • CommentTimeAug 16th 2005
     # 3
    Yes. e.g. feed://www.flickr.com/services/feeds/photos_public.gne?id=87451428@N00&format=atom_03

    there's an API too.
    •  
      CommentAuthorlech
    • CommentTimeAug 16th 2005
     # 4
    now all you need to do is find a relevant way to parse all of that into vanilla :D
    • CommentAuthorbrady
    • CommentTimeAug 16th 2005 edited
     # 5
    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>
  1.  # 6
    Whoa great idea. It would be nice to throw a few square thumbnails of the latest flickr shots for each member into their profile.
    •  
      CommentAuthordozens
    • CommentTimeAug 17th 2005
     # 7
    very rad idea... could this be an extension?
    •  
      CommentAuthornathan
    • CommentTimeAug 17th 2005
     # 8
    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)
    •  
      CommentAuthorlech
    • CommentTimeAug 17th 2005
     # 9
    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.
    •  
      CommentAuthornathan
    • CommentTimeAug 17th 2005 edited
     # 10
    I hate XML. I don't know why, but I have always had trouble with it.

    *crazy stabbing jesture*
    •  
      CommentAuthorlech
    • CommentTimeAug 17th 2005
     # 11
    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.
  2.  # 12
    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?
    •  
      CommentAuthorlech
    • CommentTimeAug 17th 2005
     # 13
    writing out is totally different from reading in and manipulating said xml, sir!
    •  
      CommentAuthornifkin
    • CommentTimeAug 17th 2005
     # 14
    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.
    • CommentAuthorbrady
    • CommentTimeAug 17th 2005
     # 15
    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.
    •  
      CommentAuthorlech
    • CommentTimeAug 17th 2005
     # 16
    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.
    •  
      CommentAuthorstuart
    • CommentTimeAug 17th 2005
     # 17
    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 ;)
    •  
      CommentAuthorlech
    • CommentTimeAug 17th 2005
     # 18
    architects > painters!
    •  
      CommentAuthorstuart
    • CommentTimeAug 17th 2005
     # 19
    oh come on, painters > architects. How many buildings have ever fallen down because the painter did a bad job ;)
    • CommentAuthorbrady
    • CommentTimeAug 17th 2005
     # 20
    Considering the PHP limitations, you could always use Ajax and transform the XML on the client.

    [Such as described here](http://www.xml.com/pub/a/2005/02/23/sarissa.html)
  3.  # 21
    stuart, how many buildings have ever been there because the painter did a good job?
    •  
      CommentAuthorMark
    • CommentTimeAug 17th 2005
     # 22
    Awesome idea. Could make for a great extension. Just include the latest flickr stuff right at the bottom of the profile info...
    •  
      CommentAuthorstuart
    • CommentTimeAug 17th 2005
     # 23
    Mark > Yeah, just need one of these fine folks to make it now and we'll be well away.
    •  
      CommentAuthorlech
    • CommentTimeAug 17th 2005
     # 24
    Until I can do XML acrobatics within php, I am in no way shape or form touching this one :D no offense stuart, I love the idea, I'm just a bit underskilled to take this one on.
    •  
      CommentAuthorMark
    • CommentTimeAug 17th 2005
     # 25
    I might do this one myself.... after I've released the next revision of Vanilla, though.
    • CommentAuthorbrady
    • CommentTimeAug 17th 2005 edited
     # 26
    I've been playing with XML outside of the workplace for the past week or so and did a few tricks with Flickr, Netflix, and even Tivo exported XML. I have pages noting what I'm [watching](http://www.criticalminds.org/aboutme/watching.html) and [photos](http://www.criticalminds.org/aboutme/photos.html) I've recently took, for example. I'm looking to continue to expand this over time as a sort of experiment on how much personalized information I can aggregate from various web services.

    I grab the feed, transform the XML, and publish the resulting HTML using Apache Cocoon and cURL, not PHP. But, I could help if you guys are interested in using XSLT for the transformations. Like I said, theoretically, you could even do the transformations on the client via JavaScript.
    • CommentAuthorpea
    • CommentTimeAug 18th 2005
     # 27
    Yeah, lovely idea!
    •  
      CommentAuthorsweeney
    • CommentTimeAug 18th 2005
     # 28
    XML in php5 is yummily simple. If you've any experience with Javascript the whole experience is very pleasant.

    http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4
    • CommentAuthorjaseone
    • CommentTimeAug 18th 2005
     # 29
    lech, can't you just use php_flag short_open_tag off in your .htaccess to disable it just for yourself? I think you can't do that if PHP is using phpsuexec though so depends on your host.
    •  
      CommentAuthorlech
    • CommentTimeAug 18th 2005
     # 30
    I would do that, if .htaccess files correctly registered on my server in the first place :) my server is set up by the most insane means :)
    •  
      CommentAuthorsauceruney
    • CommentTimeAug 18th 2005
     # 31
    how many times do i have to post this link?

    http://phpflickr.com/
    •  
      CommentAuthorJErm
    • CommentTimeAug 18th 2005 edited
     # 32
    Or you could do it the easy way, use the old flickr badge code like I do at http://jermexpress.com and style it all you like.

    This is what the old badge code looks like:

    <script type="text/javascript" src="http://www.flickr.com/badge_code.gne?nsid=49382004@N00&count=3&display=random&name=0&size=square&raw=1"></script>

    All you need to do is have each member submit their flickr id number instead of their alias which is this part I think "49382004@N00".
    •  
      CommentAuthorJErm
    • CommentTimeAug 18th 2005
     # 33
    Heh I just figured that people with flickr aliases wouldn't even know what their flickr id number is.. *lol*

    But still this might work...
    •  
      CommentAuthorFLC
    • CommentTimeAug 18th 2005 edited
     # 34
    When you make the badge it gives you it, mine, f'rinstance is 48889119704@N01
    •  
      CommentAuthorsteviehype
    • CommentTimeAug 31st 2006
     # 35
    Would it be possible to some images to the sidebar on the index page?

    thanks.

    Steve
    • CommentAuthorSirNot
    • CommentTimeAug 31st 2006
     # 36
    It would, but a potential problem is that requesting and parsing the flickr rss feed takes a good while (relatively speaking), so your page loads would probably be pretty slow.
    •  
      CommentAuthorsteviehype
    • CommentTimeAug 31st 2006
     # 37
    I was think of just having 3-4 pictures.

    Do you still think it would be slow?

    I would really appreciate it someone has something like this, I really want to get a few pictures on my index page and I think this would be a fantastic way to do it.
Add your comments
    Username Password
  • Format comments as