0

jQuery niceDate plugin

17 October // JavascriptjQuerynicedate

After looking on the internet for a jquery or javascript plugin that converts machine dates to readable ones like 12.12.2012 -> 2 days ago, I decided to write on my own. Since I am not a good javascript programmer feel free to correct my mistakes.

Features

  • multilanguage,
  • aware of language grammatics,
  • easy to hack,
  • available for past and future dates,
  • show original date on mouseover

Read more »

0

Zend Rest Client & Google Maps Geocoder API

17 October // PHPZend Framework

Here is some quick example how to use zend framework rest client and google maps geocoder API together.

1
2
3
4
5
$client = new Zend_Rest_Client('http://maps.googleapis.com/maps/api/geocode/xml');
$client->address('Cesta Andreja Bitenca 68, 1000 Ljubljana');
$client->sensor('false');
$res = $client->get();
print_r($res);
0

MySQL backup to Rackspace Cloud files, quick & dirty

25 August // AllPHPrackspace

After having deep thought about security, bad hardware and shit I decided to make some database backup for some of my clients. They wouldn’t provide any spare backup space so i decided to use my account on rackspace cloud. The file space was cheap enough so i do not charge my client for it (even if I would i could not). I wont write about how to restore the database. In case a restore is needed, the situation will be too complex to restore with a click of button. It took about 1 hour to complete the task. The plan is to use php-cli, crontab and cloud files. Read more »

2

Zend Framework & ExtJS Grid – part 1

24 July // AllExtjsJavascriptPHPZend Framework

The old way to make a grid was very time consuming. Basically it is just copy paste but still there is a lot to rewrite. You have to take care of the actions, pager and maybe a filter.

So i tried ext js grid. Since extjs renders the grid alone and looks a lot better then my grids which are done with smarty, html table and css.
Read more »

2

prototype, scriptaculous Chained Select

23 May // AllJavascriptPrototypeScriptaculous

For one of my projects i had to make some select boxes which would work in a chain. I had 500.000 inserts in mysql which should be found easily. So i implemented 5 chained select boxes.

The first part of the project was not meant to be public so i limited my work to Firefox. But after a while the public part started and i wanted to use some ready made widgets in smarty (like my address widget with 5 chained select boxes). When i tried it in IE 6 it did not worked.
Read more »

0

Getting lazy with frameworks (ZEND)

16 May // AllPHPZend Framework

For my new huge project, i did some research so I would work less. I started with cake php and after one week learning i decided that it is no good for me. My last project is not a web site and cakephp looks like it is done for making blogs and news pages.

Then i started to look at ZEND FRAMEWORK. It is a lot more flexible then cakephp and i also didnt needed scafolding. So after learning about a week I started to work on the project. In the begining it went very well, but after 2 month the pain started. I just got to lazy and depended on the framework.

On my earlier projects I allways wrote a small framework which would help me to work through the project. If i had to write something more than twice, I decided to write a function or even better an object.

When i work with zend framework, i just skipped the first process and started to write hardcoded in to the actions. Now as things get more complicated I have a great lack of my usual objects and classes.

So i learned, never get layz of writing the helpers of a project. Take around 30% in the begining of a project for writing your own objects. This will also help you to solve problems even before they occur.