Merry Xmas

Uncategorized No Comments

Here is a little image I’ve been working on in Blender.

Merrry Xmas

Adding CZECH characters to the Font Catalogue.

Uncategorized 1 Comment

I’ve had a request to add czech characters to the font catalogue script. To do this I added:

cs:'rychle hnědé liščí skoky přes lenivého psa \nÁBČĎÉĚFGHÍJKLMŇÓPQŘŠŤÚŮVWXYZ ábčďéěfghíjklmnňoópqřšťúůvwxýž 1234567890!@#$%^&*()'

The only issue I came across when running a few quick tests was that the font BlackoakStd.otf seemed to put the script in a loop. Once I took it out of my fonts folder all seemed to travel ok.

If you would like to try the script and let me know if it works for you grab it here.

I will release it as the main download once I know there are no issues, so please let me know if it does work for you.

SIMILE Widgets | Timeline with xml creation

Uncategorized 1 Comment

I’ve recently been playing around with SIMILE Widgets | Timeline as it says on the site “With this widget, you can make beautiful interactive timelines”. The issue I had with this was that it ran on XML and the first time I looked at it I was not able to create an XML file so I put it aside. After playing around with XML over the last couple of years I stumbled on this again and decided to try and create a form that would add an entry to a database and in turn output an XML in the format that is required.

First you need to create a form to capture 3 key pieces of date (start date, finish date, tittle).

For the SMILE Timeline to work it needs to read an XML file with this sort of format.

<?xml version="1.0"?>
start="Monday ,1 November 2010 00:00:00 GMT"
latestStart="Tuesday ,16 November 2010 00:00:00 GMT"
earliestEnd="Thursday ,18 November 2010 23:00:00 GMT"
end="Tuesday ,23 November 2010 23:00:00 GMT"
title="Build Go Kart">

This is the code I use to create the XML file.

// Step 1
$sql = "select * from TABLE_NAME";
$result = mysql_query($sql) or die ( mysql_error() );

$output = "<?xml version=\"1.0\"?>\n";
$output .="<data\n";
$output .="wiki-url=\"\"\n";
$output .="wiki-section=\"\"\n";
$output .=">\n";

// Step 3
while ($line = mysql_fetch_assoc($result) ) {
 // Step 4
$output .= "<event \n";
 $output .= "start=\"" .date("l ,j F Y 00:00:00 \G\M\T", strtotime($line['Column_1'])). "\" \n";
 $output .= "start=\"" .date("l ,j F Y 00:00:00 \G\M\T", strtotime($line['Column_2'])). "\" \n";
$output .= "latestStart=\"" .date("l ,j F Y 00:00:00 \G\M\T", strtotime($line['Column_2'])). "\" \n";
$output .= "earliestEnd=\"" .date("l ,j F Y 23:00:00 \G\M\T", strtotime($line['Column_3'])). "\" \n";
 $output .= "end=\"" .date("l ,j F Y 23:00:00 \G\M\T", strtotime($line['Column_4'])). "\" \n";
 $output .= "end=\"" .date("l ,j F Y 23:00:00 \G\M\T", strtotime($line['Column_3'])). "\" \n";
$output .= "durationEvent=\"true\" \n";
$output .= "title=\"" . $line['Column_5'] . "\"> \n";
$output .= "\"" . $line['Column_6'] . "\"\n";
$output .= "</event>\n";

// Step 4
$output .= "</data>\n";

$myFile = "YourXMLFileName.xml";
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh, $output);

I’ve put together an example here.

Powered by WordPress | Theme by Kordas.Industrial.Design Entries RSS Comments RSS