plugin Archive

Enabling Twitter avatars within BuddyPress

Article
02Mar
17

First up, the first step in this process is to install the Twit Connect plugin which you can do by following these instructions, then you can proceed with enabling Twitter avatars.

First up, the first step in this process is to install the Twit Connect plugin which you can do by following these instructions, then you can proceed with enabling Twitter avatars.

This is just a quick filter that I wrote while I was setting up help.deanjrobinson.com last week after I discovered that the twitter avatars weren’t working because of a different function/filter being used by BuddyPress.

I make no claims that this additional function is perfect, but I haven’t come across any problems with it yet, and I only knocked it together quickly. If you find anything wrong with it, or have any suggestions as to how it could be improved/simplified please let me know.

This new function based on one of the original functions that comes with the Twit Connect plugin which enables twitter avatars on regular WordPress blogs, just a with a few tweaks.

What you need to do is add the following code to the functions.php in your current BuddyPress theme. You can download a plain text copy of this function here (it’ll probably more reliable than copy-and-pasting from this page). Remember to backup your functions.php file before making any changes… just in case.

UPDATE: Appears some people who added this function the functions.php file in the default BuddyPress theme were seeing some error messages (I have not yet been able to recreate this error, but more than one user has reported it). Ideally you shouldn’t be modifying the default BP theme directly, you should be doing it via a child theme (find out how), so this code should be then added to the functions.php in your child theme.

7th March, UPDATE I’ve updated the function below (and the downloadable version above) to use http://tweetimag.es for the static twitter avatar URLs, it looks like it might a more reliable/consistent service.

<?php

 function bp_twc_get_avatar($avatar, $id_or_email='') {
  global $comment, $twc_user_login_suffix;

  if(is_object($comment)) {
   $user_id = $comment->user_id;
  }

  if (is_object($id_or_email)) {
   $user_id = $id_or_email->user_id;
  }

  if (is_array($id_or_email)) {
   if ($id_or_email['object']=='user') {
    $user_id = $id_or_email['item_id'];
   }
  }

  if (get_usermeta($user_id, 'twcid')) {
   $user_info = get_userdata($user_id);
   $twav_suffix = '';

   if ( $id_or_email['width'] ) {
    $twav_size = $id_or_email['width'];
    if( $twav_size < 32 ) {
     $twav_suffix = 'm';
    } else if ( $twav_suffix < 64 ) {
     $twav_suffix = 'n';
    } else {
     $twav_suffix = 'b';
    }
   } else if ( 'full' == $id_or_email['type'] ) {
    $twav_size = BP_AVATAR_FULL_WIDTH;
    $twav_suffix = 'b';
   } else if ( 'thumb' == $id_or_email['type'] ) {
    $twav_size = BP_AVATAR_THUMB_WIDTH;
    $twav_suffix = 'n';
   }

   $out = 'http://img.tweetimag.es/i/'. str_replace($twc_user_login_suffix,"",$user_info->user_login) . '_' .$twav_suffix;

   $avatar = "<img alt='Twitter Avatar' src='{$out}' class='avatar avatar-{$twav_size}' height='{$twav_size}' width='{$twav_size}' />";
   return $avatar;

  } else {
   return $avatar;
  }

 }

 // Check if Twit Connect exists (since its without it this function is pointless)
 if( function_exists( 'twit_connect' ) ) {

  add_filter( 'bp_core_fetch_avatar', 'bp_twc_get_avatar',10,4);

 }

?>

Show me the original version

I will add an explanation of what its doing if people are interested/curious.

••••

Fluency Admin 2.2 now available

Sidenote
21Dec
2

WordPress 2.9 compatibility, fixes a few minor style bugs, adds options for custom menu width, menu positioning (fixed or absolute) and show/hide menu icons. More info here or download from the WordPress plugin directory here.

••••
Link
18Oct

Fluency Admin 2.1.1 update available now After 2.1 hit 5,000 downloadsin less than a month I decided I’d knock out a quick update. Its not a huge update, but it does fix a few plugin display issues for the following plugins: Acronyms, NextGen Gallery, One-Click Plugin Updater, HeadSpace2 and WP-Polls. Fixes broken styling of Media Library popup and also added an option to set custom logo to display at the top of the menu (replaces WordPress logo). Download it here. Find out more here.

••••

Fluency 2.1 now available

Article
20Sep
3

It’s been a while between updates, mostly due to the time spent working on getting Hahlo4 finished, but with that out of the way it was time to update Fluency to work with the latest version of WordPress. The big news is that Fluency is now hosted in the WordPress plugins directory, meaning that you will be able to use the built-in plugin installer, and auto update features in WordPress when new version are released.

Fluency 2.1 now available

It’s been a while between updates, mostly due to the time spent working on getting Hahlo4 finished, but with that out of the way it was time to update Fluency to work with the latest version of WordPress. The big news is that Fluency is now hosted in the WordPress plugins directory, meaning that you will be able to use the built-in plugin installer, and auto update features in WordPress when new version are released.

You can get more details, and grab Fluency 2.1 from the WordPress plugin directory here.

New features

There aren’t mountains of new features but there a couple worth mentioning. I’ve added a ‘Fluency Options’ page, which can be found under the ‘Settings’ menu, there are just two options for the moment. Both were requests from users, you can disable the Fluency style on the login page, and you can also specify a custom logo to be displayed on the login page (this works with the Fluency login style turned on or off)

For few versions now WordPress has come with two default admin color schemes, but up until now Fluency has only had a grey-based scheme. I’ve now added full support for a Classic/Blue color scheme, based on whichever color scheme you have selected in you user profile on your blog.

» Continue reading “Fluency 2.1 now available”

••••

Added Viddler video commenting

Sidenote
15Feb
3

Now when you disagree with what I’m saying you can record a video, at least until I get sick of it and remove the plugin again, which could be in a week or in a years time, we’ll just have to see how it works out.

••••

Fluency Admin 2 Released

Article
12Dec
18

There is no doubt that the brand spanking new admin interface in WordPress 2.7 is a huge leap forward, and so long as you don’t switch to the ‘blue’ version (seriously, worst, blue, ever) its actually pretty nice to look at and use. The navigation is now down the left-hand side, just as I preferred (which is why that’s where it was in Fluency 1.x), and because of this, styling and customising the menu in-particular has been a lot simpler that it was in previous versions of WP.

Fluency 2

There is no doubt that the brand spanking new admin interface in WordPress 2.7 is a huge leap forward, and so long as you don’t switch to the ‘blue’ version (seriously, worst, blue, ever) its actually pretty nice to look at and use. The navigation is now down the left-hand side, just as I preferred (which is why that’s where it was in Fluency 1.x), and because of this, styling and customising the menu in-particular has been a lot simpler that it was in previous versions of WP.

So whats new.

Well, technically, everything is. Fluency 2 was a ground up rewrite due to the fact that just about every part of both the design and underlying structure of the default admin has changed. This was definitely a good thing, as it allowed me to make sure I’m only including what really needs to be included. However I did make this a little hard for myself when I started work using the early trunk builds, which meant that every time I updated my build I had to update Fluency…again. I actually ended up building the Fluency 2 CSS from scratch twice, and what it looks like now isn’t at all what it looked like when I first began playing around.

Keep reading for further details, screenshots, and most importantly the download link.

» Continue reading “Fluency Admin 2 Released”

••••

Fluency Admin 2 Feature Requests

Sidenote
06Nov
7

As you are probably aware WordPress 2.7 is currently in beta, and is expected to be released pretty soon. The current version of Fluency Admin, will not work with WP2.7 and it is recommended that you disable it before you upgrade WordPress. Due to the complete overhaul that the WP Admin interface has received, Fluency needs to be re-written, I’ve already begun, but I thought I should ask you all if there is anything that you’d like to see it do, I’m open to any suggestions (especially those who may have already been playing around with WP2.7). The new admin, in general, is a huge improvement, so it won’t take as much messing around as it did with the previous version, this should leave me open to do some extra things…

••••

Fluency Admin 1.2.1

Article
23Aug
5

Please not that Fluency 1.x is only compatible with blogs running WordPress 2.6.5 or older. Please use Fluency 2 for blogs running WP 2.7+
As some of you noticed, I neglected to pay appropriate attention to the “press this” styles when I released v1.2, the page was still usable but things clearly weren’t how they should […]

Fluency Admin 1.2.1

Please not that Fluency 1.x is only compatible with blogs running WordPress 2.6.5 or older. Please use Fluency 2 for blogs running WP 2.7+

As some of you noticed, I neglected to pay appropriate attention to the “press this” styles when I released v1.2, the page was still usable but things clearly weren’t how they should have been. This update fixes that, I’ve added the necessary styles to Fluency to give “press this” the same feel as the rest of the admin.

I’ve also fixed up a couple of other things that were pointed out to me such as how the sidebar was overlapping the ‘activate theme’ lightbox when using Fluency together with Ozh’s Admin Drop Downs plugin, thanks to Ozh for posting a solution in the comments before I’d even had a chance to look at it. You might also notice that I’ve reinstated the border radius on some of the buttons. I originally removed these in v1.0 because of how bad the border radius looked in Firefox 2, but that has now been fixed in Firefox 3 so the border radius love can return.

The next big step for Fluency will be to get it working with the current WordPress trunk for 2.7, which includes yet another redesign/reorganisation of the admin. It will most likely mean start almost from scratch for the next version, but since the new admin for 2.7 is set out a LOT like Fluency by default (coincidence ???) it should be a fairly simple process. I’ll keep you all posted.

Enough talk, go and grab the update!

••••

Fluency Admin 1.2

Article
20Jul
10

Please not that Fluency 1.x is only compatible with blogs running WordPress 2.6.5 or older. Please use Fluency 2 for blogs running WP 2.7+
Ok, before you go and get all excited I should say that this is a pretty basic update, mainly just compatibility. As most of you probably know WordPress released version 2.6 a […]

Fluency Admin 1.2

Please not that Fluency 1.x is only compatible with blogs running WordPress 2.6.5 or older. Please use Fluency 2 for blogs running WP 2.7+

Ok, before you go and get all excited I should say that this is a pretty basic update, mainly just compatibility. As most of you probably know WordPress released version 2.6 a few days ago, and those who follow me on Twitter (and you better be using Hahlo …or there shall be trouble :p) would be aware that I have been working on making sure Fluency remains compatible.

The latest version of Ozh’s Admin Drop Downs works with this release (if you use Ozh’s plugin with Fluency 1.1 you probably noticed it went all crazypants after you updated…yeah you did didn’t you). I’ve also taken a little bit of time to fix a few little things that had been bugging me for a while, most are so minute you won’t even notice them.

And that’s about it, nothing much else except to tell you that the download link can be found at the top right of the page after the jump, and you can find out more details here.

UPDATE: I’ve just received an email tletting me know that the Press This bookmarklet doesn’t work so well with 1.2, I’ll take the blame for that, for reasons unknown I’d crossed it off my to-do list, but its definitely a bit wonky. I will try and get it fixed ASAP. Apologies.

••••

Plugin Status Update

Article
06Apr
3

Over the last year or so I’ve released several plugins for WordPress. Some of the were adaptations of existing plugins, some were built from the ground up, some have been updated and some…well…haven’t. The release of WP2.5 gives me a good opportunity to take a look at what plugins (other than Fluency as I think […]

Over the last year or so I’ve released several plugins for WordPress. Some of the were adaptations of existing plugins, some were built from the ground up, some have been updated and some…well…haven’t. The release of WP2.5 gives me a good opportunity to take a look at what plugins (other than Fluency as I think I’ve covered it enough on here in the last month or so) I have released, and what their future holds.

Ultimate Category Cloud

Current Version: 3.0
Development Status: 4.0 is in progress.
Next Release: Before the end of April.

While this is relatively simple plugin, it took me a while to get the basics working as I had originally intended them too. The first release was quite buggy to say the least, which was the main reason that v2 follow fairly soon after. I was happy enough with v2 not to update it any further, until WP2.3 came out and changed the way that categories were handled. I updated UCC to v3, bringing WP2.3 compatibility, along with some much need “cleansing” of my code, the removal of unneeded cruft, basically it was an overall refinement.

I’ve recently started work on v4.0 which will add (much needed) widget support which will make it even easier for users to add to their blogs, I’ve also sorted out a few oddities in the code which have been there since v2.

» Continue reading “Plugin Status Update”

deanjrobinson.com
twitter was not updated. | tumblr was not updated. | lastfm was not updated. |