Recently I took part in integration project and faced interesting problem. PHP application that I deploy must communicate with Informix database for data selecte. This php application aims to corporate market, so its not a extraordinary case. I see that it may require connecto to Oracle or DB2 in near future. Yes, PHP itself has wide choose of database connectors, which is a good option to have native database support. The only problem is that most of them are used so rare that are usualy not compiled in all modern Linux destributos. For example in Ubuntu server 12.04 there are five most pupular php5-sybase php5-interbase php5-mssql php5-mysql php5-pgsql. Thinking of it, I found one interesting solution. Continue reading

Forms, forms, forms... This is essential part of the Web and probably main reason why servers-side technology like Perl, PHP appeared. But things didn't change much from the time I wrote my first Form handler using PHP3.0.18. In this post I want to share some of my tricks of handling forms. Yes, it requires JavaScript enabled, which, truly speaking, is already a must have for 99.99% of sites for a long time. Big advantages is that it really simplifies things on client and server side. Welcome reading... Continue reading

To be clear what I am talking about see the image below. It has nice Settings link which leads to plugin settings  from plugin list. Why I think this is important? Usually plugin creates new submenu in Settings, but sometimes it uses different name and it is not easy to find one. In case 20+ plugins are installed, which is a real case, it is not easy to remember where all these settings are stored. I consider Settings link  as a must have thing when developing plugin and its pretty easy to add it, see below Continue reading

Its right from UI design point of view to show user some kind of progress in case site or application is busy with some internal processing. Especially with AJAX requests, because they take time! In jQuery its very easy to hook all AJAX requests into one start/stop functions, so there is no need to show and hide progress indicator on each $.ajax request. I make usage of nice spin.js library, native JavaScript implementation of configurable spinner. Continue reading

CodeIgniter is great framework by its simplicity. But when I moved from CakePHP, I really missed layout pattern. CodeIgniter documentations offers this way to include non-changing site header and footer
$this->load->view('header');
$this->load->view('template'); 
$this->load->view('footer');
For sure it isn't flexible and does not show page structure in a clear way. For many years I use layout pattern. Layout describes whole page as a template with blocks for header, menu, content, etc like on figure below. On page rendering these blocks are filled with data.

I found a small code snipped for CI and improved it. You are welcome to try! Continue reading