thoughton:digitallife banner
about downloads imagery work
-- How To... --

FolderBlog on IIS


I've been using the great little image CMS known as FolderBlog for the last few months and have been thoroughly enjoying it. The program is easily adapted to any design and is incredibly simple to use, allowing even the most computer-illiterate client to easily upload images and edit captions. The official program doesn't have an easy non-FTP way to delete images, but that is taken care of by a nifty little modification by Björn-Frederic Limmer known as FolderBlog Ikue Reloaded (FIR). FIR also adds other features - including adding .gif compatibility and sorting by EXIF data - but it is the delete function that tops my list.

However, my entire experience of using FolderBlog and FIR has been on Apache servers. Today I tried to use it on an IIS server and ran into many problems. Searching for information to solve this problem was difficult, largely due to the lack of a search function at the official FolderBlog forums. The incomplete documentation for the current version 3 of the program also doesn't help! As a result I've decided to post my solution here:

Step 1
Edit fb_settings.php and replace:

$use_alt_url = 0;

With:
$use_alt_url = 1;

Note: To post new images and captions after changing this setting you need to browse to fb.php?p=post instead of fb.php/post/

Step 2
IIS does not have the REQUEST_URI function. We need to use PHP_SELF instead. Open up fb.php and replace all instances (there should be 5) of:

$_SERVER["REQUEST_URI"]

With:
$_SERVER['PHP_SELF']

Step 3
Some IIS servers which are running PHP as CGI may not have EXIF enabled. This was the case with my IIS server. In order to fix the exif_imagedata errors that result from this I had to find this section in the FIR version of fb.php:

function createThumb($filename,$altname="") {
global $photo_directory, $thumb_directory, $thumb_maxsize, $square_thumbs, $file_extension;


// MODIFIED BY IKUE
// check if it is a supported filetype, better error handling included

$original = @imagecreatefromjpeg($filename);
// could it be loaded? if not, try another
if (!$original) { $original = @imagecreatefrompng($filename); }
// could it be loaded? if not, try another
if (!$original) { $original = @imagecreatefromgif($filename); }
// still not loaded? dear... give an error message
if (!$original) { showerror("You attempted to load an unsupported filetype. Check your file extensions in the settings.<br>File: $filename"); }


$x = imagesx($original);
$y = imagesy($original);
if ($square_thumbs==0) {
$scale = $thumb_maxsize/max($x, $y);
$newx = $x*$scale;
$newy = $y*$scale;
$thumb = imagecreatetruecolor($newx, $newy);
imagecopyresampled($thumb, $original, 0, 0, 0, 0, $newx, $newy, $x, $y);
} elseif ($square_thumbs==1) {
$scale = $thumb_maxsize/min($x, $y);
$newx = $x*$scale;
$newy = $y*$scale;
$thumb = imagecreatetruecolor($thumb_maxsize, $thumb_maxsize);
imagecopyresampled($thumb, $original, ($newx-$thumb_maxsize)/-2, ($newy-$thumb_maxsize)/-2, 0, 0, $newx, $newy, $x, $y);
}
if (exif_imagetype($filename)==IMAGETYPE_JPEG) {
imagejpeg($thumb, $thumb_directory . basename($filename), 95);
if ($altname) {
imagejpeg($thumb, $thumb_directory . $altname, 95);
}
} else
if (exif_imagetype($filename)==IMAGETYPE_GIF) {
imagegif($thumb, $thumb_directory . basename($filename));
if ($altname) {
imagegif($thumb, $thumb_directory . $altname);
}
} else
if (exif_imagetype($filename)==IMAGETYPE_PNG) {
imagepng($thumb, $thumb_directory . basename($filename));
if ($altname) {
imagepng($thumb, $thumb_directory . $altname);
}
} else { showerror("You attempted to load an unsupported filetype. Check your file extensions in the settings.<br>File: $filename"); }

return array($newx, $newy);
}

And replace it with the same function from the original unmodified (not FIR) version of fb.php (this will remove EXIF functionality from FIR, but I don't need it anyway):

function createThumb($filename,$altname="") {
global $photo_directory, $thumb_directory, $thumb_maxsize, $square_thumbs, $file_extension;
$original = imagecreatefromjpeg($filename);
$x = imagesx($original);
$y = imagesy($original);
if ($square_thumbs==0) {
$scale = $thumb_maxsize/max($x, $y);
$newx = $x*$scale;
$newy = $y*$scale;
$thumb = imagecreatetruecolor($newx, $newy);
imagecopyresampled($thumb, $original, 0, 0, 0, 0, $newx, $newy, $x, $y);
} elseif ($square_thumbs==1) {
$scale = $thumb_maxsize/min($x, $y);
$newx = $x*$scale;
$newy = $y*$scale;
$thumb = imagecreatetruecolor($thumb_maxsize, $thumb_maxsize);
imagecopyresampled($thumb, $original, ($newx-$thumb_maxsize)/-2, ($newy-$thumb_maxsize)/-2, 0, 0, $newx, $newy, $x, $y);
}
imagejpeg($thumb, $thumb_directory . basename($filename), 95);
if ($altname) {
imagejpeg($thumb, $thumb_directory . $altname, 95);
}
return array($newx, $newy);
}

Step 4
Almost there! The FIR gallery now displays in my web browser, but although the thumbnails are visible none of links work. It turns out that all of the links were missing the ?q= characters. Thanks to this thread all you need to do to fix this is edit fb.php and replace this line:

$path[0] = $fbfile = str_replace($path[1], "", $_SERVER['PHP_SELF']) . (isset($_GET["p"]) ? "" : "?p=");

With this line:
$path[0] = $fbfile = str_replace($path[1], "", $_SERVER['PHP_SELF']) . (isset($_GET["p"]) ? "?p=" : "?p=");

Step 5
There is no step 5. You should now have a working FolderBlog installation on a Windows IIS server.

Posted on 30 December 2005, to How To... | Internet
Comment on this entry | TrackBacks (1)
-- Mobile --

Is that a mouse in your PC card slot?


Mogo MouseBTThis slick new mouse was featured on TUAW today. It's a Bluetooth mouse which slots neatly inside a laptop's PC card slot. The mouse also recharges via the slot. Finally a use for that wasted space in my Powerbook! The mouse has a small kickstand which flips out, and apparently the buttons are on the bottom of the mouse, so that pressing down the body causes a click (the lower end of the mouse is the front). It doesn't look particularly comfortable, but is still seems to be a great idea for those of us who aren't so keen on trackpads and have an unused PC card slot. The mouse is set to be introduced next month at the Consumer Electronics Show in Las Vegas.

Via TUAW, who had it from Engadget, who got it from Uber-Review, who give credit to GearLog (even though the article appears to have vanished from GearLog). Don't you just love blogs? :) In a strange twist of fate, GearLog is a blog from the editors of DigitalLife magazine :shock:
Posted on 23 December 2005, to Mobile | News | Technology
| TrackBacks (2)
-- Internet --

JenSense strangely beats ProBlogger ... how?


I noticed today that JenSense has won SearchEngineJournal's 2005 "Search Engine Blogs Awards", beating out several high profile blogs, including ProBlogger. Now don't get me wrong, I read and enjoy both ProBlogger and JenSense, but I simply cannot understand how people voted. Without being rude about it, I simply cannot think of a single area where JenSense is better than ProBlogger. Both authors are clearly knowledgeable, but ProBlogger is far and away the more interesting read. JenSense simply seems (sorry Jen!) boring by comparison.

I think part of it is a personal bias towards design. Jen's blog is so ... plain. I know, I know, whitespace is the new black and there isn't enough of it around, but c'mon, there's got to be more to a website than the words. Why not just use default fonts and no CSS at all? Perhaps this simplicity is good for attracting the business-types, I don't know. I also think the main body column in JenSense is too wide and find reading it quite tiresome. That could however simply be my uselessness rearing its ugly head.

My final gripe is that JenSense is much more 'news' oriented. A simple glance at the last 15 entries on each blog clearly demonstrates this. (I started to type out the 15 recent entries of each blog but quickly got fed up. So I took some screenshots instead.)

Here are JenSense's last 15 entries:
JenSense last 15

And here are ProBlogger's last 15 entries:
Problogger last 15

I think these two shots are pretty illuminating, but if you don't agree a quick read through those entries may change your mind. On re-reading this post it may appear that I am being overly critical of JenSense. This isn't my intention. My goal was simply to understand how ProBlogger could rank so many places behind JenSense. (I am more careful about these things since facing the wrath of a couple of righteous commenters a few days ago!)

Update: On further reflection (which I should have done before posting :D) I think the fact that JenSense is more focussed on Adsense while ProBlogger has a wider coverage makes JenSense less interesting to me. The narrower focus means that Jen covers more of the minutiae which by definition is less engrossing to the casual reader such as yours truly.
Posted on 22 December 2005, to Internet | News
Comment on this entry | TrackBacks (0)
-- Web Design --

Retrofit your website for smartphone/PDA access


IBM have published a useful article describing the basics of setting up a website so it will display correctly on cellphone and PDA web browsers. The key to the technique is tying the appropriate CSS file to the media type attribute. Slashdot discussion here.
Posted on 19 December 2005, to Web Design
| TrackBacks (0)
-- Internet --

CNN poll on Top 10 web moments


Matt Cutts, a Google employee who is also a prominent blogger, discusses a CNN poll which asked users to name the 10 most significant events in the history of the World Wide Web. The poll is to celebrate 15 years of the WWW and offers these choices:

10. WiFi hotspots -- wireless Internet connectivity appears in airports, hotels and even McDonald's.
9. Webcams and photo sharing -- communication becomes visual, and inboxes fill with baby photos. 8. Skype -- telephony turns upside down with free long-distance calls, Ebay snaps it up in September 2005 for $2.6 billion.
7. Live 8 on AOL -- five million people watch poverty awareness concerts online in July 2005, setting a new Net record.
6. Napster goes offline -- Regulators close the pioneering music swap site in July 2001 and file-sharing goes offshore.
5. Lewinsky scandal -- Matt Drudge breaks the Clinton/Lewinsky sex scandal in 1998. The blog is born.
4. Tsunami and 9/11 -- two tragic events set the Web alight with opinion and amateur video.
3. Boom and bust -- trillions of dollars were made and lost as the dotcom bubble ballooned and burst between 1995 and 2001.
2. Hotmail -- went from having zero users in 1995 to 30 million subscribers 30 months later. It now has 215 million users.
1. Google -- redefined search. Invented a new advertising model and commands a vast business empire.

Matt doesn't think much of the poll, saying that it is difficult to trust when webcams are included but RSS, XML and AJAX are not. I can't say I agree with Matt there, even today your average websurfer wouldn't have a clue what RSS, XML and AJAX were. Commenters on Matt's post offer a variety of other opinions, some of which I disagree with, and a couple of which simply made me laugh (modems? HTML? How can these be 'Top 10 Web moments'?)

My own nominations would include most of the CNN list, barring the Live8 coverage and Skype. I would also rephrase number 6 so that it recognises the creation of Napster rather than its demise. However I think there are some glaring omissions. My other nominations would be:

Netscape - the first popular graphical web browser, sparks the 'browser wars'
WYSIWYG HTML editors - it's 1995, PageMill is released, and suddenly anyone can build a webpage
Javascript - webpages become interactive, later develops into AJAX
Amazon - dramatically shook up e-commerce with great prices and fast worldwide delivery
ICQ - instant messaging enters the public consciousness via a tiny Israeli company
eBay - wasting time on the web while at work explodes in popularity and propels thousands into earning a living in their pajamas

I'm sure I've forgotten some, but I think these deserve a place on that list. Has anyone else got any suggestions?
Posted on 16 December 2005, to Internet
| TrackBacks (0)
-- Mac Video --

MPEG2 Works 4 updated


MPEG2Works4The Mac video Swiss Army knife ffmpegX has dominated home video conversion on the Mac for quite a while now, and for most of that time its only serious rival has been MPEG2 Works. So today's news that MPEG2 Works has updated to version 4.0.5 is more than welcome! New features include:

• Added horizontal cropping aside of existing vertical under Tools section [requested by users]
• Added burn DVD after authoring option under Advanced Authoring section [requested by users]
• Improved VOB/VRO with AC3 audio > QT conversion /works faster now/
• Improved VOB > SVCD conversion /works faster now/
• Improved ReplayTV > QT conversion /one preset button from now on/
• Improved AC3 > AIFF conversion /better output/
• Improved overall performance

Might be worth a look if ffmpegX isn't working out. MPEG2 Works has traditionally been strong in the areas of NTSC<->PAL conversion and VCD/SVCD creation whereas ffmpegX was better for batch processing, PSP support, H264 support (including iPod video), and, in my opinion, a more intuitive interface. However some of MPEG2 Works' new features (such as burning) have no equivalent in ffmpegX.

Both programs have the benefit of fantastic support by their authors via the MPEG2 Works forum and the ffmpegX forum.
Posted on 14 December 2005, to Mac Video | News
| TrackBacks (0)
-- Bereft of Reason --

Juvenile behaviour on World of Warcraft? No shit, sherlock.


WoW sexismBoing Boing are reporting on a San Antonio university course where students are required to observe interactions in the online role playing game World of Warcraft. One bright spark boldly embarked on an investigation into sexism, and was inexplicably surprised when she got plenty of juvenile responses ("show us yer t*ts!!!") on the WoW discussion forums. Hello? It's a GAME - with a commensurate number of children playing. Juvenile behaviour is the norm.
-- Apple --

Aperture gets torn a new one by the mighty Ars


That font of supremely in-depth technical information, Ars Technica, has reviewed Aperture - Apple's new pro-photography software - and given it an absolute mauling:

It saddens me to say that Aperture's innovations are only skin deep. If it could deliver on the promise of being both fast and produce flawless results, it would be the dream package. At this point it is an expensive and questionable alternative to Camera Raw, a free extension to Photoshop, and Adobe's Bridge which can batch produce better quality images in arguably less time. For US$500 (Photoshop itself retails for US$750), there is no excuse not to be aware of professional needs like a high-quality sharpen tool, DNG exporting or more basic things like curves, a sampler tool for RGB pixel readings, or retention of EXIF data on output.

Furthermore:

The quality of Aperture's RAW converter is bad, and for an application that's selling point is iterative nondestructive RAW editing, that's like building a house on a plate of Jello.

And this:

They have only themselves to blame: they set themselves up for a big fall by attempting to dig themselves a chunk of the pro market by purporting to have the lossless holy grail of imaging. The trouble with that is they obviously didn't have the engineering or expertise in RAW processing to pull it off or, if they did, they chose not to include it because of speed constraints due to Core Image.

I had previously been considering buying Aperture. Now I wouldn't touch it with a bargepole, at least until these numerous fatal flaws have been fixed.
Posted on 5 December 2005, to Apple | Digital Imagery | News
| TrackBacks (0)

Category icon Sponsors