Saturday, March 1, 2014

If You Build It, They Will Come - And Spam the Shit Out of Your Wiki (Part Deux)


I have the CheckUser extension to the Mediawiki software installed, which allows me to see the IP address of any user without having to directly query the underlying database. For the first few weeks of operation of Fractured Fairfax at its new home I made good use of it, adding the IP address of any spammer to the block log and deleting their spam within minutes of it appearing on Fractured Fairfax.

However, this is the same methodology I was using with the old incarnation of Fractured Fairfax, and it's like trying to empty a lake with a shovel: you can do it, but it's tedious and you can't help but think there's a better way to get the job done.

 What I wound up doing was first closing Fractured Fairfax to anonymous editing by editing the LocalSettings.php file like so:

# Anonymous users can't create or edit pages
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['*']['edit'] = false;


Next, I made it so that only registered users with accounts older than five days could edit:

#Only users with accounts five days old or older can edit or create pages or talk pages
$wgGroupPermissions['user'         ]['createpage'] = false;
$wgGroupPermissions['user'         ]['createtalk'] = false;
$wgGroupPermissions['user'         ]['edit'] = false;

$wgGroupPermissions['autoconfirmed']['createpage'] = true;
$wgGroupPermissions['autoconfirmed']['createtalk'] = true;
$wgGroupPermissions['autoconfirmed']['edit'] = true;
$wgAutoConfirmAge = 86400 * 5; # Five days times 86400 seconds/day


However, this still allowed the spambots to edit their own talk pages and post their shit, and I'd have to go in and manually delete it. Disabling the ability to create pages or talk pages did not stop it, so my next step was to protect all the pages in the User Talk namespace.

First I created the new "usertalkedit" array which allowed me to apply protection to pages in the User Talk namespace:

#Create the usertalkedit array
$wgNamespaceProtection[NS_USER_TALK] = array('usertalkedit');



Then I added permissions so that only people who were autoconfirmed or sysops could edit pages in the User Talk namespace:

$wgGroupPermissions['*']['usertalkedit'] = false; #no anonymous users
$wgGroupPermissions['user']['usertalkedit'] = false; #no regular users
$wgGroupPermissions['autoconfirmed']['usertalkedit'] = true; #autoconfirmed users
$wgGroupPermissions['sysop']['usertalkedit'] = true; #sysops



So, at this point you could only edit pages (including User Talk pages) if you had an account that was older than five days or if you were a sysop. I envisioned a case where someone might want to edit pages but not have to wait five days, so I went ahead and created another group of users called "manualconfirmed", which has the same permissions as an autoconfirmed user, but since I can add people to that group as a sysop, they won't have to wait the full five days.

#Add a new group called "manualconfirmed"
#this has all the same permissions as an autoconfirmed user, but without the wait
$wgGroupPermissions['manualconfirmed'] = $wgGroupPermissions['user'];
$wgGroupPermissions['manualconfirmed']['edit'] = true;
$wgGroupPermissions['manualconfirmed']['createpage'] = true;
$wgGroupPermissions['manualconfirmed']['createtalk'] = true;
$wgGroupPermissions['manualconfirmed']['usertalkedit'] = true;

Friday, December 13, 2013

We're Back!

The wiki that tells you absolutely nothing you need to know about Fairfax County, Fractured Fairfax, is back. The new URL is http://www.fracturedfairfax.com/w.

Saturday, March 16, 2013

Fractured Fairfax Forums Disabled

I disabled the Fractured Fairfax forums today.

They'd been up and functional, but I hadn't really spent much time working on them except to delete posts made by spambots. Since all of the traffic on the Fractured Fairfax seemed to come from these electronic vermin, and cleaning up the shit they leave behind is tedious, I went ahead and closed them to new posts, although I haven't taken the final decision whether to remove them entirely.

I had never promoted them extensively, and I'd been wondering if there's really place for them. The truth is, the market for local discussion forums seems to be pretty well served by Fairfax Underground and the City Data Northern Virginia discussion forums, and I'm unsure what elements would differentiate the Fractured Fairfax forums from these other two.

Saturday, February 16, 2013

Fractured Fairfax - Now With Bots!

Up to now, the Fractured Fairfax wiki has been crafted almost entirely by hand. I mean, sure, I use templates for certain articles and I'm not above a little copy-and-paste if I'm cranking out a bunch of stub articles. When you type as slowly as I do, any tool you can bring to bear to make things go a little more quickly is welcomed and happily exploited.

I'd known for some time that really big wikis, like Wikipedia, use programs called "bots" to automate a lot of the routine and mundane maintenance type chores. I am wholly in favor of this; I've long said that a major point of using a computer is to get the dull and repetitive work out of the way, leaving the human free to do to the creative stuff that you can't automate.

Finally, I took action and did some serious investigation into what exactly was needed to create bots for the Fractured Fairfax wiki. Since I program in Python, the Python Wikipediabot Framework seemed like an ideal tool for me to use.

My first tentative steps with  Pywikipedia were to use the framework to create empty month articles. I'd previously done this using copy-and-paste and manually editing the article templates to reflect the correct month and year, which is a fairly quick process if you do only one, but a real chore if you're doing several at a time.

So now I have month articles for every month from January 1866 to the present. All I need to do now is actually add some content to them.

Saturday, December 15, 2012

Fixes and Changes to the Fractured Fairfax Forums

I've made the following fixes and changes to the Fractured Fairfax forums:

  1. Fixed the problem where the buttons in the editor didn't work if you were using Firefox 16+. This was particularly annoying, but it was a pretty easy fix once I found the patch on the MyBB Web site.
  2. Removed the link to the forum calendar from the forum header. I'd disabled the calendar anyway, so all clicking on the calendar link did was take you to a page telling you that the calendar had been disabled, which was kind of annoying and useless.
  3. Added a new "Announcements" forum. I added a new read-only forum for news and announcements for the Fractured Fairfax forums.
The Fractured Fairfax forums also had their first spambot registrations: two of them, in fact! I deleted the accounts, but this has got me thinking as to what other changes I'm going to have to make to protect the forums from spambots.

I also think I'd like to make some changes to the formatting and layout of the forums to make them look a little more like the Fractured Fairfax wiki.

Thursday, December 13, 2012

Monday, December 3, 2012

The Evolution of the Fractured Fairfax Logo

Here's the original Fractured Fairfax logo:


Actually, it's not the original, original Fractured Fairfax logo. That one had a slightly different pattern of lines, but I was unhappy with it because it looked like tiger stripes rather than cracks. When I redrew it, the old one went to the great bitbucket in the sky.

I used this logo for about the first year of Fractured Fairfax, but I was increasingly unhappy with it. Finally, I broke down and created this version last month:

It's better, because the outline of Fairfax County is actually broken up (fractured, even!). I've used this logo for about a week or so, but the problem is that when it was shrunken down, the words seemed too small. So I left it alone with the idea that I'd know better what changes were needed after a "cooling off" period.

Finally, I came back to it and made a few color changes and made the text bigger, so here's the new new Fractured Fairfax logo:
I'm still not 100% happy with it, so I imagine before too long we'll see the new new new Fractured Fairfax logo.