SFC Chicklet

I saw this morning that Jesse Stay had created a rather neat little chicklet for his FBFoundations plugin. I thought it was a clever idea, so naturally I stole it and added it to Simple Facebook Connect as well.

Of course, just copying an idea is no fun. So I had to improve upon it a bit for my version. 🙂

I ended up not using any of Jesse’s code, but I did (mostly) keep the format of his chicklet output the same, so as to try to be compatible with it for styling rules and such.

Continue reading “SFC Chicklet”

Twitter

I signed up for twitter today, and installed a plugin for the blog that hooks into it. It’s kinda neat. The basic idea is that you can send “what you are doing right now” to it at any given moment, and the site posts it. Not complex, basically like a blog for one-liners. The WordPress plugin I installed lets you show the latest twitter messages you’ve sent to the service on the sidebar, or in a post, or what have you. Very nifty.

So if you look on the bottom right of this page, you’ll see the latest info on what I’m currently doing. The cool thing about it is that you can post what you’re doing to the site via email or IM or even text message. Quite entertaining, albeit somewhat useless, information. Still, fun for a while, and maybe I’ll figure out something useful to do with in the long run.

Picasa Web WordPress Widget

THIS PLUGIN DOES NOT WORK ANYMORE. I doubt I’ll be updating it any time soon.

Playing around with my new Picasa Web access, I found the RSS feeds quite nice. So I made a widget for them.

Picasa Web Widget

Basically it puts a slideshow of photo thumbnails from one or more Picasa Web RSS feeds into your sidebar. You can click them to go to the photo’s page on Picasa Web. Uses divs and names and all that good CSS stuff to make styling them easy, if you want.

Enjoy!

—-

Update: Version 1.1 actually works now. )

—-

Update: Version 1.2 now has four additional options. Now you can:
-Turn javascript image rotation on/off.
-Limit how many images will be rotated through.
-Display more than just the one image.
-Control whether or not the images are shown in a random order.

The image rotation script has also been corrected to work in both IE and Firefox (and probably others as well).

—-

Update: Version 1.3 adds Brian’s fix for filenames with unusual characters in them being in your web album.

—-

Update: Version 1.4
– Output will now validate as valid XHTML. Should work all the time. Important note: Use the class for CSS styling of anything, the ID is only there when you are only showing one image.
– Added the ability to display descriptions below the thumbnail. It even works with rotating images. )
– Fixed the case where you are showing multiple images in a non-random order.

—-

Update: Version 1.5 – Corrected a problem where it would only show the last feed when you give it multiple feeds.

—-

Update: Version 1.6 – Corrected some cases where the rotate images javascript would fail to work in certain scenarios.

30boxes Widget

Narendra Rocherolle asked me to convert the Google Calendar widget into a 30boxes capable widget. No problem, it only took like 10 minutes.

So if you use 30boxes and want a nice and simple WordPress Widget for displaying events on your calendar, well, here you go: 30boxes Widget

This is, of course, a first stab at it only. I can and probably will add more functionality to it (like start and end dates). But that can wait until later. Right now I need BBQ! D

Fun with Widgets

Note: The ExecPHP widget does not work in the upcoming WordPress 2.5. Therefore, if you upgrade to 2.5, you will need to install the updated version of this widget. It can be found here, now and forever more: http://wordpress.org/extend/plugins/php-code-widget/

A new plugin for WordPress came out that’s kinda cool. It’s called Widgets, and the general idea of it is to make the sidebars on your blog a bit more configurable, a bit more easily.

So, I decided to spend an hour or so converting my sidebars to Widgets so I could manage them a bit simpler. Editing PHP code is easy but time consuming, while dragging stuff and dropping it to rearrange the blog, well, that’s quick and easy.

Few things I learned:

  1. The Widgets Plugin does not like Windows. Since I run this site on a Windows box (edit: I did then, I don’t anymore, and anyway, they have fixed this problem since then), it needed some tweaking to make it work. For those who want to know, the problem is in the sidebar_admin_setup() function in widgets.php. More info on this problem is in the comments of this post.
  2. Text boxes are extremely useful when converting from your existing customized webpage to a widgets based one, as you can simply cut and paste chunks of HTML into them and voila, you’ve got a sidebar widget. However, there’s not a lot of text widgets available. If you need more text widgets, you will need to edit these functions: widget_text_setup(), widget_text_page(), and widget_text_register(). As it turned out, I didn’t need but 4 text widgets because:
  3. Despite how useful text boxes were for a quick migration, they were not enough.

So, I ended up writing two plugins of my own.

The first one is a Google AdSense plugin. You can download it here: gadsense.zip. It’s exactly the same as the Text widgets, but with (very) minor tweaks specifically for inserting Google Ads in the sidebars. Also, it shows a name of “Google AdSense” in the widgets panel, which is nice. Like the Text widget, you can have more than 1 of them, but unlike the Text widget, you can only have 4 of them, since Google’s TOS only allows 3 ads and 1 link block on a page.

The next one is also like the Text plugin, however it will also let you put PHP code into the text and have it actually work. Here’s the download: execphp.zip. Like the Text plugin, you can have up to 9 of them (more if you want to tweak the code). Note that any PHP code you put into the widget MUST be surrounded by <?php and ?> tags, just like writing PHP normally. Also note that this is isn’t exactly safe, as it’s just doing an eval() on whatever you put in there, so you have complete and full access, as does anybody else who can get to your admin screen. Still, it’s very useful.

Both of those are plugins. Just drop them in the widgets folder under the plugins folder, and activate them on the plugins screen. Then the widgets will be available for you to use on the widgets screen.

Hope these help somebody. They sure helped me. )

css.php