Re: find('list'): Filtering by a related table's field

2009-04-16 Thread John Andersen
How is your PropertyImage model defined? Does it have a hasMany to the Property model? I am asking, because your fields definition does not contain the model name, and the conditions definition contains Property model name, not PropertyImage model name. John On Apr 17, 6:29 am, mattalexx wro

Paginator sort() links not switching between asc and desc?

2009-04-16 Thread George H
Hi guys, I have a list of users displayed in my view in a table, and the resultset is parsed by Paginator. I am also echoing $paginator->sort () in my view. When I view the page the links work and they sort by the columns that I have specified in my code. But I thought that if I was to click on

Re: Dependent in Associations is not working.

2009-04-16 Thread kaushik
It is my code for deleting user : if ($this->User->del($id,true)) { $this->flash('The User with id: '.$id.' has been deleted.', '../ users'); } I think that it is enough for deleting cascade entries. But it is not working. What is the problem? On Apr 14, 3:35 pm, Braindead wro

Re: Plugin architecture and plugin limitations

2009-04-16 Thread John Andersen
Thanks Jaime, As I understand it: 1) The user interface (UI) is completely managed in the browser environment. 2) The business logic (BL) is managed in a CakePHP application in the server environment. 3) The storage logic is managed partly by the CakePHP application and a database engine (MySQL).

find('list'): Filtering by a related table's field

2009-04-16 Thread mattalexx
PropertyImage hasOne Property. Why can't I do this: PropertyImage->find('list', array( 'fields' => array('id'), 'conditions' => array( array('Property.mls' => '80578'), ), )); debug($check_property_images); ?> But when I use find('all') it

Re: XML parsing

2009-04-16 Thread mscdex
On Apr 16, 7:07 pm, "smithtrev...@googlemail.com" wrote: > Thanks for your help mxcdex. > It all is working fine, except the line: > > $success = $this->Team->saveAll($xml['Teams']); > > This doesn't save anything, or appear to be doing anything. It doesn't > produce an error message, nor does it

Re: Internationalization in find results

2009-04-16 Thread Marcelo Andrade
On Thu, Apr 16, 2009 at 2:54 PM, Stu wrote: > > basically what I want to do is, get a list result from find while > still being able to translate the resulting data with : __('word') You seen the TranslationBehavior? http://book.cakephp.org/pt/view/794/Attaching-the-Translate-Behavior-to-your-Mo

Re: XML parsing

2009-04-16 Thread smithtrev...@googlemail.com
Thanks for your help mxcdex. It all is working fine, except the line: $success = $this->Team->saveAll($xml['Teams']); This doesn't save anything, or appear to be doing anything. It doesn't produce an error message, nor does it save the records. I've tried all combinations of Team, Teams, team an

Re: Using setAction

2009-04-16 Thread Markus Jürgens
hi! tried $this->view_names($param1, $param2, $param3); ? hope i helped. 2009/4/16 bondo > > I have a need to redirect from one action to another action in the > same controller and not have the URL change. I think I can use > setAction to accomplish this rather than redirect but I have a c

Re: Helper not being found

2009-04-16 Thread Miles J
Are you calling the class right? class StateListHelper extends... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from th

Using setAction

2009-04-16 Thread bondo
I have a need to redirect from one action to another action in the same controller and not have the URL change. I think I can use setAction to accomplish this rather than redirect but I have a couple of questions. 1. I need to pass 3 parameters but I've only seen examples using 1 parameter. Is th

Re: Quick debugging question

2009-04-16 Thread Stu
I just caught on to what you were saying Brian, just exit(); your controller before the redirect and they print right there... Makes sense... 'slaps forehead'. Thanks man --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Quick debugging question

2009-04-16 Thread Stu
Yeah, it's just because the function went through as normal but the there was 2 columns that were left empty, I pr'd $this->data and everything was fine. My next debugging idea was to check what the query looked like. Even with the debugging at 2, it didn't show the INSERT query, so I thought th

Internationalization in find results

2009-04-16 Thread Stu
Hey guys, I would be surprised to find a solution to this, but here it goes. basically what I want to do is, get a list result from find while still being able to translate the resulting data with : __('word') Didn't catch that now did you? I don't blame you.. here's some code to clear it up:

Re: Problem with linked models

2009-04-16 Thread Toby
Ah. My fault. It would appear that I had a condition in the belongsTo relationship that was not needed... 'conditions' => array('Size.size_type_id' => 'StockItem.Product.size_type_id'), Thanks for your help. T On Apr 16, 2:49 pm, Grzegorz Pawlik wrote: > here: (`StockItem`.`size_id`

Re: Plugin architecture and plugin limitations

2009-04-16 Thread Jaime
A *VERY interesting* reading on the subject: http://blog.fedecarg.com/2008/06/28/a-modular-approach-to-web-development/ "MVC is about loose-coupling, and Modular Programming takes that concept to the extreme. A modular application can dynamically load and unload modules at runtime, completely se

Helper not being found

2009-04-16 Thread Ernie
Hi, I am new to CakePHP and have what may be a configuration problem (Vista, xampp). I installed CakePHP in the c:\xampp\htdocs\cake directory and have several projects underneath of this directory (say one and two). I then installed my first custom helper in c:\xampp\htdocs\cake\one\views \hel

Re: how to validate texbox which is not related to table's field

2009-04-16 Thread Mark (Germany)
if you want to validate by posting, it doesnt matter if those fields are in the DB or not just set up the rules and cake will validate those as well if you want to validate them directly by JS, you have to validate it manually On 16 Apr., 15:56, vikas wrote: > Hello all.. > > I have a task lis

What CI tools does cake core use?

2009-04-16 Thread Grzegorz Pawlik
I'm doing some research and trying to find best tool set for projects I run. Because cake is my favourite application - CakeTeam is my favourite dev team and I probably could follow the example and find out if it suits for me. Anyway I'm wondering (or know but want to list all elements of this pu

Re: EmailComponent - Proper usage for mass mailing

2009-04-16 Thread Brendon Kozlowski
I think I'd have to get a VPS or a PS for my host to allow that many emails per day. :) Regardless, I know CakePHP's EmailComponent is great for one-off emails, but...no one's used it for larger scale mail campaigns or sending? I'm a little surprised, I would have thought someone would have tac

Re: Layout Columns

2009-04-16 Thread brian
Also, if you want to be able to enable/disable one or another element, have a look at this: http://snook.ca/archives/cakephp/elemental_conditional_content_with_cakephp/ It's a bit old now so I expect you'd need to update it somewhat, unless Jonathan has already done so. On Thu, Apr 16, 2009 at

Re: EmailComponent - Proper usage for mass mailing

2009-04-16 Thread Dardo Sordi Bogado
> I've been sending 3000+ emails using SwiftMailer[1]. There's a > SwiftMailerComponent at the Bakery (I had to modify it quite a bit, > though). I'm sending 6000+ emails every day with SwiftMailer in a shell task and is working great! I recommend you using something like daemontask [1] to contr

Re: Plugin architecture and plugin limitations

2009-04-16 Thread Jaime
> Could you show some examples (code, ideas, whatever) of what you tried > to accomplish, so the CakePHP community can grow from your experience > and/or maybe provide additional information to assist in finding a > solution? There is no single line of code, nor will be until all the application

Re: Layout Columns

2009-04-16 Thread jsundquist
Brian is correct. You should use $this->element() to format how you want each column on your page to be displayed. So you could have a right, left, and center view in your elements folder then have a variable set in your function for the view for each column. Each column then would could use the

Re: Run an action with out a view? Is it possible?

2009-04-16 Thread jsundquist
And since I am not technically returning anything for these functions it shouldn't matter where the sit. But I guess for best practices I will just place them at the top of each function. Thank you all for your help. On Apr 15, 9:51 pm, "Dr. Loboto" wrote: > $this->autoRender = false should be

Re: Access to sql queries?

2009-04-16 Thread jsundquist
Best thing to do would be to read through the blog tutorial to give yourself a better understanding of how that all works. My guess is you did something along the lines of $this->Picture->id = $id; $this->Picture->read(); If you did something like the above two lines then change it to be $myPict

Access to sql queries?

2009-04-16 Thread Clemens
Hi. I'm new to cakephp. In debug-mode i see a running queries: SELECT `Picture`.`id`, `Picture`.`project_id`, `Picture`.`name`, `Picture`.`description`, `Picture`.`type`, `Picture`.`size`, `Picture`.`data`, `Picture`.`created`, `Picture`.`modified` FROM `pictures` AS `Picture` WHERE `Picture`.

how to validate texbox which is not related to table's field

2009-04-16 Thread vikas
Hello all.. I have a task list page in which all task listed(simple index.ctp).. Now in that index.ctp i have set a two text box in which user can enter a startdate & enddate of project respectively. and according to that dates I show the projects. Now I want to validate user has enterd a valid

Re: Reserved words in CakePHP?

2009-04-16 Thread Grzegorz Pawlik
Additionally You rather shouldn't name Your model/controller like Object/Objects and Page/Pages ;) On Apr 16, 12:52 pm, "Mark (Germany)" wrote: > yeah > i once proposed to change components into > > $this->FileComponent->foo() > > etc with "Component" attached to prevent this from happening > >

Re: Problem with linked models

2009-04-16 Thread Grzegorz Pawlik
here: (`StockItem`.`size_id` = `Size`.`id` AND `Size`.`size_type_id` = 'StockItem.Product.size_type_id') After 'AND' you have something that is not automatically generated by cake. You must have something extra in StockItem->find() passed, or in relation definition (ie. in conditions field). Pleas

Re: Using Cake

2009-04-16 Thread demet8
Thanks man. I appreciate it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+uns

Re: Using Cake

2009-04-16 Thread demet8
Thanks. It helps. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@goo

input name data[_method]

2009-04-16 Thread Telegu
i have a problem, when i generate my form if input name has more level example (data[i][Model1][j][Model2][Model3]) it becames _method, data[i][Model1][j][Model2] work when i add [model3] it does not work. can you help me??? --~--~-~--~~~---~--~~ You received this

Re: Problem with paginator

2009-04-16 Thread sbutch
Sorry, but I still don't understand why this work: last(' >>', array('url'=>"0")); and produce this correct link: http://127.0.0.1/assysts/index/0/page:6 and this not: next(' >', array('url'=>"0"), null, array('class'=>'disabled')); and produce this crazy link: http://127.0.01

Login attempts limitation

2009-04-16 Thread ShyamT
I want to give limitation for login attempt user authentication. Suppose user fail to login in continuous 3 attempts, his account should be locked, and he should not access that account till it unlock. Is there any facility in auth component to count login attempt and check it. Please help me.

Re: Problem with paginator

2009-04-16 Thread sbutch
I have solved. Problem was that the behavior of array_merge() was modified in PHP 5. Unlike PHP 4, array_merge() now only accepts parameters of type array. So I have modified line 312 of paginator.php helper, with a typecast: It was:$url = array_merge(array('page' => $paging['page'] + ($wh

Re: Problem with paginator

2009-04-16 Thread sbutch
Sorry, but I still don't understand why this work: last('last>>', array('url'=>"0"));?> and produce this correct link: http://127.0.0.1/assysts/index/0/page:6 and this not: next('next>',array('url'=>"0"),null, array ('class'=>'disabled'));?> and produce this crazy link: http://127.0.0.1/ass

ACL Child Group

2009-04-16 Thread Dave Maharaj :: WidePixels.com
I have ACL set up and running fine with 4 groups admin: access everything managers: edit all agents: read all edit only their own investors: read and edit only their own What i completely forgot is that on the Investor side the investor might be company with different users of that profile Exa

Re: Routes Regex problem

2009-04-16 Thread visskiss
Well, I have stumbled upon something I didn't think of. By realizing that cake goes through routes in order, I simply forward the 'exceptional' routes to their proper place (controller/action) and then leave all the rest '/*' to the appropriate single controller What say all? --~--~

Re: What do you develop in (ide, text editor, etc.)?

2009-04-16 Thread Franco Tampieri
Hu, that's cool Teh!!!, well I actualy use this: http://mihai.bazon.net/projects/emacs-javascript-mode not soo bad... but it uses cc-mode too Cheers Franco Franco Tampieri Details: - Linux User #286282 - FSF Member #5827 GNU/Linux: Hardened / Embedded / H.A. Cluster / System Integrator Certifi

Routes Regex problem

2009-04-16 Thread visskiss
Good day to you all, I have tried to solve this and it's killing me. My site is working well, but I am trying to perfect the URL's to optimize for search. The short question: Doe anybody know how to get the routes regex working so that all queries EXCEPT those in a given list (say, all queries

Re: What do you develop in (ide, text editor, etc.)?

2009-04-16 Thread Teh Treag
Franco, So I'm not alone. Yea! Do you have a good mode for javascript? php- mode is great, every thing works fine. For years, I've been using c- mode to edit javascript, and it doesn't handle json very well, or lambda functions. Do you have an alternative? On Apr 15, 10:03 am, Franco Tampieri

Re: Session madness

2009-04-16 Thread floepi
After some more digging, I finally found it. My predecessor added a Session->renew() command deep inside the code which caused the problem... Cheers On Apr 16, 11:50 am, floepi wrote: > Hi all, > > after three days of researching and trying to fix those damn sessions > I am at a complete loss a

ACL clarification

2009-04-16 Thread toby1kenobi
Hi All, [Apologies if this turns up more than once, I seem to be having trouble posting] I'm setting up Auth and ACL on a site, to manage access to the admin area, and I'm just looking for clarification. I've been looking at the "Simple Acl controlled Application" in the example applications

Re: Reserved words in CakePHP?

2009-04-16 Thread Mark (Germany)
yeah i once proposed to change components into $this->FileComponent->foo() etc with "Component" attached to prevent this from happening but they did not care about that much in the core team at that point in time :) PS: same with helpers (conflicts between vars from controller): $poll (conten

Session madness

2009-04-16 Thread floepi
Hi all, after three days of researching and trying to fix those damn sessions I am at a complete loss as to why my sessions are lost at random! I have set Configure::write('Session.checkAgent', false); Configure::write('Security.level', 'low'); to no avail. I am NOT moving from https to http s

Re: Plugin architecture and plugin limitations

2009-04-16 Thread John Andersen
Sounds interesting! Could you show some examples (code, ideas, whatever) of what you tried to accomplish, so the CakePHP community can grow from your experience and/or maybe provide additional information to assist in finding a solution? Enjoy, John On Apr 16, 12:28 pm, Jaime wrote: > > Our l

Re: Plugin architecture and plugin limitations

2009-04-16 Thread Jaime
> Our lame but necessarily practical/quick solution was to give up on > plugins. [...] I'm afraid we will do the same. This application will have *a lot* of Javascript which also needs to be modular and extensible. I think there won't be any problems making pluggable components for the client par

Re: Session lost when changing from SSL to non-SSL connection

2009-04-16 Thread OceanInternet
I've opened an RFC on this: - http://groups.google.com/group/tickets-cakephp/browse_thread/thread/97c06384d8cdfa4d is there somebody that could take a look at it? also, is this something that should be moved to 1.3? Many thanks, --~--~-~--~~~---~--~~ You receive

ACL clarification

2009-04-16 Thread Toby Mathews
Hi All, I'm setting up Auth and ACL on a site, to manage access to the admin area, and I'm just looking for clarification. I've been looking at the "Simple Acl controlled Application" in the example applications section of the manual, and also the "Access Control Lists" bit (under Core Compon

Re: Using Cake

2009-04-16 Thread Martin Westin
I'd say go for a framework. I learned a lot more php a lot faster when I started using a framework. (a long long time ago in a framework far far away) You will also have a good foundation to practise OO-theory or application design ideas. On Apr 16, 3:37 am, "dem...@gmail.com" wrote: > I am

Re: Need high-level advice on how to implement cross Model csv exporter

2009-04-16 Thread Martin Westin
Hi, some ramblings and vague advice... :) As long as all your normal actions and views make use of $this->data then you can get away with exporting "what's on screen" by simply using parseExtensions and a csv-layout (as Brandead points out). But since you mention "tens of thousands of results" I

Re: Problem with linked models

2009-04-16 Thread John Andersen
In your controller, which fetches all the StockItems for a given product, how does it do that? Sorry for asking, but I do not see anything automatically fetching the required information, but I don't know all about CakePHP yet :) If you know the product, then you should fetch the stockitems from

Re: Problem with linked models

2009-04-16 Thread Toby
There isn't a find call, I was relying on automatic call, as this seems to get it almost right. Do I need to specify the find call myself then? T On Apr 16, 6:24 am, John Andersen wrote: > How does the find call look like in your controller? >    John --~--~-~--~~~-