New Yahoo7 site

Yahoo7 HomepageYahoo and the Seven Network have combined to create a new ninemsn clone: Yahoo7. They’ve done well and created a site that is a CSS-based layout (ie no tables except for tabular data). It looks nice too, nicer I would say, than ninemsn. I think this site may actually manage to pull my homepage away from Google Personal Homepage. Y7 doesn’t compete for customisation, but it’s got more personality, and personality goes a long way. There’s some good use of DHTML/AJAX, not overwhelming and showy, just used as it should be, i.e. to make things easier to use. I particularly like the little scrollable news box (but just swiped from the news.com.au site) and the customisable local weather widget.

All very nice, but can someone please tell me why, after all the effort of creating a great CSS-based site, you would go ahead and not specify a content-type and put the DOCTYPE tag in wrong?

Continue reading

Subversion in all its coolness

Graham Asher explains exactly why I love Subversion and why I’ll never go back to CVS:

Some of my clients used CVS, which is completely free and has a Windows client. Unfortunately CVS is very hard to use (in fact I find it unusable without severe, painful effort) because it doesn’t have uniquely-numbered states like Perforce change-list numbers. The great thing about Perforce – in fact the one thing that is essential in a usable source control system – is that every check-in gets a single unique number called a CL or change-list number. CLs start at 1 and go up one by one for the lifetime of the source code repository.

The solution is Subversion. I promise you that Subversion will change your life. It is free, open source, has a wonderful Windows client called TortoiseSVN, and uses unique numbers, incremented one by one, just like Perforce, for every change. In fact, it goes further than Perforce and stores every state of the file system – that is, not just changes to files, but file moves and renames. You can give arbitrary attributes to files and it stores and tracks them too.

At Liquorice, we use Subversion instead of FTP now. We have a subversion repository that all 3 of our offices have access to, which is where we store all the data for each of our sites. So this means that I can create a new website for a client on my local development server here, submit it to the repository, and the check it back out again on the live server. A cron job scheduling an svn update command every 20 minutes on the live server means that I don’t even have to log into the live box to update it (unless I want to see the update right now).

It even keeps the database in sync, as I just keep a mysqldump file as part of the repository and update that every time I make a database change. Subversion updates, run the mysql script on the live box and bang, version controlled database.

The TortoiseSVN client is nice, especially for non-tech users, but I find myself just using the command line interface. It’s a whole lot faster to just have a SSH window to my dev box open all the time and just type svn ci -m "" when I want to commit, rather than opening explorer to the samba drive, right clicking on the folder, waiting for windows to parse the million or so functions I have mapped to the context menu before displaying it, then select SVN Commit, then have to wait for it to run and dismiss a popup window when it’s finished. This is in no way a disparagement on the TortoiseSVN software, it’s great. It really lowers the barrier to entry for new SVN users.

Yahoo! and Google Sitemaps

*whistling* “anything you can do I can do [not so much] better…”

Yahoo! released it’s own version of Google’s sitemaps service last year, which is just a simplified way of submitting your site to the seach engines. NetRegistry has a quick rundown of how Yahoo!’s works and how to set it up. SearchEngineWatch has an interview with Shiva Shivakumar from Google about their service

However, while Yahoo!’s service is just about submitting your pages to the search engine, Google’s gives you access to basic analysis of your site once you’ve setup the sitemap.  It’s nothing fancy, it’s certainly not a replacement for Google Analytics by any stretch of the imagination, but it’s cool none the less.  Probably the most useful information is the Crawl Stats and Site Errors section, which shows you the imformation about the Googlebot’s attempts to index your site.  You can see URLs that the bot couldn’t reach.  Unfortunately it doesn’t tell you how it got those dead links, so you have to dig around in your site to find where they’re linked from, but at least it gives you a starting point.

For WordPress users there’s a really nice plugin to automatically create the Google sitemaps files.

Technorati Tags: , ,

Image link generator

From a discussion with Jesse from PixelZion, I’ve got a little tool that can help you promote your site. If you have a number of banners or other imags that people can you to link to your site, this tool will create the form to place on your site. The form will automagically create the code for people to copy when they choose an image.

If this doesn’t make any sense, have a look at the form in action on the PixelZion site. The form can create either standard HTML code, or BBCode for use on forum signatures. To use the form, fill in & submit the form, then save the imagelinks.js file that is generated at step 1 into the root folder of your site, then copy and paste the code at step 2 into the page on your site where you want to see the images.

Feel free to use this wherever you like. A return link somewhere would be appreciated though.

IE7 improvements

The IE7 dev team are actually going to change CSS handling to be more consistant with the standards, and have detailed a few on their blog.

Address CSS consistency problems. Our first and most important goal with our Cascading Style Sheet support is to remove the major inconsistencies so that web developers have a consistent set of functionality on which they can rely. For example, we have already checked in the fixes to the peekaboo and guillotine bugs documented at positioniseverything.net so use of floated elements become more consistent.

’bout time too. major inconsistencies sounds so much nicer than stupid bug doesn’t it. The PNG support is a great thing too, hopefully PNGs can get the popularity they deserve.

All Consuming Bookmarklet

Because All Consuming is so very cool, and I’m so very lazy, I’ve written up a small bookmarklet that simplifies the process of adding an item to AC. Basically what it does is whenever you’re looking at an item on Amazon you can click on the bookmarklet and it will open up the item’s page in All Consuming in a new window, from which you can add it to your list.

Unfortunately, because AC uses it’s own id numbering system for adding items to lists, I can’t just make this bookmarklet automatically add the item (Erik, please tell me if I’m wrong here!), but it’s only one extra click to add the item anyway.

Bookmarklet link: Add to All Consuming (Updated link 2005-04-13)

How to set it up:

  • IE 5.5 and above: Right click on the link above, and then click on “Add to Favorites…”
  • Netscape 6 and above and Mozilla/Firefox: Drag the link into your bookmark bar or right click on the link and then click on “Add bookmark”/”Bookmark this link…”.
  • For Safari: Drag the link into your bookmark bar.

This bookmarklet works for Amazon URLs that have the /asin/1234567890/ format, i.e. The Shadow Rising and the /detail/-/1234567890/ format, i.e. The Eleventh Hour. If there are other formats that I’ve missed, please let me know.

To do: Expand the script to search the body text of the current page for ASIN’s and allow the user to select from a list.

Word or RTF parser

Does anyone know where I can get a script (either Perl or PHP) that will parse .doc or .rtf files? I’ve tried using RTF::Parser and RTF::TEXT::Converter, but they just return a bunch of blank lines. Win32::OLE would work nicely, but it relies on the underlying win32 architecture to run, i.e. it needs to run on a Windows box.

Basically a client has a site that we maintain, and the content that changes regularly is provided in a standard Word document, which would make it very simple to automate the updates if I could just figure out how to parse the document.

Local Happenings

A few web-related things happening around locally in the last few days:

WordPress powered company site

The one item on my to-do list which has been there the longest has been to add a CMS to control the news section on our website. Typical for a web-development company, our own website is the last thing on our priority. Well, today I can knock it off my list, all thanks to WordPress. After toying with a couple of proprietary products, or the possibility of writing something myself (yeah, sure, I’ve got the time for that) I realised that all I really wanted was a cut-down blog. There’s no need for comments or any of the other features, but the interface, along with the ability to restrict authors to certain activities fit the bill exactly. Not to mention the ability to have RSS/Atom feeds.

Because I had limited time, the solution I came up with is a bit of a messy hack, but it works. I have a fairly simple principle with development: If it works, it was the right way to do it.

Continue reading

Migrating to WordPress 1.5

So I’ve had WordPress installed for all of a week & then they go and release a new version on me. Sigh.

Anyway, I figure if I intend to keep up my web-nerd cred I’d better install it. So I’ve done that & I now need a way to import all my messages from this site to the new site. I’m not game enough to do the direct upgrade thing that’s descibed, I wanted a parrallel cut-over. That’s when I discovered one thing really lacking in WordPress: There is no export function.

WordPress has plenty of good scripts for importing posts & comments from other platforms, but nothing to go from one copy of wordpress to another, specifically from one version of wordpress to another. The upgrade instructions show you how to change your current blog from 1.x to 1.5, but not what to do if you want to have them both running at the same time.

In the end I had to do it by doing a DB dump and running the SQL script on the new DB, but I still needed to hack that slightly to get it to work. There are 4 tables that contain the information about the posts & comments: wp_categories, wp_comments, wp_post2cat, wp_postmeta & wp_posts. The only structural change as far as I can see is the removal of the ICBM data (i.e. the post_lat & post_lon fields) from the wp_post table. As it was far easier to modify the 1.5 database than to get the export script to exclude those fields, I just added those two fields to the wp_post table, ran the script then dropped the fields. See, easy!

This was way to fiddly for your average joe-user, there really needs to be a way to export all your posts & comments in a standard format that can be imported into other WordPress blogs and also into other platforms. If you do need to do this, here’s the code:

alter table wp_posts ADD COLUMN post_lat FLOAT(12,31) after post_excerpt;
alter table wp_posts ADD COLUMN post_lon FLOAT(12,31) after post_lat;

###INSERT STATEMENTS HERE####

alter table wp_posts drop column post_lat;
alter table wp_posts drop column post_lon;

Just replace ###INSERT STATEMENTS HERE#### with the insert statements from the database backup (procedure is shown here) for the tables mentioned above.

So anyway, the long and the short of it is that we’re now running on 1.5, and I haven’t changed anything yet. Time to start on a whole new template!. I’ve installed the very nice Greentrack theme and over the next few days/weeks I’m going to try and hack it into exactly what I want. Props to Sadish for his top work on wpthemes.