Commit Graph

52 Commits

Author SHA1 Message Date
Mikael Nordfeldth
1776c90cb9 Moved oEmbed stuff out to a plugin (Oembed). 2014-05-06 23:32:13 +02:00
Mikael Nordfeldth
b0c4e8fc3d Enable events for showing Attachment representation 2014-05-06 21:49:42 +02:00
Mikael Nordfeldth
37ce1f4766 Better fallback on UnsupportedMediaException 2014-04-28 12:12:06 +02:00
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
Mikael Nordfeldth
d3b4a8616d Original name preserved in uploaded file.
Avoiding collisions with date (shorter than before) and 4 character
random alphanumeric string. I bet someone could mass-upload files
and generate all combinations of aaaa-zzzz during the course of a
day, but then maybe that user should be disabled anyway :)
(filling the collision space will cause a never-ending loop).
2014-04-16 23:17:27 +02:00
Mikael Nordfeldth
90a593718f HTML5 video/audio support in attachments 2014-04-14 14:06:11 +02:00
Mikael Nordfeldth
da06350a72 Added some free codecs for media attachments 2014-04-14 13:52:03 +02:00
Mikael Nordfeldth
47fbe16562 stricter typing 2014-02-23 21:05:34 +01:00
Mikael Nordfeldth
2a4dc77a63 The overloaded DB_DataObject function staticGet is now called getKV
I used this hacky sed-command (run it from your GNU Social root, or change the first grep's path to where it actually lies) to do a rough fix on all ::staticGet calls and rename them to ::getKV

   sed -i -s -e '/DataObject::staticGet/I!s/::staticGet/::getKV/Ig' $(grep -R ::staticGet `pwd`/* | grep -v -e '^extlib' | grep -v DataObject:: |grep -v "function staticGet"|cut -d: -f1 |sort |uniq)

If you're applying this, remember to change the Managed_DataObject and Memcached_DataObject function definitions of staticGet to getKV!

This might of course take some getting used to, or modification fo StatusNet plugins, but the result is that all the static calls (to staticGet) are now properly made without breaking PHP Strict Standards. Standards are there to be followed (and they caused some very bad confusion when used with get_called_class)

Reasonably any plugin or code that tests for the definition of 'GNUSOCIAL' or similar will take this change into consideration.
2013-08-18 13:13:56 +02:00
Evan Prodromou
9cab0958f5 use Notice::attachments() to get attachments for a notice 2011-08-02 18:22:06 -04:00
Zach Copley
b7d0746694 Merge branch '0.9.x' into 1.0.x
Conflicts:
	actions/confirmaddress.php
	actions/emailsettings.php
	actions/hostmeta.php
	actions/imsettings.php
	actions/login.php
	actions/profilesettings.php
	actions/showgroup.php
	actions/smssettings.php
	actions/urlsettings.php
	actions/userauthorization.php
	actions/userdesignsettings.php
	classes/Memcached_DataObject.php
	index.php
	lib/accountsettingsaction.php
	lib/action.php
	lib/common.php
	lib/connectsettingsaction.php
	lib/designsettings.php
	lib/personalgroupnav.php
	lib/profileaction.php
	lib/userprofile.php
	plugins/ClientSideShorten/ClientSideShortenPlugin.php
	plugins/Facebook/FBConnectSettings.php
	plugins/Facebook/FacebookPlugin.php
	plugins/NewMenu/NewMenuPlugin.php
	plugins/NewMenu/newmenu.css
2011-02-28 15:39:43 -08:00
Brion Vibber
b896a37da0 Use cachedQuery on File::getAttachments, plus other cleanups:
* dropped unnecessary join on notice table
* made the function actually static, since it makes no sense as an instance variable. The only caller (in AttachmentList) is updated.
2011-01-31 12:22:50 -08:00
Evan Prodromou
5c25364141 remove extraneous <dl> and <dt> tags 2011-01-14 15:36:06 -05:00
Brion Vibber
fe7cb35551 restore empty showFallback() for attachment display; still needed for one-offs 2010-11-15 12:56:56 -08:00
Brion Vibber
2c33fdd2fb Only use saved thumbnails for notice list attachment thumbs -- don't attempt to search enclosures for photo types. We now save thumbs directly for oEmbed photos that don't list a separate thumb entry (like Flickr), so it's not needed. Keeps things cleaner :D 2010-11-12 14:03:57 -08:00
Brion Vibber
592e0bc505 add title attribute on attachment list items 2010-11-09 16:43:37 -08:00
Brion Vibber
f25accc43e split out InlineAttachmentList from AttachmentList 2010-11-09 10:45:19 -08:00
Brion Vibber
a2994e3aa2 Testing... using photo info for temp thumbnails 2010-11-08 15:50:06 -08:00
Brion Vibber
551b196a35 doomy doom doom 2010-11-08 15:32:41 -08:00
Siebrand Mazeland
b9177f5e2e * i18n/L10n and translator documentation updates.
* whitespace and indentation updates
2010-09-29 00:39:45 +02:00
Siebrand Mazeland
9b788471d4 Add translator documentation. 2010-04-10 22:50:15 +02:00
Brion Vibber
e174a7211d Restore lost addition of inline HTML attachment display. 2010-03-25 14:31:22 -07:00
Brion Vibber
c11064a539 Updated 'more' anchor for attachments to do an XHR GET
Conflicts:

	lib/attachmentlist.php
	plugins/OStatus/classes/Ostatus_profile.php

Merge tried to delete things that it seems it shouldn't, very confusing order. Hope rest of the cherry-picking isn't a problem.
2010-03-25 14:15:54 -07:00
Sarven Capadisli
3c5586d4bd Using rel=external instead of class=external for jOverlay title link 2010-03-25 21:33:38 +01:00
Brion Vibber
7aee7670c7 Replace the "give up and dump object" attachment view fallback with a client-side redirect to the target URL, which will at least be useful. 2010-03-22 10:35:54 -07:00
Evan Prodromou
df86aa7214 define LACONICA and accept LACONICA for backwards compatibility 2009-08-26 10:41:36 -04:00
Evan Prodromou
865b716f09 change LACONICA to STATUSNET 2009-08-25 18:42:34 -04:00
Evan Prodromou
ae883ceb9b change controlyourself.ca to status.net 2009-08-25 18:19:04 -04:00
Evan Prodromou
d35b2d3f3c change laconi.ca to status.net 2009-08-25 18:16:46 -04:00
Evan Prodromou
c8b8f07af1 change Laconica and Control Yourself to StatusNet in PHP files 2009-08-25 18:12:20 -04:00
Craig Andrews
ac75772150 Sanitize html returned by oEmbed providers to protect laconica from XSS attacks 2009-07-27 13:42:03 -04:00
Sarven Capadisli
fcb43dd711 Added class entry-content to attachment list container 2009-06-25 06:55:40 +00:00
Sarven Capadisli
835799ff16 Separated attachment view components 2009-06-25 00:49:54 +00:00
Sarven Capadisli
fa57e717e3 Moved the attachment representation outside of the anchor so that
onclick, it doesn't follow through on the href (e.g., it would play
the video in the overlay instead)
2009-06-25 00:25:22 +00:00
Sarven Capadisli
23d6d19e75 Better attachment view check 2009-06-18 19:03:44 +00:00
Sarven Capadisli
730c173238 Updated markup and CSS for attachment_view 2009-06-18 18:48:19 +00:00
Robin Millette
c442b400b9 Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into 0.8.x 2009-06-18 06:02:54 -04:00
Robin Millette
65b4cfbb54 Display more oembed info in attachment popup. 2009-06-18 06:02:12 -04:00
Evan Prodromou
4df1ea49ec Merge branch '0.8.x' into userdesign
Conflicts:
	actions/designsettings.php
2009-06-09 21:51:24 -07:00
Robin Millette
fe38827a76 Remove js that crept back in, added another error string. 2009-06-01 17:40:53 -04:00
Robin Millette
4bd195b80f Fixed small bug for attachment layout (css/js). 2009-06-01 19:40:39 +00:00
Robin Millette
683b835c3e Attachments popups for supported files are now embedded with the object xhtml tag. 2009-06-01 14:02:59 -04:00
Robin Millette
ebeb5f744c Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into upload
Conflicts:

	js/util.js
	lib/attachmentlist.php
2009-05-31 17:12:04 -04:00
Sarven Capadisli
60ac9bc6fd Bunch of UI fixes/improvements for attachments (hover, overlay, notice view,
clip)
2009-05-27 19:43:43 +00:00
Evan Prodromou
648d967226 Merge branch '0.8.x' into userdesign
Conflicts:
	lib/attachmentlist.php
	lib/noticelist.php
2009-05-26 23:24:01 -04:00
Robin Millette
af700ea277 Let's you upload a file with a notice and have it shown with other attachments. 2009-05-26 21:20:04 -04:00
Sarven Capadisli
01dad57298 Markup cleanup for attachments 2009-05-25 15:53:19 -04:00
Robin Millette
594454ced3 Single anchor to include thumbnail and title for attachment 2009-05-25 15:38:50 -04:00
Robin Millette
84edf12791 Display thumbnail on hover over links in notices when appropriate. 2009-05-25 11:13:13 -04:00
Robin Millette
b5ac6e31f2 Rearranged attachment info to only appear on each applicable notice page and thru an ajax popup. 2009-05-24 04:43:34 -04:00