Categories
Uncategorized

Final bits of WordPress migration

Two things that needed doing – the first one was that I’m a windows guy, so my site is on windows and IIS.  Apache has a nifty “mod_rewrite” add-on which lets WordPress do the cool url’s like http://blog.digitaltinder.net/2008/12/exporting-blogml-from-subtext-21-and-importing-blogml-into-wordpress-27/ instead of having a link to http://blog.digitaltinder.com/index.php?p=3746.

So I’d found a WordPress URL Rewriter which worked well (as long as PHP wasn’t running as an ISAPI module).  But it needed me to add the url rewriter as an ISAPI module and I kinda wasn’t happy with having to make manual changes to my hosting setup because then upgrades/domain moves might cause issues. I wanted to have the solution I used only require me to change stuff in the plesk control panel, and not directly on the server.

With that limitation, I decided to go with the “fake 404” page solution which is mentioned in a few blogs.  Basically this works because you tell IIS that if someone requests a page that doesn’t exist (like the pretty perma-link) then it should redirect the user to the index.php page with the correct settings in place so that wordpress shows the related blog entry.   This works pretty well!

The final bit of my wordpress migration was that my old site had it at http://digitaltinder.com/blog, while the new site is at http://blog.digitaltinder.com (or http://blog.digitaltinder.net)

A basic sample of what I used can be found http://tech.einaregilsson.com/2007/07/30/pretty-wordpress-permalinks-on-iis/

So I decided to modify my little 404 page to include some redirects and I found the code below:

function redirect($url, $type=301)
{
  if ($type == 301) header("HTTP/1.1 301 Moved Permanently");
  header("Location: $url");
  echo ‘This page has moved to <a href="’.$url.’">’.$url.'</a>’;
  exit();
}

And the proof is the fact that the blog should just be working at the moment, regardless of what URL you access it on.  Of course that’s assuming that its all still working now, which probably thanks to the demo god’s will fail miserably now that I’m using it as an example.

Categories
Development General

Exporting BlogML from Subtext 2.1 and importing BlogML into WordPress 2.7

I currently run by blog using Subtext and I’ve been wanting to test out some features in WordPress for a while.  So naturally I don’t want to lose all of my blog posts and I’m not keen to write a whole bunch of code to read from the one database and write to the other.

Fortunately Subtext has the ability to export to BlogML and WordPress apparently has the ability to import from anything (if you believe the rumors)  Unfortunately both the export and the import don’t really work.

Firstly, Subtext’s export doesn’t work. BUT since I had started my day thinking about moving from Subtext to BlogEngine.Net, I’d found a forum post where a friendly person showed how to make SubText export to BlogML successfully (Its the post by Harold on 2 Dec 2008).  He links to the binary of SubText.BlogML.dll – you just replace the one on your site (make sure you have a backup of your version, just in case there’s some issues with newer versions of Subtext)

Now for the import part – Thankfully Aaron Lerch had handled this back in WordPress 2.3 in his post about moving to WordPress from Blogger.   The important thing for me was his BlogML importer.

There are a few things that seem to have changed.  Aaron’s post uses “XPath.class.php” which you can get from Sourceforge.  It suggests that you put the file in the /wp-admin/import folder, but that just seems to cause issues.  So I’m going to lay out the steps that I took over here:

  1. Download “XPath.class.php
  2. Put the file in your /wp-admin/ folder
  3. Edit /wp-admin/admin.php and add a line at line 27 so that the file looks like:
    require_once(ABSPATH . ‘wp-admin/includes/admin.php’);
    require_once(‘XPath.class.php’);
  4. I’ve modified Aaron’s blogml importer and you can get blogml.php.
  5. Upload it to your /wp-admin/import folder

The original blogml had a few issues:

  1. It couldn’t handle &nbsp; or &gt; or even &lt; in any of the blog posts
  2. Categories were not imported correctly at all
  3. It didn’t, and still doesn’t, handle draft posts at all.
  4. It didn’t work with WordPress 2.7

I managed to fix the problems with the escaped html, the categories and the WordPress 2.7 issues, but didn’t quite get to fixing the issue with the draft posts.  Let me know if you manage to fix that part – I only had one draft post so it didn’t really matter.  Hopefully this will help someone else though.

Categories
Uncategorized

The Lost Ring

Not sure if anyone has seen or heard about this new ARG.  Its designed by the creator of “I Love Bees” and a number of others that I’ve not really looked at.  I just read about it in Boing Boing, who link to a CNet Interview at SXSW and eventually to the main site itself The Lost Ring.  Basically the ARG is built in association with the International Olympic Committee and McDonalds and is meant to be truly global and some kind of a run up to the Summer Olympics in Beijing.

The premise of the story is as follows (as CNet puts it):

“The game is built around the fictional concept that more than 2,000 years ago an Olympic sport was lost to history and that now, five Olympic-caliber athletes have turned up in corn fields around the world, amnesiac but sure they’ve been tasked with some great mission.

Players of The Lost Ring, then, are similarly tasked with helping these five people figure out their identities, and in the process, rediscovering this lost Olympic sport. ” [Taken from CNet]

Now for those of us in South Africa, the cool thing is that the main character (well, the woman from the introductory film clip) was found just outside of Johannesburg!  So its an international ARG that might actually require some involvement from someone over here in deepest darkest africa.

Categories
General Humour

Stand up for Sundays – SA Comedy

My company have a value where they take us employees out to social events once every month or so.  Last night we went to watch Stand up for Sundays by The Comedy Shop.  (I actually found them via “The South African Comedy Blog“.)

I’m not one who usually goes to comedy shows, but I’ve wanted to for a long time. So I was quite excited to go and see the show.  About 15 of us went, all from different cultures/backgrounds/races/etc and we all had an absolute blast!

The guys doing the show are Mel Miller, Al Prodgers, Kedibone Mulaudzi, Etienne Shardlow, and Alistair Plint.  (For those from SA Developer, Alistair is Ruari’s cousin)

The show was amazing.  I haven’t laughed that hard for ages.  Some of the members of our group looked like they were about to soil themselves they were laughing so much.  The show started with Alistair as the MC, giving us an intro to the evening, and cracking a few good jokes, then came Kedibone.  I’ve never heard of him before but he was FUNNY!  Had all us whitey’s in stitches laughing at ourselves as he showed some great “real life” situations for the silliness that they are.  Then came Al Prodgers, again super funny even if my inner prude was a little embarrassed at times.  (We bought a DVD of Kedibone and Al after the show, that’s how good they were)

Then on to the second half of the show after some drinks outside.  First up was Etienne Shardlow – “The School Boy”.  He didn’t seem to get as many laughs as the rest of the guys, but that might just have been our crowd.  Basically he (a fully grown man) came on dressed as a school boy and with all the nervous mannerisms that go with it.  I really enjoyed the “view of a child” that he showed.  And finally we got to see Mel Miller.  He had us “rolling in the aisles” (please excuse the clichés).  His audience interaction was awesome, taking cues from what audience members said and combining that with his train of thought to make something unique to our audience.  He’s probably got the most expressive face of whole group.

I wish I could give you a link directly to the Computicket page where you can buy their tickets, but I’ve yet to find a way to do that.  So the best I can suggest is to go there and search for “Stand Up”.  (Don’t search for “comedy” because that won’t get you to their show… not sure why, but hey, technology sometimes just doesn’t work)

If I had the money I’d tell you that I’d pay you for your ticket if you didn’t enjoy the show, but I don’t so you’ll just have to spend your own R80 or R90 (depending on where you get the ticket) to go see them.  I’ve subscribed to the Comedy Shop’s blog so that I can find out when next they’re doing another show so I can go see it.

Categories
Uncategorized

Testing blog from Windows Live Writer on Vista

It took the Live installer about 3 tries to get the installation right, so hopefully Live Writer will actually work first time.  Since I’m writing a “test” blog, I might as well say something other than “testing.  So here goes:  “I don’t like Vista, its a painful thorn in my side that I can’t wait to get rid of every evening when I leave work.”

Copying files is now a hellishly long procedure, my windows explorer crashes at least 5 times a day, applications keep hanging, the “Start bar search” is useless, I have to delete a folder twice if I actually want it to get deleted (first time it just deletes the contents of the folder and not the folder itself), explorer keeps on showing me stuff in “Photo” view instead of the standard view, it also keeps “grouping” stuff instead of sorting by the column I want, and just the other day I installed an application from Microsoft that popped up a dialog box that said:

“This app requires Windows XP or greater to operate.
Please visit www.microsoft.com/windowsxp for upgrade details”

So now I have proof that even Microsoft think that the Windows XP is an upgrade to Vista.

Categories
General

More Ubuntu – Virtual PC’s

I’ve been playing with Ubuntu for a while. Besides a few oddities on my laptop, it has worked almost perfectly.  It works quite well, since I’m not an uber gamer, there’s not much that I can’t do via a Virtual PC.  I originally thought I’d use VMWare.  I’ve always heard about them and their products and so they were my first call.

The only problem is that finding support for their product was kinda tough.  I had a problem where my USB devices would just not get detected by the virtual pc and if they did they would not work correctly.  I found a number of articles talking about how to fix the problems but none of the solutions worked.

Eventually I stumbled upon VirtualBox which just seems to work so well.  I had some brief difficulties with USB, but VERY quickly found solutions on their forums.  I’ve had to do lots of forum searching since starting out with Ubuntu, and its getting a little tiering.  But its damned fast, and I kinda like the fact that I sometimes have to get involved just under the surface of the Operating System to get it working.

With Windows its semi-easy to do everything, but there are downsides… A fresh Windows XP SP 2 installation takes a LOT of updates and its pretty slow at getting them… My Ubuntu install did a few updates, and they were damned fast.  It seems that ubuntu has update servers in various countries around the world, and one of them just so happens to be South Africa.  Not sure why Microsoft doesn’t do that, but ubuntu’s updates certainly do download WAAAAY faster than my microsoft updates, and there’s a damn side less reboots involved.

Categories
Uncategorized

When Software Sucks

I’ve had to re-install my PC at work due to some hardware issues and Oh My Goodness(!!) some software installations are up to crap!  A few quick lessons:

  1. Microsoft – if you ship an MSDN DVD with an installation for VS.Net 2005, please make sure that the installation can actually work?  I sat installing and got to the point of requiring “Disk 2” and the whole thing just died.  There was no way for me to tell the installer “Disk 2 is in this folder here, right next to the one you’re installing from”.  So I had to uninstall, and find an older version of the MSDN disc which actually had a working install
  2. Trend Micro – Just give up on UI design now! 
  3. I installed Trend Micro PC-Cillin 2007, all went fine (from previous experience I did not install their firewall, since the old version was useless).  I ran their main console and its filled with “warnings”… The biggest one (which window’s reported too) is that is database is out of date…
    1. Rule 1: Tell your users what went wrong or how to fix it
      So I click on the big “Update Now” button, it greys out as if something is going to happen, and then becomes clickable again.  But no updates have happened!
    2. Rule 2: If you tell me something, then make it so
      So finally I figure out that the Updates are not happening because I haven’t registered the software.  So I go and register it via their ui (which pops up a window WAY too big for the form I’m filling out). At the end of the process I get told that the registration was succesful. 

      Then it turns out that I can’t update my antivirus database until they have flagged something in an online system somewhere that says that I do actually have a license.  Why the crap didn’t this happen during the activation process?  Why didn’t they tell me that this was going to happen?  And why in the name of all things holy does the bloody update button not just pop up a dialog to tell me why it isn’t doing its job?

    3. Rule 3: Give UI cue’s if you’re going to perform a long running process
      While waiting for trend to activate my installation in their central database, I decided to look at the features.  I thought I’d try turn on their “SPAM Protection” feature.  So I click on the “On/Off” drop down and choose on.  The whole application hangs.  The cursor shows me the regular mouse pointer, no indication of what its doing or how long I should expect to wait.  Finally it starts responding again.  A little later I’m showing someone else how silly it was: I click on the drop down, and click away from it… Again the long pause with no UI cues to tell me what its doing.  (Even though it shouldn’t be doing anything since I didn’t change anything).
    4. Rule 4: If you’re supposed to be doing something in the background then do it in the background
      I expect any antivirus software to automatically update itsself… I’d like some small cue to tell me that it is doing so, but I do NOT expect it to pop up a window randomly, taking focus away from my active application, to let me know that it is going to start an update now.  I applaud their attempt at keeping me informed, but please! I work on my PC… I don’t want to keep having to alt+tab away from your darned update window. 
    5. Rule 5: Make it easy to turn off “friendly” notifications
      Following on from rule 4, I had to search through the settings before I found the option to stop it from popping up the “I’m updating now” dialog.  But there’s two more annoying popups that I can’t get rid of.  One is when you start up the main console.  They open a “Trend Online” window on the right, which basically tells me that I can’t use any of their online services unless I buy a better subscription.  Its really of no use to me, but I can’t find the place where I can turn this bloody thing off!  It’s irritating! 
  4. Microsoft & Trend: If you need me to reboot my PC, just ask me once!  For goodness sake, I’m not an idiot. So reminding me every 15 minutes that I need to reboot my pc in order for the recently updated components to be applied is just going to piss me off.  At the very least give me an option to postpone the next “warning” for a few hours or a few days!

Admittedly, Trend’s 2007 interface is WAAAAAY better than their older one, and their firewall looks a little more usable than the last version. So they have done some things right. 😀

Categories
Uncategorized

Test from diarist.

A few weeks ago I found out about Diarist2. Its a .Net CF application that lets you post to your blog from your Windows Mobile phone. It took me a while to get .Net CF v2 on my phone so this is my first test.

Yay!

Categories
General

Notepad2 Updated

I found out about this cool tool a few years ago and have used it since then.  Its free, it works, and it does syntax highlighting for all of the common file types that a developer might want to ever edit.

I just read today that its been upgraded to v2.0.15.  NotePad2 is great!

The only hassle I’ve ever had is with replacing Windows’ notepad with NotePad2.  XP SP2 likes to keep its version of notepad in place, and replaces anything that isn’t MS’s version.  One workaround I’ve seen is to rename Notepad2.exe to Notepad.exe, then to have a batch file copy it into the following folders, one after the other with no prompts and no pausing:
    C:WindowsSystem32dllcache
    C:WindowsSystem32
    C:Windows
I’ve had mixed results from doing this, so YMMV, but here’s the contents of my batch file (which worked on my PC):
    copy /Y notepad.exe c:WindowsSystem32dllcachenotepad.exe
    copy /Y notepad.exe c:WindowsSystem32notepad.exe
    copy /Y notepad.exe c:Windowsnotepad.exe

Categories
General

Ubuntu Links

Before I start on the links… People complain about windows XP having to download lots of updates after it is first installed.  Well I’ve found out, at work, that Mac’s have a lot of upgrades too and so does Ubuntu.  Tonight I got prompted to download about 238mb of updates!

So far I’ve found that SyncCE along with MultiSync should work ok with my HTC TyTN. And it seems that “gnomad” should allow me to connect to my Creative Zen MP3 player. Both require some effort on my part though – like building from source code – so I’m going to leave them till a little later.  Ubuntu’s “Desktop Guide” actually seems quite good.  It has pointed me to a few nice resources, although it appears that my Cannon 4400F scanner and my HP 1600 Color LaserJet won’t work through Linux.  So the two things I thought would be impossible (synchronisation with my TyTN and my Zen) are quite do-able and the two things I thought would be easy (connecting to my scanner and printer) are going to be imposible.

Oh, well. It just goes to show that you can’t predict much in life.  Like how my cat has just gone missing (she’s not quite used to our new home yet so she gets lost in the complex).  So I’m going to go off and look for my cat while Ubuntu downloads its 238mb of updates. 😉

[Update: Ok, so it looks like my printer might work after all.  I found two links with info – one specifically at LinuxPrinting that seems to be promising.]