Recent activity
Subscribe to this feed
Otto replied on October 06, 2009 19:15 to the problem "BackType Connect WP Plugin causes incorrect avatars." in BackType:
Ugh. You're right, and I have no idea why it does that.
Replacing
<?php echo prologue_get_avatar( $comment?>user_id, $comment->comment_author_email, 32 ); ?>
with
<?php echo get_avatar( $comment, 32 ); ?>
Will give the same results and without the problem you're having.
One possible way around it is to check the global $in_comment_loop variable. If it's true, comments are being currently displayed (via a wp_list_comments call). If it's false, they're not.
Otto replied on October 06, 2009 17:49 to the problem "BackType Connect WP Plugin causes incorrect avatars." in BackType:
Yes, but a "string" is not an "object" in PHP.
Basically, $id_or_email can be one of four things:
1. A user ID number (NOT a comment ID number, mind you).
2. An email address string.
3. A comment object
4. A user object (badly documented, but the code works for this).
The only one of those your code can do anything with is the comment object, and your _btc_is_btc_comment function works fine for filtering out user objects.
This code works fine for me:
function btc_get_avatar($avatar, $id_or_email, $size='96', $default='', $alt='') {
if (is_object($id_or_email) && _btc_is_btc_comment($id_or_email)) {
$alt = '';
switch ($id_or_email->comment_agent) {
case 'btc_'.BTC_SRC_TWITTER:
$default = 'http://btspiurl.appspot.com/' . $id_or_email->comment_author;
break;
case 'btc_'.BTC_SRC_FRIENDFEED:
$default = $id_or_email->comment_author_url . '/picture?size=medium';
break;
case 'btc_'.BTC_SRC_DIGG:
$default = $id_or_email->comment_author_url . '/l.png';
break;
case 'btc_'.BTC_SRC_REDDIT:
$default = WP_PLUGIN_URL . '/backtype-connect/images/reddit-icon-50.gif';
break;
case 'btc_'.BTC_SRC_YC:
$default = WP_PLUGIN_URL . '/backtype-connect/images/yc-icon-50.gif';
break;
}
return "[img alt='{$alt}' src='{$default}' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' /]";
}
return $avatar;
}
(Fix the image tags, obviously)
Otto replied on October 06, 2009 17:19 to the problem "BackType Connect WP Plugin causes incorrect avatars." in BackType:
The get_avatar function can take all different sorts of things, but the only one of those that is an "object" would be the comment or user objects.
One way to be sure: if (isset($id_or_email->comment_type) && 'comment' == $id_or_email->comment_type) then it's a valid comment object.
Sorry for the repost, getsatisfaction.com is behaving oddly.
Otto reported a problem in BackType on October 06, 2009 17:07:
BackType Connect WP Plugin causes incorrect avatars.The Backtype Connect WordPress plugin has a bug that causes normal calls to get_avatar to show the wrong avatar, when the last comment displayed is a BackType comment.
To see the problem:
1. Make a WordPress post.
2. Make sure the last comment on that post is a BackType connect comment.
3. Use a get_avatar('email@example.com') function call anywhere in the theme *after* the comments have displayed.
Expected result: avatar for email@example.com
Actual result: avatar from last comment, as per BackType Connect.
Why this happens: Error in the BackType Connect plugin, in the function named "btc_get_avatar".
The first three lines of the function are the following:
if (!is_object($id_or_email) && $comment_ID = get_comment_ID()) {
$id_or_email = get_comment($comment_ID);
}
This basically says if the $id_or_email is not an object (like a comment object), then it will get the latest comment and use that instead. This is a fundamentally wrong approach, what it should do in this case is to simply return the $avatar as is, with no changes. get_avatar can be used for more than comment objects, and since Backtype only concerns itself with comments, it should leave the avatar entirely alone when something other than a comment avatar is requested.
This should be really be fixed as soon as possible.-
Otto started following the idea "Enable full screen for home screen iPhone bookmarks of m.shizzow.com" in Shizzow.
Otto replied on October 05, 2009 15:07 to the problem "iPhone app behaving oddly" in Gowalla:
-
Otto started following the question "Gmail: filter mail without subject" in Google.
-
Otto started following the idea "Add BrightKite photo support" in Thing Labs.
-
Otto started following the idea "Add BrightKite photo support" in Thing Labs.
Otto shared an idea in Thing Labs on September 28, 2009 16:27:
Add BrightKite photo supportExample Tweet: http://twitter.com/Otto42/status/4446...
Note that it contains a link to a photo on BrightKite. It'd be nice if Brizzly understood and displayed that photo inline.
You could also add support for displaying a tiny map for the location, since that's sorta the whole point of BrightKite, really, but the photo display would be sufficient and probably pretty easy to support immediately.
Otto replied on September 25, 2009 16:50 to the problem "iPhone app behaving oddly" in Gowalla:
In the places I've been checking in, I'm always on Wi-Fi and I still see the issue.
However, when trying it about an hour ago, I was on 3G and see the same result.
This isn't intermittent, it started a few days ago, and now it happens every time. Don't think it's a timeout problem, as the close button dialogs pop up more or less immediately. Wish I could post a video of it, but I can get a screen capture if it'll help.
Also tried removing and reinstalling the app. No change.
Otto reported a problem in Gowalla on September 25, 2009 14:22:
iPhone app behaving oddlyWorked fine for a while, but lately it's doing weird stuff.
When I check in, a tiny dialog pops up that just has a close button in it. In rapid succession, it disappears and pops up 3 times. I can click close to get rid of the last two, but not the first one.
The app then seems to hang, with the big spinner spinning, but never returning from that.
Closing the app and restarting it shows that I did check in, but I can't get any more items from checkins because of this.
Otto shared an idea in BackType on September 23, 2009 18:46:
Support Google Sidewiki commentsThe new Google Sidewiki allows people to leave comments connected to specific webpage URLs. Their API is available to retrieve those comments for any given URL: http://code.google.com/apis/sidewiki/...
It'd be neat if Backtype Connected sites could automatically check those feeds on a regular basis and import Sidewiki comments automatically.
Otto reported a problem in Gowalla on September 18, 2009 18:51:
Bad name for spothttp://gowalla.com/spots/14160 has a mispelling in the title. It should be "and", not "amd".-
Otto started following the idea "Adding Friends when NOT on FB or Twitter." in Gowalla.
-
Otto started following the idea "Photos of Spots" in Gowalla.
Otto marked one of Ben Dodson's replies in Gowalla as useful. Ben Dodson replied to the idea "Publish to Fire Eagle or Brightkite". Otto and 2 other people think it's one of the best replies.
Otto replied on September 16, 2009 20:48 to the idea "Publish to Fire Eagle or Brightkite" in Gowalla:
Definitely would like a push of location data to Fire Eagle. Already using it with half a dozen different apps, it's very nice to have a centralized location storage.
http://fireeagle.yahoo.net/developer/...
Otto replied on September 16, 2009 20:44 to the question "Kilometers vs miles" in Gowalla:
Otto replied on September 16, 2009 20:43 to the problem "Can't create a Gowalla Passport because iPhone Crashes" in Gowalla:
| next » « previous |
Loading Profile...
