10th November 2003, lunch time | Comments (27)
Status | |
---|---|
Code usage | In use on this blog |
Updates | None |
Demo | Available |
Downloads | Available |
I’ve recently added some new features to this site, and thought I may as well tell you about them, plus a few other things you might not notice at first glance.
Adrian Holovaty, Simon Willison and Paul Hammond all had the idea of using javascript and CSS to dynamically place a citation link after any blockquotes in their pages. I took Simon’s code a step further and added in a few simple features:
Examples:
You can see the script in action on the demo page.
Following the lead of others, I’ve implemented a comment-spam system on this blog. I don’t suffer from much spam (I’ve only received three up to this point) but I’d like to be prepared for the future.
If you haven’t heard of comment-spam before then I’ll explain what it is:
One of the ways in which Google determines the importance of a web site (and hence its placing in search results) is the number of incoming links to that site — if 4 million people link to a web site then, Google says, it has to be important. Comment-spammers try to take advantage of this by posting gibberish comments on blogs, each containing a link back to their web site. The comments add no value to the blog, but the more links the spammers can get pointing to their sites, the better they’ll do on Google.
Comment-spam then is an enormous pain for blog owners, and a lot of thought and discussion has gone in to combatting these attacks.
So, how does the anti-comment-spam system on this site work? Well, new comments are checked against a constantly growing list of spam domains harvested by myself and other bloggers. If any of these domains appear in the new comment then the submission is classed as spam and posting is denied.
If a matching domain is not found then the comment is posted as normal and I receive a notification email. At the bottom of this email are two links: one to the comment in question, and one to an administration page. If at that point I (as a human) deem the comment to be spam I simply click on the link to the admin page and the spam comment is deleted from the database. The spam’s URL is then added to the public and master blacklists for future use.
A warning notice has also been added to the comments form to try to stop the problem before it starts (this will only influence manual spammers). We’ll see how I get on.
I often find that when I post comments to someone’s blog I’m not making a standalone comment, rather I’m replying to a point raised by another visitor. Unfortunately there’s no simple way for me to alert that person to my post — either their email address is hidden, or, if their address is visible, I have to fire up my email program and send a separate message to them as well. All a bit inconvenient.
Keith Devens suggests a solution: a comment subscription methodology, whereby someone leaving a comment could choose to be alerted when new comments were made (but then not be alerted again until they had re-visited the post in question).
I think that system would work well for blogs and threads where discussions take place and everyone’s interested in the outcome, such as Simple Bits’s quizzes. But for blogs such as mine I think the interaction between commentors (and between commentors and the site owner) is different.
When I post to blogs like mine I’m interested to see if the owner, or anyone else, replies to my comment. I’m not really interested in other people’s interactions with the site’s owner, and I don’t want to get alerts about their conversations. But if there was some easy way for people to notify me when they wrote something that related to what I previously said, I'd be happy.
So, my experimental solution is this: when you post a comment on this site you’re presented with a checkbox asking if you’d like to ‘Let future posters alert you of their replies.’
Checking this box will place a line underneath your finished post offering future posters the opportunity to ‘Alert [your name] to your comment’:
If a future poster does decide to alert someone, their selections are shown in the comment preview window, along with the rest of their comment details:
This system is meant to help one person interact with a small number of other people on a specific topic. This may turn out to be rubbish… we shall see.
Update: about 2 days after I wrote this post, Mozilla released a new version of Firebird (0.7), and a new verison of Mozilla (1.6a). In both new releases recognition of -moz-list-number
was broken. This prompted me to remove this selector from the CSS and recode without it. Same effect, just takes a bit more effort to get it working.
In an effort to cut down on the number of extraneous DIVs and SPANs used to code this site I’ve ended up using some fairly advanced CSS selectors. Very occasionally I’ve resorted to a Mozilla-specific CSS rule. One of these is li:-moz-list-number
which lets you easily style list numbers.
I’ve applied this rule to style the list numbers of comments and search engine results:
In an effort to cut down on the number of extraneous DIVs and SPANs used to code this site I’ve ended up using some fairly advanced CSS selectors. Very occasionally I’ve resorted to a Mozilla-specific CSS rule. One of these is li:-moz-list-number
which lets you easily style list numbers.
I’ve applied this rule to style the list numbers of comments and search engine results:
On the whole this site looks at its best in Mozilla (certainly its support of max- and min- widths adds a lot), but occasionally Opera goes one better than Moz and manages to do something cool. I’ve styled some ordered lists to display inline. Opera copes with this, Moz and IE don’t:
Well, that’s all for now. There are a few other things in the site that might interest people, but I’ll leave them for another day.
Jump up to the start of the post ↑
A collection of miscellaneous links that don't merit a main blog posting, but which are interesting none-the-less.
Our enemies are innovative and resourceful, and so are we. They never stop thinking about new ways to harm our country and our people, and neither do we.— George W Bush (9)
Stuff from the intersection of design, culture and technology.(3)
A selection of blogs I read on a regular basis.