Archive for the ‘Software’ Category

Category Order 2.0.1 Released

Tuesday, November 6th, 2007

I’ve released a new version of the Category Order Wordpress 2 plugin. This plugin allows the blog administrator to set an explicit ordering, spacing, and indentation of categories in the category list that appears in the sidebar. The administrator specifies the ordering in the new “Category Order” management page. There is also an option for placing the category post count inside the link.

New changes:

  • Viewing a page now doesn’t cause categories to unfold. (Thanks to Tom Howard for the bug report and patch.)
  • Fixed a bug where a blog with no categories would cause a message from the plugin. (Thanks to Bruce and others for the bug report.)

A screenshot shows the management page. Download it on my code page.

Category Access 0.8.2 Released

Tuesday, November 6th, 2007

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Added a workaround for a WordPress bug that was causing the padlock to
    appear on static pages when a protected category was selected. (Thanks to
    gspark for the bug report.)
  • Added WordPress 2.3 support (Thanks to James Wurster for the patch.)
  • Moved the padlock in the category list to after the name.
  • Fixed a bug that was causing problems for people running the German translation. Thanks to Moritz Mueller for bugfix.)

Download it on my code page.

Dead, dead, dead… It was the hard drive after all

Thursday, November 1st, 2007

A few days ago my MacBook Pro wouldn’t boot. Dropping down to single-user mode, I ran fsck and it found lots of errors. Perhaps foolishly, I tried to repair the errors multiple times. At the end of each run it would report that the drive could not be repaired. It looks like the disk problem I had earlier was a real disk problem and not just a bad image. Now I wish I hadn’t wasted so much friggin’ time reinstalling Tiger, upgrading to Leopard, installing apps, etc.

At least I have a reasonably recent backup. It’s only been a couple of days and yet I already wish I had taken the time to use the new Time Machine feature. :( So I thought I would try to recover whatever I could from the drive before sending the machine back to Apple. Here was my basic process:

  • Get my older PowerBook and connect it to the MacBook Pro with a firewire cable
  • Boot the MacBook Pro into target disk mode by holding “t” while it was booting
  • Wait 5 minutes while Leopard tries to fix the drive. It would then give up and mount it read-only, showing a nice message box that says “You’d better get your data off!”
  • Use rsync to get a few files off until it hit a bad file and would get hung.
  • Wait for 5 minutes until a read error would occur. Cancel rsync and unmount the drive.
  • Reboot the machine to unwedge it, and resume the copying, skipping over the bad file.

I did figure out a way to make this process faster. The first delay can be overcome by manually mounting the drive before Leopard decides to try to mount it and fix the problems. I wrote this script to beat the OS, mounting the drive read-only:

#!/usr/bin/perl

print "Waiting for disk...\n";

do {
$result = `mount -v -t hfs -r /dev/disk1s2 /Users/coppit/Desktop/oldmac 2>&1`;
} while ($result =~ /(No such file|Permission denied)/);

if ($result =~ /Resource busy/) {
print $result;

do {
$result = `mount -v -t hfs -r /dev/disk1s2 /Users/coppit/Desktop/oldmac 2>&1`;
sleep 1;
} while ($result =~ /Resource busy/);
}

print $result;

Basically I would start this script, then boot up the other computer. Oh yeah, you have to create the “oldmac” directory ahead of time.

Now with regard to the second delay, all you have to do is power down the MacBook Pro. In this case you’ll get a “you forgot to unmount” error which can be ignored. But at least you don’t have to wait for the OS to determine there was a read error.

Finally, here’s what I did for the copy command:
~/desktop/remount && rsync --exclude-from=/Users/coppit/Desktop/excludelist -avu /Users/coppit/Desktop/oldmac/Users/coppit ~/Desktop/recovered

As you can see, I called my remount script and then did the copy. In this case I am copying my home directory into ~/Desktop/recovered. Whenever the copy would hang, I would put the filename (and perhaps part of the path) into the excludelist file, CTRL-c to abort the copy, power down the MacBook Pro, up-arrow to get the above command back, press enter, then power up the Macbook Pro.

With this process I was able to fairly quickly bypass bad files and get off all my important data. If I was really motivated I would have automated the creation of the excludelist file by watching the transfer speed during the copy operation. Then all I would have to do would be to power cycle the other computer at the appropriate times…

Category Access 0.8.1 Released

Wednesday, August 1st, 2007

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Added “Check all categories” and “Uncheck all categories” buttons to the options and user pages. (Suggested by David Katz)
  • Fixed a bug where category filtering would sometimes fail, especially for things like RSS fields. (Thanks to Tim Lockwood for the patch.)
  • Fixed a problem where post titles would be protected in situations where they shouldn’t be, such as in the dashboard comment list. (Thanks to Joe Church for the bug report.)
  • Updated the wp-commentsrss2.php modification in the README for WP 2.2 or newer. (Thanks to Aniesh Joseph for the bug report.)
  • I also fixed a problem in the comments RSS modification documentation where posts would be entirely removed, even if you had enabled “Show the title and links (but not the summary or content) instead of hiding posts.”
  • Changed the options page so that it uses Javascript and CSS to show only the visibility options for only the selected class of users. This cleans up the interface and allows for possible future support of roles.
  • When surfing to the permalink for a protected post, the user will now be redirected to the login page if they cannot view the post and are not logged in. Note that after logging in, they may still see an Error 404 if they do not have permissions to view the post. (Thanks for the feature suggestion by Jason Holtslander.)
  • CSS styles are now used for protected titles, posts, categories, and padlock icons. (Thanks to Tyler Gore for the suggestion.)
  • Fixed a bug where the padlock icon HTML was being inserted into the category link title.
  • Fixed a bug where the previous and next post links would always be protected if the post for the current page was protected.

Download it on my code page.

SafariBlock

Sunday, June 10th, 2007

I finally got fed up with Firefox’s lack of threading support. This means that the entire application hangs when rendering a webpage. I switched to Safari, which is much more responsive. Unfortunately, I immediately found out how ad-infested the web is… I’ve been running Firefox with the Adblock Plus plugin for so long, I didn’t realize how annoying the web had gotten.

After a bit of hunting around, I found SafariBlock by FSB Software. It’s an Adblock-like plugin for Safari.

One downside is that it doesn’t ship with a list of filters. There are filters out there for Adblock, but SafariBlock doesn’t yet support regular expressions like Adblock does. Here’s the solution:

  1. Download and install SafariBlock
  2. Download the latest version of FilterSet.G from http://www.pierceive.com/
  3. Open the text file in Wordpad, and copy and paste it into the deregifier
  4. Copy the output list into a new filter file, and remove any regular expressions that deregifier couldn’t handle
  5. Import the new filter file using SafariBlock’s import feature in the preferences.

I also discovered another downside: The basic “*” pattern matching that is does support is very basic, only working at the beginning and end of a pattern. This means that a pattern like “*.example.com*.swf?*” won’t work.

Spotlight at ICSE

Monday, May 28th, 2007

I presented a formal research demonstration at ICSE last week. The demo highlighted Spotlight, our research prototype for software plans. Software plans are like architectural plans of a building in that they allow programmers to work on semi-independent aspects of their programs in semi-independent views, then later integrate them to create the final system. You can check out the latest version of Spotlight, which is built in the Eclipse IDE here.

Category Order WP 2.0.x Compatibility

Wednesday, May 16th, 2007

Let me know if you’re using WordPress 2.0.x and are having trouble with my Category Order plugin. One thing to try is to change this:

function get_category_by_slug($slug) {
$categories = get_categories();

in category_order.php to this:

function get_category_by_slug($slug) {
$categories =
$wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_name");

Category Access 0.8.0 Released

Wednesday, May 9th, 2007

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Added MySQL 4.0.x compatibility (Thanks to Giorgio A. Schwarz for the patch.)
  • Set the priority for this plugin to really low, so that other plugins can have a chance to work on comments and such without interference. (Thanks to Ian Beck for the bug report.)
  • Added support for internationalization. The first language is German (Thanks to Michael Rothfischer for the patch.)

Download it on my code page.

Category Order 2.0.0 Released

Thursday, April 26th, 2007

I’ve released a new version of the Category Order Wordpress 2 plugin. This plugin allows the blog administrator to set an explicit ordering, spacing, and indentation of categories in the category list that appears in the sidebar. The administrator specifies the ordering in the new “Category Order” management page. There is also an option for placing the category post count inside the link.

The major new feature of this release is the ability to “fold” indented categories until the parent category is clicked. The plugin also will add up the post counts of the hidden categories and add that to the visible parent category.

New changes:

  • Added folding of sub-categories until the user clicks on the parent category. (Thanks to Ana Luiza Bergamini for pointing out the incompatibility of this plugin with the Fold Category List plugin, which caused me to add this functionality to this plugin.)
  • Fixed a bug where sub-lists in the original list of categories HTML would cause extra <li>’s to be inserted in the output list. (Thanks to Jessica for the bug report.)
  • The order is now stored using category IDs rather than slugs, since the former are unique. Added a warning for the case when two categories have the same slug and the permalinks use slugs rather than IDs. (Thanks to Gautam Jain for the bug report.)
  • Fixed a bug where the parser would complain when there were no categories. (Thanks to Jason for the bug report.)

A screenshot shows the management page. Download it on my code page.

Category Order 1.9.7 Released

Sunday, February 4th, 2007

I’ve released a new version of the Category Order Wordpress 2 plugin. This plugin allows the blog administrator to set an explicit ordering, spacing, and indentation of categories in the category list that appears in the sidebar. The administrator specifies the ordering in the new “Category Order” management page. There is also an option for placing the category post count inside the link.

New changes:

  • Updated for Wordpress 2.1. It should continue to work for Wordpress 2.0

A screenshot shows the management page. Download it on my code page.

Category Access 0.7.2 Released

Sunday, February 4th, 2007

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Updated for Wordpress 2.1. It should continue to work for Wordpress 2.0
  • Fixed a bug where pages would sometimes not be shown.

Download it on my code page.

Category Access 0.7.1 Released

Thursday, January 11th, 2007

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Comments management page now shows usernames, emails, and comments. (Thanks to Paul Argoud for the bug report.)

Download it on my code page.

Category Access 0.7.0 Released

Friday, December 29th, 2006

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Added an option to show the title of a post but hide its body text. (Thanks to Martin for the feature suggestion.)
  • Fixed a bug where static pages would be hidden. (Thanks to Keith for the bug report in the 0.6.1 post comments.)

Download it on my code page.

Category Access 0.6.1 Released

Saturday, October 7th, 2006

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Fixed a bug where categories with special characters like “‘” would incorrectly be protected.
  • Fixed long-standing pagination of posts bugs.
  • Removed next_post functions, since this should be fixed in Wordpress now.

Download it on my code page.

Category Order 1.9.5 Released

Friday, August 25th, 2006

I’ve released a new version of the Category Order Wordpress 2 plugin. This plugin allows the blog administrator to set an explicit ordering, spacing, and indentation of categories in the category list that appears in the sidebar. The administrator specifies the ordering in the new “Category Order” management page. There is also an option for placing the category post count inside the link.

New changes:

  • Fixed a bug where category spacers were being ignored.
  • Fixed a bug where special styles on the category list would be removed by the plugin.

A screenshot shows the management page. Download it on my code page.

Category Access 0.6.0 Released

Thursday, August 24th, 2006

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Added an option to reveal the title and links for a hidden post in the feeds.

Download it on my code page.

Category Order 1.9.4 Released

Tuesday, June 20th, 2006

I’ve released a new version of the Category Order Wordpress 2 plugin. This plugin allows the blog administrator to set an explicit ordering, spacing, and indentation of categories in the category list that appears in the sidebar. The administrator specifies the ordering in the new “Category Order” management page. There is also an option for placing the category post count inside the link.

New changes:

  • Fixed a problem where subcategories would not be displayed properly with their parent categories when the date and time permalink structure was in use.

A screenshot shows the management page. Download it on my code page.

Category Access 0.5.3 Released

Monday, June 19th, 2006

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Fixed a problem where per-user category settings still weren’t being set properly. Hopefully it’s fixed for good now.
  • Fixed a problem where pages would be hidden if the default category was hidden.

Download it on my code page.

Category Access 0.5.2 Released

Monday, June 12th, 2006

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Fixed a PHP warning created by changes in the last release.

Download it on my code page.

Category Access 0.5.1 Released

Thursday, June 8th, 2006

I’ve released a new version of the Category Access Wordpress 2 plugin. This plugin allows the blog maintainer to restrict access to posts belonging to particular categories on a user-by-user basis.

New changes:

  • Fixed a bug where changes to category access on a per-user basis would sometimes not be reflected in the updated page.
  • Added support for preventing comments for hidden posts from showing up in the comments RSS.

Download it on my code page.