One word…

I reckon it’s gonna be bigger than SpaceBook and MyFace put together. Remember, you heard it here first!
Holla!
Following a previous post where I coveted Whitevoid’s use of the Papervision3D library for Flash, I’ve had a quick play about. The result is largely inspired by the PicLens plugin for Firefox, and is very much a first stab in the dark with Papervision.

Shoot over to http://assets.pcreate.co.uk/photospace/ for a quick gander. It’s quite clever actually - all of the images are loaded in dynamically using an external XML feed, so should provide interesting results when hooked up to Flickr or some such.
Click on the images to take a closer look at them. Use the icons in the top left corner of the screen to do interesting stuff with the images (and reset them), and bask in full-screen glory using the button at bottom right.
I’ll have a bash at improving it later, when I get a spare bit of time.
Peace out. Love to your mothers.
I have created yet another theme for this site, and at the same time I decided to upgrade my installation to 2.5. Everything went perfectly smoothly, except that WordPress would keep reverting back to the default Kubrick theme after I had left the site.
Anyway, I’m sure there’s a much better work around, but all I did was copy my new theme folder and rename it ‘default’ (after backing up the Kubrick theme, of course). It seems to work (hopefully you can see my new black/grey/green theme right now!).
I’m sure that this bug will be sorted shortly, but just in case anyone else is having the same problems and need a short-term fix.
More on the site redesign shortly.
I’ve been unashamedly geeking it up this weekend, messing about with CodeIgniter, the PHP application framework from EllisLab. One of the great things about using a framework like this is that it automatically supports clean URLs (ie URLs without ?query=strings at the end) when used with the mod_rewrite feature of Apache…
Activating mod_rewrite:
The first thing that I discovered is that Tiger has introduced an extra level of confusion to the stock configuration of Apache. In addition to the httpd.conf file in the /etc/httpd directory, there’s also a users directory as well which holds unique config files for each user of the machine. So, if you were able to enable mod_rewrite or AllowOverrides in httpd.conf, you may find that it doesn’t work in your personal Sites directory. So let’s take a look…
In Terminal:
- Open /etc/httpd/httpd.conf:
$ sudo pico /etc/httpd/httpd.conf
- Go to line 223 (or there abouts) and uncomment the following line:
LoadModule rewrite_module libexec/httpd/mod_rewrite.so
- Go to line 267 and uncomment the following line:
AddModule mod_rewrite.c
- Scroll down to line 408 and change the line to read:
AllowOverride All
(Some server admins will tell you this may not be the best idea for hosting a live site, but I’m assuming you’re using this for local development only, right?)
- Uncomment line 454:
AccessFileName .htaccess
- Save and exit the file, and then restart Apache:
$ sudo apachectl restart
NOTE: I’m running a custom installed build of PHP5 from Marc Liyanage which had already amended my httpd.conf file to make most of these changes, but I though I’d include them anyway.
At this point you should have mod_rewrite happily fixing your ugly URL’s in the /Library/WebServer/Documents directory, but I’m guessing that it’s still not working in your /Users/you/Sites directory:
- Open the yourname.conf file in the /etc/httpd/users folder.
- Change the first two lines to this:
Options All
AllowOverride All
- Give Apache another bounce:
$ sudo apachectl restart
You should now be seeing friendly URL’s in your very own Sites directory. And that’s about it.
If, like me, you run multiple sites out of sub-directories of your Sites directory, then you may notice that all hell is breaking loose in directories that have a .htaccess file trying to rewrite your URL’s. This is because the .htaccess file is redirecting everything back to the root of the Sites directory.
Enabling Virtual Hosts:
Here’s how to develop as many sites as you want, with “root relative” calls for graphics, scripts, CSS, links, etc. and keep all of the files for any particular site together - and they don’t even have to be in the default web server document root.
The practice is called “Name-Based Virtual Hosts” and is described in the Apache documentation (for those of you who want to read up on it). Essentially, I’ve managed to boil it down to a two(ish) step process…
In Terminal:
- Open back up your /etc/httpd/httpd.conf file:
$ sudo pico /etc/httpd/httpd.conf
- Find the line that reads ### Section 3: Virtual Hosts and read the description below. Underneath the sample VirtualHost you’ll want to create the following hosts…
<VirtualHost *:80>
DocumentRoot /Library/WebServer/Documents
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /Users/yourname/Sites/site/root/
ServerName your.vhost.name
</VirtualHost>
An example from my own machine is a vhost for my installation of phpMyAdmin which looks like this:
<VirtualHost *:80>
DocumentRoot /Users/philsmith/Sites/php/phpMyAdmin/
ServerName local.db
</VirtualHost>
As you can see, ‘your.vhost.name’ can be anything you like!
- Save and exit.
- Next you’ll need to edit /etc/hosts:
$ sudo pico /etc/hosts
- It should look a little something like this:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
Below the first localhost description, add your new vhost. For my example above, this would be:
127.0.0.1 local.db
- Save, exit and restart Apache:
$ sudo apachectl restart
Now, if you go to http://your.vhost.name in your browser, you should see your site. If not, you may want to try:
$ sudo kill -HUP cat /var/run/lookupd.pid
$ sudo lookupd -flushcache
Magic!
Not that I’m expecting it to become the next Threadless or anything, but I’ve set up a small shop over at Spreadshirt selling some t-shirts. Why not pop by at some point…
Just another experiment to see what the web has to offer…