Category Archives: Development

Trans­lat­ing vari­able strings with get­text or “How to trans­late Doctrine’s enums”

Trans­lat­ing of some­thing with get­text is well-discussed prob­lem, so there’s no need to dis­cuss it again. Everything works like a charm, when you deal­ing with string con­stants. But what to do if you need to trans­late a string retrieved from some vari­able, … Con­tinue read­ing

Posted in Development, Doctrine ORM | Tagged , , , , | Leave a comment

qTip v.1.0.0-rc3 for jQuery v.1.4.2

If you are using qTip plug-in for jQuery and have updated your jQuery to ver­sion 1.4.2, you might notice that qTip become broken. That’s because of jQuery’s change in logic of jQuery.data(el, key, data) func­tion. Before ver­sion v.1.4.2 it returned … Con­tinue read­ing

Posted in jQuery | Tagged , , , , | 6 Comments

Fast debug someone else’s PHP application

Some­times you need to make a small fix to someone’s code (e.g. you are hack­ing exist­ing applic­a­tion). And unfor­tu­nately 85% times you’ll meet strange bugs. Most of such bugs are because of unex­pec­ted “input”, e.g. you expect that vari­able should be … Con­tinue read­ing

Posted in Development, How To's | Tagged , , , | Leave a comment

Beware of PHP’s list() function

If you are using list() func­tion with vari­able, like this: $arr = array(‘green’, ‘apple’); list($color, $fruit) = $arr; You should pay atten­tion to the order of vari­ables you assign if one of them has same name as ini­tial array. Else you’ll … Con­tinue read­ing

Posted in Development | Tagged , , | Leave a comment

Joomla! files and dir­ect­or­ies to ignore on versioning

After I was hired for another pro­ject of Joomla! based web­site, I real­ized that I need a list of files and dir­ect­or­ies to ignore with the stu­pid con­tent tracker. I love to keep all changes I made tracked by git. So today, I’m going to list … Con­tinue read­ing

Posted in Development, Joomla! | Tagged , , | Leave a comment