Blog entries from March 2007.
Well, that depends on what language you're using! It's fun to say something is "as simple as 2 + 2", but as a developer I can tell you that 2 + 2 isn't as straightforward as you might think.Here's a breakdown of how a seemingly trivial computation can differ on a language-by-language basis.
--Jim Wilson 22:24, 30 March 2007 (MST)
Recently I've been getting spammed on the comments to GTalk Emoticons - probably because this is the #1 traffic generator for my site.
I've also abstracted out the spam checking out of the core code by adding a new hook called "ArticleCommentsSpamCheck". The extension provides a default implementation that hooks into this.From here out, development of any additional spam filters should be easy without changes to the extension's core code. Maybe an Akismet wrapper would help.
--Jim Wilson 12:53, 27 March 2007 (MST)
In a recent post, I claimed that DZone had implemented a new Draconian policy regarding delisting of links based on complaints.
--Jim Wilson 14:40, 23 March 2007 (MST)
Previously, if someone lodged a complaint against an article submitted to dzone.com, the article would viable, still contending for that oh-so-precious front-paging.
No more. Now, a single complaint causes a submitted article to be permanently delisted - going so far as to return an HTTP 410 "page permanently removed" message. [read more ...] -or- [leave a comment ...]
--Jim Wilson 12:27, 23 March 2007 (MST)
Wondering how to add planet.wikimedia (or open.wikiblogplanet) to your Google Homepage or Google Reader?
--Jim Wilson 09:46, 22 March 2007 (MST)
This version has the following enhancements:
Note: For reference, the feed you're reading now was generated using WikiArticleFeeds from a regular wiki article. Enjoy!
--Jim Wilson 15:40, 19 March 2007 (MST)
I say 'rudimentary' because all it does is check for spammy-looking regular expressions. Currently just these two:
%\\[url=(https?|ftp)://%smi %<a +href=[\'"]?(https?|ftp)://%smi
The first weeds out [url] notation, and the latter catches direct <a href=""> instances.
In the future, I hope to implement a heuristic spam detection system - perhaps checking these dimensions:
Or perhaps something even more tricky, like a combination of the above, weighted by virulence.
Another thing I may add is anti-captchas (input fields that humans are instructed to ignore, or ideally hidden via CSS). This may stop the most generic kinds of spamming - which is what I appear to be getting so far.
The obvious problem of any heuristic spam detection method is that every time it changes, the spammers will change their tactics. Leaving only direct captchas as a continuously viable option. Of course, this is also on my todo list.
--Jim Wilson 03:35, 18 March 2007 (MST)
Lately I've been spending a lot of time writing MediaWiki extensions, rather than writing real actual articles. Hopefully this will begin to even out that trend. Enjoy!
The MediaWiki parser cache is a powerful thing. The processing it takes to render a page is formidable - so caching the output is important for performance. This means that extension tags and parser functions will be run only once, at render time (just after edit submission).
The question is, how do we trigger the execution of code on every page view, using information from a parser extension, without invalidating or disabling the cache?
--Jim Wilson 01:21, 14 March 2007 (MST)
This parser extension provides a tag which is used to inject meta keywords into the document header of an article.
To use, simply add the following to any article:
<keywords content="ListOfKeywords" />
Where ListOfKeywords is a comma-separated list of keywords to inject.
--Jim Wilson 01:13, 14 March 2007 (MST)
This extension provides a way for users to create custom styles which are applied to their user page and any subpages. Basically this allows users to hack the css to their liking for their own corner of the wiki.
To get started, simply edit:
Where 'Username' is the name of your user. After saving, subsequent visits to your user page (or subpages) will show your custom styles.
The way this differs from the built-in user-css functionality is that while vanilla MediaWiki allows you to edit the CSS that you see, UserPageStyles allows you to edit the CSS that everyone sees.
Let me know what you think!
--Jim Wilson 03:18, 12 March 2007 (MST)
The sole purpose of this extension is to prevent users from editing other users' pages and subpages. Non-logged in users (guests) are also prevented from editing user pages. Sysops are immune from this restriction.
I'd love to hear from you if find this useful, and I'll be happy to troubleshoot any issues.
--Jim Wilson 23:10, 8 March 2007 (MST)
This version contains minor cosmetic changes and one major enhancement: it supports offloading feeds to FeedBurner.com. This is great to reduce the amount bandwidth your feeds consume.
To use the new functionality, all you have to do is register your feed with FeedBurner, then add <feedBurner name="nameOfFeed" /> to your article text.
--Jim Wilson 23:37, 7 March 2007 (MST)
Here are the features of my extension:
Enjoy! As always, I'd love to hear from you if find this useful, and I'll be happy to troubleshoot any issues.
--Jim Wilson 01:59, 7 March 2007 (MST)
You may have noticed the brand new "Share This!" portlet in the site's sidebar (underneath the Toolbox). This is provided by the ShareThis Extension, which has just been released.
Out of the box, ShareThis comes with a number of popular social bookmarking and news sites - and it's easy to add your own if need be.
Inserting a block of links into a page is also easy, all it takes is a <sharethis /> flag, and you get this:
Special thanks to my good friend Eric Redmond for coming up with some skeleton code and a list of popular sites to start off with.
--Jim Wilson 00:30, 5 March 2007 (MST)
A lot of websites have logins, and many of those have a "Remember Me" option (usually a checkbox) that lets you skip logging in on your next visit. But some sites don't.
--Jim Wilson 12:05, 1 March 2007 (MST)