widgets

Embedding FriendFeed For Your Lifestream

After the recent upgrade of my site at www.awakenedvoice.com to Drupal 6 I decided to make some improvements to the lifestream page that I had created using Simple Pie. Simple Pie is a great, free tool but there were some issues that I wanted to clean up but just didn't have the time to research, implement and test all the adjustments I wanted to make.
 

Favicons and Twitter

For example, I couldn't get the favicon images to show up for all of the services where I publish. So some entries had that nice little image next to them and some had nothing. I'm obsessive about stuff like that and wanted to change it. This issue wasn't necessarily the fault of the Simple Pie software, because the services in question did not have their favicon stored at the location ('mysite.com/favicon.ico') that is considered standard.

The second problem with Simple Pie was related to Twitter. There's a known issue that causes Twitter feed problems when Simple Pie tries to grab and display new items. As a result Twitter updates were showing up only sporadically on the lifestream page.

Module Options

Drupal offers a decent variety of module options to assist with creating a lifestream, including FriendFeed, Activity Stream, Feed API and the core aggregator module. All of them have their merits but required more work time than I wanted to invest in order to achieve my desired result of a lightweight, sharp looking stream of activities that wouldn't add too much overhead to the site. Since I'm a member of the FriendFeed service and had heard that their lifestream embed widget was customizable via CSS I decided to try and use that as the source of the stream.

The FriendFeed Solution

If you head over to http://friendfeed.com/embed/widget when you're logged in to that service you will see the options for creating a bit of javascript that you can eventually embed in a Drupal page or block to present to your users. If you uncheck all the options you will be left with a bit of javascipt that looks like the following.

<script type="text/javascript" src="http://friendfeed.com/embed/widget/username?v=2&amp;num=10&amp;hide_logo=1&amp;hide_comments_likes=1&amp;hide_subscribe=1"></script><noscript><a href="http://friendfeed.com/username"><img alt="View my FriendFeed" style="border:0;" src="http://friendfeed.com/embed/widget/robsafuto?v=2&amp;num=10&amp;hide_logo=1&amp;hide_comments_likes=1&amp;hide_subscribe=1&amp;format=png"/></a></noscript>
 
I bolded the two areas of note in the script because you can change them to suit your needs. Instead of username you would have your FriendFeed username inserted in that spot. And you can alter the number of items displayed by changing the num=10 value to something else. I set that value to 100 and stripped out the <noscript> part which will display an image instead of the javascript if someone's browser does not support javascript. In the end I was left with the following code.
 
<script type="text/javascript" src="http://friendfeed.com/embed/widget/robsafuto?v=2&amp;num=100&amp;hide_logo=1&amp;hide_comments_likes=1&amp;hide_subscribe=1"></script>
 
I then took that script and pasted it into a new page on my site, with an input format of Full HTML, and set the path of /lifestream. At this point there were two issues left to tackle. There was still a blue border around the items and the background did not match the text of my page. This is where I needed to add some custom css for which FriendFeed provides some guidelines.
 
In order to remove the blue border around the items and make the background color match the colors on my page I adjusted the border element to be zero pixels in size and set the background color to "transparent". I took the code snippet and added it to the bottom of the style.css file for my theme. That snippet is attached to this post. There are a number of lines in the snippet but I only changed the two that have "!important" added to the end of the line. Adding that bit tells FriendFeed to ignore those elements and let your elements take priority.

The Final Product
 

Click the image below or head over to http://awakenedvoice.com/lifestream to see the final product.

Bookmark and Share Bookmark or Share Post

Integrating Google Friend Connect

Unless you've been under a rock you know that Google recently opened up their Friend Connect service to the world. Friend Connect allows site builders to add a number of social features via widgets that Google calls gadgets. There are three main widgets currently available whose features I've summarized below.

  1. Members (pictured at right below) gives people the opportunity to join your site and displays pictures of users which link to the person's Google profile. This widget also allows people to "invite" other people to the site via email and a number of social bookmarking services.
  2. Wall adds comment functionality with the ability to link to Yo
  3. Review/Rate (pictured at left below) allows people to add star ratings along with comments to the site.

Friend Connect and Drupal

Friend Connect can easily be implemented on a Drupal site. All you have to do is cut and past ethe code provided by Google in order to add the functionality. See the video embedded below for a tutorial that shows me implementing FriendConnect on a WordPress site.

I don't think that the rating or wall features will be too helpful to Drupal site builders as that functionality is readily available via modules like Fivestar and Guestbook. If you're using Drupal as more of a blog without turning on the core sign-up and profile features then the members widget could be useful in building a soft community and adding to the viral nature of the site. I'm trying it out on the front page here.

Friend Connect Tutorial

Friend Connect Images  
Review and Rate Gadget Friend Connect Members Widget
Ratings Widget Members Widget


 

Bookmark and Share Bookmark or Share Post

Finding Widgets, Players, Etc. For Your Blocks

In my previous drop I pointed out the great features afforded by Drupal blocks. One of the great features I mentioned was the ability to add widgets (which are basically mini applications) from other sites in order to add nice functionality to your Drupal site. Rather than simply tease you with that notion I figured I would follow up with a list of places where I've found useful widgets to spruce up my Drupal sites.

Bookmark and Share Bookmark or Share Post
Syndicate content