It's Fixpert, the bike lane of the internet, a blog about track bikes, fixed gear bicycles, comics, illustration, random acts of awesomeness!

Using DOM Scripting for Fixpert Comments

I want to be all spiffy and change the background color on my comments on Fixpert so that when I’m scanning the comments on a post, it’s easier for me to skip over what I said. Seems like it will be helpful for my readers too, I don’t expect that it will get in their way at all.

There is probably a PHP-based solution for this, but PHP is not my forte. Instead, my idea is to use DOM Scripting to look for any comments where the value of the href is http://www.fixpert.com. Then once that particular link is identified, I can walk up the DOM to its parent li and assign it a class of site-admin. Then tweak the background color in the stylesheet.

Thoughts? Is this a dumb way to attack this problem? Thanks guys!

^ 8 Comments...

  1. Jake Ingman

    I use this for RtF:
    http://inner.geek.nz/archives/2005/01/12/wp-plugin-official-comments/

    Plugins are our friends.

  2. Jake Ingman

    Oh and I also wanted to say, that anyone could appear as “you” just by putting in “fixpert.com” as their URL. Anyone mean, that is.

  3. Sally ala Fixpert

    That’s awesome, thanks Jake! Man, just checking ol’ fixpert on the PC — my site looks like crap on the PC, the fonts look like doodoo without font smoothing (or whatever they call it in Windows) turned off. But I digress.

    Thanks again Jake!

  4. Peebers

    the site’s awesome. looks great on my PC. i’d scootch over and check it out on my Gf’s mac, but………..eewwww

  5. Sally ala Fixpert

    Got it! The plug-in worked, pretty easy too. I picked an ugly background color, haha. I’ll have to fix that later tonight. Thanks all!

  6. Sally ala Fixpert

    Alright, cool. Now I got the bike lady talkin’.

  7. Tim McCormack

    The alternating background colors look weird. For example, on this post, I see a bunch of comments with white backgrounds (matching the page background), and only a couple with a special, highlighted light blue background — those appear to my eyes as special comments, likely by the blog author. Of course, that’s not quite right.

    If you’re going to use alternating backgrounds, pick two colors that don’t match the page or comment area background and have roughly the same “highlight effect” to them.

  8. Sally ala Fixpert

    Yeah, this is great feedback. Thanks Tim!! I’m going to have to rethink how I present comments. Think think think…

) Your Reply...

© 2004-2008 Fixpert Subscribe to my RSS