Tag Archives: javascript

four times in two months

i upgraded my blog again last night, to help joen with some bugsquashing on Fauna RC2. after not touching my wordpress install for the better part of a year, it’s odd to be updating it this many times in 2 months. I still had to do a manual hack to get my WYSIWYG tabbed editor to work. Nazgul’s suggesting that i should keep doing this, so i used my handy new computer hacking SVN skillz to make a patch, so i don’t have to work so hard next time:  UPDATE: something in 2.1.1/2.1.2 changed, and my patch stopped fixing it.  this is a new version.  you may also need to hack gzhandler() out of functions.php.


the upgrade also means that my WYSIWYG editor is back to the standard font and padding. i dunno how i feel about that.

Patching instructions after the jump


Save your contact page from spam

there are a couple of different methods for blocking email harvesting bots from your contact page. Some involve javascript and obfuscating the email address. some involve putting the address in an image. my new favorite trick involves both.
first, go get your email address turned into escaped HTML characters. Take the code they give you, and wrap it in a span with a specific class, and add the same class to the link:

<span class="jsmail"><!--
document.write("<a href='mailto:put your scrambled address here' class='jsmail'> wp-admin [at] archgfx [dot] net</a>"))
// --> 



I also changed the ‘contact us!’ text to a human readable, but not copyable version of the email address. Now, get your email turned into an image, and we’re going to use the image in CSS, so that even if a real person is browsing the site with javascript disabled, they’ll still see the email address:

.jsmail {

display: block;

width: 129px;

height: 11px;

background: url('http://safemail.justlikeed.net/e/dd6330802be7d20f41dc95336e2acbfa.png') no-repeat 0 0;

text-indent: -9000px;


i like it. it’s not completely accessible, but it’s pretty good. it’s reliable, and it won’t be confusing to people with older browsers or strict security settings. Here’s an example.

Exposing the Lurkers

Engtech is posting everywhere about MyBlogLog making a widget for WordPress.com blogs. I don’t know that the Custom CSS upgrade is actually necessary. I hope not, background-color:teal; is really ugly, so i changed it.

Kudos to MyBlogLog. they’re pulling the same trick as feedburner’s feedflare, calling images that are actually generated on the fly. It’s a much better solution than javascript. the more companies that realize this, and starting running GD scripts in order to appeal to the myspace crowd, the less whining from people like scoble about wordpress.com’s perfectly valid security settings.

i have yet to see whether it works, though. I don’t know if i should have the community pointed at sbk.wp.com, or sbk.archgfx.net.

turning off akismet

my attempts at delurking aren’t going very well.  nonetheless, raven’s anti-spam has brought spam to a dead stop.  after commenting myself (man i’m uncool), i found this:  akismet was blocking the good comments.  not that they were hard to find in the list, since there were no spam comments.

there’s a simple choice. akismet is disabled.  akismet is great if you’re willing to accept some false positives.  i’m not.

in which it becomes clear that scoble is, in fact, a freeloader.

You’re a VIP, and you’re still not happy? Whiskey. Tango. Foxtrot.

Seriously, you already got a custom template, and the right to run ads on a service that no one else does, and you want more?

I mean, there are people asking for this stuff every day on the forums. but they didn’t get a sweet deal from matt. they got face value, possibly before there was even so much as a TOS.

They don’t have the ability to change their template files, but they can buy a CSS upgrade. Components from other web companies? did you mean like meebo? or like flickr? del.icio.us? or perhaps you have an RSS feed you’d like to display?

wordpress.com stops you short in one place, and one place only. javascript. (well, flash too, but i’ve seen few complaints about that). the only reason you think that javascript is a limitation is because the host of a million splogs lets you add them. And you see where that got them. It’s not a new limitation to the million of mypace users. or livejournal users. or xanga users. or msn spaces users.

so, yes, robert, i’d choose wordpress.com for any blog for myself or any of my friends. it’s got the horsepower under the hood, without the stigma of being a dramafest for teenage girls. But then, I know more CSS tricks than most folks. and the flexibility of the sandbox is lost on those who don’t.

I hate javascript

no, i’m fucking serious.  del.icio.us launches network badges and they wrap 2 images, 5 links, and a paragraph inside a javascript for NO FUCKING REASON WHATSOEVER.  so now whenever joe n00b comes bouncing into the forum asking how to add it to his sidebar, we have to explain the intricacies of ‘view selection source’, so we can grab the HTML instead of the stupid javascript.

i’m only so pissed because networks are such a good idea.

at this point, though, the forum is so full of threadjackers and adsense haters on the warpath, i’m having a hard time spending time in there.