Goodbye Slovenia

David Lednik (red_mamba) migrating to New Zealand
16. Jul 2008

I posted this to CakePHP team an they rejected the modification because you have to change the core of the CakePHP frame work. So I’m posting this on my blog if someone finds it useful.

First thing is to change the default.ctp layout in the <head>;
java script does the actual ajax calls, in code we just change the url address, javascript calls the actual cake functions via ajax; it periodicaly scans for URL address changes, this way we have history in browser:

<script src=”http://www.google-analytics.com/urchin.js” type=”text/javascript”></script>
<script type=”text/javascript”>_uacct = “UA-XXXXXXX-X”;</script>
<script language=”javascript”>
var oldURL = ”;
var ignore = false;
function PhpAJAX(URL)
{
urchinTracker(URL);
oldURL = document.location.hash = URL;
}

//new PeriodicalExecuter(pollChatRoom, 1);
new PeriodicalExecuter(function(pe)
{
if (ignore == false)
{
if (oldURL != document.location.hash)
{
oldURL = document.location.hash;
new Ajax.Updater(’go’, oldURL.replace(/^.*#/, ”), {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', 'go']});
}
}
}, 1);
</script>

Right before </body> tag (still in default.ctp) we add:
<script type=”text/javascript”>urchinTracker();</script>

Now we edit core.php file, at the end add the line:
define(’AJAX_ANALYTICS’, true);

Now lets edit ajax.php file, you’ll find it under
cake/libs/view/helpers:
function remoteFunction($options = null)
{
$func=”;

if (isset($options['update']))
{
/* TRACKING AJAX URLs FOR GOOGLE ANALYTICS */
if ( defined(’AJAX_ANALYTICS’) )
{
if (!isset($options['oldstyle']))
{
if (AJAX_ANALYTICS && $options['update']==’go’)
{
$func .= “PhpAJAX(’$options[url]‘);”;
return $func;
}
}
else
$func .= “urchinTracker(’$options[url]‘); “;
}
/**/

if (!is_array($options['update'])) {
$func .= “new Ajax.Updater(’{$options['update']}’,”;
} else {
$func .= “new Ajax.Updater(document.createElement(’div’),”;
}
if (!isset($options['requestHeaders'])) {
$options['requestHeaders'] = array();
}
if (is_array($options['update'])) {
$options['update'] = join(’ ‘, $options['update']);
}
$options['requestHeaders']['X-Update'] = $options['update'];
/**/
}
else
{
$func .= “new Ajax.Request(”;
}

$func .= “‘” . $this->url(isset($options['url']) ? $options['url'] : “”) . “‘”;
$func .= “, ” . $this->__optionsForAjax($options) . “)”;

if (isset($options['before'])) {
$func = “{$options['before']}; $func”;
}

if (isset($options['after'])) {
$func = “$func; {$options['after']};”;
}

if (isset($options['condition'])) {
$func = “if ({$options['condition']}) { $func; }”;
}

if (isset($options['confirm'])) {
$func = “if (confirm(’” . $this->Javascript->escapeString($options['confirm'])
. “‘)) { $func; } else { return false; }”;
}

//echo $func;
return $func;
}

That’s it :D

You can see this in action on my web hosting (gostovanje strani) pages.



Application sent

Author: admin
26. May 2008

We finished the paper work. The papers were sent to Mr. Lenko.

Now we wait for them to answer us, wish us luck :D



ActiveMigration

Author: admin
24. May 2008

Hi!

Today I attended the ActiveMigrations seminar. Tony Lenko was talking about how to migrate from Slovenia to Countries like Canada, Australia and New Zealand. My girlfriend Maja and me were there so we can get some new information regarding migration to New Zealand. And to ask Mr. Lenko some questions in person.

After this seminar we changed our migration deadline from 5-7 years to ASAP :)

So after we fill out the paper work I will send ActiveMigration our data and will see how good our chances really are.



David Lednik’s CV

Author: admin
1. May 2008

David Lednik’s CV


summary of Qualifications

  • Multilingual: Slovenian/English/German
  • Outstanding diplomacy that consistently produces win-win results for customers and company.
  • 8-year professional background in programming
  • 5-year professional background as lead GIS developer
  • Creative and persistent problem solver, I thrive on challenges, excel under pressure and get the job done
  • Bright, energetic and resourceful team player
  • Member of Mensa Slovenia

RELEVANT EXPERIENCE

  • Operating Systems
    • Windows 95/98/Millennnium
    • Windows NT/2000/2003
    • Windows XP
    • Windows Vista
    • Linux (Suse, Fedora Core, Debian, RedHat, …)
  • Applications
    • MS Office (Word, Excel, Access, …)
    • Pain shop pro, Adobe Photoshop
    • Microsoft IE, Mozilla Firefox, Opera
    • AutoCAD, AutoCAD MAP (2004, 2005, 2006, 2007)
    • ESRI ArcGIS (8.3, 9.0, 9.1, 9.2)
    • Adobe Dreamweaver CS3
    • Adobe Flash CS3
    • CVS, SVN
  • Administration and work
    • Windows/Linux systems
    • Oracle (9.x, 10g), MySQL (Linux/Windows), PostgreSQL (Linux/Windows), MSSQL, IBM DB2 (Windows, Linux)
    • Apache 2.x (Linux/Windows), IIS5, IIS6
  • Desktop programming
    • MS Visual Studio .NET (2002, 2003, 2005, 2008, C#, VC++, VB.NET)
    • MS Visual Studio 6.0 (VB, VC++)
    • PHP (4.xx, 5.xx, OOP)
    • VBA – Autodesk AutoCAD MAP (2004, 2005, 2006, 2007, 200 8)
    • VBA – ESRI ArcGIS (8.3, 9.0, 9.1, 9.2)
    • C# ESRI ArcObjects (8.3, 9.0, 9.1, 9.2)
    • Dreamweaver CS3
  • Web programming (frameworks - FW)
    • CakePHP
    • Ruby on Rails
    • w3matter (Boston stationed firm; have been working for a couple of months on there FW)
  • Web programming/technologies
    • HTML
    • CSS
    • XML
    • JavaScript
    • PHP
    • Ruby
    • ASP.NET
    • AJAX
  • Databases
    • Oracle
    • MySQL
    • PostgreSQL
    • IBM DB2
    • MSSQL

EMPLOYMENT

  • October 2000 - 31. December 2006: LUZ d.d. (as student work)
  • 1. January 2007: LUZ d.d. (permanent job)

EDUCATION

  • High school – Chemist
  • Faculty of Chemistry and Chemical Technology Ljubljana; finishing study

OTHER SKILLS

  • Electronics
  • Chemistry knowledge

REFERENCE

Available upon request.