My two sheds // Personal take on tech

Coding

Pages (2): [1] 2 »

June 2

Widon't in XSLT: don't be a widow-maker!

Filed under: Coding, Symphony

Bad typography on the Web doesn't exactly kill people (even if it is believed to be 95% of what web design is) but it can still make widows - typographic widows, that is. To quote Shaun Inman:

For those who don’t know, in typesetting, a widow is a single word on a line by itself at the end of a paragraph and is considered bad style.

Compare these:

This is a widow
Now with Widon't!

Helping website owners to fix the most frequent errors automagically will hopefully make online texts more readable and stylish as well. Mr. Inman came up with a simple yet perfectly working solution: replace the regular whitespace between last two words of a title with a non-breaking space (i.e.   entity) - and released it in a form of an easy-to-use Wordpress plugin. It is now also ported for Movable Type, Expression Engine, Textpattern etc.

Today I make Widon't available for Symphony and other XML/XSLT-based engines via an XSL template. Read on for full source.

Read More. 6 comments.

July 31

Download updated Instiki image for Mac OS X

Filed under: Applications, Coding

I installed Instiki Wiki-clone on my Mac about 6 months ago and used it ever since as my personal knowledge base, notepad and GTD tool – pretty much like any other Wiki/Instiki user. I liked it more than other clones because of ease of installation on my iBook – it came as a self-contained DMG-image with one file inside that I had to drag into my 'Applications' folder, double-click it – et voila!

Alas, the latest version of OS X .dmg distribution available from Instiki site is 0.9.2 which is several releases older than current 0.10.2. While there are some instructions available to upgrade they are however not accurate and clear enough.

Read More. No comments made.

April 3

Guestbook for Googlebot

Filed under: Coding

Some time ago there was this 'googlebot' PHP script circulating on the net that sends you an email every time Google's crawler is checking your page. However, after some time the hype wave went down – if you own a blog which gets updated regularly, Googlebot will check your pages for changes some times twice a day. Do you really want to be told every time it happens, for every page of your website?

So here is my version of googlebot script that generates a plain text log to notify you in a less obtrusive way. I've also included a check for robots of other search engines besides Google (namely Yahoo!, MSN and Russian engine, Yandex).

Read More. No comments made.

March 19

XHTML-friendly Javascript: I stand corrected

Filed under: Coding

In my previous post on this issue I've made a mistake – resulting code was in fact not valid XHTML Strict!

Read More. No comments made.

March 18

Integrating news feeds using Magpie RSS

Filed under: Coding

Changed two of my PHP scripts which fetch RSS from del.icio.us and render my 43things goals for the sidebar.

The scripts were taken from 'Integrating del.icio.us with PHP and Magpie' article at MovableBlog. This code works but not GoodEnoughTM – from time to time the feeds were unavailable which resulted in an error message that screwed up my layout. I took the idea from Magpie RSS FAQ to suppress errors and make it display a less obtrusive message. I have also tweaked the code here and there. The result can be seen below.

Read More. No comments made.

Pages (2): [1] 2 »

Subscribe to new entries