web development

Premade admin panel layout – Complete Liquid Admin Control Panel

I found this nice premade admin panel layout on themeforest.net, a single licence is just 15$ (10-projects licence 45$, which I bought).

Complete Liquid Admin Control Panel

Author description:

Complex Liquid Admin template that contains a login page as well as a modular content page that includes all the elements you could possibly need in your admin. From these elements you should be able to generate any required page.

Please open the preview to check out all the elements.

Liquid as oposed to a fixed size means all the screen real-estate is used in the most efficient manner possible and also eliminates compatibility issues with non-standard, very low or very high screen resolutions.

Tableless CSS coding, cross-browser compatible and very stylish. Impress your customers today !

The template includes all page .psd files as well as slices and should be Easy to customise with medium knowledge of Photoshop and CSS .

Later edit : This template also contains rectangular notification boxes (ex. positive, negative, site message etc.) like our FlexiAdmin, however the shots don’t show this. So if you need these no worries, you will find them in the download package.

I’m impressed with the details and “amount of work” you get for that small price. I’m definitely going to use this in some projects – at least in my own ;)


OCZ Apex SSD 120GB and How to move a vista boot partition to a new drive

My newest toy arrived today: OCZ Apex SSD 120Gb – a very fast Solid State Drive. The manufacturer tags it with “230mb/s read, 160mb/s write, <0.3ms access time”.

After my six hour hassle of (trying to…) moving the boot partition from my old harddrive to the new one (see the full report/steps below), I was curious about the first performance test, which I used HD Tune for.

This is the result for my old harddrive, a Samsung HD642JJ:


Raw data:

HD Tune: SAMSUNG HD642JJ Benchmark

Transfer Rate Minimum : 55.0 MB/sec
Transfer Rate Maximum : 102.8 MB/sec
Transfer Rate Average : 83.0 MB/sec
Access Time : 13.2 ms
Burst Rate : 135.3 MB/sec
CPU Usage : 4.5%
Temperature : 25°C

And this is the result for my new SSD (OZC Apex SSD 120GB):


Raw data:

HD Tune: OCZ APEX_SSD Benchmark

Transfer Rate Minimum : 1.4 MB/sec
Transfer Rate Maximum : 172.7 MB/sec
Transfer Rate Average : 138.1 MB/sec
Access Time : 0.2 ms
Burst Rate : 129.5 MB/sec
CPU Usage : 5.5%
Temperature : 44°C

As I said before, I moved my bootpartition to the new drive. These are my subjective feelings about the new system:

  • The Windows bootup isn’t that much faster, but I didn’t measure the startup time of the old harddrive. (Still too long…)
  • Applications start much faster now. I think this really is the point where the ridiculous low access time of the SSD kicks in. Zend Studio i.e. is down from ~30 secs to 12. (And I haven’t switched the projects/workspace to a new SSD partition yet!)

The application startup speed, and working with big filecount-intensive projects were the main reasons for me to try out a SSD. So far (this still is my impression after only 2-3 hours of usage) I am very satisfied with the results.

The temperature of the SSD is ~20° warmer, but I think even 44°C is not high enough to care about.

In about one month I will provide you with even more subjective feedback :)

The steps for the Vista bootpartition-move, using Acronis True Image, should be these:

  1. Boot from the Acronis True Image CD
  2. Backup your boot partition from the old drive
  3. Restore the backup to the new drive, mark the new partition active (Cloning didn’t work, because the SSD is much smaller, and the UI doesn’t let me clone just one partition)
  4. Reboot from your Vista Installation disc
  5. Repair the installation on your new drive (the log should show something about “missing bootmanager – fixed”)
  6. Boot from your new SSD
  7. If your bootpartition is not C, fix it this way: How to restore the system/boot drive letter in Windows
  8. Done. Finished. Hopefully.. (At least, you should have 2 layers of backups to restart if something screws up…)

Just two small things OCZ could improve:

  • Inform me as a customer, that there is no SATA cable in the retail box. Every other retail (SATA) harddrive I bought up to this day had at least one packed.
  • As most of the customers will be “switchers” imho, ship something to help with the partition migration process. I will happily pay some more bucks, if it just works.

Error #0 on AIR application installation

I got this errormessage on “some” places while trying to install an AIR application package, while other places just worked fine.

The application could not be installed. Try installing it again. If the problem persists, contact the application author. Error #0

The first step debugging this was to find out where the AIR application installer logs errors – which by default he does not. To activate installer logging, you have to put two files in your home directory (C:\Users\youraccountname\ on Vista or C:\Documents and Settings\youraccoutname\ on XP) called .airappinstall.log and .airinstall.log.

If those two files are present, the logging writes to them automagically.

The error I found there looked like this:

Installing C:\Dokumente und Einstellungen\***\Lokale Einstellungen\Temp\fla12.tmp\setup.msi
Error occurred; beginning rollback: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="1603" errorID=0]

From here on I was very sure that it has to do with privileges… (No, there is no context menu entry on AIR packages to “install as Administrator” or “run as”…)

Finally, I checked the windows event log, and found this:

Product: *** -- Error 1925. You do not have sufficient privileges to complete this installation for all users of the machine.  Log on as administrator and then retry this installation.

Why can’t they show this error at the installer instead of error #0?…

Yes, installing as Administrator solved the problem!

Elegant OOP HTML scraping with DOMDocument

Over the years, I had to do html scraping sometimes. At my very first coding attempts some years ago, I found the explode() function to be pretty nice for this purpose. Not being satisfied with its (nonexistant) fault-tolerance, I learned regular expressions and used them. But regex only gets you so far in the DOM-tree. Finally, I arrived at the DOMDocument class, the builtin PHP answer to DOM parsing/manipulation. Looking into this is really worth it, because it a) solves the problem (99.99%) and has a nice OOP way to achieve it.

I will show you two very simple examples with all three methods – see for yourself why one should use DOMDocument ;)

Sample 1:

<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
        <div id="fetchme">


// explode
$dataFirst = explode('<div id="fetchme">', $sample);
$dataSecond = explode('</div>', $dataFirst[1]);
$result = trim($dataSecond[0]);
echo $result;

// regex
preg_match('#<div id="fetchme">(.*)</div>#is', $sample, $matches);
$result = trim($matches[1]);
echo $result;

// domdocument
$doc = new DOMDocument();
$element = $doc->getElementById('fetchme');
$result = trim($element->nodeValue);
echo $result;

All three methods get this very simple example right ($result will be ‘foobar’).

Adding complexity, two of them fail badly, because they do not know which closing tag belongs to which opening tag.

Sample 2:

<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
            <div id="fetchme">


The scraping methods are the same as for the first example, but with different output:
The explode method returns: ‘foo <div> bar’
The regex method returns: ‘foo <div> bar </div> </div>’ (the non-greedy regex would return the same as the explode version).
The DOMDocument method returns ‘foo bar’, because nodeValue strips htmltags. But the DOMElement $element holds just the content of the div #fetchme as we wanted it. It gets it right again.


You should know, some sites do not follow the (x)html standards correctly and therefore DOMDocument can fail. It also likes to throw exceptions then, but besides complaining you can still use > 90% of the document. If you want to disable the exceptions, you could either do it with @$doc->loadHTML() or $doc->strictErrorChecking = false.


Besides DOMDocument solving the tag-matching issues, it also provides a much cleaner way to do HTML scraping jobs imho. It also is a lot more fault tolerant, one could use xpath-queries against the document, etc.