Re: 3.0: a peek into CakePHP's future

2012-12-07 Thread pete
The modeling for me as PHP programmer is much more simpler when i can descripe my models in PHP. You also have to decide first which RDBMS you want to use. I think this is a limitation so it is not so easy to switch to another Datastore in development process because the code first approach is

Re: IIS 7, CakePHP 2.2.3 and the Blog Tutorial

2012-12-07 Thread Nathaniel Sumaya
Hi Jorick, Did you resolved the issue in your index root? Mine is just working fine. Regards, On Sat, Dec 1, 2012 at 9:21 AM, Jorick de Lange jorickdela...@gmail.comwrote: Hi Nutty, Thanks for your link. I followed it, copy+pasted your web.config file, refreshed, but then the index (root/)

Re: Extracting core validation messages for I18N with the cake shell

2012-12-07 Thread Cyrille Faucheux
Because the extracting process overwrite all the files. I probably could do it manually, by backuping and replacing some files, but I don't want to since I'm sure it will lead to mistakes. Le jeudi 6 décembre 2012 17:07:09 UTC+1, euromark a écrit : why not running it twice? once for the core

Category HABTM Post, find results by selected category and show related posts and paginate by posts?

2012-12-07 Thread Salines
*Category HABTM Post, find results by selected category and show related posts and paginate by posts?* Another day, another problem. When Selecting one category, output will show properly related posts. But the post results need to use pagination. How? Thanks -- Like Us on FaceBook

Model-query not working with virtualFields

2012-12-07 Thread Mathias R
Hi, i have a Modelaction where i want to list all zipcodes within a radius nearby another zipcode public function listZipcodesNearBy($zipcode = '', $radius = false, $km = 1.609344) { if ($data = $this-findByZipcode($zipcode)) { $lat = $data['Zipcode']['cityLat'];

Re: Model-query not working with virtualFields

2012-12-07 Thread euromark
no errors? just an empty resultset? what is the query you result in? Until very recently I got a bug in my distance query, as well. Maybe thats what happens here? might be just some () missing or $lng instead of $lng somewhere To confirm that you could try using my (now correctly working)

Re: Category HABTM Post, find results by selected category and show related posts and paginate by posts?

2012-12-07 Thread jodator
Just do it: http://api21.cakephp.org/class/paginator-component#method-PaginatorComponentpaginate look what you can pass as $object Param (i.e: Category.Post). in $scope set proper conditions (like 'Post.category_id' = $id). Hafe fun reading docs :

Re: Model-query not working with virtualFields

2012-12-07 Thread Mathias R
Hi, sry, but i dont want to use google code. I need to build my own opengeodb-plugin for this app. All vars are filled and cake displays no errors and no log-messages. debug($this-Zipcode-listZipcodesNearBy(19370)); has no output. Cake dumps only first query ($this-findByZipcode) but not second.

Re: Model-query not working with virtualFields

2012-12-07 Thread euromark
this is not google code ;) the method I showed you merely has a working distance query to use as virtual field try to compare that to yours you should be able to get results if you comment out the conditions! because then its just a normal query + a mathematical virtual field if you still get

Re: Model-query not working with virtualFields

2012-12-07 Thread euromark
oh.. and if (isset($radius)) {} is pretty bad with false as a default value either use NULL as default or/AND use just if here: if ($radius) {} Am Freitag, 7. Dezember 2012 16:02:11 UTC+1 schrieb euromark: this is not google code ;) the method I showed you merely has a working

Security component and data posted from external site

2012-12-07 Thread Jeremy Burns
I'm using 2.3 beta and the Security component. I have a site that is posting data to a controller action but the Security component blocks the request; so I don't get $this-request-data and the code fails. If I disable the Security component in beforeFilter for this action the data gets

Re: Model-query not working with virtualFields

2012-12-07 Thread Mathias R
How i wrote: there's only one dump, and this dump shows the query by $this-findByZipcode(); the other one has no dump and no output. with your method same problem. no output, no error. sry, i have to repeat myself: is there a way to display a sql-statement before cake send this to

Re: 3.0: a peek into CakePHP's future

2012-12-07 Thread Jorge Gonzalez Ortiz
It would be great to support Doctrine, lots of PHP programmers know and master it so this can be a good point for adopting new CakePHP users. But, just a suggestion, what if CakePHP can handle any ORM layer? I mean, you can choose a built-in one developed by the framework people, but if you want

Re: Category HABTM Post, find results by selected category and show related posts and paginate by posts?

2012-12-07 Thread Salines
I'm lost in the code and reading documents :/ * public function show($slug = null) {* * $this-Category-Behaviors-attach('Containable');* * * * $this-paginate = array(* * 'contain' = array('Post'=array('fields'=array('Post.title'))),* * 'fields' = array('Category.id',

Re: Category HABTM Post, find results by selected category and show related posts and paginate by posts?

2012-12-07 Thread Salines
Solved public function show($slug = null) { $this-Category-recursive = 0; $this-paginate = array( 'joins' = array( array( 'table'= 'categories_posts', 'alias'= 'CategoriesPost', 'type' = 'inner', 'conditions'= array( 'Category.id = CategoriesPost.category_id' ) ), array(

Re: Listing menu items from database to layout file

2012-12-07 Thread Trisztán Thar
Hey there lowpass, Thanks for this full-fledged explanation, it helped me understand how CakePHP works, and i finally am able to use it for (at this time) basic things, on my own :) About the character thing: After all I managed to make my menu with the helper that Tim mentioned above, but I have

Re: Listing menu items from database to layout file

2012-12-07 Thread Tim Denholm
Hi Tristan, To add class names, just alter your $menu array as follows: $menu = array( 'options' = array('class' = 'menuitems'), 'items' = array( array('title' = 'Hirek', 'url' = array('controller' = 'posts', 'action' = 'index'), 'options' = array('class' = 'button1')),

Re: Listing menu items from database to layout file

2012-12-07 Thread lowpass
Try writing a plain PHP script (not Cake) that fetches the records and prints them to the browser. That might help to narrow down where the problem lies. As for using divs like that, it's not very good use of HTML. On Fri, Dec 7, 2012 at 4:17 PM, Trisztán Thar triszta...@gmail.com wrote: Hey

Re: Model-query not working with virtualFields

2012-12-07 Thread euromark
a) did you read me remark about your faulty isset()? that is most likely the source of your issues. fix it and you will probably be fine b) there might be. but you dont need to display the sql statement prior to the query either - it is wrong and results in an exception (and will be displayed

Re: 3.0: a peek into CakePHP's future

2012-12-07 Thread lowpass
I've always preferred to start with the schema because to me the data itself is the most important thing to understand before anything else. It helps that it's all there in front of me in one file, too. After baking up some models, I can go into each and round them out a bit with business logic.

Re: Extracting core validation messages for I18N with the cake shell

2012-12-07 Thread lowpass
The only thing you can be sure of is that nothing will get done. Just make a copy of your Locale directory. Better yet: use version control. On Fri, Dec 7, 2012 at 5:23 AM, Cyrille Faucheux cyrille.fauch...@gmail.com wrote: Because the extracting process overwrite all the files. I probably

Re: FULL_BASE_URL error using requestAction()

2012-12-07 Thread Miles J
Anyone have an idea? On Monday, November 26, 2012 12:11:05 PM UTC-8, Miles J wrote: The latest, 2.2.2 I believe. On Thursday, November 22, 2012 5:40:38 AM UTC-8, jsundquist wrote: What version are you using. On Nov 22, 2012 1:39 AM, Miles J milesw...@gmail.com wrote: I keep seeing this

Re: Model-query not working with virtualFields

2012-12-07 Thread Mathias R
Hi, yes i fixed it before my last post. Same Problem: No Output, no Errormessage. Greet Am Freitag, 7. Dezember 2012 23:38:06 UTC+1 schrieb euromark: a) did you read me remark about your faulty isset()? that is most likely the source of your issues. fix it and you will probably be fine

Re: Model-query not working with virtualFields

2012-12-07 Thread Mathias R
Problem solved: there was 2 errors: in virtualfield: the fields cityLng and cityLat are virtualfields too, but in query i got a no column-error, dont know why. i changed this to original City.lat and City.lng. in conditions: $conditions = array(distance =, (int)$radius); changed to

Re: Security component and data posted from external site

2012-12-07 Thread Jeremy Burns | Class Outfit
My solution is to receive the post via one action then redirect to the log in action. Security::unlockedActions doesn't seem to work though (I must be doing it wrong?); I have to check for the initial action and disable the Security component. After the redirect the action is different, so the