WordPress: Requiring Login

I know this goes completely against the concept of blogging, but an end-client wants their site to be password protected. Now, one way to do it is to create a .htpasswd file and lock people out of the site that way, but it’s a pain for non-technical people to dig through access logs.  But thanks to the ubiquity of WordPress plugins and a little ingenuity, I am able to accomplish said task. This is being done in WordPress 3.1, so I’m not sure about the backward-compatibility of this. If you would like to comment on this code’s backwards-compatibility, please feel free.

First in the lineup is User Tracking. Thanks to LBAK, that’s one problem solved.

Second up is requiring a user to be logged in. One way to get this done is to edit the wp-blog-header.php file as follows. The script is easy to read, as all it does it call other scripts. Place the following code right under the part that says: if ( !isset($wp_did_header) ) {

if ( !isset($wp_did_header) ) {
     if ( !is_user_logged_in() ) {
          echo '<!DOCTYPE html>
<script type="text/javascript">
  window.location = "<?php bloginfo('wpurl') ?>/wp-login.php";

… and you’re done! Now, any user still has access to the Admin area, because the code doesn’t quite reach that far, and if you want to protect your intellectual property that badly, I think you’ll want to keep even the lowest-level users outside of that area.

If so, stay tuned, and you will see exactly where that code would go!

Digitalstudent.me Introduction Video

DigitalStudent.Me is all about organizing your life around the new technologies that our parents didn’t have as university students. Heck, some of us didn’t have such a wealth of technology ten years ago!

The world is changing so fast. It seems like the trend of all-in-one machines is here to stay. So our word processor also allows us to watch cute kitten videos, or even a science fiction film from the 1970’s whilst typing up reports and documents. Distraction is everywhere. Without proper organizational skills, you’re screwed.

But thanks to DigitalStudent.Me, you don’t have to be.


Recording for Video

Last week my friend Jon Tilton asked me to help him with a class assignment he has. I didn’t quite know what it was all about but I did know it would be cool. I’d lent my voice many, many years ago on something called Superlander. Now he’s finishing college and we still get to work together.