Kyle, I know you were checking out Polymeme...and so I know you saw them incorporating images into their memetracker. Will there be image support with Memetracker?
The ultimate setup would be to have a thumbnail for each meme, pulled directly from the URL of the main story in the meme and cached via imagecache or something like that.
Now, as I understand it, Memetracker will get its content from Feed API items. So if a feed has an image with its items, it'd be possible to map that image to a field in the content type and then display the image alongside the meme after some theme edits. That'd be one way to do it, right?
Here are two other approaches I see, one dirt simple and not so great, the other potentially very interesting but maybe trickier?
1. Use the webluga module - The Webluga module returns a thumbnail "screenshot" for any URL that you feed it. So you could get a screenshot of the main story in the meme. Not ideal, but an option.
2. Flickr - Could Memetracker query Flickr using keyterms from a meme, snap up the most relevant image and "attach" a thumbnail of it to the meme somehow with the photographer's credit? That could be pretty cool, depending on the keywords in the meme.
When you've got a site like Techmeme.....how cares about images? But Memetracker is being built to reach waaaaay beyond the tech vertical. So having some sort of multimedia support would be pretty killer.
Comments
Comment #1
bflora commentedCould you also just scrape a URL for a nearby image at the time of meme creation to get that ultra relevant image thumbnail?
Comment #2
SeanBannister commentedHow about using Feed Element Mapper (http://drupal.org/project/feedapi_mapper) to map the image in the feed to an ImageField (http://drupal.org/project/imagefield). Feed Element Mapper is pretty close to a Drupal 6 port and I'll finish it if need be, and I seem to remember someone needing Imagefield for a client so they're porting it.
The other great thing about Feed Element Mapper is we could map a video feed to Embeded Media Field for video content in MeMe's.
I'm currently unsure how MemeTracker will handle the display of CCK fields because it doesn't display as a node or teaser so it doesn't currently show them. I'd be interested to hear from Kyle what the plan is here.
Comment #3
bflora commentedSean, I think your Feed Element Mapper suggestion would work perfectly. How close is "pretty close to port"?
I've been using feed element mapper on a D5 install and it works like a charm. Great module.
Comment #4
kyle_mathews commentedI don't think Feed Element Mapper will work for memetracker. Feed Element Mapper "maps elements on a feed item such as tags or the author name to taxonomy or CCK fields." RSS and Atom Feeds are xml documents. What feed element mapper allows you to do is map items from within the xml document to fields within your node. For example, some feeds include the author --
<author>Kyle Mathews</author>. This element (and "element" has a specific meaning in this context -- http://www.w3schools.com/XML/xml_elements.asp) the author element, can be mapped to a cck field author.Most feeds don't include images as xml elements so Feed Element Mapper can't map images to cck fields as there is no image elements to map.
My plan is to use XPath to scrape images from the html and display them directly from the memebrowsing page using code similar to what I'm working on now to scrape links:
http://paste2.org/p/55720
Comment #5
bflora commentedKyle & Sean,
I agree that Feed Element Mapper limits your photos only to those attached to feed items in the original RSS feed. Scraping would be a heckuva log cooler. If scraping's not possible, though, mapping could suffice in a poormanscron sort of way.
Comment #6
SeanBannister commentedWell Alex needs Feed Element Mapper for a client this week so he's patching it. I did think about most feeds not posting images in an xml element and I'd be willing to provide a patch for Feed Element Mapper that would scrape the feed content for the image because this is something all feeds need not just MemeTracker.
My only request would be that images are attached to the nodes using something like FileField and ImageField so that if we want to display a node outside of MeMeTracker it still has the images attached. And when I think of it like this it feels like it should be a seperate module and not a direct part of MemeTracker.
I'm interested to hear what everyone thinks because this will be a really great addition to MemeTracker but it's also a great thing to have for ANY feed pulled with FeedAPI.
Comment #7
kyle_mathews commentedSean,
That's a good point -- Images should be available as a field so they're more universally accessible. This expands the scope of Feed Element Mapper some though so it'd be good to check with its developers to see what they think. But with Memetracker, I'd definitely support going that route.
Comment #8
bflora commentedI agree. That sounds very sensible, being able to store the images as a field.
Comment #9
bonobo commentedScraping would probably be separate from the Feed Element Mapper -- this also has the potential to get unwieldy quickly.
How would multiple images be handled?
How would links to multiple file types be handled?
Given the state of file handling (FileField, ImageField, Image Module, EmField, Audio, Image, Asset, and core Upload, to name a few) the dependency here would need to be made as generic as possible.
Comment #10
SeanBannister commentedBeen doing a bit of research and the new FileField in Drupal 6 is really good. The idea behind it is it will handle ALL file uploads in Drupal and ImageField will then just hook into it. This seems like a really good way to go, however we would need to add the ability for FileField to download files from a URL and not just a local upload. This seems like a good idea for FielField and would be something I'd be interested in implementing.
I'm sure everyone would agree we shouldn't be hot linking images direct from the source.
So if we went down this path of placing images in a field we would need :
1. A patch for Feed Element Mapper to pass the image into the ImageField.
-- (a) Need to talk to author of Feed Element Mapper to ensure this is OK.
2. A patch for ImageField/FielField to accept URLs.
The advantages are:
1. ImageCache could handle thumbnailing and resizing of images.
2. Other modules like LightBox that already intergrate with ImageCache and ImageField can be used.
3. Images displayed on all feed nodes not just Meme's.
4. Paves the way for other uses of Feed Element Mapper like mapping Meme's of Audio, Video.
Ok let me know what everyone thinks, if we decide on this method I'd be happy to get patches together and rally support.
Comment #11
bonobo commentedAgreed that FileField offers the best way forward -- there has been some really nice work coalescing around it as well, such as:
http://drupal.org/project/metaformatter
http://drupal.org/project/mimedetect
http://drupal.org/project/jquery_media
One sticking point centers around how to handle multiple images in a post, and how to handle things like embedded media within an aggregated post, and how to handle locally vs remotely stored media -- particularly when, with large files, making a copy of the file would have all kinds of complications -- and then, of course, there's the issue of wrapping all this functionality up and making it Just Work so it's invisible to the end user.
Scraping is definitely a starting point, and setting up some admin-configurable default behaviors based on mimetype, filesize, and url would also be useful (for example, only copy pngs smaller than 300K, and always embed files from youtube.com), but really, the processing of this information in order to be able to present something sensible to the Feed Element Mapper would require some careful planning. IMO, this is separate from the Feed Element Mapper, and while this can definitely be done there are some tricky variables here.
Has anyone gotten feedback from the FeedAPI or FileField gurus?
Comment #12
SeanBannister commentedMultiple images shouldn't be a problem as ImageField in Druapl 5 always handled multiple images so I'm sure it will in Drupal 6.
I've been trying to rally support for Embeded Media Field to have a unified field (http://drupal.org/node/172007). The current problem with Emfield is they have seperate Audio, Image, Video fields and my plan is to make this into one field. I'll be starting on this when the Drupal 6 release is made (hopefully next week). I'll certainly need some help if anyones up for it.
This will be great for embeding things like YouTube feeds, Flickr Feeds and other 3rd party feeds who let you hot link. One of things I'm not sure if it does (presume it wouldn't) is scan the content of a page and identify that it has a YouTube video embeded on it. I think this is something we could think about down the track but it sounds like a pain to develop.
I haven't talked to the gurus yet.
Comment #13
kyle_mathews commentedThis is definitely an issue that goes beyond Memetracker. I like the idea of scraping images and putting them into FileField. I'd planned on doing something similar but creating a general solution that everyone can use, not just memetracker is a much better idea.
Comment #14
rupen1978 commentedHi,
I am new to drupal. I was successfully able to get the memetracker installed.
However, I was wondering if there is a way I can add image manually to the feed under Admininster->Content Management->Content and get it to display on the Meme browser. I was able to see it in the content preview section when updating it, but it does not show in the meme browser.
Please help
thanks
Comment #15
kyle_mathews commentedNot yet, supporting the display of images will take additional non-trivial programming -- which is why I haven't added it yet.