Posts Tagged ‘blogging’
Released from Akismet prison on a technicality
August 11th, 2010 at 8:11 am
(For background see this post and this one. Nutshell: Akismet, the spam filter for WordPress blogs, has for weeks been blocking me from commenting on WP blogs other than my own. My attempts to get Akismet to unblock me have failed.)
Yesterday morning I found this message from Akismet in my inbox, a response to an email I had sent the day before:
Hi,
I am sorry for this happening and the delay.
I believe it is fixed now and that your comments will appear.
So I went back to the dummy blog Akismet support has set up for testing problems like mine1 and tried to leave a comment. I filled out the comment form this way:
Name: Dr. Drang
Email: drdrang@gmail.com
Website: http://www.leancrew.com/all-this/
Comment: Blah blah blah
When I clicked the Post Comment button—you’re way ahead of me, aren’t you—the comment disappeared into the spam filter and wasn’t published. I decided to try again with slightly different input:
Name: Dr. Drang
Email: drdrang@gmail.com
Website: http://www.leancrew.com
Comment: Blah blah blah
Note the shorter URL. This comment was published immediately! I tried again with the longer URL and that comment was blocked, just like the first one.
This was at my home computer. I went through the same procedure at work and got the same results. Pretty clearly, then, it’s the URL that’s triggering the filter, not my name, email address, or IP number.
So now I have a way to comment on WordPress blogs. Strictly speaking, the problem with my being blocked hasn’t been solved, because my URL is still on Akismet’s shit list. But at least I have a workaround. I tested the workaround on Tom Levenson’s Inverse Square Blog, where I’ve been blocked several times in the past, and my comment sailed through unimpeded.
I sent off an email to Akismet support, telling them what happened, and got this surprisingly speedy response:
I will mention this to one of the engineers and see how it comes about,
I do apologise though for the problems.
Maybe the problem with the longer URL will be fixed, maybe not. Either way, I’m out of Akismet jail.
What’s really weird about this is the reason I thought to try the shorter URL. Just the day before, I finally got around to changing my .htaccess file to redirect hits on the site’s home page (which has never had anything of interest) to the blog—something I’d been putting off for over a year. And it came in handy almost immediately. You might think this would teach me a lesson about never putting off until tomorrow, etc., but I’m sure it won’t.
-
Akismet has recently changed the test blog from public to private, so I can’t get a screenshot of its comment form. I wonder if it’s getting spammed because its address has been publicized? I mentioned it in my last post but didn’t give its URL. I did submit that one fake comment at Fred Mertz, though… ↩
My continuing battle with Akismet
August 9th, 2010 at 9:30 am
Here’s an update on my inability to leave comments on most WordPress blogs. Shorter version: I’m still being screwed by Akismet. Longer version…
After that last post, Matthew McVickar—who’s becoming a ubiquitous presence here—gave me administrator access to an unused WordPress 3.0 installation on a server he controls. I tried a handful of commenting permutations and came up with these results:
- First, I left a comment as me (which is to say, identifying myself as Dr. Drang and giving my email and web addresses) without first logging in as an administrator. This comment was published immediately. This was a bit of a surprise until I logged in as an administrator and learned that Akismet hadn’t yet been activated.
- I then activated Akismet and left a message while still logged in as an administrator. This comment, too, was published immediately. No surprise there; comments from an admin account should bypass spam filtering.
- I logged out of the admin account and commented again as me. This comment did not get published immediately. Upon logging in again as an administrator, I found it in the spam filter. Finally! Clear evidence that Akismet was blocking me. I reclassified the comment as ham, and it was published.
- I logged out of the admin account again and tried another comment as me. This one was published immediately, presumably because I had just told the blog that my previous comment wasn’t spam.
Unfortunately, this reclassification of me as a non-spammer was only a local change; I was still (and am still) unable to comment at, for example, Tom Levenson’s Inverse Square Blog.
So I left another message at Akismet’s contact form:
My comments been getting flagged as spam on other sites. I have left basically this same message here twice before in the past week, but haven’t heard anything from you. How can I get myself unblocked if the blocker won’t respond?
Yes, I said “my comments been”—I was angry and my typing got ahead of me. Perhaps the illiteracy helped; unlike the two previous attempts, this complaint got a response:
There is no reason akismet would stop your comments.
Could you comment here please? http://xxxxxxxxxxxxxxx.wordpress.com/
The first sentence was a bit off-putting and not just because the writer failed to capitalize a proper noun. I know there’s no reason for Akismet to stop my comments, but it is.
Anyway, I went to the site, which is a test blog just like the one Matthew gave me access to. I’ve changed its address to protect Akismet, which is more than it’s done for me. I entered my name and addresses, typed in a short comment and clicked the “Post Comment” button. My browser showed a blank page with the address
http://xxxxxxxxxxxxxxx.wordpress.com/wp-comments-post.php
Going back to the main site, I found that my comment hadn’t been published. No surprise.
That was back on July 31. I tried again just last night and got the same result. I also tried commenting as someone else: Fred Mertz (fmertz@gmail.com). That one was published right away.
Twice I’ve sent email to Akismet—using the address from which they emailed me—telling them that I’d done what they asked and my comment didn’t get published. No response.
I feel kind of bad complaining. Akismet does a fine job of blocking spam from this blog, and I don’t pay anything for it. But as I’ve come to realize how much power it has over me—it’s silencing me on every WordPress site but one1—I’ve developed a real resentment for this shadowy censor that won’t answer my questions.
Obviously, the Fred Mertz example shows the way to get around Akismet’s filter. But I don’t want to comment as Fred Mertz, I want to comment as me.2 It’s like I’m caught in some low-budget 60s rehash of 1984. I have no mouth and I must scream. I am not a number!
-
The exception is Clark’s Tech Blog, which may be allowing me in because it’s running WordPress 3.1. ↩
-
By me I mean the pseudonymous entity associated with this blog. On the internet, nobody knows you’re a dog. ↩
WordPress and Akismet hate me
July 29th, 2010 at 8:39 pm
I’ve been unable to post comments on WordPress blogs, and I don’t know why.
Now it’s true that this is a WordPress blog and I can comment here, but that’s an exception—presumably because I’m the administrator. At every other WP blog, my comments go off into some netherworld.
I first noticed it a few weeks ago at Lawyers, Guns and Money. My comment had a couple of links in it, so I figured LGM was filtering links and didn’t think any more about it. A week later I tried to comment again—with no links this time—and was rebuffed again.
Well, rebuff isn’t quite the right word. When I hit the Publish button, the response is perfectly normal…except that my comment never appears.
Last week I tried a comment at Tom Levenson’s Inverse Square Blog. No luck. I asked Tom via Twitter if my comment had been classified as spam, and he told me it was nowhere to be found. Tom took my comment via email and has since posted it himself; this is very nice of him, but I should be able to post comments on my own.
Figuring this was an Akismet problem (Akismet is a spam filtering service set up by the WordPress people; because it’s easy to install, I suspect most WordPress blogs use it), I went to their contact page to plead my case. Twice. Still haven’t heard back from them, not even an autoresponse.1
I’ve had no luck Googling my problem. I read somewhere that going to podz.wordpress.com can tell you if you’re on Akismet’s shit list, but all I get from it is Checking…

Today’s was the weirdest experience. I tried to leave a comment at Clark’s Tech Blog. As expected, it didn’t appear. I emailed Clark and asked him to look for it in the spam bucket; as with Tom, it wasn’t there.
I tried to comment again (not sure why). Independently, and at almost the same time, Clark upgraded his blog to WP 3.0.1 (just released today), and both my comments suddenly appeared!
So maybe it’s a problem with WP 3.0, not Akismet? Maybe it’s some interaction between the two that got fixed in the latest point release?
I have been able to comment again at Clark’s place, so that’s a good sign. On the other hand…
I went back to Inverse Square to try again. The comment failed in the usual way, but I don’t know for sure whether it’s running 3.0.1. It’s hosted at wordpress.com, so it’s likely to get the latest and greatest version of WP shortly after it’s released, but maybe it’s still too soon. And there’s no way to know when self-hosted blogs like LGM will get around to upgrading.
Sound on a web page
May 14th, 2010 at 4:22 pm
In last night’s post, I included some code to embed a little audio player in the page. There are many ways to do this, and I spent entirely too much time exploring them to ever want to do it again. So here’s (almost) everything I know on the subject.
Standard link
You don’t really have to put a player on the page. You can instead just use a regular old link, like this one to a short MP3 file. The HTML code is
<a href="http://www.leancrew.com/all-this/sounds/lennon-just-all-this.mp3">a short MP3 file</a>
This is so simple that you can even do it in Markdown
[a short MP3 file](http://www.leancrew.com/all-this/sounds/lennon-just-all-this.mp3)
or Textile or any of the other simplified markup systems. When the user clicks on the link, she’s taken to a new page with a player.

Because I’m on a Mac, the player that appears is QuickTime.1 The player that appears for you will depend on your operating system, your browser, and how your browser is configured (via plugins) to handle MP3 files. The URL of the MP3 file will be in your browser’s toolbar.
This method has the great advantage of always working, no matter what the browser and operating system, as long as the browser understands the file format and has a plugin for it. MP3 files should work on any browser, anywhere. The disadvantage, of course, is that the player isn’t embedded in your page. You can make things a little nicer by adding target="_blank" to the link:
<a href="http://www.leancrew.com/all-this/sounds/lennon-just-all-this.mp3" target="_blank">a short MP3 file</a>
This link will look the same, a short MP3 file, but will put the player in a new window (or perhaps a new tab) when the user clicks it. Since the new window will obscure the page, there isn’t much advantage to it; but it does suggest the next possibility.
Simple JavaScript
With JavaScript you can create a new window and control its size so it doesn’t cover much of your page. The code is
<a href="javascript:newWindow=window.open('http://www.leancrew.com/all-this/sounds/lennon-just-all-this.mp3','Sound', 'height=50,width=400')">a short MP3 file</a>
The link will still look the same, a short MP3 file, but the player that pops up when you click it will be less obtrusive.
Still, it’s not as nice as having the player in the page.
Flash
There are dozens of Flash-based audio players that let you put a player in your page. In the past, I’ve used one from Google that looks like this
and uses this code
<embed type="application/x-shockwave-flash" src="http://www.google.com/reader/ui/3523697345-audio-player.swf?audioUrl=http://www.leancrew.com/all-this/sounds/lennon-just-all-this.mp3" width="400" height="27" allowscriptaccess="never" quality="best" bgcolor="#fff" wmode="window" flashvars="playerMode=embedded" />
The URL of the MP3 is the audioURL parameter; you can fiddle with the width and height and color as you see fit.
It’s a nice enough looking player, but it has two problems:
- It uses Flash, which won’t work on iPhoneOS devices.
- It uses the
<embed>tag, which, although accepted by lots of browsers, isn’t standard (X)HTML.
Objects
A standards-compliant way of embedding an audio player in your page is with the <object> tag. This is what I used in last night’s post, and it looked like this:
The code for this player is
<object type="audio/mpeg" data="http://www.leancrew.com/all-this/sounds/lennon-just-all-this.mp3" width="400" height="40">
<param name="src" value="http://www.leancrew.com/all-this/sounds/lennon-just-all-this.mp3" />
<param name="autoplay" value="false" />
<param name="autoStart" value="0" />
RSS and some browsers won't show the player that's supposed to be here. <a href="http://www.leancrew.com/all-this/sounds/lennon-just-all-this.mp3">Click this instead.</a>
</object>
This will work with iPhoneOS but is not without problems:
- It won’t work in older browsers, like IE6. That doesn’t bother me on this blog, but might be a killer on a commercial site. This is somewhat mitigated by its degradation to whatever non-
<param>HTML is placed between the opening and closing<object>tags. As you can see, I put a simple HTML link to the MP3 in that spot so people with older browsers can still get to the audio. It won’t necessarily come through in an RSS feed. Google Reader shows the degraded text inline, but is nice enough to put up a player at the end of the item.

I don’t know what other RSS readers will do.
- Different browser plugins use different parameters, and you have to account for that. The
autoplayparameter is for QuickTime, theautoStartfor Windows Media Player and Real Audio.
HTML5
This, finally, is the Holy Grail of embedded audio. One tag, <audio>, that lets you embed a player in your page. It definitely won’t work on older browsers, and by “older” I mean “even the current version of Internet Explorer.” But it is seductively simple. This code
<audio src="http://www.leancrew.com/all-this/sounds/lennon-just-all-this.mp3" controls style="width:400px">
If you see this text <a href="http://www.leancrew.com/all-this/sounds/lennon-just-all-this.mp3">click here</a> to listen to the audio.
</audio>
will give you this player:
What’s that? You’re using Firefox? The latest version? And there’s no player? Just something that looks like this?

Well, that’s because Firefox won’t play MP3s natively. Patents, don’t you know. You’ve read Gruber’s posts about Firefox and H.264 v. Ogg Theora on the video side? Same issue on the audio side, but with MP3 v. Ogg Vorbis. The galling thing is that it puts up that gray box instead of degrading to the old-fashioned link.
If you want to serve up <audio> on Firefox, you’ll have to make an .ogg file and dirty up that nice clean tag:
<audio controls style="width:400px">
<source src="http://www.leancrew.com/all-this/sounds/lennon-just-all-this.ogg" />
<source src="http://www.leancrew.com/all-this/sounds/lennon-just-all-this.mp3" />
Older browsers will have to <a href="http://www.leancrew.com/all-this/sounds/lennon-just-all-this.mp3">click here</a>
</audio>
Which should work in Safari and Firefox.
This page says you have to list the .ogg before the .mp3 or Firefox won’t work, but that bug has been fixed. I can order them either way with Firefox 3.6.
As I write this, I have no idea how an RSS reader will treat the <audio> tags. But I’ll find out as soon as it’s published.
Update 5/14/10
Both Google Reader on my Mac and Reeder on my iPhone show the <audio> player inline. So that’s better than the RSS behavior of <object>.
Summary
There’s no single, generally accepted way to embed an audio player.
- Flash works well if you don’t care about mobile users or people with Flash blockers.
- The
<audio>tag is fine if you don’t care about IE users (or if you do care and just want to rub it in), but it forces you to provide an.oggversion.2 - The
<object>tag gives most users a player and everyone a chance to hear the audio somehow. It’s probably the best compromise for most sites.
-
In fact, Safari—which is where the screenshot comes from—puts an HTML5 wrapper around the file URL, which you can see if you have Safari’s Developer Tools enabled and choose Show Web Inspector from the Develop menu. ↩
-
Unless there’s a Firefox plugin or Greasemonkey add-on that can handle MP3s. ↩
A small popup footnote change
May 7th, 2010 at 10:49 pm
Following up this post, where I described Lukas Mathis’s popup footnote jQuery script and my small adaptation to fit the look of this blog, I’ve made another small change you may be interested in. It removes the Daring Fireball-style return link from the end of the popup.
If you use PHP Markdown Extra, as I do, your footnotes will be followed by a little return arrow, ↩, that links you back to the main text. Michel Fortin, the author of PHP Markdown Extra, chose this style of return link to match that used by John Gruber on Daring Fireball. This is fine for footnotes at the end of a post, but makes no sense in a popup, because the popup doesn’t move you away from the main text.
In Mathis’s original implementation, the little arrow appeared in the popup, like this:

I’ve added one line to eliminate the unnecessary return link from the popup. Immediately after the newly created <div> is filled with the HTML contents of the footnote, I remove the return link:
div.html($(el).html());
div.find("a[rev='footnote']").remove();
The first line is there in Mathis’s original; the second is my addition. It finds, within the new <div>, the link with the rev="footnote" attribute and removes it. This removal applies only to the popup, not to the footnote at the end of the post.1
Not a big change, I’ll grant you, but it does look better. Obviously, if you want to do this and your footnotes use something else for the return link, you’ll have to use a different jQuery selector. But the principle is the same.
-
As you can see. ↩
Not a review of MarsEdit 3
May 5th, 2010 at 5:06 pm
I’d like to thank Daniel Jalkut for releasing MarsEdit 3 this week. I don’t use MarsEdit and don’t plan to, but the hoopla and acclaim for the new version gave me the kick in the pants I needed to work up an addition to TextMate’s Blogging bundle.
MarsEdit is supposed to handle previews very well, which happens to be the only thing I don’t like about the Blogging bundle. Let’s say I’m writing my post (in Markdown, of course), and I want to see it before publishing. I hit ⌃⌥⌘P and get a preview that:
- doesn’t handle tables;
- doesn’t handle footnotes;
- doesn’t format equations; and
- uses a small sans-serif font for the body text.
In other words, it’s not really a preview.
I thought about making some changes to the standard Preview command, but it relies on a series of scripts that call one another, some of which are also used for other purposes. I was afraid that touching any one of them could screw up other commands. So I decided to start fresh.
The steps are simple:
Separate the header from the body of the post. The header is a series of lines like this
Blog: And now it's all this Title: Not a review of MarsEdit 3 Category: blogging Category: mac Category: programming Keywords: mac, blogging, programming, python, marseditat the top of the file. It’s followed by a blank line and then the rest is the body.
- Extract the title from the header.
- Convert the body from Markdown to an HTML fragment.
- Wrap the fragment in more HTML, turning it into a complete page that references CSS and JavaScript files that give the page the look of my blog.
I do the conversion in Step 3 using a customized version of MultiMarkdown that works with jsMath to generate nice-looking equations from LaTeX source. It’s similar to my customized PHP Markdown Extra.
The JavaScript files are local versions of jsMath, my line numbering script, and my slightly-edited version of Lukas Mathis’s popup footnote script. The CSS file is an ever-so-slightly altered version of the CSS file I use for this blog (MultiMarkdown and PHP Markdown Extra use different classes for their footnotes). The script that actually does the four-step process is written in Python. All of this is available for download from a GitHub repository, although I can’t imagine anyone using it without some serious editing.
The TextMate command I use to preview my posts is this addition to the Blogging Bundle, called Good Preview:

The two lines of code are
~/blog-preview/post-preview.py
open ~/blog-preview/post-preview.html
The first line runs the post-preview.py script, creating or overwriting the post-preview.html file on my Desktop. The second line opens post-preview.html in my default browser. In addition to writing a file, post-preview.py writes “Done” to standard output, which Good Preview shows as a tooltip when the command finishes successfully. The Good Preview TextMate command is not included in the repository, which is why I’ve reproduced it here.
I deleted the original Preview command from the Blogging bundle and removed the ⌃⌥⌘P Key Equivalent from the Preview commands in the Markdown bundle. It might have been smarter to use a different key combination for Good Preview and preserve ⌃⌥⌘P for the standard behavior. Oh well.
As you can see, the preview matches the look of my blog quite well. I left the sidebar in place, but empty.

This is everything I want in a preview, and I don’t have to leave TextMate to get it. Thanks for the inspiration, Daniel!
Update 5/6/10
Acting on pupa_2’s comment below, I’ve moved the HTML preview file from the Desktop to the blog-preview directory where all the scripts live. This keeps my Desktop cleaner, and there’s no problem with continually overwriting the preview file.
I’ve changed the Good Preview screenshot and its two lines of code shown above accordingly.





