By Collin Allen

fmTuner: A Last.fm Plugin for WordPress

September 7, 2008

fmTuner is a WordPress plugin for retrieving song details from your Last.fm profile and publishing them anywhere in your WordPress theme. It provides options for choosing among your Recent, Loved, or Top tracks, as well as tools to adjust the update frequency and appearance.

Of particular note is the customizable Display Format option. Using simple tags like [::artist::] and [::image::] intermixed with regular HTML, you can tweak your Last.fm tracks exactly how you like, or however your WordPress theme requires. You have full control!

Download

Download the latest fmTuner from WordPress.org

Requirements

  • WordPress 2.7 or newer.
  • PHP 5 or newer
  • Basic knowledge of PHP, HTML, and WordPress.

Installation

  • Upload fmtuner.php to a directory inside /wp-content/plugins/ directory. For example: /wp-content/plugins/fmtuner/fmtuner.php
  • Ensure /wp-content/plugins/fmtuner/ is writable by your webserver.
  • Activate the plugin through the “Plugins” menu in WordPress.
  • Set up options in the “Settings” menu in WordPress.
  • Place the PHP code if(function_exists('fmtuner')) { fmtuner(); } in your templates, to call up fmTuner.

Release History

  • fmTuner 1.1 Released on Feb. 1, 2010 Added a placeholder image field to the fmTuner Settings page, which will be substituted when tracks have no artwork. Tested under WordPress 2.9.1.
  • fmTuner 1.0.8 Released on Nov. 3, 2009 Fixed a bug with the [::url::] fmTuner tag that caused Last.fm links to appear incorrectly.
  • fmTuner 1.0.7 Released on Apr. 23, 2009 Tracks with foreign character sets now display more accurately.
  • fmTuner 1.0.6 Released on Mar. 29, 2009 You can now display more than 10 Recent Tracks, and you should get fewer tracks without artwork.
  • fmTuner 1.0.5 Released on Mar. 22, 2009 Track information is now properly escaped to handle $ signs, quotes, and other non-alphanumeric characters.
  • fmTuner 1.0.4 Released on Dec. 14, 2008 Made minor tweaks for fmTuner Settings page under WordPress 2.7.
  • fmTuner 1.0.3 Released on Nov. 15, 2008 By request, a [::number::] fmTuner tag has been added, which emits a sequential number for each track (starting at 1). This is particularly useful for CSS and JavaScript display purposes.
  • fmTuner 1.0.2 Released on Oct. 5, 2008 Added a cURL-based alternative to file_get_contents to hopefully resolve “URL file-access is disabled” issues. If allow_url_fopen is disabled in the php.ini, cURL will be used to fetch the Last.fm feed instead.
  • fmTuner 1.0.1 Released on Sept. 9, 2008 Added better failure checking and informational messages, removed development code, and updated instructions.
  • fmTuner 1.0 Released on Sept. 6, 2008 Initial release.

How to Run Hamachi on Leopard

August 30, 2008

A while back I detailed how to get Hamachi VPN running on Mac OS X, but times have changed, so here’s how to go about it under Leopard. Again, it’s a bit tricky, involving some Terminal work, but it’s pretty straightforward as far as command-line software goes.

Download and Install Tun/Tap

Hamachi for Mac OS X depends on some other tunneling software, a Tun/Tap kernel extension which does the low-level work. Download the latest Tun/Tap package and install it.

Download and Install Hamachi

Next, download the latest Hamachi for Mac OS X. Installation is a bit more complicated than the Tun/Tap drivers. Unzip the archive, and open up a Terminal window, and type cd, followed by a space. Don’t press Return just yet… Instead, drop the Hamachi folder right into the Terminal window, which will insert the path to that folder after the prefix you just typed: cd /Users/you/Downloads/hamachi-0.9.9.9-20-osx. Press Return, and the Terminal’s new working directory will be the Hamachi folder – this is just a quick drag-and-drop shortcut to avoid typing out the path to a folder you already have available.

Once in the Hamachi folder, type sudo ./install. Enter your administrator password to perform the install.

Hamachi should now be installed, and you can initialize it for the first time by typing hamachi-init. This will generate public and private encryption keys in your Home folder, under .hamachi/ (the initial dot makes the folder hidden in regular Finder windows). With both set-ups out of the way, it’s time to start using Hamachi!

Run Hamachi

Configure Tun/Tap by typing sudo ./usr/sbin/tuncfg

Start up Hamachi by typing hamachi start followed by hamachi login.

At this point, you should be connected to the Hamachi service, but without a VPN for your computers to join. If you already have a network, or plan to join a trusted friend’s network, you can easily join it by typing: hamachi join SomeNetwork.

Most likely, though, you’ll need to create your own network: hamachi create MyNetwork

Now you should have a virtual network in place and can go online hamachi go-online MyNetwork.

To see other parties on the network, run hamachi list

If other computers are online, you’re ready to connect to them with any higher-level software like iChat via Bonjour, the Finder’s “Connect to Server” command, Safari, etc.

To log out of Hamachi and shut down VPN connections, run hamachi stop

For more information about how to use Hamachi, you can view its manual by running hamachi -h.

Coda 1.5

August 27, 2008

The developers at Panic have been very busy for the last several months preparing a major update for their one-window web development app (covered earlier), Coda, and have finally delivered. Coda 1.5 brings tons of new features like multi-file search, customizable books, “reverse publish”, and more, but the one that really takes the cake is full Subversion support. None of that bolted-on nonsense, either – Panic went out of their way to carefully weave Subversion into the interface, presenting commands as needed. The update is also free for registered owners.

If Coda is your primary tool for web development, and you already use Subversion, you’re most likely aware of Versions and Cornerstone, but now you can toss both of those apps and have your source code management built right into your leafy-green development environment. And, after reading how to go about setting up Subversion on MediaTemple, your Mac web development paradise should be complete, ready to start developing all those killer web apps you’ve been pondering. Check out Coda and get coding!

iPhoto Billing Information Error

August 26, 2008

While trying to order some prints from Kodak/Apple via iPhoto yesterday, I repeatedly got the error message “Please review your billing information and approve it.” After checking out my billing information twice, and still getting that error, I found the answer on an Apple Discussions thread: Make sure your credit card verification code is entered in the Account Information screen. Why iPhoto doesn’t highlight or complain about the missing required field is beyond me, but overlooking this tiny field causes problems that hardly indicate their source.

MacBook Pro Insomnia

August 3, 2008

For the past several weeks, my MacBook Pro had been occasionally waking up during periods where it was expected to be in sleep mode. Even with the lid closed, it would briefly wake up, illuminate the screen and Apple logo, then fall back asleep moments later. Seemingly random, it would sometimes happen only once every other day, and other times it would happen sequentially with only seconds in between cycles. I had no idea if the issue was hardware or software, but it didn’t seem major enough to warrant an AppleCare call.

A quick trip to the Console application in the Applications > Utilities folder reported dozens of instances of “USB caused wake event (EHCI)”, which gave me some initial Google hits. The obvious answer is that a USB device was waking up the computer, however I rarely had USB hardware plugged in when the random awakenings were occurring.

As it turns out, others have had this problem before. As indicated in the previous links, Mac OS X keeps its power schedule inside /Library/Preferences/SystemConfiguration/com.apple.AutoWake.plist, but this file didn’t exist for me, apparently “confusing” Mac OS X. Without it, it would exhibit the symptoms I was encountering.

Following suggestions, I opened System Preferences, Energy Saver, Schedule, where you can schedule system sleeps and wakes. By toggling on a scheduled wake, clicking OK, then disabling it, the com.apple.AutoWake.plist was re-created, and left with no scheduled sleeps or wakes. So far, this has cured my MacBook Pro’s insomnia!

Mastodon