Archive

Archive for November 2007

I have a question for you

29 November 29 2007

So please head over to my poll at http://arunstephens.com/poll.

I have decided to do some market research.

Travel

IE compatability issues with WordPress

28 November 28 2007

There are a few problems with WordPress when working with IE. They’re kind of annoying, so I will look at fixing them when I can be bothered.

One I noticed today occurred when I wanted to create a link using the keyboard shortcut Ctrl+K after selecting text:

TinyMCE error IE7

It looks like it fails at this point (starting at line 28 of link.js):

// WordPress -- next 3 lines
document.forms[0].href.value = tinyMCE.getWindowArg('href') || 'http://';
document.forms[0].href.select();
document.forms[0].href.focus();

Let’s try this again. What is document.forms[0].href under IE7? It’s an <input /> tag. It’s the field that accepts the URL of the linked-to page. Let’s see whether it’s invisible or not enabled. <input /> tags definitely do accept the focus. The tag itself is visible and enabled, so it must be one of its parents. I guess the simple solution is to find the part in link.js that makes it visible, and put this .focus() call after it.

OK, it’s not as simple as that, because the code that makes the popup visible is called from an event handler. The onLoad() function in tiny_mce_popup.js, to be precise. It’s part of the TinyMCE_Popup class. I guess in IE7 the load event is called later than in Firefox? Right, well, it turns out it’s document.body that has display: none.

(I just checked in Firefox and there is no error at all. That’s good news.)

Ok, before the aforementioned line I added:

document.body.style.display = '';

Let’s see what happens. No error message! But the focus is not set. So it really has the effect of not setting the focus at all. But let’s think a minute. We want there to be focus whenever the insert link form is loaded. So why not put the set focus code in that load event? Actually, I think it is already being called from there, and it’s not working.

Never mind. I have fixed the problem I came to fix. I will fix the other problem another day.

One problem I have is that you can’t use the <code> tag without going into HTML mode. Must fix that.

Uncategorized ,

Journeyman didn't come last last night

28 November 28 2007

According to the overnight ratings at Zap2it, Journeyman didn’t come in completely last place last night. CSI: Miami won the night, but Journeyman came in second for total number of viewers (but third for number of households, which is what they actually care about). So that’s some nice news. But not that encouraging.

The people at the Save Journeyman page have a new campaign to send Rice-A-Roni (I have no idea what that is) to NBC. Apparently this Rice-A-Roni (it sounds like a combination of rice and macaroni) is made in San Francisco, where the series is set.

It will be unfortunate if Journeyman is cancelled, but as long as it gets a decent ending (and it looks like it will) then it won’t be too bad.

UPDATE: Here’s another article about Journeyman’s ratings for 26 November, from a different “Save Journeyman” blog. 

Personal Rants , ,

Below the Queen's head

27 November 27 2007

A while back I noticed that the initials IRB appeared below the portrait of the Queen on recently-minted coins. It turns out that those are the initials of of Ian Rank-Broadley, the man who drew the portrait. I found that courtesy of the Wikipedia article on the British one penny coin.

So now you know the reason for those letters. I thought it might have had something to do with the series of the issue or something. But it was much simpler than that. It seems a bit odd that whoever is in charge of choosing the image allowed the initials on there. It seems weird for the artist to sign coins. But then, our notes used to have © Thomas De La Rue and Company on them (the paper notes).

Personal Rants

The end of some of my sports picks applications

27 November 27 2007

During the Rugby World Cup, I stared an application on Facebook: France 2007 World Cup Picks. It had that stupid name for trade mark reasons. (Another app turned up a few weeks later called Rugby World Cup complete with the real logo, but it didn’t have anything to do with the IRB.) It now called Rugby Picks and is following the Heineken Cup.

At its peak, there were 35,000 users. The peak was about halfway through the competition, and it dropped off significantly by the end. At its peak I thought, wow, this is a good idea, why not do it for some other sporting competitions. So I did. And now there are apps for the Premier League, Champions League, NBA, College Football and NHL. And the A-League and cricket too. Except half of those have next to no users and updating the scores is taking a up a lot of time, for no gain.

I wrote Rugby World Cup app for two reasons: to learn about Facebook applications (pass) and to draw people to Zemobo (fail).

Because of the time involved, I’ve had to make a decision, and I am going to close down the applications that have less than 300 users. So that means goodbye to:

  • A-League Picks
  • College Pigskin Picks
  • Cricket Picks
  • Fútbol Picks
  • What The Puck?
  • Basketball Picks

I’m sorry for the inconvenience. If anyone who reads this is interested in purchasing and maintaining an application (VB.NET/SQL Server code base – you’d get a non-exclusive license to the source code), please send me a message on Facebook (the link’s on the application pages).

These ones are still around:

It’s interesting to note that it’s rugby and football (both big in the UK) that are getting the most users.

Uncategorized

I am the world's authority on Brazilian-European monetary relations

27 November 27 2007

It seems so, anyway. I wrote an article in March about finding a coin from Brazil that was similar to a 5 cent euro coin. If you search for “brazilian money euro” on Google, I come out number 1. I’ve had three hits from that.

I also got a hit from “entavos brasil”. But there’s no such thing as an entavos. It’s supposed to be centavos. But I couldn’t see the C on the coin. Presumably somebody else couldn’t either. Funny.

I’m also popular for “similar to euro” and, of course, “arun stephens” (with or without quotes). Perhaps one day I will be number one for “arun”. I’m the number 2 arun if you restrict the search to New Zealand. That’s cool.

Personal Rants , , ,

Perhaps WordPress MU needs too much customisation

26 November 26 2007

After a bit more experimentation, it looks like I might need to hack around with WordPress MU a bit more than I originally thought. Which suggests that perhaps it’s not the best thing to use for the travel blog site.

Stuff that’s very important is the ability for users to upload photos into their blogs inline easily (and not by uploading first and then adding the uploaded photo to the post) and a fixed list of categories, to be used to associate posts with places. Apparently WordPress has “global categories” but there is no common list of categories. Instead, if a user creates a new category with the same name as someone else’s category, they will become associated. This probably stems from the fact that WordPress MU is based on WordPress proper, which doesn’t have any support for multiple blogs and this was the easiest way to provide such a feature.

Also, a big problem with WordPress MU is that it doesn’t work very well with Internet Explorer. The WordPress crew also seem to have some sort of vendetta against IE, putting a link to a web site encouraging you to switch browsers at the bottom of the admin page. It’s kind of arrogant really. They’re probably saying “don’t use IE because it’s bad*” because they don’t want to say “we’ve only made this work with Firefox et al”. There’s also no use complaining that IE doesn’t implement standards properly, because IE is by far the most used browser. You have to e pragmatic. (* The linked-to site talks about security problems with IE.)

So, I shall now head back to my feature requirements list and evaluate some other platforms as well. Drupal and ELGG seem to be in the running as well as WordPress MU.

Technology

Customising WordPress MU

25 November 25 2007

Last year, before my trip to France, I thought about starting a web site where anyone can set up a blog about their travels. Plenty of them exist already. None of them are any good!

WordPress, which my blog now runs on, is pretty good and mature. They have a multi-user version, called WordPress MU, which would suit me nicely. It’s very extensible through a plugin architecture, so it should be relatively easy for me to add some decent geotagging. I will chronicle my efforts here.

WordPress has two classification mechanisms: categories, which are a fixed (more or less – by default you can add categories at any time) list, and tags, where you just type whatever tags you want. I want to disable (sort of) categories, and let users only use tags. I say “sort of”, because the categories are going to be a site-wide hierarchical list of places. Users won’t choose the place through the category hierarchy. Instead, they will type the name of a place and the Google Maps geocoder will look it up for them. The coordinates of the article will be saved, and the post will be categorised automatically. That’s the idea, at least. I will reuse the geocoding interface used for Zemobo.

So my first task is to remove the ability to select a category when writing a post. This will also have to be removed from the RPC thing that applications like Windows Live Writer (which I am using now) use. No idea how to do that. I think it will actually involve hacking the existing code rather than using plugins.

You can follow my progress here: http://arunstephens.com/category/travel-blog/.

Technology

Save Journeyman

25 November 25 2007

Journeyman is a new show for NBC this year, airing Monday nights at 10:00, after Heroes. It’s about, Dan Vasser (Kevin McKidd, Rome), a reporter for the San Francisco Register, who seems to suffer from regular headaches. Now, that doesn’t sound like an interesting story, except unlike most headaches, Dan’s headaches are accompanied by time travel. It’s kind of like Quantum Leap for the 21st century, except Dan doesn’t take the place of someone from the past. And there’s no Sam (although there is his ex-girlfriend, Livia, also a time traveller, who helps him out from time to time, much to the initial chagrin of Dan’s present-day wife).

In each episode, Dan tracks the life of someone, and attempts to put things right. He’s still learning the rules of time travel, and in the latest episode he learnt the hard way how changing history can affect the present.

Dan’s wife, Katie, knows about the time travel (Dan proved it by burying her engagement ring he was getting fixed under the deck of their house in a locked box with the newspaper from before they met), and, until Dan changed history, his brother Jack, a cop, was also beginning to believe him.

But I am writing this not to give you a rundown of the show, but to encourage you in America to watch it! Because otherwise it might be cancelled. It’s doing pretty poorly in the ratings. It does have decent lead-in with Heroes, but this second season of Heroes is nowhere near as good as the first. It’s only up against CSI: Miami on CBS and, it turns out, a new(ish) show I’ve never heard of, October Road, on ABC (up till last week it was against The Bachelor, which I didn’t know they were still making!)

Please watch Journeyman! (Especially if you have a Nielsen box!)

UPDATE: Apparently there’s a bit of a campaign to save Journeyman: See http://savejourneyman.funurl.com/ and http://save-journeyman.blogspot.com/ for more details.

Personal Rants , ,

"sudo" for Windows Vista

23 November 23 2007

If you’ve ever administered a UN*X box before, you’ll know that you should never log in as root, but rather log in as a normal unprivileged user and use sudo or su to perform administrative tasks. That has always been best practice for Windows boxes too, but usually never followed, until it was forced upon us (you can turn it off though) with User Account Control, or UAC. Even if you are an Administrator account, your account runs in an unprivileged mode until it needs to become an Administrator, and then you are prompted to confirm this.

I sometimes find that I need to run ipconfig /flushdns, especially seeing that I have been playing around with a local DNS server this week. In Windows Vista, that command needs to be run by a privileged user. But if I am in a command prompt, I can’t change to a privileged user. I have to open another command prompt, usually by right clicking on it after searching for cmd in the start menu, and choosing “Run as Administrator”.

Until now… This utility, by Michael Murgolo published in TechNet Magazine, is the equivalent of the sudo command, for Windows. There are a few other related tools in the download, but the “elevate” tool is the one that I need.

Technology ,