Commit Graph

11 Commits

Author SHA1 Message Date
Mikael Nordfeldth
d59eb5e184 Dynamically generate thumbnails (see full text)
The File object now stores width and height of files that can
supply this kind of information. Formats which we can not read
natively in PHP do not currently benefit from this. However an
event hook will be introduced later.

The CreateFileImageThumbnail event is renamed to:
CreateFileImageThumbnailSource to clarify that the hooks should not
generate their own thumbnails but only the source image. Also it now
accepts File objects, not MediaFile objects.

The thumbnail generation is documented in the source code. For
developers, call 'getThumbnail' on a File object and hope for the best.

Default thumbnail sizes have increased to be more appealing.
2014-04-21 20:46:11 +02:00
Jean Baptiste Favre
368906258a You need an API key when using embed.ly. Unfortunatly oembedhelper.php does not support it. This commit aims to fix it. 2013-06-15 18:35:41 +02:00
Zach Copley
c137d69aee Switch from oohembed to noembed for default oembed provider 2011-09-30 19:51:23 +00:00
Siebrand Mazeland
f9f437f5da Update translator documentation. 2011-04-08 01:22:00 +02:00
Evan Prodromou
4b5f76d688 more flexible oEmbed handling 2011-04-06 17:57:33 -04:00
Evan Prodromou
17515aacac drop previous in oembedhelperexception code 2010-12-20 18:32:43 -05:00
Evan Prodromou
f63355451d fixup exception constructor for php 5.2 2010-12-20 18:28:42 -05:00
Brion Vibber
87114a5c30 Add some basic oEmbed lookup test cases; fixed a bug in discovery fallback. 2010-11-15 11:55:28 -08:00
Brion Vibber
57ec01d0b8 Drop some debug lines 2010-11-15 11:30:35 -08:00
Brion Vibber
c8445299c7 Swap the Services_oEmbed wrapper in oEmbedHelper out for doing it ourselves...
- workaround for providers that are skimpy on their data, such as missing width/height or thumbnail_width/thumbnail_height
- workaround for YFrog listing "image" instead of "photo" type
- generally more lax about formatting: if it comes back and looks kinda ok, we'll take it.
- discovery uses system HTML parser, should be more robust if the links include things like ampersands with proper HTML-level escaping
2010-11-15 11:25:38 -08:00
Brion Vibber
4f323efdf7 Encapsulate the oEmbed -> oohembed fallback into oEmbedHelper class. Also added a chance to whitelist sites that don't show discovery info but do have oEmbed API endpoints, and to provide alternate APIs for some common services.
Newly supported:
- TwitPic: added a local function using TwitPic's API, since the oohembed implementation for TwitPic produced invalid output which Services_oEmbed rejects. (bug filed upstream)

Tweaked...
- Flickr: works, now using whitelist to use their endpoint directly instead of going through oohembed
- Youtube: worked around a bug in Services_oEmbed which broke the direct use of API discovery info, so we don't have to use oohembed.

Not currently working...
- YFrog: whitelisting their endpoint directly as the oohembed output is broken, but this doesn't appear to work currently as I think things are confused by YFrog's servers giving a '204 No Content' response on our HEAD checks on the original link.
2010-11-12 17:41:35 -08:00