Archive for category Software

Keyboard navigation plugin for WordPress

I prefer to use the keyboard for navigating content whenever possible, rather than the more awkward movement of a mouse… and my carpal tunnels thank me for that preference. I’ve seen keyboard navigation of posts implemented on FFFFOUND! and thought it was really nice. So I decided to make a WordPress plugin to allow others that functionality easily.

Scrolling through posts by keyboard may not be useful to everyone, but it makes a lot of sense for anyone with a photoblog. Users can quickly flip through your content without enlessly flicking a scroll wheel or clicking and dragging until they grab their wrists in pain.

Features:

  • Press the “J” key to see the next post, and the “K” key takes you to the previous post.

Planned features:

  • Add “next” and “previous” keys for page-by-page navigation.
  • Add an options page which allows the navigation keys to be customized.
  • Automatically load the “next” or “previous” page when you hit the end.
  • Detect the scrollable element in a site’s design. (Current version only scrolls the body.)

Download
The current version can be downloaded at WordPress.org.

Changelog

  • 0.6
    • Updated the algorithm to work with fractional scrollTop property in Firefox
  • 0.5
    • Added scroll event listener to make the navigation sensitive to your current scroll position
  • 0.4
    • Continues to next/previous page when you navigate past the last (or first) post
  • 0.3
    • Javascript has moved to a separate file and is now added through via wp_enqueue_script
    • jQuery has been implemented for all DOM functions
    • ScrollTop is now at the top of the screen, as expected
    • Tested on Internet Explorer 7, Firefox 3.5, Safari 4, and Chrome 3
  • 0.2
    • Key navigation is no longer added on single posts
    • Keypress events are ignored inside of TEXTAREA and INPUT elements
  • 0.1
    • Initial version

Tags: ,

Freedom of Information!

Freedom of Information, my second WordPress plugin, is just for fun. It filters the content of your post and “redacts” terminology that certain nefarious conspirators wouldn’t want getting out.

Example:

This is a government test of a new top secret plugin for ufo homeland security. I wonder what will happen to George Bush and Karl Rove when I type their names. Do you think John F. Kennedy was involved with the Secret Service’s plot to give H1N1 Swine Flu and Mad Cow Disease to the citizens? I wonder who knows about President Obama’s secret plan to bring socialism to the United States?

Current version is 0.1, and you can download it here: freedom-of-information

Tags: ,

Add Linked Images To Gallery

screenshot-1Add Linked Images To Gallery
Makes local copies of all the linked images in a post, adding them as gallery attachments on the post itself.

I have a photoblog, for my iPhone. I take a lot of pictures, and I want them to post quickly and easily. And I’m lazy. I want to send the photo to Flickr, and let Flickr update my blog. But I also want my main pages to reflect the latest additions. And what’s more, I want customized images on the front page, and I need to use the gallery to get those.

This WordPress plugin creates local copies of all external linked images in the SRC attribute of IMG tags. It extracts a list of IMG tags in the post, saves copies of those images locally as gallery attachments on the post, and then offers the option to replace the external link with a link to the local copy.

Features

  • Finds all external images linked in the SRC attribute of IMG tags and makes local copies of those images
  • Allows the SRC to be updated to point to those local copies
  • Can be applied to posts in all categories, or only those selected
  • Can be applied to all authors, or only selected authors
  • Administrator has the option to replace the external src with the url of the local copy. Another option allows the plugin to be applied to all external images, or only to those on Flickr.

This plugin is particularly useful for photobloggers, especially those who update using the mail2blog Flickr API. The plugin will saved the linked image file from Flickr locally.

Planned features

  • Add internationalization support
  • Integrate with Flickr API in order to allow always downloading the original image size regardless of which is linked
  • Additional options to allow running the plugin only for specific users or categories

Download

Download the current stable version: Add-Linked-Images-To-Gallery.

Changelog

  • 1.0

    • Finally found the “WP_Error on line 48″ issue. Added trapping.
    • I’m ready to call this a 1.0
  • 0.9
    • Replaced externimg_loadimage() function with a call to WordPress’s media_handle_sideload()
  • 0.8
    • Fixed a pad path, preventing imported images from showing up in WP media library
  • 0.7
    • Fixed a syntax error in creating the new attachment
  • 0.6
    • Suppresses safe_mode warnings from CURL
    • Adds compatibility with WordPress 2.9
  • 0.5
    • Fixes a bug that cause all img tags to be rewritten as the last matched image
  • 0.4
    • Option added to option panel allowing the plugin to run only on posts in specific categories
    • Option added to option panel allowing the plugin to run only on posts by specific authors
  • 0.3
    • Improved pattern matching for images
    • 404 errors not processed
    • Flickr “image-not-found” jpg not processed
    • Improved local file naming
    • Replace feature was replacing URL in entire text. Now only replaces in IMG src.
    • Added feedback when options are saved.
  • 0.2
    • Added options panel
    • User can apply plugin to all external images or choose only to apply to Flickr
    • User can choose to either mark images by custom tag, or to replace image source
    • Custom tag name is user-definable
    • Improved regular expression matching
  • 0.1
    • Initial version

Tags: ,

Google Chrome

I downloaded Chrome, Google’s new web browser, today and gave it a short test drive. There’s not much to say about it, but here’s what I found:

  • No menu bar They’ve taken the application-ness out of the application, and turned it into a direct-to-web browsing experience. This change also leaves more screen real estate for the actual web sites to be viewed without scrolling.
  • Less clutter Not only is there no menu bar, but there’s also no status bar, no search box, and with the exception of the start page, there’s no favorites toolbar. It’s a sleek, experience-centric design that reminds me of browsing on the iPhone.
  • One box In true Google fashion, everything can be done from one text input box: navigating, searching, opening a bookmark, etc.
  • Incognito browsing This is the first time I’ve seen such a straightforward way of surfing the web without leaving a trail. While most web browsers offer cleanup after the fact, Chrome’s incognito window never creates a trail to begin with. I think this is something that most people want, but which might scare managers and parents who want to know what their employees or children are doing online. This may be the one controversial feature of Chrome.
  • Fast, attractive rendering Being built on top of Apple’s WebKit browser framework, Chrome loads pages super-fast, and renders them beautifully.

After messing around in Chrome for a few minutes, my experience is basically positive. To a certain extent, I miss the extensibility of Firefox, but at the same time I’m tempted to prefer not having it, due to the incredible performance bloat that occurs once you install a bunch of add-ons. Still, I’d like to be able to hide ads the way Adblock lets me in Firefox. Still, it supports Flash, so apparently there is some extensibility in place already.

I think I’m going to spend the next week or so using Chrome as my main browser and get an idea of how I really feel about it.

Tags:

My first Firefox extension

After installing the Firefox 3.0 beta, the majority of my extensions stopped working. I had gotten rather spoiled with them, so I decided it was time to learn about writing Firefox extensions so that I could a)fix the ones I like which aren’t being updated, and b)write my own for the things that don’t exist yet.

For my first foray into writing Firefox extensions, I decided to go with something simple, but which I find useful. So I made PlusOne.

What PlusOne does is quite simple. It finds the numerical part of the current URL you are browsing, and simply adds 1 to it. (You can also subtract 1 from it.) So, if the page you’re viewing is called page1.html, you could right-click on the page and choose “Plus One”, and it will navigate to page2.html. Likewise, if you are viewing britney-spears-naked-17.jpg, you can right-click on the page and choose “Minus One” and it will navigate to britney-spears-naked-16.jpg.

Of course, if the file doesn’t exist, you’ll still get a 404. But often you can discover many interesting, and somewhat hidden, gems just by exploring the possibilities of incrementing the URL. It’s also easier than searching the entire page for the tiny “next” link hidden at the bottom when you’re reading a six-page scientific essay. (Yeah, right… you’re looking for naked pictures of Britney Spears.)

Please try it out and leave any comments on this page.

Tags:

Upgrading a G4 iBook to Leopard

A few weeks ago I got an iPhone and was unable to use it with my computer. Last week I got Adobe Lightroom and then was unable to use it with my computer. The time had come to do something about that. So Friday I went to the Apple store and I got OS X Leopard.

I was unsure if Apple was still supporting G4 computers, but I was able to find that answer on their web site: they are. What I was not able to find, however, was any indication that I could upgrade. In other words, I was not prepared to do a clean install and wipe out my computer. The representative at the Apple store confirmed that I could do an upgrade.

The upgrade process took nearly three hours, and used almost all of the 10GB of free space on my hard drive. I hadn’t expected that. But I’ve found some ways to recover some space, so that’s not an issue. In fact, there really aren’t any issues. It just goes in and works. All of the upgraded software kept my settings and kept on working as I expected.

The only thing that stopped working was the driver for my Wacom tablet, but Wacom has provided almost a dozen driver upgrades on their web site in the three years since I first installed it, and after downloading and installing the new driver, my tablet worked like a charm.

The new features, going from 10.3 to 10.5 are amazing, and seem to run quite well on my iBook, even if it’s not a dual core Pentium. And yes, I took a few minutes to play with the new features of the OS, but only a few minutes, because what I really wanted to do was play with Lightroom… which is awesome.

And what about the iPhone? No dialogs popping up when I plug it in. No device listed in iTunes. I think something must have gotten set to ignore the iPhone when I tried it on 10.3.9 and it didn’t recognize it. Time to Google it.

Tags: ,

Where are those iPhone apps?

I had to find this the hard way, so I’m posting the info in hopes of making it easier for others.

After you’ve done the jailbreak app, you’re probably looking at the list of apps and thinking “is this it?”

Well, it’s not. You have to add sources to the installer. Go to the section called SOURCES and add the available ones. Next time you look at the selection, there will be much more available!

Tags:

Search shortcuts for Firefox

Everyone who has ever used my computer, even for a moment, has taken a particular liking to my search shortcuts — most notably gg, my shortcut to Google.

I’m doing Google searches all the time. Whenever I have a question about anything, I don’t hesitate to grab my laptop and look it up on Google. If I had to go to Google.com, wait for the site to load, and click in the search box before I could type in my query and search, it would slow me down.

After reading that, you probably think I’m crazy. But yes, that little bit of extra work would slow me down. I search a lot!

So what is my more efficient solution? It’s simple: Firefox bookmark keywords. If you don’t understand them, I recommend that you go look at the LifeHacker article about them.

I’ve published some of my more useful search shortcuts here. Firefox users can simply right-click on the link and choose Bookmark This Link. Then, go into Organize Bookmarks and add keywords to them. I also recommend grouping the search shortcuts into a folder called Search to keep some sanity in the Bookmark menu.

Google Search – keyword: gg
Google Maps – keyword: map
Google Image Search – keyword: img
IMDB Lookup – keyword: imdb
Dictionary – keyword: dc
Thesaurus – keyword: th
Wikipedia – keyword: wiki

After saving the bookmarks, don’t forget to add the keywords. The shortcuts are useless without them. Oh, and if you don’t use Firefox, you’re out of luck.

With the shortcuts, you can now go to the address bar and type gg britney spears to learn everything you want to know about annoying pop singers. But that would be useless.

More useful would be, when you’re looking at the web site for a local sushi restaurant and you see their address on the page, you could copy it from the page and paste it into the address bar, typing map before it, so you have something like map 401 N Michigan Ave Chicago. Just a few keystrokes gets you the directions you’re looking for.

Tags: ,

Google Reader

Google Reader

Okay, so it took me a little while to come around to Google Reader, and I think they’ve changed some stuff since the first time I tried it, but I’m now convinced.

Keeping up with a large number of web sites became easy to do with the introduction of RSS… and now, thanks to Google Reader, it’s easy to do from anywhere, rather than being stuck with the settings only on your home computer, or work computer.

I became a GMail believer immediately after trying it, and while I don’t think the documents are a replacement for MS Office just yet, I like the ability to share them. Now, with Reader, Google is easily becoming the home of my online experience.

If you haven’t tried it yet, or don’t understand RSS, it’s simple. You find the little “feed” icon (feed) on the page you are looking for, right-click on it and copy the link, and then paste that into Google reader.

Firefox users have it even easier, because any page with an RSS feed will also have that icon in the address bar at the top. The first time you click that icon, you will be asked to choose your RSS tool. Pick Google. From then on, every time you click that icon, you will be prompted to add the feed to Google Reader.

It works for blogs, news sites, sports sites, and even Flickr photostreams. Finally, you can keep up with all your friends without having to go visit every web site every time.

It’s also a good way for obsessed stalkers to get back some of their valuable time, so they can keep an eye on their ex while still managing to get some work done at the office. ;-)

Tags:

Firefox

Spread Firefox Affiliate Button

If you haven’t yet tried Firefox, you need to. Firefox is a fully standards compliant browser, which is important if you’re developing web sites because you need to know that you’re writing standards compliant code. Firefox is faster than Internet Explorer, and it’s also far safer, lacking all of the security holes that IE provides for hackers to access your system. And if that’s not enough, Firefox also provides tools to block popup windows, and extensions make it easy to block ads anywhere in a web page.

Tags: