Commit Graph

22 Commits

Author SHA1 Message Date
Mikael Nordfeldth
3658774429 Super-basic OpenGraph image preview support, "works for me" 2016-01-12 15:29:03 +01:00
Mikael Nordfeldth
d4be5349b3 think I have managed to show oEmbed images better now 2016-01-07 17:35:37 +01:00
Mikael Nordfeldth
6772d991ae Only provide Notice oEmbed data for local notices 2015-12-31 01:55:18 +01:00
Mikael Nordfeldth
334a0d56e7 Oembed slimmed to only do discovery (soon we get og: discovery too) 2015-11-30 02:06:04 +01:00
Stephen Paul Weber
a9b1b60a97 Refactor on File::processNew
The code was so involved there was even a comment asking for a refactor.

Now, File_redirection::where always returns a nice File_redirection
object instead of an array or string or nothing.  The object is
either one which already existed or else a new, unsaved object.

Instead of duplicating "does it exist" checks everywhere, do it in
File_redirection::where.  You either get what exists or something to save.

An unsaved File_redirection may be paired with an unsaved File.
You will want to save the File first (using ->saveFile()) and put the
id in File_redirection#file_id before saving.
2015-11-02 05:15:08 +00:00
Mikael Nordfeldth
d52b7e3124 Oembed fiddling, nothing major 2015-10-01 22:18:33 +02:00
Mikael Nordfeldth
f094918cf6 Revert "Inverse logic error in OembedPlugin"
This reverts commit 9ab996d9e6.
2015-04-05 15:44:04 +02:00
Mikael Nordfeldth
4fc4f91b9e Allow oEmbed data from all sites by default 2015-04-03 21:00:19 +02:00
Mikael Nordfeldth
9ab996d9e6 Inverse logic error in OembedPlugin 2015-04-03 20:59:56 +02:00
Mikael Nordfeldth
8fac7a9f6c StatusNet class renamed GNUsocial
also added backward compatible StatusNet class for the two calls I know
third party plugins use, isHTTPS and getActivePlugins
2015-02-27 12:44:15 +01:00
Mikael Nordfeldth
000b7675d8 Vimeo oEmbed thumbnail host added to whitelist 2015-02-02 11:14:13 +01:00
Mikael Nordfeldth
470971cf47 File_thumbnail uses file_id as PRI 2015-01-25 13:13:01 +01:00
Mikael Nordfeldth
12058c30b4 Managed_DataObject->updateWithKeys throws its own exception 2015-01-25 12:54:08 +01:00
Mikael Nordfeldth
0e0783ee8c Regexp for Oembed domain matching 2015-01-25 11:18:57 +01:00
Mikael Nordfeldth
85e644d647 Remote thumbnail fetching from trusted sources
So far we only trust i.ytimg.com for YouTube thumbnails, but you can
configure the Oembed plugin in config.php by setting the plugin's class vars:

   addPlugin('Oembed', array('param'=>'value', ...));

Some might think this is a security risk or privacy invasive, but as the Oembed
script is already calling remote sites to get information _about_ linked media,
the way to stop it is to disable the Oembed plugin. However it is not certain
it has been migrated out into a plugin properly yet. But try it if you want to.
2015-01-25 02:34:40 +01:00
Mikael Nordfeldth
092dfee1c6 spring cleaning in Oembed helper list
Fixed http -> https and removed some dead services
2015-01-17 12:06:08 +01:00
Mikael Nordfeldth
414a95a784 Initial move towards microformats2
No validation has been attempted yet. Lots of changes left. This
is visibly not (very) different from the previous CSS layout. But
some simplifications have been made.

Might cause issues with local changes to themes and CSS. Also maybe
javascript which depends on certain legacy microformats elements.

The move to microformats2 is motivated by the announcement that all
microformats should be migrated to version 2, as of 2014-06-20 at:
http://microformats.org/2014/06/20/microformats-org-turns-9-upgrade-to-microformats2
2014-06-22 17:11:04 +02:00
Mikael Nordfeldth
d7c40e77b2 Show more links work with AJAX-retrieved HTML
Attachment_ajaxAction has been removed since AttachmentAction handles
AJAX calls splendidly.
2014-05-19 00:56:21 +02:00
Mikael Nordfeldth
c93a5252c1 Don't show or preview text/html attachments
htmLawed cleans stuff out properly, but there's no very good way right
now to show text/html attachments, since everything gets jumbled up with
our own CSS etc. Best would be an iframe or just a new tab or so.
2014-05-18 23:11:49 +02:00
Mikael Nordfeldth
04b7194511 Notice->getUrl() for shares would throw exception in some feeds 2014-05-10 13:06:18 +02:00
Mikael Nordfeldth
d1755e4363 Bad variable reference in OembedPlugin 2014-05-06 23:43:02 +02:00
Mikael Nordfeldth
1776c90cb9 Moved oEmbed stuff out to a plugin (Oembed). 2014-05-06 23:32:13 +02:00