Nintendo Wii forums Forum for writers phpBB mods Essays on copyright Dating advice Narnia forums

Movable Type plugin: Gravatars

Gravatar, identicon Gravatar, monsterid Gravatar, wavatar

I recently saw a few blogs that had photos by the author of each comment.  I thought, "Wow, those blogs must be very popular if people are willing to upload photos!"  But then I saw the same dude with the same photo on a couple different blogs, and the blogs were smaller than mine.  So I started looking into it, and I learned about gravatar.com.  That Web site allows you to associate a photo or icon with your email address, so that no matter where you post, your photo goes with you.

Of course, you wouldn't sign up if you want privacy.  But lots of people are signing up, and I want to show the icons they're using.  So I found an old Movable Type plugin from 2003 that does the job.  But it does it badly -- it has a feature that no longer works (the border option), and it doesn't use any of the newer plugin features.  So I've revised it to use the newer Gravatar URL format as well as use the MT plugin interface.  However, I haven't revised it to work with MT 4.  No.  Instead, I've revised it for MT 3.

Why revise for MT 3?  Well, there are a lot of us still using it.  I won't be onto MT 4 for another 6 months or so.  But I want Gravatars now.  So here we go.

Read more...

You're a great man, Joseph Richardson

Joseph Richardson's photo

I hope that when my time comes, I can be half the man you were.

New Greasemonkey script: Slashdot nuzak CSS

I created a script that is hosted over at userscripts.org.  It's called Slashdot nuzak CSS.  It modifies the appearance of slashdot.org so that it doesn't look as clunky.  It thins out the big fat box drawn around each comment, it makes the "reply" buttons look a little more stylish, and so on.  It's not a big overhaul, but it's a nice little cleanup project.

Thanks to Slashdot member nuzak for coming up with most of the CSS that is used.

-Tony

Greasemonkey: PHP multi-byte string warnings

Just a quick note to say that I released a new Greasemonkey script.  It adds a warning box of text to any php.net manual page that features a function that is dangerous to multi-byte strings.  I'm sorry, you want that in English?  OK.  Have you ever posted something to a Web site and found that characters were missing or truncated or there were lots of question marks or boxes where letters should have been?  Usually that's because the person running the site doesn't understand how letters work at a programming-language level.  They think everyone on Earth is using an English keyboard with the letters A-Z.  When they get data that isn't A-Z, their Web site programs don't know what to do with the data, and they mangle it.

It turns out most people don't use just the A-Z characters, even people who write in English.  Lots of people want to use the Euro symbol, for example.  That isn't a "normal" letter, and so lots of Web sites just mangle it.  Part of the problem is the programming language used on these Web sites.  In particular, the PHP language has two main "modes" for handling characters.  The first, and the default, is basically to treat everything like ASCII.  ASCII is the A-Z standard.  Unfortunately, that severely damages the text that people type nowadays.  So PHP has a second major mode of operation, and that is to set itself to UTF-8.  UTF-8 includes lots and lots of characters, and it's backwards compatible with ASCII.  So pretty much every Web geek should use it. 

The problem?  The online PHP manual doesn't offer much of a warning any time you look up one of the old, bad ASCII functions.  I personally replaced some old, bad code with... you guessed it... more old bad code.  Why?  Because I looked up replacement functions and found what I thought would work, only to realize that the replacement functions were also bad and came with NO disclaimer!  And that leads us to my Greasemonkey script.  This script will add disclaimers to php.net, on any page containing a bad old function.  If possible it will also tell you a better way to do what you want to do.  It's basically code help for PHP developers.

You can get the script on userscripts.org.  Please install it and then view some of these pages to see the disclaimers it adds:

http://www.php.net/ucwords
http://www.php.net/strstr

Barack Obama, Jeremiah Wright

Older entries:
May 2008 April 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007

Welcome

Welcome to the Boyd family site. Most material is by Tony Boyd. Use the sidebar to catch up on other family members, or to check out Tony's projects.

Tag Cloud

fitness, funny, games, graphics, greasemonkey, harry potter, movable type, movies, nontech, obama, photos, php, phpbb, planescape, poetry, politics, pst, rpgs, sacrifice, saddest photo ever, slashdot, sydney bristow, tech, the blog mod, tv, utf8