WordPress Digg Widget

Sorry for the lateness. Went out, and it wasn’t working by the time I left.

Anyways, number 6 in Widget-A-Day is a Digg widget. It’ll display your latest dugg stories and the number of diggs the story has. It can be customized to include just about all the information the RSS feeds gives. Check out formatting for more information.

Update: If you downloaded this before 6 CST on May 31, the caching system wouldn’t work. Just redownload the file, and it’ll work or just remove AND FALSE on line 39.

Download digg.zip (digg.tar.gz)

Default display:
digg1cropped.png

Admin panel:
digg2cropped.png

Requirements

Installation

  1. Download digg.zip (gz)
  2. Extract and upload digg.php to the plugins/ directory
  3. Enable Digg Widget in the Plugin admin panel
  4. In widget admin panel, place digg in the sidebar, and edit it to enter your username

Features

  • Displays your latest dugg items from Digg
  • Completely customizable display
  • Caching for large traffic sites

Formatting

There are 3 parts needed to format the output.

The first part, called items start in the admin panel, is the first part of the widget after the title. For the default formatting, this is just <ul>.

The second part, called items end, is the ending of the widget. By default, this is:
</ul>
<a href="%profilelink%" style="float:right;">%username%</a>


The third part is what is called for each item. By default, this is:
<li style="list-style-type: none;"><a href="%link%">%title% (%diggs%)</a></li>

The premise of calling each value is this:

  1. start
  2. item
  3. item
  4. item
  5. end

The formatting for items is:

  • %title% – Title of the item
  • %link% – Link to the item
  • %desc% – Description of the item
  • %date% – Date the item was submitted (in GMT)
  • %category% – Category of the item
  • %diggs% – Number of diggs the item has
  • %comments% – Number of comments the item has
  • %user% – User name of the submitter
  • %userimage% – Link to the submitter’s icon
  • %number% – The number of the current item

The formatting for start and end is:

  • %username% – Your username
  • %profile% – Link to your profile
  • %rss% – Link to your profile’s RSS feed
  • %count% – Number of items shown

Download digg.zip (digg.tar.gz)

WordPress Weather Widget

Number 5 in Widget-A-Day is a Weather widget.

It isn’t too fanciful. It displays the current condition, temperature, and the feels like temperature. It uses weather.com‘s xoap api to retrieve the information. I’ll probably come back to this and make it better.

Download weather.zip

SVN Checkout
svn co http://svn.wp-plugins.org/weather-widget/trunk

Default display:
weather1cropped.png

Admin panel:
weather2cropped.png

Requirements

Installation

  1. Download weather.zip
  2. Extract and upload weather.php to the plugins/ directory
  3. Enable Weather Widget in the Plugin admin panel
  4. In widget admin panel, place Weather in the sidebar, and edit it to enter your location

Location

The location can either be a zip code for US users or the locid. To find the locid, you can do a search using http://xoap.weather.com/search/search?where=[search parameters].This will return an XML file with search results and their corresponding locid’s.

You can also find it out by the Weather.com website. After searching for and selecting you city, you will be sent to a url that will look something like, http://www.weather.com/outlook/driving/interstate/local/USTX0617?from=search_city, where USTX0617 is the locid.

Image Hosting

I’ve provided the images used and provided by weather.com here. If you want to host your own images, extract and upload the files, then, in the admin panel, edit the ‘Image Location’ field to point to your directory of images. Make sure to have the trailing slash.

If you don’t use your own images, you are free to use the ones that I’ve hosted, which are located at http://ja.meswilson.com/blog/weatherimages/

Editting display

You can edit ‘Widget Formatting’ to change how the info is displayed. To access the variables, use this formatting:

  • %loc% – Location
  • %temp% – Current temperature
  • %feels% – Feels like temperature
  • %icon% – The icon referring to the current weather. This is just a number
  • %iconhref% – The location of the image with your set image location at the front
  • %attribution% – The link supposedly required to be displayed. Weather data provided by weather.com®

The default formatting is:

<img src="%iconhref%" alt="%cond%" style="float:right;" />
%loc%<br />
<span style="font-size: 150%;">%temp% °F</span>
(%feels% °F)<br />
<span style="font-size: 65%; float: right;">%attribution%</a>

Download weather.zip

WordPress Countdown Widget

Today is my birthday. Woo! So that means, I’m not doing anything fancy, so without further ado

Number 4 in Widget-A-Day is a countdown widget.

It’ll display the amount of time until a certain event, or if it passed, how long ago it was. Lame? Yes. Do I care? Not really. Is there Javascript? No. Was there supposed to be? Yes. Why not? Because I’m lazy.

Update: By request, added a new version

Download countdown.zip (countdown.tar.gz)

Default display:
countdown1cropped.png

Admin panel:
countdown2cropped.png

Requirements

Installation

  1. Download countdown.zip (gz)
  2. Extract and upload countdown.php to the plugins/ directory
  3. Enable Countdown Widget in the Plugin admin panel
  4. In widget admin panel, place Countdown in the sidebar, and edit it to enter your the time and name

Download countdown.zip (countdown.tar.gz)

WordPress Google Reader Widget

Number 3 in Widget-A-Day is a Google Reader widget.

This widget will display your latest shared stories. You can change the amount of stories to display and how to display them.

Download googlereader.zip

Default display:
googreader1cropped.png

Admin panel:
googreader2cropped.png

Download googlereader.zip

SVN Checkout
svn co http://svn.wp-plugins.org/google-reader-widget/trunk

Requirements

Installation

  1. Download googlereader.zip
  2. Extract and upload googlereader.php to the plugins/ directory
  3. Enable Google Reader in the Plugin admin panel
  4. In widget admin panel, place Google Reader in the sidebar, and edit it to enter your user id

Features

  • Displays your latest shared items from Google Reader
  • Completely customizable display
  • Caching for large traffic sites

User ID

In order to get your shares, you need to know your user id according to Google Reader. This can be found by going to the ‘Shared Items’ link, and copying the 20 digit number at the end of your shared items link.

So something like:
http://www.google.com/reader/shared/02774557510273097991
Where 02774557510273097991 would be my user id.

Formatting

There are 3 parts needed to format the output.

The first part, called items start in the admin panel, is the first part of the widget after the title. For the default formatting, this is just <ul>.

The second part, called items end, is the ending of the widget. By default, this is:
</ul>
<a href="%googlereader%" style="float:right;">Shared Items</a>

The third part is what is called for each item. By default, this is:
<li style="list-style-type: none;"><a href="%link%">%title%</a></li>

The premise of calling each value is this:

  1. start
  2. item
  3. item
  4. item
  5. end

The formatting for items is:

  • %link% – Link to the item
  • %title% – Title of the item
  • %site% – The title of the site the item is from
  • %sitelink% – The link to the site the item is from
  • %number% – The number of the current item
  • %comment% – The comment (note) made when sharing an item

The formatting for start and end is:

  • %googlereader% – Link to your Google Reader shared page
  • %count% – Number of items shown

Download googlereader.zip

WordPress Last.fm Widget Widget

Number 2 in Widget-A-Day is a widget for the last.fm widgets.

It can show the chart of your recent tracks, top tracks, and top artists (weekly tracks and artists don’t work currently since the value varies throughout). You can also choose between red, blue, black, and green.

Download lastfm.zip (lastfm.tar.gz)

Here is the default view:
lastfm1cropped.png

Here is the admin panel:
lastfm2cropped.png

Requirements

Installation

  1. Download lastfm.zip (gz)
  2. Extract and upload lastfm.php to the plugins/ directory
  3. Enable Last.fm Widget – New Style in the Plugin admin panel
  4. In widget admin panel, place Last.fm in the sidebar, and edit it to enter your username

Download lastfm.zip (lastfm.tar.gz)

Compete WordPress Widget

Compete released it’s API today, so I decided to make a widget for WordPress using it.

Download compete.zip

SVN Checkout
svn co http://svn.wp-plugins.org/compete-widget/trunk

This adds a link, your current rank, the amount of visitors, and your rank image to the sidebar.

By default, it looks like:
wpcompetecropped1.png

In the widget admin panel, you can completely edit the title, your api key, your host (by default, it’s the current host), the amount of time before the cache expires, and the ability to completely edit the display (see below)

wpcompetewidcropped1.png

Requirements

Installation

  1. Download compete.zip
  2. Extract and upload compete.php to the plugins/ directory
  3. Enable Compete Rankings in the Plugin admin panel
  4. In widget admin panel, place Compete in the sidebar, and edit it to enter your API Key

Features

  • Displays data about your site or any site you choose
  • Edit nearly all aspects of it via widget admin
  • Caching for large traffic sites

Editting display

You can edit ‘Widget Formatting’ to change how the info is displayed. To access the variables, use this formatting:

  • %rank% – Rank of the site
  • %icon% – The icon relating to your traffic rank (large or small depending on options)
  • %count% – People count
  • %host% – Hostname used in lookup
  • %link% – Link to the compete page for the host
  • %compete% – The compete link – Compete.com

The default formatting is:

<span style="float:right;"><img src="%icon%" alt="%rank%" /></span>
<a href="%link%">%host%</a><br />

Ranking: %rank%<br />
People: %count%<br />
%compete%

Download compete.zip

WordPress Widget-A-Day

I’ve been wanting to do a ‘Something-A-Some-amount-of-time’, and since I just made a WordPress Widget, which is pretty easy, and with WordPress 2.2, widget support is available by default, I decided to do a ‘WordPress Widget-A-Day’.

Over the next week, though I’ll probably start today, so I guess it’ll have 4 extra or maybe just 1 depending on my motivation, I’ll make and release a widget for WordPress everyday. These might not be fancy, they might not even be original, though I’m going to try to not make ones that already exist with the same functionality, but they’ll be widgets.

If you have any ideas or suggestions, comment or contact me.

View posts about Widget-A-Day or subscribe to the Widget-A-Day feed

Hopefully, I won’t fail at this.

All of Google’s Toolbar Functionality, Without the Toolbar

I don’t like Google’s Toolbar, or really toolbars in general. Maybe it’s because it brings back memories of horrible IE interfaces with way too many, or that the logos are just bright and don’t fit in at all, or maybe it’s just that I like to see as much page as possible. But for whatever the reason, it’s got to go.

But I run into a problem, I like some of the features, mainly Web History and showing the current PageRank. Finding out about unread gmail messages. And even though I still mainly use regular old bookmarking, I guess the ability to bookmark the page might be useful. Thankfully, there are alternatives to them all.

First, Web History and PageRank can easily be fixed by the Search Status plugin. This shows the PageRank and Alexa rank for the current page/site. What’s good about this, Google records the Web History by using the PageRank lookup, meaning that we don’t need anything else for us to use the Web History app.

Download Search Status

Next, getting unread count of Gmail messages. There are a few plugins that do this, but the best one, imo, is Gmail Manager. This allows you to check multiple accounts (better than the toolbar), set the refresh rate, and won’t take up valuable toolbar space, since it sits at the bottom of the browser.

Download Gmail Manager

Finally, the bookmarking. There are quite a few extensions out there, but I didn’t like any of them, so I wrote my own Greasemonkey script. You’ll still need something to view the bookmarks, but bookmarking a page is as simple as a key press. Hit the Pause/Break button and the current page will be saved to Google Bookmarks. Nothing else. You need Greasemonkey to use this.

Download Google Bookmarks via Key Press User Script

And now I don’t need the Google Toolbar anymore. Yay!

Last.fm now has flash widgets

Neat. Looks like last.fm just added flash widgets, or at least, I think they just did. I might have been slow in finding them.

Anyways, instead of having just an image based on your chart, it’s now a fancy flash “widget”. I guess images aren’t Web 2.0 enough. Which means, instead of about 120 bytes of code, you can now use 3.1 kilobytes to show even less info.

Compare:

122 B:

3.1 KB:

Yeah, you can see album covers, and the width is smaller, but it only shows 5 songs, while the previous show 10, or customizable down to 5. You can also use the first one in forums or most anywhere, but the latter, only sites that allow you to use html. Also, instead of having all customizable backgrounds and such, you only have a choice of four colors, black, red, grey, and light blue.

Another annoyance, it will stick to the top of whatever text you have below it no matter what. Add as many <br /> as you want, it’ll still sit right above the text.

Now, to be fair, I’ve added the recently played chart to my sidebar, and they do still have the image script available, and I hope they keep it around, but I’m not so sure that they will.

Anyways, here are the new embeds

Continue reading “Last.fm now has flash widgets”

Fun with Digg’s API

Digg’s api was released about a week ago a while ago, and since that time, various flash projects have surfaced, probably due to that pesky contest. But I don’t have any flash experience, so PHP, here we come.

We’re going to make various tag clouds, a Reddit clone, Reddit/Better RSS feed, and a live diggs app.

Update – 05/09/07 – 3 PM – Stupid host seems to be having database issues. Great. I wish I could afford a dedicated, or I guess VPS, so I don’t have to put with this crap.

Update – 05/09/07 – 6 PM – It seems that it was a combination of their db sucking and the fact they got rid of some essential pear packages. WTF?

Update – 05/12/07 – 11 AM – Yup. They cut off my MySQL abilities. I can’t connect to any of my databases on xrho.com. This site is fine however. I guess inserting 100+ entries a minute might have annoyed them?

Update – 05/17/07 – 7 PM – The MySQL abilities are still cut off. Fucking netfirms. Also, it seems in one of my updates, it cut off the bottom, which also happened to include the download links. You can download a ZIP or Gzip of the files. Since I’m having problems with that, feel free to download them and run them on your own site. Let me know if you do so I can add the link.

Demos of most of the scripts are available here, and more specifically:

Due to the length of this post, I’m splitting it. I hate making people click through, but it’s long enough to constitute it.
Continue reading “Fun with Digg’s API”