Here is peace of code that can allow you to link CSS per controller action, just place the code in to the layout head section /app/views/layouts/default.ctp Read the rest of this entry »
In my own opinion database content translation with core CakePHP ‘translate’ behavior is a kind of pain when the matter comes to HABTM relations and any bulk records manipulations. It’s not a secret that it is also pain for java ORM engines, like Hibernate. Read the rest of this entry »
Use case: Show translation of database content.
Use case: We have two tables: Preferences and Countries. While editing preferences user should be able to select multiple countries and save the selection.
Use case: User uploads image to the web server. Image should be resized and cropped. Image saved to the database. Show successfully uploaded image on the web page.
METHOD OF FORMING, DISTRIBUTION AND VERIFICATION
OF THE PROTECTED ELECTRONIC MARKS
Finally I own patent for the invention that concerns to computer facilities, in particular to creation of an information and marketing centre for forming, distribution and issue of protected electronic marks used for confirmation of the right to use a service, to receive money or goods. Read the rest of this entry »
Today I’ve got a new solution about data level authorization. Let me start with the problem case the topic is about.
Users Jack and Andy has a Policy records in the database. One record belongs to Jack and another to Andy. System should allow Jack to make CRUD only on his records, and behave the same way for Andy. This means Andy do not see and is not able to modify Jacks’ records in the database.
Read the rest of this entry »
There are situations when the form should show two select boxes in the parent - child style. For example when in the parent select box user selects country the child select should show cities only of that country.
There are at least two approaches to update child select box:
- load all cities and update contents of child select box by javascript filter;
- load cities from server on each change of country.
While the first one is simple it could be not the optimal solution for big arrays of data. Current tutorial will show how to make the second one with CapePHP.

