Can you help me with router?

2009-10-12 Thread vla...@gmail.com
Hi! I need to make custom url, like here: http://flipflops.org/2009/09/29/cakephp-menu-helper-for-tree-data/ Of course I need parse any url in my posts_controller.php in view- function All url, except (for example) /admin/* So, I make rule: Router::connect('(?!admin|maps|news|posts|contacts|pi

Cache, session Auth

2009-09-17 Thread vla...@gmail.com
Hi! What a good style use Cache & Auth? In example http://book.cakephp.org/view/347/Marking-Non-Cached-Content-in-Views - it's doesn't work Because helper (form, session) doesn't start. And really in I can use only php function, not Cake. How to good style combine Cache & user? In CakePHP sty

Bug?

2009-09-15 Thread vla...@gmail.com
Cake PHP 1.2.5, MySQL 5.* What I have: model user (all default) and: var $validate = array( 'username' => 'alphaNumeric', 'password' => 'notEmpty', 'name' => 'notEmpty', 'email' => 'email', ); In MySQL I set for this table (users) fields: userna

Virtual Hosting for CakePHP sites

2009-09-08 Thread vla...@gmail.com
Hi! Can you tell me about good (nice|normal) virtual hosting for website based on CakePHP? I trying hostmonster.com, but get MySQL Error 1104 (MAX JOIN) - not work with CakePHP ACL/ACO systems. Any idea where I can get host? Thank you --~--~-~--~~~---~--~~ You r

What the... with behavior?

2009-05-14 Thread vla...@gmail.com
I have trouble with not working behavior in belongsTo relationship... And now I see - If I use Translate behavior - I couldn't made sort by field in I18n table ;-( I have posts with fields (id, created) and l18n - for post. I can make paginate for posts and sort posts by id, created... But cann

ActAs in hasMany/belongsTo relationship doesn't work?

2009-05-12 Thread vla...@gmail.com
Hi! I'm using behavior: http://bakery.cakephp.org/articles/view/actas-image-column-behavior So. It's looks like: Model A actAs ('Image'...) Model A hasMany Model B Model B belongsTo Model A ... So, when I do some thing like Model A->find('all') - all fine. Behavior work fine, and I get my i

How to make this tricky paginate - beauty?

2009-04-21 Thread vla...@gmail.com
In table I have pirce in different currencies - USD/Euro Pure MySQL I can do: SELECT id, price, currency_id, title, CASE currency_id WHEN 1 THEN price WHEN 2 THEN price * 1.34

2 jointable

2008-12-27 Thread vla...@gmail.com
Hi! I have: Post (id,name) Tag (id,name) Category (id,name) Post HABTM Tag Post HABTM Category Post -> Tag jointable Posts_Tags: id, post_id, tag_id Post -> Category jointable Posts_Categories: id, post_id, category_id All model, controller - are good and working perfectly until... ... ..unti