Using ImageMagick with VBScript

August 17th, 2005

First first ever lines of VB Script code. This script generates thumbnails out of all files in a given directory and saves them to another. Additionally it creates a resized version of the images to fit into a certain max dimension. Note: ImageMagick needs to be installed in order to run this script.
Image Magick resizing test with VBScript

Get me those cheap notebooks!

August 9th, 2005

These screenshots were taken at heise.de. Made them some months ago but as I’m cleaning up my hard disc at work at the moment I thought I could “outsource” them to this page ;)
thumbnail heise screenie 1
thumbnail heise screenie 2

Web Design patterns

July 20th, 2005

Martijn van Welie collected some nice tipps and tricks concerning design patterns for different types of web sites from artists sites over eCommerce sites to web-based applications. In his artcles he points out the differences one needs to consider and even shows some best practices for page elements like login boxes shopping carts etc. . A very useful resource while planning a new project and a nice read in general.
Check it out at http://www.welie.com/patterns/.

pear package installer

July 10th, 2005

As I’m always forgetting this quite easy to remember switch a little mental note: --alldeps makes pear install command resolving all needed dependencies automatically… dumb me

Fedora update from Core 1 (Core 2) to Core 3

July 9th, 2005

I recently booted one of my long forgotten linux machines at home and realised the Fedora Core running on it was more than outdated. As I was not willing to download the full CD set for an offline update I thought I could try to find out how to update the system via online update.
After doing some research I found out that theoretically an update is quite easy to accomplish by downloading the actual version of fedora-release and yum. So I gave it a try and tried to install those two rpms manually. First problem were the outdated GPG-Keys. Went back to the Fedora Server and downloaded all files starting with RPM-GPG-KEY. To import the keys to the system simply do a rpm --import RPM-GPG-KEY*. You’ll need those keys anyway, but I had to realise that updating from Core 1 to Core 3 doesn’t seem to work that easy. I had some trouble with unresolved dependencies (e.g. udev needs kernel 2.6) so I continued with an intermediate step, I installed Fedora Core 2 first. If the Fedora update worked fine (it did without problems for me) we can start the same procedure for FC3:
Download fedora-release-3
and yum and install them with rpm -Uvh --force fedora-release-3-8.i386.rpm yum-2.1.11-3.noarch.rpm. You have to use the --force flag as there are conflicts between fedora-release-3 and up2date which can be ignored.
Afterwards just run a yum upgrade, wait some minutes and accept to download all new packages. Due to a bug in rpm it might be that you get an error message like
Error: Requiring package gnome-vfs2-2.8.2-8.i386 not in transaction set nor in rpmdb.
In this case just install the Fedora Core 3 versions of rpm (4.3.2-21) and its dependencies (rpm-python, rpm-build, rpm-devel) and re-run yum upgrade and everything should be allright.
This method worked fine for me, hope it will aswell for you. Please report any upcoming problems here and we will see if we can find a workaround :)

LiveUser Beta 0.16.0 released

June 26th, 2005

I just realised the guys from LiveUser released Beta 0.16.0 this week. I hope there are not that many changes as I just managed to integrate this Pear package into one of my running projects.
LiveUser is a Pear package for user management including Auth and Permission handling functionality. Unfortunately allthough being a quite a nice piece of code it is aswell one of the least well documented Pear projects I’ve ever seen. As I have to check out the new version anyway I’ll try to contribute some tips on how to get started with this package here during the next time.
Check out LiveUser at the Pear home: http://pear.php.net/package/liveuser

CSS style problem with Windows XP themes

June 23rd, 2005

Ok, I knew that Internet Explorer is highly integrated into the OS, but this issue was new to me…
Smooth 3 column layout, a navigation to the left, some teasers and a searchbox to the right. All three cols have a fixed width. The content area is filled up with a medium complex form. I used fieldset and legend attributes but I don’t want to have a border line all around the fieldset. So I give the fieldset a border:none and let the legend be underlined by a 1px div which has the full with of the parent div container. “All fine” I think and check it in into cvs. Some hours later my co-worker:

- “Hey, this form page you made … kinda messy, eh?”
- “Hu?”
- “The whole teaser area isn’t there where it is supposed to be.”
- “No it isn’t, look at my screen!”
- “Yes it is, look at my screen!”

After some hours of code comparison and several tests we finally figured out the problem. We both work with almost the same notebook, same OS (Windows XP with identical Service Pack and patch status) but different screen resolution (which couldn’t be the problem as we have a fixed layout here) and (here’s the crux!) different windows themes. I’m on “Windows Classic” theme and he has the standard Win XP theme. Funnily the Win XP theme adds a padding to the fieldset element (!!!) so all we had to do was adding a padding:0 to the fieldset css. To be honest, there are much more important things I am willing to waste my time with…
So as a conclusion for you WebDevs out there: Always test your layout on different Windows tehemes aswell ;)
(Just to make another line on the Mozilla vs. IE list – Mozilla just behaved as expected and all was fine before and afterwards…)

CSS styled submit buttons

June 21st, 2005

Yay, first Coding post!
Needed a neat little submit button design today. Here’s what I ended up with:

As I wanted to have an rollover effect but IE doesn’t support usage of :hover with other elements than the a-tag, I decided to use a simple 3-liner for “on the fly (hover)” style switching:

function changeStyle(id, newClass) {
identity=document.getElementById(id);
identity.className=newClass;
}

Very simple, but quite useful for several circumstances. id is the unique id of the element I want to switch the style of, newClass is the style I want to switch to. Only disadvantage is the non-functional hover effect with disabled JS in Internet Explorer.

Here’s the CSS code:


input.fancysubmit {padding-left:3px; border:0; color:#fff; background-color:#abcdef; cursor:pointer; font-weight:bold; background-image: url(./img/pfeil_button_white.gif); background-repeat:no-repeat; background-position:left center;}
html>body input.fancysubmit {padding-left:12px}


input.fancysubmit:hover {padding-left:3px; border:0; background-color:#abefcd; color:#fff; cursor:pointer; font-weight:bold; background-image: url(./img/pfeil_button_white.gif); background-repeat:no-repeat; background-position:left center;}
html>body input.fancysubmit:hover {padding-left:12px}


/* workaround for wacky IE CSS2 implementation */
input.fancysubmitmouseover {padding-left:3px; border:0; background-color:#abefcd; color:#fff; cursor:pointer; font-weight:bold; background-image: url(./img/pfeil_button_white.gif); background-repeat:no-repeat; background-position:left center;}
html>body input.fancysubmitmouseover {padding-left:12px}

As you can see, I’ve added an background image. It is just a tiny arrow in this case, but there are several other possibilities for using the background. You can download my all-in-one HTML file and the image here:

Fancy button HTML source code

For those of you not that into browser hacks, the html>body makes IE ignoring the following style definitions. A good way to correct display problems concerning different box models of the browsers.

Back in town

June 20th, 2005

Aye, not much time to redo the page completely like I want it to be, but at least the boring 404 is away. Hope I can discipline myself a bit and post some interesting stuff soonish ;)