Categories
General

Unique Theme Studio for UIQ3 Released

I am pleased to announce the release of version  1.0 of Unique Theme Studio for UIQ3. 

[Edit] Sorry no longer available.

Categories
Linux

Pixel Image Editor – like Photoshop CS2 and cross platform too

So you want a cross platform Adobe Photo Shop that runs on linux ? Then look no further for an application that is at least as functional as CS2.

Pixel Image Editor

Pixel is running following platforms now: Windows, Linux/x86,
Linux/PPC, Linspire, Zeta/BeOS/x86, QNX/x86, FreeBSD/x86, MacOSX/PPC
and MacOSX/x86, MorphOS/PPC, eComStation, OS/2, SkyOS and DOS.

At the moment as it’s still pre v1.0 (not that you would know) it costs only $38!!!! with free upgrades up to version 2.0 and the license to run on any platform

Having used photo shop the interface feels totally natural. Everying is set out similar and there a few nice enhancements as well.

Some of the features:

Core

  • Pixel is an extremely small and fast application
  • it is easy to translate to any language as it supports full
    Unicode, all available translations are available at once (English,
    German, French, Spanish, Dutch, Slovak, Croatian, Swedish, Polish,
    Russian, Hungarian, Afrikaans, Brazilian Portuguese and others)
  • supports TWAIN compatible scanners, digital cameras
  • supports SANE compatible scanners, digital cameras and others (Linux, BeOS, eComStation)
  • pressure sensitive tablets support
  • printing support
  • multiple color managed clipboards
  • various image formats handling (GIF, PNG, JPG, TIFF, BMP, PSD…)
  • support for JPEG-2000 format
  • support for OpenEXR format
  • EXIF support

Image editing

  • support for layers, paths, channels, masks and selections
  • Color Management support for RGB, CMYK, Grayscale and CIE Lab modes (8-bit and 16-bit)
  • support for HDR (High Dynamic Range) images with 32-bit/channel
    precision, HDR images in Pixel are editable in full HDR quality, not in
    8-bit RGB as in competiting programs
  • realtime live effects for layers (adjustments, effects), sets of live effects can be saved as layer Styles
  • image browsing and searching
  • powerful text editing with spellchecking and support for IME/XIM (Asian languages)

Retouching

  • includes variety of brushes, including full-color brushes and animated brushes
  • brush retouching tools including special effects
  • retouching set of filter plug-ins

Web features

  • complex support for image slicing and image optimizations (GIF, PNG, JPEG, WBMP)
  • direct editing of generated HTML code without destroying user’s additions
  • support for clickable maps
  • support for small animations for your web pages (animated GIFs)
Categories
Linux Ubuntu

Java Window blank or not rendering correctly when running under XGL/Compiz

I’m running Ubuntu with an XGL session and Compiz, and tried installing ArgoUML a java based cross platform UML designer. However when the application was run, the main window did not render correctly, it was blank with no menus or content.

A friend informed me of the solution, which affects Netbeans IDE as well, so the following:


sudo gedit /etc/environment

Add the following line

AWT_TOOLKIT="MToolkit"

save and close.

You may need to restart the session or reboot to pick up the environment setting change.

Categories
General

Various Ruby Learning Links

For reference, a few ruby links.

Poignant Guide to Ruby
A Ruby user guide
Ruby How Tos
Ruby code snippets

Categories
General

3D Desktop (Beryl and Xgl) on Ubuntu Edgy Eft with ATI card

After trying several of the articles out there in the big WWW, and after several failures, I finally found an article on how to get the 3D desktop effects going in ubuntu 7.04. The key differentiation is the need to roll back beryl to a previous version so you get the beryl-xgl installed.

http://wiki.beryl-project.org/wiki/Install_Beryl_on_Ubuntu_Feisty_with_XGL

Categories
General

What Digital Camera – Photo editing competition

What Digital Camera run a competition to “Photoshop” an image the provide and the best modification can win a copy of Adobe Lightroom.  For the May issue they have provided the following image for modification:

wdc_challenge_may2

This is my entry that I have submitted, here’s hoping hey…

oldsmobile4

Comments welcome. 🙂

Categories
General

Funny, funny, funny, the world is just full of them

Have a look at this guys blog, he received a letter from a web site complaining that Deans site has a higher ranking in Google.  Although this is very funny, and you have probably seen it already I’m posting the message just to link to dean’s site and improve his ranking even more.

http://deanhunt.com/bizzare-google-request/

http://deanhunt.com/bizarre-google-request-update

Way da go dean, you can ave im.

Categories
General

Royal Mail are still promoting killing trees

Junk Mail, I hate it.  My own personal view is to never buy anthing from any company that posted unsolicited mail through my post box.  I take my hat off to the Mail Preference service (MPS), which after registration with them a couple of years ago, has cut the amount of Junk Mail that I receive, but the latest “get round” for compainies is to pay Royal mail to deliver junk mail unaddressed with my other mail. 

This completely negates the great work that the MPS do and in my opinion is a disgusting policy adopted by Royal Mail.  If I wanted the stuff I wouldn’t have registered with MPS.  What gives Royal Mail the right to deliver unsolicited items where other companies that honour the MPS lists loose out.

I wonder if there is an online petition or something.  If you know how to stop Royal Mail delivering this rubbish please let me know.

Categories
General

Searching for MP3s on the net

Can’t remember where I found this tip, but it’s a great one.

Looking for SonicEncoders, try replacing the mp3 with sonicencoders.msi!

People leave music files in unprotected directories all of the time. Here’s how to get to them.
Directions
If you properly query google, you can find open indexes of music files easily. Here are some hints to get you started.
Google: -inurl:htm -inurl:html intitle:”index of” mp3

    Using this string we are using the “index of” and the inurl commands to attempt to isolate directories only. The mp3 tag on the end tells google to look for mp3s in these open directories. You can change this to wma or ogg if you wish.

You can add additional search criteria to focus your search more.
Google: -inurl:htm -inurl:html intitle:”index of” mp3 “pearl jam”

    This command will find open directories with mp3 files with Pearl Jam. Obviously you can change the band name or file type to better define your search.
Categories
General

Creating an upgradable Mambo Component

Mambo and Joomla don’t currently seem to have any standards for creating a component that can upgrade.
Generally, when a component is installed, it creates the tables it requires and when it is uninstalled it removes them.
However at some point the developers introduced the com_install() and com_uninstall() functions which can be used instead of putting sql in the XML component file.
The component I am writting is a component for uploading themes, basically stores an image and a file. so where “theme” occurs in classes and table names, it is referring to my component, adapt these to suit your own.
The installation / upgrade of tables is quite easy, I created a ‘theme_version’ table which simply has one field and one record that stores the version number.  This is used to track the version of the tables installed.
If this table does not exist, then it is assumed to be a new install of the component and the rest of th etables are created and populated.  Note the first thing you should do is create the theme_version table and add a single record with a value of 1 to denote the first version of the tables.
If the table does exist, we get the value of the version field and then simply add a switch statement to perform the alter / update sql dependant on the version value.  If you ensure the case statements are in numeric order and don’t bother with break; statements, this system can even upgrade version 1 to version 5 for example.
The ony problem now is what happens on uninstall.  Generally in the uninstall script you would put all the drop table sql to remove the component’s tables.  However, if a user is uninstalling to upgrade, the last thing we want is to remove the tables.
To get round this, I added a boolean field to my component’s configuration table which when set to Yes, will remove the tables.  As a default this field is set to No, so to actually uninstall the component fully, including deleting the tables, the user must first goto the configuration screen, save the configuration with “uninstall tables” set and then uninstall the component.
Personally, I don’t think this is a problem, as if the user forgets, they can just re-install the component, change the config and then uninstall to ensure the whole component is removed.
This assumes you have a configuration section on your component.
The code below mentions themes, this is the component  I was developing. Change the theme to the relevant name for you
component.
Step 1) Create the uninstallTables option.
Add a new field to the configuration table called uninstallTables, this should be set with a default value of either 0 or 1,
depending on whether or not you want to uninstall the tables as default.  Personally, I default it to 0.
e.g.
`uninstallTables` TINYINT(1) NOT NULL
Add the new field to the extended mosDBTable class for the configuration table if used.
Modify the edit configuation html to add a Yes/ No option for the new field.
e.g.

            <tr>
                <td>Uninstall Tables ?</td>
                <td>
                <? echo mosHTML::yesnoSelectList( "uninstallTables", "", $row->uninstallTables ); ?>
                </td>
                <td>By default, the Themes component does not remove tables it has created so they can be upgraded.  If you

want to completely remove this component set this option to 'yes' and save the configuration before uninstalling</td>
            </tr>

You should now be able to modify this field, set it to yes or no and have it persisted in the table.
Step 2) com_install() function
Move you table creations from the XML to the com_install function and add the theme_version table and the install / updgrad
condition e.g.

<?php
global $mainframe;
require_once( $mainframe->getPath( 'class' ) );

function com_install() {
    global $database;

    $table_prefix = $database->_table_prefix;  // get the mos_ table prefix

    $tableList = $database->getTableList(); // get a list of the tables
    if (in_array("{$table_prefix}themes_version",$tableList))  // if the version table exists
    {
        // get the current version
        $SQL = "SELECT  * FROM #__themes_version LIMIT 1";
        $database->setQuery($SQL);
        $rows = $database -> loadObjectList();
        if ($database -> getErrorNum()) {
            echo $database -> stderr();
            return false;
        }
        $row = $rows[0];

        $tableVersion = intval($row->version);  // get the current table version

        switch($tableVersion)
        {
            case 1 :
                // run alter statements to upgrade next version
                ...

                // set the new version
                $SQL = "UPDATE #__themes_version SET `version`=2";
                $database->setQuery($SQL);
                $database->query() or die( $database->stderr() );

        // note we don't have a break here so the V2 - V3 upgrade below will get run as well
            case 2 :
                // run alter statements to upgrade next version
                ...

                // set the new version
                $SQL = "UPDATE #__themes_version SET `version`=3";
                $database->setQuery($SQL);
                $database->query() or die( $database->stderr() );
            break;
        }

    }
    else
    {
        // Themes_Version does not exist so create the tables

        // Themes_version table
        $SQL = "DROP TABLE IF EXISTS #__themes_version";
        $database->setQuery($SQL);
        $database->query() or die( $database->stderr() );

        $SQL = "CREATE TABLE #__themes_version (";
        $SQL = $SQL." version int ";
        $SQL = $SQL." ) TYPE=MyISAM;";
        $database->setQuery($SQL);

   $database->query() or die( $database->stderr() );

        $SQL = "INSERT INTO #__themes_version (version) values(3);";  // change the value here to the table version each time

you release
        $database->setQuery($SQL);
        $database->query() or die( $database->stderr() );

        // themes configuration table
        $SQL = "DROP TABLE IF EXISTS #__themes_config";
        $database->setQuery($SQL);
        $database->query() or die( $database->stderr() );

        $SQL = "CREATE TABLE #__themes_config (";
        $SQL = $SQL." `configid` TINYINT(4) NOT NULL,";
        $SQL = $SQL." `themePath` char(240) NOT NULL,";
        $SQL = $SQL." `uninstallTables` TINYINT(1) NOT NULL";  // this is the uninstall Tables field
        $SQL = $SQL." ) TYPE=MyISAM;";
        $database->setQuery($SQL);
        $database->query() or die( $database->stderr() );

        $SQL = "INSERT INTO `#__themes_config`";
        $SQL = $SQL."(configid, themePath, uninstallTables) values(1, '/themes',0);";  // unistallTables is initialised to 0
        $database->setQuery($SQL);
        $database->query() or die( $database->stderr() );

    // create other tables
    ...

    }

}
?>

Step 3) com_uninstall() function
The uninstall is nice and simple, check the uninstallTables field in the configuration then uninstall if set

<?
global $mainframe;
global $mosConfig_absolute_path;
require_once( $mainframe->getPath( 'class' ) );

function getConfig()
{
    // this function gets the row from the config table
    global $database;

    $database->setQuery("SELECT * FROM #__themes_config LIMIT 1");
    $rows = $database -> loadObjectList();
    if ($database -> getErrorNum()) {
        echo $database -> stderr();
        return false;
    }

    return $rows[0];
}

function com_uninstall() {
    global $database;

    $config = getConfig();

    if ($config->uninstallTables == 1)
    {

        $SQL = "DROP TABLE IF EXISTS #__themes_version";
        $database->setQuery($SQL);
        $database->query() or die( $database->stderr() );

        $SQL = "DROP TABLE IF EXISTS #__themes_config";
        $database->setQuery($SQL);
        $database->query() or die( $database->stderr() );

    // drop other tables
    ...
    }
}
?>

If there are any mambo / joomla developers reading this then it would be nice for something similar to this to be integrated into the CMS, as I the inability to upgrade components as standard as quite a flaw in the component architecture.
Maybe, you can add a standard table which holds a version number and uninstall tables option for each component.  In addition the install can then either call the com_install() or a new com_upgrade($version) script.