Batch Programming

Tools Trackbacks (0)

It's been a decade or longer since I last did anything in "batch" - aka batch file. Now, in the days of Microsoft Windows XP and Windows Vista, it haunts me again.

Batch files are a very useful and easy to use tool dating back to the MS-DOS era when everything was running in command-line mode and even Windows was nothing more than a program started from there. Nothing more than a text file containing commands and written by using any text editor, a batch file could become sorts of a program in itself by executing commands and even providing a user interface - if such was written into the batch file in the first place.

Today in the era of Windows and its Windows Script Host, which allows the running of scripts written in VBScript and related scripting languages, batch files are still a handy tool when it comes to quickly put together a bunch of commands for such things as automated compressing, copying, renaming, up- and downloading and so forth.

 (More)

OTRS Experience

General Communication Trackbacks (0)

I got an enquiry by Christopher T. Kuhn, Vice President at OTRS regarding my experience with the software given my project additions and edits on the Ohloh site. I compiled a PDF with all my developer blog posts in chronological order spanning the entire year from October 2006 to 2007.

It will be no surprise to the frequent reader of this blog that despite my continuous use of OTRS, I have troubles with this trouble ticket system all the time and keep complaining about it and fixing problems by myself.

NetCam Gallery

CMS Media Trackbacks (0)

A client operates a simple Web-accessible camera (aka "netcam", "Internet camera" and "ipcam") - a D-Link DCS-G900 - which periodically uploads via FTP an image to a hosting account. The first task was to get the camera online for static images (via FTP), live images (via Java) and to access the camera itself from anywhere (extensively covered in "Extracting dynamic IP from China"). The second task builds upon the data output of the first one and requests for images to be stored in a gallery style for a number of days and to archive even more days in a compressed file. All must be kept as simple as possible in order to support browser platforms ranging from desktops to mobile phones.

 (More)

Automatic Restart With Timer

System Trackbacks (0)

Here's another annoying Windows XP restart notice after some important system updates. How could anyone with a right mind develop such a thing? Imagine I do an upgrade while some other important stuff is in progress. I'd just be killed by this timed restart.

Lesson of the day: never do other, important things while doing system updates.

LifeType And Gallery 2 Image Block

CMS Trackbacks (0)

LifeTypeIntegrating Gallery 2's Image Block code for remote calls into LifeType proved harder than expected. Here the summary:

  1. LifeType is using Smarty, so rewrite Image Block's sample PHP code from (no linebreak)

    <?php @readfile('http://gallerylocation/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title'); ?>

    into this (no URL linebreak)

    {php}
    @readfile("http://gallerylocation/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title");
    {/php}
  2. This shows the images in a vertical line, so in order to get a horizontal display, we have to add before the {php} tag this:
    <span class="one-image">
    and of course close with a nice </span> after the {/php} tag.
    To keep it simple, open the current template's CSS file and add this:
    div.one-image {
    display: inline;
    }
    div.one-image img {
    padding: 0;
    margin: 0;
    border: 0px;
    }
  3. Now it should look nice but in case there is any text delivered by Image Block, it will still show up in vertical mode. Such text could be a name, date... below each image. Disable any text display and it's all good.
    Btw, the design above breaks the horizontal line at the end of the current display box so it's not running "out of the box".