This is old content! The graveyard is a snapshot of content created from 2002-2005. For new stuff, visit Maniacal Rage.
 

More Changes

posted on february 20, 2003, tag: site

In a constant effort to make things better around here, I've made some more adjustments to the site today. Two days ago I upgraded to Movable Type 2.62—a quick and painless process with no problems whatsoever—and today I spent a bit of time bettering the comments popup window.

Changes:

  • Added a "post yours" link to the top of the window. Clicking this will send you down to the post form. This will be especially handy if there are lots of comments you don't want to scroll through.
  • Text input fields have been widened to fit the width of the comment background boxes. Looks better now.
  • Changed the "Remember Info" option from a single checkbox to two radio buttons (idea credit goes to Jeremy Hedley), which now function much friendlier. Select Yes if you want to be remembered, No if you don't. Simple.
  • Tab order for input fields has been properly ordered, skipping over the remember radios.
  • I've added a list of allowed HTML tags just above the comments text area. Currently, you can use a href, b, i and u. If you think I should include something else, let me know. Note that URLs are not auto-converted to links with HTML turned on, so you do have to write HTML for all of your links. You do not have to include a target tag (see next item).
  • All links posted in comments will be automatically* assigned a target tag value of _blank. You don't have to specify this tag, and this will allow for links to be viewed free from the small comment window.
  • I've removed the "FORGET ME" button (because of the new remember me method), and changed the label of the post button from "POST" to "Post Your Comment". I mention this because from now on, if you want to be forgotten, just select the "No" radio next to "Remember Me" (as noted above). I've also centered this button (as well as the note below it).
  • Added a close window link, center-bottom.
  • Added a "Preview" button, allowing you to preview your comments before posting them

* Using a simple JavaScript function, you can make every link on a page open with the target of your choice. The drawback to this, of course, is that every link will get this value if it doesn't already have one of its own. To avoid problems, set any links you don't want to open in a new window to have a target of _self, and then place this in the HEAD of your document:

function reTargetLinks () {
     for (var i=0; i<=(document.links.length-1); i++)
     if ((document.links[i].target == '') || (document.links[i].target == null)) {
          document.links[i].target = 'blank';
     }
}

Then, in the BODY tag of your document, invoke this function when loading:

<body onload="reTargetLinks()">

This will make every link without a target tag open in a new window. Thanks to Ben Trott for the idea. Works well.

Comments

There are 10 comments, comments are closed

Shawn on 02/20/2003:

Two questions:
1)How did you go about selecting precisely which HTML tags are allowed?
2)Why is it necessary to include 'http://' in the URL. Doesn't MT automatically handle the inclusion of this?

All in all you have been making some very elegant and smart changes to your site, many of which I want to (and will) copy.

Garrett on 02/20/2003:
  1. I just picked some. The ones I thought people might need. And only those. I don't think anyone will ever notice. Again, I'm open to suggestions.
  2. I'm testing this right now.

Oh, and thanks (credit also wouldn't hurt if you copy noticeable things...).

Garrett on 02/20/2003:

Yes, Shawn, you're right. HTTP is added automatically. Removing this feature. And done.

Shawn on 02/20/2003:

Actually, I'm positive that you don't need 'http' because I never type it and my link always works.

And my real question was, how do you control which HTML tags are used, but I've since learned how.

And last, of course I'd give credit. It seems to be policy in the blog community to borrow and give credit. I mean, I'd do it regardless. I'm in the middle of tweaking and once satisfied I'll post as such. (fyi, my site is now called MorrisonRage)

Garrett on 02/21/2003:

Tomorrow I plan to post an entry about Sanitize, as I feel its documentation is a bit screwy and most people don't even know what it's doing.

And I like the name.

Linus on 02/21/2003:

Everything looks great. I noticed one bug though. You should set a for the "close window" link in the comments window — when I click it I get "javascript://" in a new window.

Garrett on 02/21/2003:

Good catch. Bug squashed. Thanks.

n3verm0re on 02/24/2003:

Is there any reason you chose not to include the preview comment function? If this was your own script, then I might understand the reservation. Extra work, blah, blah. But seriously, it's supported out of the box with MT.

Garrett on 02/24/2003:

I never use them, so I didn't add it. But, because you've asked, the feature now works. Enjoy all of your previewing.

n3verm0re on 02/24/2003:

Fabulous. I shall enjoy my previewing now.


See Also

View the archive

Original iPod Introduction
How far we've come in just a few short years. Here's where it all started.

Front Row on Non-iMacs
Going to try this tonight!

WriAShorStorWe!
DY starts a one-week short story writing event for people to lazy to enty NaNoWriMo. VerCooIdea.

Lost Rhapsody
Funny Flash movie using Weird Al music and Lost stuff. Lyrics make a surprising amount of sense!

Jed's Other Poem
Unsolicited music video made on an Apple ][. Fantastic!

Printers Output Secret Barcode
The government is keeping tabs on what you print, with the help of major printer companies.

Dreamhost Promo Codes
DH already has very cheap, very good hosting—this just sweetens the deal.

Photos of the new iPod
Just received my new iPod and I put a few photos up.

PEZ MP3 Player
Funny idea that actually looks kind of neat. I like that it comes pre-loaded with "indie" music.

HD Easter Egg
"My Name is Earl" on NBC gives viewers with HD TVs a little easter egg. Cute, but weird.