Closed (fixed)
Project:
Vimeo Link Formatter
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Apr 2011 at 14:11 UTC
Updated:
13 Apr 2012 at 23:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
drupalninja99 commented+1
Comment #2
drupalninja99 commentedHere's the actual logic for how to fetch it:
http://stackoverflow.com/questions/1361149/get-img-thumbnails-from-vimeo
I might try to create a patch or something to accomplish this
Comment #3
drupalninja99 commentedAlrighty I got this working. Took me a while to figure out d7 formatters. This patch adds the thumbnail formatter with a setting for the thumbnail size, small, medium or large. Works good.
Comment #4
drupalninja99 commentedChanging to needs review
Comment #5
drupalninja99 commentedOK I created a 2nd patch to change out file_get_contents which doesnt work with remote urls for drupal_http_request which uses curl. You need both patches for this to work. Anywho someone else can clean up this up, but it does work.
Comment #6
Jerome F commented@jaykali: very nice feature indeed, you did very good! The formatter is now available in manage display for the content types and in views. Well done!
Thanks to you I can now use thumbnails and colorbox trigger to display my videos in a popup.
side note for your patches names the syntax is:
[description]-[issue-number]-[comment-number].patch
vimeo_thumb-1142354-3.patch
vimeo_thumb_httprequest-1142354-5.patch
Comment #7
Jerome F commentedjust a small patch to clean up the code (using coder module)
This patch combines both previous patches and this small typo fix.
Comment #8
Bevan commentedI do not have time to test the code myself, but am happy to commit clean patches that have been thoroughly peer-tested at least once. This patch passes the peer-test but does not meet coding conventions, mostly with regard whitespace and inline comments, which should always be on their own line, be complete sentences (Capital letter and full stop); http://drupal.org/coding-standards
I wonder if there is an opportunity for code re-use in
vimeo_link_formatter_field_formatter_view_vimeo_link_formatter_thumbnail()which appears to be copied, pasted and edited?Otherwise it looks good.
Comment #9
thebuckst0p commentedThanks Jerome F, I added caching to the thumbnail data so the server doesn't have to do a remote call (relying on a 3rd party server to be up) on every page load. This patch goes on top of yours (#7), not merged. Seems to be working so far. I'm going to add linking to the formatter options as well, like the core image styles.
Comment #10
thebuckst0p commentedAdded "link to content" and "link to video," patch applies on top of yours in #7 and my previous #9.
I can verify that the patch in #7 works fine, I think caching is pretty important, if someone else wants to give that a 2nd look, (and someone else wants to fix whitespace issues), then it should be good to commit.
Comment #11
thebuckst0p commentedIt would help if I actually attached the file.
Comment #12
Bevan commentedPlease provide this as single git patch created from the project's git.drupal.org code repository, so that reviewers may apply the patch simply cloning the git repo and applying one patch: http://drupal.org/node/707484
Comment #13
thebuckst0p commentedSingle git patch re-rolled on the contrib repository. Combines the patches in 7, 9, 12.
Comment #14
Bevan commentedThe patch looks good and clean. Though I do not have time to give it the review it needs and deserves. If a few others test it out and report back I am happy to commit or make thebuckst0p a co-maintainer (if you are willing?)
Comment #15
thebuckst0p commentedI don't have time to be a co-maintainer, sorry. I appreciate the work you did on it and hope my patch helped a little.
Ben
Comment #16
JulienD commentedThanks guys for this new feature.
I tried the patch #13 and it's works great.
Comment #17
Bevan commentedI took a closer look at this when I went to commit and saw a few things to tidy up in the patch that I had not noticed before. The updated patch is attached, and is not at all tested. Almost there...
Comment #18
BenK commentedSubscribing
Comment #19
markabur commentedMissing a comma after '400', patch seems to work if I add that.
Comment #20
Bevan commentedComment #21
WorldFallz commentedpatch still applies cleanly, thumbs work great.
I'm happy to help out or be co-maintainer--- i have no intention of installing 3 modules (media, media_vimeo, and emfield) for such a simple function! let's see-- 173kb + 13kb + 9kb or 9kb, lol.
Comment #22
WorldFallz commentedhttp://drupalcode.org/project/vimeo_link_formatter.git/commit/11e31ba
Thanks for the patches!