Brion Vibber [Fri, 12 Nov 2010 22:03:57 +0000 (14:03 -0800)]
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
Brion Vibber [Fri, 12 Nov 2010 22:03:08 +0000 (14:03 -0800)]
Save oEmbed photo references as thumbnails if there's not a separate thumbnail_url entry in the return data. This fixes thumb saving for Flickr photo references.
Brion Vibber [Fri, 12 Nov 2010 21:06:41 +0000 (13:06 -0800)]
Fix for failure edge case in TwitterBridge outgoing repeat/retweets.
When the retweet failed with a 403 error (say due to it being a private tweet, which can't be retweeted) we would end up mishandling the return value from our internal error handling.
Instead of correctly discarding the message and closing out the queue item, we ended up trying to save a bogus twitter<->local ID mapping, which threw another exception and lead the queue system to re-run it.
- Fixed the logic check and return values for the retweet case in broadcast_twitter().
- Added doc comments explaining the return values on some functions in twitter.php
- Added check on Notice_to_status::saveNew() for empty input -- throw an exception before we try to actually insert into db. :)
Brion Vibber [Fri, 12 Nov 2010 20:24:55 +0000 (12:24 -0800)]
Add a quick config setting to disable/enable display of thumbnails in regular notice lists (attachments/show_thumbs) - disabling gives the same display as before this feature was added (but changes to oembed handling are still there, and the lightbox popup is gone)
Brion Vibber [Wed, 10 Nov 2010 00:28:33 +0000 (16:28 -0800)]
Cleanup on the CSS for inline attachments; removed some unneeded changes since the split of the inline and regular attachment lists. Removing commented-out code that seems to be for some old thumbnailing system where the thumbnails were hidden popups within the core text (wtf!)
Brion Vibber [Tue, 9 Nov 2010 01:36:02 +0000 (17:36 -0800)]
Add attachments 'thumb_width' and 'thumb_height' settings for inline thumbs, defaulting to 100x75.
This is used as the max thumb width/height for oEmbed requests (replacing the old default of 500x400 which was more suitable for the lightbox).
Brion Vibber [Tue, 9 Nov 2010 00:51:31 +0000 (16:51 -0800)]
Break out ImageFile->resizeTo() from ImageFile->resize(); allows resizing images to non-square sizes and to arbitrary destinations. Will be used for creating thumbnails as well as the originala use of cropping/sizing avatars.
Evan Prodromou [Mon, 8 Nov 2010 18:10:09 +0000 (13:10 -0500)]
Complete email summary sending system
Added the necessary classes to send email summaries. First, added a
script to run on a daily basis. Second, added a queue handler for
sending email summaries for users, and another to queue summaries for
all users on the site. Fixed up the email_summary_status table to
store the last-sent notice id, rather than a datetime (since we don't
support 'since' parameters anymore). Finally, made the plugin class
load the right modules when needed.
Brion Vibber [Thu, 4 Nov 2010 00:25:29 +0000 (17:25 -0700)]
Fix for ticket #2804: bad non-cache fallback code for dupe checks of prolific posters
The old code attempted to compare the value of the notice.created field against now() directly, which tends to explode in our current systems. now() comes up as the server/connection local timezone generally, while the created field is currently set as hardcoded UTC from the web servers. This would lead to breakage when we got a difference in seconds that's several hours off in either direction (depending on the local timezone). New code calculates a threshold by subtracting the number of seconds from the current UNIX timestamp and passing that in in correct format for a simple comparison. As a bonus, this should also be more efficient, as it should be able to follow the index on profile_id and created.
Brion Vibber [Wed, 3 Nov 2010 21:04:08 +0000 (14:04 -0700)]
UserFlagPlugin fix for ticket #2118 and ticket #2847: flagged state wasn't reflected in profile lists such as group members page and profile search .
Pulled common code for the profile page and profile list cases to give them the same logic on checking. Also fixes the problem that you'd get a flag button for yourself in profile lists, while we explicitly exclude that from the profile page -- it's now skipped in both places.
Brion Vibber [Wed, 3 Nov 2010 20:11:34 +0000 (13:11 -0700)]
Use Profile->getBestName() in PersonalGroupNav instead of manually picking nickname vs fullname. Logic should still work the same when no nickname is provided, but it doesn't make any sense -- probably needs cleanup. :)
Brion Vibber [Wed, 3 Nov 2010 20:10:42 +0000 (13:10 -0700)]
Migrate some more code from manually constructing "fullname (nickname)" to using Profile->getFancyName(). Encapsulates common logic and allows for localization of the parens.
Brion Vibber [Wed, 3 Nov 2010 19:59:19 +0000 (12:59 -0700)]
General cleanup & part of ticket #2864: use User_group->getFancyName() instead of replicating the logic in various places. Encapsulates and allows for localization of parens.
Brion Vibber [Wed, 3 Nov 2010 19:53:51 +0000 (12:53 -0700)]
Add getFancyName() to User_group to match the one on Profile: encapsulates the "fullname (nickname)" vs "nickname" logic and allows for localization of the parentheses in a common place.
Brion Vibber [Wed, 3 Nov 2010 19:32:11 +0000 (12:32 -0700)]
Fix for ticket #2168: if we've already flagged a profile from another window, let the 'Flag' form submission gracefully show the updated state instead of throwing an error (error message isn't even exposed properly in AJAX submissions)
Brion Vibber [Wed, 3 Nov 2010 19:20:25 +0000 (12:20 -0700)]
UserFlag fixes to prevent PHP notices breaking AJAX submissions when display_errors is on. Key & seq defs weren't quite right, which caused accesses to unset array indices in DB_DataObject.
Brion Vibber [Tue, 2 Nov 2010 20:05:16 +0000 (13:05 -0700)]
Tossing in a basic i18n message export to script code. Plugins can hook StartScriptMessage/EndScriptMessage, or directly add needed mappings in Action::getScriptMessages(). Exported entries are accessible as SN.msg(key) at runtime.
StatusNet core code now sets the tooltip text on .attachment.more links when they receive their attachment-expansion magic; this will override the hardcoded tooltip text saved from OStatus plugin when displaying timelines in the web UI.
Brion Vibber [Tue, 2 Nov 2010 18:39:38 +0000 (11:39 -0700)]
Starting on making Realtime plugin's UI messages localizable: pause/play, popup button text and tooltip text are now loaded from PHP code where we can get at gettext.