Half-Elf on Tech

Thoughts From a Professional Lesbian

Year: 2012

  • “This Needs Support” vs “This Needs Patching”

    “This Needs Support” vs “This Needs Patching”

    Writing code is rarely an act of support.

    Most of the time when someone needs support (i.e. help with a problem) what they need is to understand what they’re doing, where they’re coming from, and what they want. Once they have that, they can apply their knowledge and define their goals and achieve them. I know, I know, that sounds all new age of me, but that’s really what’s going on.

    Patching is ‘This code is broken, I should fix it.’ However patching is not support! This sounds weird to the unfamiliar, but there is a big difference between fixing the broken and helping people.

    The conflict comes up when someone using software has a problem. When a user has a problem, most of the time they feel it’s a bug. Trying to explain the difference between a bug and a missing feature is complicated, but to boil it down I say ‘If it’s a bug, it’s supposed to work an it doesn’t. If it’s a missing feature, it’s documented as working differently.’ (We often say ‘it’s not a bug unless it’s documented, but that’s used to mean that if someone didn’t report the error, it’s not real. Schrodinger’s bug reports, as it were.) When it’s a missing feature you have a ‘feature request’ or an ‘enhancement.’

    Thus I’m not surprised at all when someone makes a complaint ‘This enhancement is a bug, fix it now!’ and then ‘Why can’t I get support on this?’

    Your’e asking the wrong people. Support doesn’t go out and fix everything. Support sits down with you, sorts out what really happened, how to fix it, how to work around it, and is trained to think. A good support person makes a note every time a weird error pops up, who has it, how they fixed it, and when there’s a pattern, reports it up the chain. “You’re right, sir, that’s a problem.” If they know it’s a problem, they give you a ticket number to follow, or some way for you to know what the over all status is.

    So if the support people are being good and reporting things as they should, why don’t the bugs get fixed right away? Well, if they were that easy, they wouldn’t be bugs in the first place. Okay, that’s not true all the time. Sometimes it’s just that it’s a small bug and no one cares enough to fix it. Other times it’s waiting on other fixes, and finally the devs may just have more important things to do.

    The thing you don’t do in these situations is say “I don’t know how to code, but this must be simple!”

    That Dilbert will send the developers into a frothing fit of ‘You idiot…’

    I’ve said it before, and I’ll say it again. It’s okay not to know something. Look, I barely know SQL. I don’t know AJAX at all. But what I do know is how to think and how to ask for help. And I know how not to ask for help too. The point is, I know my abilities and I know how to network and research. And I know when I don’t know something. Do not for the love of anything ask me to help you with Excel and pivot tables.

    The point of that is if you start a sentence with “I know nothing about code but…” you better be very, very thoughtful about things. I recently suggested to someone “I don’t know this code, but here’s what I did on this other one… Would it be possible to leverage X to do something similar?” I don’t presume that I’m right, but having some related experience, I shared what we did in the hopes it will help or inspire someone.

    And inspiration is the magic that fixes code.

    Code is part art. You are creating something that has never been seen before, never conceived of, and never written. If that’s not art, I don’t know what it. And art, like all creative things, requires inspiration. We do not just pluck ideas out of the air, that were left there by the idea fairy. We see something in a puddle that makes us think ‘What if uploading images was as easy as a droplet of water…’ We have to invent, create and imagine. We have to dream. (Sidebar, this is exactly why my office’s draconian laws upset me. They stifle our creativeness and we make worse products.)

    When you tell someone that something is ‘wrong’ there’s a reason you may get push-back like ‘Well what would you like it to do?’ or even ‘Why do you want to do that?’ It’s clear you have had that moment of clairvoyance where you can see a perfect future, and we want to see it too! That will help us either follow your vision and make it happen, or tell you that’s not going to happen right now. Your ‘bug report’ helps create better things.

    At the same end, we have to remember that just because something isn’t working right, doesn’t mean it’s broken.

    ‘Right’ is surprisingly suggestive, and has a lot to do with use-cases. No two people use a product the same way. I open Skype when I want to talk to someone, my friends keep it open all day. I keep a word processing app open all day, others don’t. And consider email applications. My coworker has his open on schedule every 2 hours, and never alerts him to new email. I have a metric ton of filters that alert me when important emails are in, or when I haven’t checked in 90 minutes. We all push tools to fit our use.

    Why, then, is it surprising that when something doesn’t work the way I want it to, this might be because of me, and not the tool? I’ve been telling people a lot that using WP Optimize (a very cool DB optimization tool) on a large site (or a Multisite Network) is akin to using a hammer to drive in a screw. You know you should use a screwdriver, but the hammer’s right there. Now, the plugin has some features that are annoying to have to roll on your own (removing post revisions and auto-drafts, and some scheduling), but the reality is that when a site is large, you’re using an inefficient tool for the job. PhpMyAdmin is a far better tool, though it’s more complicated and requires more knowledge, so people use this plugin. For a time, that’s fine, but when you grow and change, you have to learn and adapt.

    Is it the plugins fault that it can run out of memory while working on a large DB? Of course not. It’s not even a bug, and the plugin isn’t broken. What the plugin is, is limited. And limitations aren’t bad. You have to limit software (otherwise it runs forever, and that, children, is what we call an endless loop), you have to give it an end point. Marking these and saying ‘Yes, today that’s a limitation’ doesn’t mean it’ll never get fixed, but just that today you can’t do everything.

    Some takeaways for you.

    • Make thoughtful suggestions and recommendations.
    • Remember your needs may not be the same as everyone else’s.
    • Reflect on if you’re using the right tool for the job.
    • Try to understand the problem from as many angles as possible.
    • Never, ever, ever say ‘This is easy code to fix!’ unless you’ve written it, and it was.
    • Remember that genius is born of innovation and perspiration.

    What do you think helps keep that balance between support and new code?

  • Simply Complicated

    Simply Complicated

    I’ve been playing around with Tumblr a lot, mostly to help a friend get set up on it, but also because they didn’t publicize they had a way to ‘black out’ your site for SOPA day until the last minute, and I wanted to help my friends join in.

    Tumblr pitches itself as sort of a blog version of Twitter.

    Tumblr lets you effortlessly share anything. Post text, photos, quotes, links, music, and videos, from your browser, phone, desktop, email, or wherever you happen to be. You can customize everything, from colors, to your theme’s HTML.

    At it’s heart, it sounds really wonderful. You can share anything, as long or as short as you want, with anyone. They can retumbl it and share it, adding on their commentary, and so on and so forth. But when you compare it to either Twitter or a blog, the analogy collapses and Tumblr becomes insanely complex. By trying to be both, it’s effectively neither.

    The tl;dr for this post is that I don’t like Tumblr, and find it a clunky, poorly supported psudeo-blog and you should use something else.

    I should say that there are things I think Tumblr gets right. They make it very easy to publish your content with a few clicks. Uploading media is simple, and ‘reblogging’ content is a simple click. However that’s only true if the content comes from Tumblr to begin with, or if the external source has coded in a ‘tumble’ button (similar to the tweet/facebook buttons I have here). Tumblr can make a decent ‘community,’ however allowing multiple people to manage a Tumblr site is cryptic.

    Logging In

    When you go to tumblr.com, you’re presented with a signup screen:

    Tumblr Front Page

    That’s it. A very simple and direct screen, much more like Twitter.com than something like LiveJournal or WordPress.com. You’re told ‘Sign up.’ But what if you’ve already signed up? Unlike LJ or WP, there’s no bar at the top of the page to let you sign in anywhere.

    Tumblr LoginOn Tumblr, tucked way off to the upper right, is a little Log in button. Points for not making the word ‘login’ (though that is a valid use), but it’s not where people generally look first. Jakob Nielsen has been touting the F-shaped reading pattern since 2006. That is most of the weight of a reader’s attention is to the left, though the top right corner is a good place to use too. At the same time, horizontal attention still leans left. So while the location is decent, the button’s efficacy strikes me as diluted.

    The Dashboard

    Once you’ve logged in, you go to the Dashboard. This is pretty standard stuff. If you log in to WordPress, Blogger or even LiveJournal, you go to the back end. On the other hand, if you log in to Twitter, you see your Twitter stream. In keeping with Tumblr’s dichotomy, you get both:

    Tumblr Dashboard

    The green icon is ‘me’ and right away I see that someone’s started following me, and two people I follow (CBS Television Studios and a friend) have posted something. Above that is a list of ‘types’ of posts I can make, and on my right is basic information about me. I follow people, I’ve liked posts, I can explore, and here’s a random photo we like.

    It’s not terrible, and the implication is ‘Just start posting!’ At this point, any time I go back to tumblr.com, I will be sent to my dashboard. Period. And there’s no obvious link to show me what my site looks like. As it happens, I have to click my ‘icon’ (the green box) to see my site. The row on the very top has ‘Dashboard’ and then ‘My blog name’ (which I fuzzed out) and ‘My second blog name’ (ditto), is followed by four icons. The plus sign makes a new blog, the question mark is for help, the grommet is for settings and the power button is to log out. I don’t know why they have ‘make a new blog!’ so prominent.

    Posting

    Tumblr Text Post

    I’m not going to get into how you post in detail. This is pretty straight forward and my only real complaint is tags, but it’s a big complaint.

    I can’t see my commonly used tags, and that actually bothers me a lot. On WordPress, I can see my regularly used tags (and my categories) right away. With this simple screen, I get a blank area to add in my tags, which is nice, but I like to use some of the same tags over and over. It’s at the point where I’ve stopped tagging things because it’s a hassle. That’s a problem because other people can search for ‘tagged Ipstenu’ and find anything tagged that way. I’m devaluing the search because the functionality as a content create is onerous. Compare this to WordPress, where I can click on ‘Recently used tags’ and there the ones I use are, and I can click on them to add them. Done. Categories are easy to find and now I’ve created a robust multi-level way to search for content on my site!

    Furthermore, if I reblog something, I lose all their tags and have to start over.

    The Other Dashboard

    Blog Dash

    Well, now here’s where it’s a mess.

    My blog names were listed on that top row, so when I click on one, I get another dashboard. This one is very similar to the first, only now I see all my reblogs and all comments.

    Oh, wait. No. I don’t see any comments. That’s because Tumblr doesn’t have an easy way for my visitors to leave comments on my site!

    What’s going on here? It’s Tumblr’s dichotomy. It’s both a social site, like Facebook and Twitter, and a blog, except right here, in this one moment, it’s magically neither. Facebook lets you leave comments, Twitter lets you leave @-replies. WordPress (and LiveJournal) live and die by the comments. Comments are how you connect, interact, and grow your audience.

    And you can’t do it (easily) on Tumblr. Oh, sure, I figured it out in about an hour, with a tweet to a friend and some reading about Disqus, but that’s not the point. You cannot be a blogging system without a comment system. That may be a strong statement, but there it is.

    You’ve heard people say that if you’re not paying for something, then you’re the product? That’s never more true than with Tumblr. On this site, my content is generated by me, and the additional UGC (User Generated Content) comes in the form of comments. I can see my ‘value’ based on retweets, +1s and likes, but it’s in communicating with you commenters (and I try to talk to everyone) that I find out what’s engaging in my posts, what’s important, and what I get wrong. Oh yes, I get things wrong.

    It’s talking with people that help me grow as a writer, a technologist and a thinker. So while some themes on Tumblr have Disqus built in, I’ve found more that don’t and more that don’t explain it. And worse? If you google ‘Tumblr comments’ the first hit is not a ‘How to turn on comments on Tumblr!’ from Tumblr, but a how to from Disqus.

    There’s nothing wrong with Disqus, I like it and use it on some sites. But. There’s something wrong when your communication platform relies on third party vendors for communication. Sharing? No problem. Communicating? You better be a techie.

    Where are those settings at?

    And now we’re at the crux of why Tumblr is so cumbersome.

    Where the hell are my settings!? If you go click on that gear icon, which is logically at https://www.tumblr.com/preferences, you may notice everything’s about you. It’s your user preferences. Okay, so that’s acceptable. And they even put a nice link to customize your blog. But … have you looked at their options?

    This is where I wanted to get a screenshot of the clunky ‘pick a theme’ interface (though they get small props for being able to select ‘free only’), or how you have to know how to edit HTML/CSS to customize and add ‘pages’ to your site, or how you don’t see how your content will look, only their sample. I tried to get a screenshot, but it was too complicated to even begin to explain.

    And that’s the problem right there. Tumblr’s too hard to customize for the novice. It’s not too hard for me, I have no problem with it. But my partner (a non-tech) and my friends (non-tech) all appealed to me for help around SOPA day to make their sites go black. It took me 10 minutes to sort out how to make a WP.com site go black by adding a widget. It took me 10 minutes to find a plugin I liked for self hosted, fork it to what I wanted, and implement it. I was able to logic out how to apply my wp.com change to Blogger (via a ‘widget’) and Tumblr, but the minute I told the Tumblr’s “You need to edit the site’s HTML…” they balked.

    So what’s really the problem here?

    The problem is Tumblr’s attempt to be the best of both worlds, a blog and a social networking site, means they offer up more customization then that of a traditional blog, but less that running your own site. Twitter has very little customization you can do, but really it’s like saying you can’t design your email. Few people I know actually go look at your Twitter page. We use apps, or aggregate you onto own own streams. It doesn’t need it, and wisely leave it alone. WordPress.com (I’m harping on them because I know them best) lets you use themes that allow customization, but you have to pay for CSS or a custom domain. Tumblr lets you do these things for free.

    Now, to be fair, Tumblr doesn’t claim to be a blog. And they’re right, they’re not a blog. What they are is a way to make a share things. Easily. And you know, to that end, they succeed. It’s very easy to share. What is not easy is to stand out from the crowd, use Tumblr in a new and amazing way. What’s not easy is to be unique.

    I’ve seen memes, photoblogs, Q&As, and mostly just people sharing posts. I’ve seen amazingly creative designs. What I haven’t see is something that changed the entire way I’ve thought of publishing. And I haven’t seen it in a way that let me grow, adapt, and spin off it as far as I want. I don’t want to get this confused with beautiful sites like capitolcouture.pn, which is just lovely. But it looks … like a webpage. I can think of ways to do that on any platform. In this case, though, they picked Tumblr I would guess because of the ease of re-sharing content. They exist with a massive amount of user generated content, by copying the posts to their own site (with a link back of course). That’s cool, but it’s not a game changer. In it’s own way, it’s just the best designed meme I’ve ever seen.

    Have you seen a site on Tumblr that made you re-think everything about a website?

  • Moving WordPress Multisite

    Moving WordPress Multisite

    I answer this a lot.

    Edited to add: If you’re just moving to a new server and keeping your domain name, it’s exactly like moving Single Install WordPress. Just remember to make sure your new server is set up to handle wildcard domains, and your httpd.conf has ‘AllowOverride’ set to ‘All’ and you should be fine. If you’re moving to a new domain name, read on!

    Edit : The Incerconnectit Search/Replace DB script is also perfect to use, though you still need to manually edit a couple places.

    Moving a normal WordPress site is really easy. Copy over your data. Change your URLs, do a search/replace on your wp_posts table (to fix any internal links), go out for a beer. Some of you may need to edit a wp-config file, but mostly that’s it.

    Then there’s Multisite, which sucks. See, unlike single installs of WordPress, you can’t change your site URLs easily. Don’t get me wrong, if you’re a Super Admin, you can easily go into WP Admin -> Network -> Sites and edit the sites. You’d have two places to edit it:

    On the Info Tab

    On the Settings Tab

    But here’s where it starts to suck. If you’re changing tech.ipstenu.org to press.ipstenu.org for example, you do that and then you need to go to your database and look for the site posts table (in this case, it’s wp_2_posts) and search/replace tech.ipstenu with press.ipstenu.

    That’s not terrible, right? It looks a lot like moving a single install of WordPress.

    What if you have your site as subfloders, using ipstenu.org/tech and ipstenu.org/press though? And you want to move everything to lipstenu.org?

    This is where it sucks.

    See some widgets and theme settings store your data and include your URL. This is done with data serialization as well, which means the length of your URL matters. If you changed from ipstenu.org to Lpstenu.org, then you would be perfectly safe doing a total database search/replace of the domain name! But since I’ve proposed changing it to Lipstenu.org, I can’t do that. Any field that counted my domain name would be off by one, and thus invalid, and thus wipe out my settings. Oh and to make it worse? Depending on how you uploaded your media and included it in your site, your postmeta table might also be filled with this.

    It’s important to understand two things here.

    1. This situation exists on a normal single site install.
    2. You don’t have to change it in those places!

    And as a maybe third, I know a lot of people who do a blanket search/replace all the time and never have a single problem. But because I know enough who do have issues, I can’t safely recommend you try it unless you have a rock-solid backup of your database.

    This brings us to the point. How do you move WordPress Multisite to a new domain name?

    Very, very, carefully.

    You’re going to have to do some work in the database, so now’s the time to get some coffee and practice not freaking out. If you have phpMyAdmin, editing your WordPress database is not terrifying, but like a cat, should be approached with caution. Remember to take a full backup of your database before you start. A good backup.

    First, it’s perfectly safe to edit all wp_posts (and wp_x_posts) tables with a search/replace of your domain name. I strongly suggest using as much of the domain as you can: i.e. http://newdomain.com instead of just newdomain. This will make sure you don’t confidently change the content of your posts. The Incerconnectit Search/Replace DB script is also perfect to use here, but it won’t fix everything, which is why we have another step:

    Next you need to manually go through these tables:

    • wp_site
    • wp_blogs

    Those two tables are really straight forward, by the way. You’ll see what to edit right away.

    Then you have to manually (again) review all the wp_x_options tables and look for THREE fields:

    • home
    • siteurl
    • fileupload_url

    Only edit those. And yes, you have to do it manually in each of the options table unless you used the Incerconnectit Search/Replace DB script earlier.

    Once you’ve done that, go into your wp-config.php and see if you have to change define( 'DOMAIN_CURRENT_SITE', 'ipstenu.org' ); (depending on your change, you may not).

    And … that should be it.

    It’s a pain, but it’s not insurmountable.

    Right away, though, you can see the complications if you’re moving a site from ipstenu.org/wordpress to ipstenu.org, and while most of the changes remain similar, you need to remain vigilant and attentive with every change you make. The wp_blogs table is where it gets stickiest, as you have to add in the new subfolder (or remove it) by editing a separate field in the row.

    Just pay attention, read carefully, and remember to breathe.

  • Large Files Don’t Move Well

    Large Files Don’t Move Well

    Every time you email a file to yourself so you can pull it up on your friend's laptop, Tim Berners-Lee sheds a single tear.The internet is great for small files. Email, Twitter, Tumblr. When we make webpages, we push to make them lean and mean. So what happens when you have a 200 meg video you need to send out to local news outlets?

    The best way is to toss it on a USB drive. I have two in my purse at most times (one’s a novelty R2-D2 my friend sent as a thank you, I keep all my PDFs for software on it). But wait, you say, it’s 2012. Why can’t I use something else?

    The problem is that the methods by which we can transfer large files aren’t, generally, user friendly. I mean, that comic there on the left is pretty much why it sucks. Click on the picture to see it bigger. The only think Randall didn’t list was Torrent, which I love for how it handles files, but it’s really not ‘non-nerd’ friendly to set up. To use, it’s easy, but making a torrent, distributing it, and seeding it, takes time.

    A friend of mine suggested HFS which stands for HTTP File Server. It lets you treat HTTP as FTP. Just as secure as FTP too. But again, it’s a pain to set up.

    So what happens when two simple guys want to share a movie they’re working on? They drive over with an external hard drive and share the data. Because that’s the fastest, safest, best way to do it.

    We’re missing something here, aren’t we?

    I got to thinking about this when MegaUpload, a filesharing site (mentioned in the comic) was shut down on the 19th for violating copyright. See, some people were uploading material they didn’t have the copyright for to MegaUpload. Why? Because anyone could sign up and upload anything. Of course.

    https://twitter.com/EricMann/status/160110405090414592

    I meant MEGAUPLOAD in that tweet, but Eric’s reply got me thinking more.

    How much illegal material goes through the US postal service? I mean, let’s say I download illegal software, put it on a USB drive, and mail it across state lines to my friends in Texas. How many laws did I break? A lot! The US Postal Service sends a lot of really weird mail but they do have rules. The trick is getting caught. They don’t check DVDs, books, or USB drives because there’s no need to.

    Going back to MegaUpload, they were shut down because someone used them to transport illegal items. If we apply that mentality to physical mail, then we’re talking about shutting down the entire postal service because Bobby Dumbass mailed his brother a video of himself jerking off. Oh yes, that’s illegal.

    This isn’t unnecessary hyperbole.

    The reason MegaUpload is so popular is that it made it fairly easy for the laymen of the world to upload large files. The problem with it is that it’s filled with distractionary popups and the like. I’m using ‘is’ since I think it’ll be back. Still, MegaUpload filled a niche that is desperately needed. How do the tech-newbies upload large files? I’m capable of making and seeding a Torrent, but those aren’t easy and rely on other people seeding to speed it up, plus a level of tech-savvy from the receivingt end where someone knows how to use a torrent file and pull the data back down.

    On the other hand, when I download something from Apple, say a 300meg update for my iPhone, I’m downloading … a 300meg update. Apple has a gazillion severs in the US. Why not use Torrent technology to let me pull down the file in chunks, instead of in order? Is this because of how Torrents work, or are they just scared because of what happened to other Torrent sites?

    Torrents (bittorrents) are amazingly impressive to me. In regular file downloads, you pull a file down ‘in order’, essentially, like a printer. One line at a time is sent, downloaded, rendered and output. Torrents spin that around, and work by downloading small bits of files from many different web sources at the same time. It’s like watching the movie Memento. The story is told out of order, but in the end it makes sense. That means if I’m downloading one bit from Joe in Arizona and another from Dan in Nebraska, I still get the same file, and I get it faster because if I lose connection to Dan, my Torrent app finds Barbara in Iowa who’s also seeding the file and I keep downloading.

    Today, if I lose connection in an FTP download, I have to start over. A torrent I can stop and start all I want. I know, that sounds totally awesome, right? So why aren’t we using it more?

    I don’t know. I think because it’s seen as ‘dangerous’ by the copyright moguls. It makes it too hard to track infringement, and makes everyone culpable. Which it really doesn’t. I mean, I guess they’re just afraid and don’t understand that this power is already there, and that it’s always been there. These are the same people who wanted the VCR to die an ugly death because it would ‘hurt sales.’ Protip: It didn’t. Neither will this.

    So let’s push our tech companies to come up with a better way to share large files, a way the non-tech people can use. Make it easy to set up on your computer, make it easy to understand, like email and the basics of the web. Make it fast to upload, faster to download, and easy to link to. Make it easy to keep private if we want, or public if we don’t. Make it simple to report copy infringement too, and use it as a legal way to send large files, like movies, so the Hollywood people can give us a viable, workable, alternative to theft.

    We have the tools, let’s do it!

  • SOPA Blackout

    SOPA Blackout

    I’m lazy and I don’t want to write a plugin, so I asked on Twitter if someone had one to black out a site for SOPA on the 18th of January. If you don’t get why this is a thing, please read WordPress.org’s post on SOPA. A lot of sites are going black from 8am to 8pm. I am, and I to didn’t want to use a plugin.

    My solution for this involves two files and is all thanks to Pete!

    To do this is really simple. Go in and make a file called .maintenance in the top level of your WP install. For most people, it’s the same folder as your .htaccess and wp-config.php files.

    Now edit that file and put in the following content:

    <?php
     
    // Let's make sure you're not an admin/logged in!
     
    function is_user_logged_in() {
        $loggedin = false;
        foreach ( (array) $_COOKIE as $cookie => $value ) {
            if ( stristr($cookie, 'wordpress_logged_in_') )
                $loggedin = true;
        }
        return $loggedin;
    }
     
    if ( ! stristr($_SERVER['REQUEST_URI'], '/wp-admin') &amp;&amp; ! stristr($_SERVER['REQUEST_URI'], '/wp-login.php') &amp;&amp; ! is_user_logged_in() )
     
    // If it's after 8:00:00 on the 18th, we're going to show the blackout page
     
    if ( time() >= mktime(8,0,0,1,18,2012) ) {
    	// When we hit 8pm (20), we're back.
    	$upgrading = mktime(20,0,0,1,18,2012);
    }
    ?>
    

    What does this do? It’s pretty simple. First it checks to see if you’re logged in and, if so, lets you get where you need to go. If you’re not logged in, though, it checks the date and if it’s after 8am on the 18th, you get a maintenance page. After 8pm on the 18th, it swings back. (All this code, except for the date stuff which I wrote, is from Matt (Sivel):
    WordPress Maintenance Mode Without a Plugin and WordPress Maintenance Mode Without a Plugin Part 3/ ) Pretty cool right? And the 8am to 8pm is based on your server’s time, so it’s all local. It’s also pretty easy to see how you change that for your own time. I would say pick your busiest time to go black.

    But if you want it to look pretty, you need to do a little extra. (Code from WordPress Maintenance Mode Without a Plugin Part 2 and text from Blaccupy) Make a file called maintenance.php and put it in your wp-content folder. Here’s an example:

    <?php
    /* Tell search engines that the site is temporarily unavilable */
    $protocol = $_SERVER&#91;"SERVER_PROTOCOL"&#93;;
    if ( 'HTTP/1.1' != $protocol &amp;&amp; 'HTTP/1.0' != $protocol ) $protocol = 'HTTP/1.0';
    header( "$protocol 503 Service Unavailable", true, 503 );
    header( 'Content-Type: text/html; charset=utf-8' );
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
            <title>BLACKED OUT</title>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <style type="text/css">
            body {
                    background: black;
                    text-align:center;
                    color: #eee;
                    font-family: Helvetica;
                    font-size: 2.2em;
                    }
            </style>
    </head>
    <body>
    
    <div style="width: 960px; margin: 0 auto;">
    <h2>This website is..</h2>
    
    <h1>BLACKED OUT!</h1>
    
    <p>In protest of pending US legislation, which threatens the freedoms of websites like this one and the freedoms of the people who use them, this website is offline on January 18th, 2012 from 8am to 8pm EST.</p>
    
    <p>Please <a href="http://americancensorship.org/">help protect our free speech</a> against the corporate and political interests which seek to take them away!</p>
    
    <p>(And don't worry, we'll be back in business tomorrow!)</p>
    </div>
    
    <?php
    die();
    ?>
    

    Which means your site will look like this on January 18th. You’ll notice I made some tweaks on mine. This is a default feature of WordPress, by the way. You can design your own maintenance mode page just with this one file, so y’know, party time.

    Now there’s only one catch. If you update WP via the automatic updater between now and then, you lose the .maintenance file. I don’t have a fix for that, but if you do, please comment!

    And yes, my sites are going dark on the 18th.

    ETA: If you have a Multisite and only want SOME sites dark, use Customize the Suspended blog page from WordPress Must-Use Tutorials. Suspend the sites and boom goes the dynamite.

    ETA 2: If you’re using MediaWiki (like I am on another site) I came up with this idea to go dark for SOPA. Its just a normal extension that, between those hours, redirects to the same page I use for WordPress. You could have it point to any page, of course.

    <?php
    
    if ( !defined( 'MEDIAWIKI' ) ) die();
    
    if ( time() >= mktime(8,0,0,1,18,2012)  &amp;&amp; time() <= mktime(20,0,0,1,18,2012) ) {
         
            include('/location-of/wp-content/maintenance.php');
        exit();
    }
    ?>

    That code, sans the Mediawiki line, will also work as an extension for ZenPhoto, so pass it on.

  • WordPress › Help Stop SOPA/PIPA

    We are not a small group. More than 60 million people use WordPress — it’s said to power about 15% of the web. We can make an impact, and you can be an agent of change. Go to Stop American Censorship for more information and a bunch of ways you can take action quickly, easily, and painlessly. The Senate votes in two weeks, and we need to help at least 41 more senators see reason before then. Please. Make your voice heard.

    via WordPress › Help Stop SOPA/PIPA.