Disable cache in listSources

2006-10-25 Thread Anton B.
I use dinamically creating tables and that's why I always need actual information. Is there a possibility to disable cache in DboMysql::listSources() or in DboSource::listSources()? Or simply clear cache? Thanks a lot. --~--~-~--~~~---~--~~ You received this

Re: Simple Site Structure - newbie question

2006-10-25 Thread AD7six
Hi Matt, http://groups-beta.google.com/group/cake-php/search?group=cake-phpq=%22static+pages%22+nateqt_g=Search+this+group http://cakephp.org/search?q=static+pages And Or: http://bakery.cakephp.org/articles/view/86 HTH, AD7six Please note: The manual/bakery is a good place to start any quest

Re: This Mailing List Isn't on Google For No Reason

2006-10-25 Thread AD7six
Hi All, I am glad to see this thread, I do hope that it it not taken by some to be anti-noob, everbody was a noob once (well, except PhpNut). On Oct 25, 12:14 am, francky06l [EMAIL PROTECTED] wrote: Maybe obliging a syntax for the subject in messages could help to classify or search such as

Re: Planning on CakePHP future versions

2006-10-25 Thread Dr. Tarique Sani
On 10/24/06, nate [EMAIL PROTECTED] wrote: In what way did it break your apps? I'm curious because in the last Thanks for the attention - here it goes In the security fix release - Components were suddenly not available in the contructor of app_controller.php of an application - this was not

Re: beforeSave()

2006-10-25 Thread carlosrg
You are great! :D Ok, now I have put beforeSave() function in the model... But I can't access from the model to $this-Session-read('User'). I'm doing well? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake

Re: MD5 Function

2006-10-25 Thread Sonic Baker
When I started my first php project I didn't know PHP and I didn't have an Internet connection. I had previously downloaded the manual though.Everything I needed to know was in there (and the comments). php.net is your friend. --~--~-~--~~~---~--~~ You received

Multiple checkboxes

2006-10-25 Thread Gonçalo Marrafa
Hi, bakers. Is there a way to create multiple checkboxes and treat them as an array? I i set the checkbox's name to 'Foo/bar' the generated name will be data[Foo][bar]. For it to be treated as an array it should be data[Foo][bar][]. Tried 'Foo/bar[]' but it doesn't work! Any thoughts? Thanks

Re: Multiple checkboxes

2006-10-25 Thread AD7six
You can probably get what you want with Foo/bar][ or something similar. There is no typo above, HTH, AD7six On Oct 25, 11:52 am, Gonçalo Marrafa [EMAIL PROTECTED] wrote: Hi, bakers. Is there a way to create multiple checkboxes and treat them as an array? I i set the checkbox's name to

Re: Multiple checkboxes

2006-10-25 Thread Gonçalo Marrafa
Thanks for your swift answer. On Wed, 25 Oct 2006 09:59:31 - AD7six [EMAIL PROTECTED] wrote: You can probably get what you want with Foo/bar][ or something similar. There is no typo above, HTH, AD7six On Oct 25, 11:52 am, Gonçalo Marrafa [EMAIL PROTECTED] wrote: Hi, bakers.

Re: Planning on CakePHP future versions

2006-10-25 Thread Martin Schapendonk
2006/10/25, Dr. Tarique Sani [EMAIL PROTECTED]: I am now curious as to where we did not play by the rules in the above two cases :) I suppose you should have filed a ticket in Trac (http://trac.cakephp.org/). Martin -- Martin Schapendonk, [EMAIL PROTECTED]

Re: Multiple checkboxes

2006-10-25 Thread Ismael S. Kafeltz
I recomend to you force the ID in the checkboxes (e.g array('id' = 'bla bla bla')) because multiple checkboxes will have the same ID and this can happens some strange behavior in some web browsers. This happen when you make Bla/bla][ --~--~-~--~~~---~--~~ You

Return class-mapped object instead of associative arrays

2006-10-25 Thread Marcelo de Moraes Serpa
I know that in the latest Cake version, you can configure your model to fetch the data in a object-tree (where each object is a real instance of its model class) instead of a associative array. However, I can't find anything anywhere about this! I've talking to gwoo about this some time ago, he

Code or Databases????

2006-10-25 Thread Sonic Baker
Hi there,I've read before that it's faster and even recommended to sum values at the DB level through queries. So if I wanted to get a list of items sold between certain dates, calculate tax totals, etc I should do this through queries. However, I'm not sure how portable it would be to do this

Re: Code or Databases????

2006-10-25 Thread Chris Hartjes
On 10/25/06, Sonic Baker [EMAIL PROTECTED] wrote: Hi there, I've read before that it's faster and even recommended to sum values at the DB level through queries. So if I wanted to get a list of items sold between certain dates, calculate tax totals, etc I should do this through queries.

AJAX observeField for n00bs

2006-10-25 Thread Finster
I'm a complete CakePHP and AJAX newbie. I'm trying to set up a pretty simple ajax select element where my selecting an option in select A will display relevant choices in a new select B. For whatever reason, the code I've implemented is not working. My guess is that I'm missing something vital in

Select tag with optgroup

2006-10-25 Thread Troy Schmidt
Okay just trying to keep with the same thread. Has anyone used this helper? Is this something included now in the Cake core? -- Forwarded message -- From: zis [EMAIL PROTECTED] Date: Apr 11, 4:38 am Subject: Select tag with optgroup To: Cake PHP Hi i would like to share with

Re: SMF + CakePHP

2006-10-25 Thread [EMAIL PROTECTED]
Cool! SMF has an api file with functions that can help you check if the user is logged in. (use the forum's session). BTW after authenticating the user, do you store the info into Cake's cookie/session? I searched through this mailing list and find many posts about integrating phpBB and Cake's

Re: This Mailing List Isn't on Google For No Reason

2006-10-25 Thread [EMAIL PROTECTED]
There are several things: Some parts in the manual and wiki's tutorial are out of date which caused confusion to newbies (or at least me *_*), FAQ is a great idea, we can make it like a wiki so everyone can help? (I will certainly do) And I still believe that a Forum is way better than this.

Re: THTML files not working

2006-10-25 Thread barry_normal
Hi guys. Well, php is running fine. I get the welcome screen from Cake okay. Here's the url: http://192.168.0.2/app/views/posts/index Using just http://192.168.0.2/app gives you the Cake welcome screen Maybe it's some other url I should be using. Controller/action pair you say? I don't mind

Re: ajax observefield how to get $params in the controller ?

2006-10-25 Thread Steniskis
Hi Bakers Sorry I just changed $this-Vehicule-listedesvehicules(mysql_real_escape_string($params['form']['vehicule_select'])); for $this-Vehicule-listedesvehicules(mysql_real_escape_string($this-params['form']['vehicule_select'])); AND IT WORKS! Sten

Re: THTML files not working

2006-10-25 Thread Chris Hartjes
On 10/25/06, barry_normal [EMAIL PROTECTED] wrote: Hi guys. Well, php is running fine. I get the welcome screen from Cake okay. Here's the url: http://192.168.0.2/app/views/posts/index Well, here's part of your problem. The URL should be http://192.168.0.2/app/posts/index Again, I

Cake's suitability for downloadable apps

2006-10-25 Thread PurelyArtistic
Hello all, After a year or so of using Ruby on Rails I'm returning to PHP to work on a downloadable app (think forums, galleries, that sort of thing). What are you thoughts on using Cake for this sort of application? It seems that Cake, like RoR, is intended mainly for hosted apps but it might

Re: Problems when using observeField to check password and its confirm

2006-10-25 Thread Finster
Wouldn't observeForm work in this case? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to

Re: Code or Databases????

2006-10-25 Thread Sonic Baker
Hi Chris,Thanks for your response. I guess to stick with cake's portability I'll do these sort of tasks in the Domain logic.For future reference, if anyone's wondering about this question, and they are good enough to search the list before posting, here's a link to help you decide:

Re: This Mailing List Isn't on Google For No Reason

2006-10-25 Thread Sonic Baker
I was just thinking,How about using the rating system on the group to rate good posts? Does this increase the chances that the good posts come up first?Another thing I was thinking was this:Sometimes it's hard to find the answer to a question on the group when you don't know the lingo. So what if,

Re: Code or Databases????

2006-10-25 Thread [EMAIL PROTECTED]
This is an issue that comes back in many domains. my view on it , is basically: the more layers of abstraction you make to interact with a resource, the more simple that interaction becomes, but also, the more generic. And thus, the less you can optimize those interactions. (well offcourse you

Dynamic Dynamic Bind

2006-10-25 Thread Sonic Baker
Hi there,I'm wondering if there's a way to dynamically load the fields into bindModel()?Basically I have a model method which I want to share between a few models. This method calls bindModel() to another Model but this bound model will be different depending on which model calls the method.

Re: Code or Databases????

2006-10-25 Thread Chris Hartjes
On 10/25/06, Sonic Baker [EMAIL PROTECTED] wrote: Hi Chris, Thanks for your response. I guess to stick with cake's portability I'll do these sort of tasks in the Domain logic. For future reference, if anyone's wondering about this question, and they are good enough to search the list

CakePHP for Railers

2006-10-25 Thread jwmittag
Hi, just a few weeks ago, I discovered Ruby and Ruby on Rails, and instantly fell in love with it. My webhoster doesn't offer Ruby, so I set out to search for an alternative and I found CakePHP. However, even though I never seriously used Ruby on Rails and only toyed around with it for three

HABTM and $validate: ensure at least one value was selected

2006-10-25 Thread DaRollingHobbit
Good evening/morning, I'm fairly new to cakePhp and partially succedd in setting up an HABTM relationship between my user and profile table. When I create a user, I can choose one or several profiles among the available ones and when I save everything goes fine EXCEPT I couldn't find out how to

Re: Code or Databases????

2006-10-25 Thread Sonic Baker
Hi Chris,On 10/25/06, Chris Hartjes [EMAIL PROTECTED] wrote: That's a really great article.I've printed it out to read on thetrain ride home tonight.I'm doing some refactoring of an existingapplication (Rails, not CakePHP) and have to make some decisions about this very topic.Greatly

Re: CakePHP for Railers

2006-10-25 Thread Chris Hartjes
Hey there jwm, I've got experience with both Rails and CakePHP. In fact, I even gave a talk at the php|works conference in September on the topic of What Can PHP Learn From Ruby On Rails?, so I'd like to think I'm qualified to comment on this topic. I'm sure I'll be corrected if I'm wrong.

Re: Planning on CakePHP future versions

2006-10-25 Thread nate
The second case I can't really help you out on, since the plugins interface is the one department of the framework I tend to stay out of, but I will say that yes, we usually completely ignore any bugs reported on the mailing list, as they should be reported on Trac. The first case, however, is

Re: beforeSave()

2006-10-25 Thread nate
Models aren't supposed to have access to the session. What you can do is, if your model has a 'user_id' field (or equivalent), you can do something like this in your controller: $this-Model-set('user_id', $this-Session-read('User.id')); --~--~-~--~~~---~--~~

Application Architecture

2006-10-25 Thread realien
I'm new to cake, but not MVC so had a few questions on where the best place is to put some functionality as it pertains to CakePHP. 1) I parse an XML file from a dv camera and need to insert what I get into my database, I will have models for the data, but do I create my xml parse class in my

Re: CakePHP for Railers

2006-10-25 Thread nate
- Acts (acts allow you to decorate a model's behaviour with additional orthogonal aspects and encapsulate that behaviour in a single, central place) We have something called 'Behaviors' in Cake 1.2. There have been a few posts on it in this mailling list which you can search for,

Re: Re: CakePHP for Railers

2006-10-25 Thread Samuel DeVore
tease On 10/25/06, nate [EMAIL PROTECTED] wrote: - Acts (acts allow you to decorate a model's behaviour with additional orthogonal aspects and encapsulate that behaviour in a single, central place) We have something called 'Behaviors' in Cake 1.2. There have been a few

Re: Application Architecture

2006-10-25 Thread Chris Hartjes
On 10/25/06, realien [EMAIL PROTECTED] wrote: I'm new to cake, but not MVC so had a few questions on where the best place is to put some functionality as it pertains to CakePHP. 1) I parse an XML file from a dv camera and need to insert what I get into my database, I will have models for

Re: Return class-mapped object instead of associative arrays

2006-10-25 Thread nate
It doesn't exactly work like that. There is a class called Set which will be replacing NeatArray, and this object has a method called map(), which can be used to map an array onto a dummy storage object (usually stdClass). There are a couple of notes on it toward the end of these slides:

RE: Planning on CakePHP future versions

2006-10-25 Thread Mariano Iglesias
Nate, I think that's already properly documented. I've been using beforeFilter() for that purpose and I don't possess any mind reading skills that I know of, so I must have read it somewhere. I've also been going through the Cake PDF manual and it is quite well designed, as it helps developers

Re: Return class-mapped object instead of associative arrays

2006-10-25 Thread Marcelo de Moraes Serpa
Hi nate, thanks for the info...This feature would be particulary useful for us flash programmers to use in conjuction with AMFPHP (CakeAMFPHP) VO mapping features. Marcelo. On 10/25/06, nate [EMAIL PROTECTED] wrote: It doesn't exactly work like that.There is a class called Set whichwill be

Re: Code or Databases????

2006-10-25 Thread nate
Theoretical Example: Order hasMany OrderItem, OrderItem belongsTo Order, Item: $this-OrderItem-find( 'Order.date BETWEEN ' . date('Y-m-d') . ' AND ' . date('Y-m-d', strtotime('-1 month')) . '', 'SUM(Item.price) As total' ); If you wanted to calculate that including the tax per order,

Re: Code or Databases????

2006-10-25 Thread Sonic Baker
Hi Nate,Thank you for your input.On 10/25/06, nate [EMAIL PROTECTED] wrote: Theoretical Example: Order hasMany OrderItem, OrderItem belongsToOrder, Item:This is interesting. I have these Modles, however my setup is Order HABTM Item (link table Items_orders). Then when I want to add items to the

Re: CakePHP for Railers

2006-10-25 Thread nate
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/model/behavior.php Just because we haven't released any doesn't mean you can't write one yourself :-P --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake

Re: Return class-mapped object instead of associative arrays

2006-10-25 Thread nate
Yeah, we're working on something for that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email

Re: need help with specifying a complex query

2006-10-25 Thread bingo
hi, Thanks to Christoph. I found a solution but wondering is there any better way to get rid of this long SQL query. Its fine for me to have a multistep procedure $query = SQL select Users.id as user_id, Users.name as user_name, Singers.id as singer_id, Singers.name as singer_name,

Re: Code or Databases????

2006-10-25 Thread nate
This is interesting. I have these Modles, however my setup is Order HABTM Item (link table Items_orders). Then when I want to add items to the order I use bindModel to create a hasMany association between Order and ItemsOrder. I'm interested to know why you chose the above associations?

Cake and VALID_NOT_EMPTY

2006-10-25 Thread [EMAIL PROTECTED]
Here's my problem. In my database firstname and lastname are required fields. If you enter a space in the field, it will let you submit it (expected), but when you go to edit the field the space is gone (not so expected). This is causing me some problems and I'm not sure if it's something I can

Re: Code or Databases????

2006-10-25 Thread Sonic Baker
Hi Nate,On 10/25/06, nate [EMAIL PROTECTED] wrote: This is interesting. I have these Modles, however my setup is Order HABTM Item (link table Items_orders). Then when I want to add items to the order I use bindModel to create a hasMany association between Order and ItemsOrder. I'm interested to

Re: Cake and VALID_NOT_EMPTY

2006-10-25 Thread Samuel DeVore
perhaps posting some code in the bin to let people see what you are doing might help. http://bin.cakephp.org/ On 10/25/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Here's my problem. In my database firstname and lastname are required fields. If you enter a space in the field, it will let

Re: Cake and VALID_NOT_EMPTY

2006-10-25 Thread Chris Hartjes
On 10/25/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I think actually looking at the code won't help much. It's a pretty simple model. I think actually looking at the code is the easiest way to fix the problem. But maybe that's just me. -- Chris Hartjes The greatest inefficiencies

Re: Cake and VALID_NOT_EMPTY

2006-10-25 Thread Chris Hartjes
On 10/25/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Ok - here's the code snips. http://bin.cakephp.org/view/1298589871 Hey kungfoofool, Your code looks pretty straightforward. Looks like you save all the data like anyone else would. I think it would also be good to see the form

Routing Question

2006-10-25 Thread [EMAIL PROTECTED]
Hi All, I am trying to build a multilingual site and want the urls to be example.com/lang/controller/action example.com/en/controller/action where the lang could be anythinghow to achieve this? thanx sandosh --~--~-~--~~~---~--~~ You received this

Re: Dynamic Dynamic Bind

2006-10-25 Thread Sonic Baker
Hi Francky,On 10/25/06, francky06l [EMAIL PROTECTED] wrote: I do not see how you can achieve this since the model to bind willdepend of the current model. Unless you define a static array into theapp_model (base) and call a function there that can then know whichmodel you are calling from, I do

Re: Routing Question

2006-10-25 Thread francky06l
I had the same problem but I choose another way to solve this .. I have considered your approach and I did give name to my views in the form en_viewname or whatever langage_viewname. For this you can automate this into the beforeRender and stick the langage letters before rendering the views (I

Re: Routing Question

2006-10-25 Thread francky06l
I forgot, you also have the $viewpath variable that you can change to use the same views names but in another directory. On Oct 25, 11:08 pm, francky06l [EMAIL PROTECTED] wrote: I had the same problem but I choose another way to solve this .. I have considered your approach and I did give name

Re: Application Architecture

2006-10-25 Thread Grant Cox
That (1) is pretty much exactly what I would do. Make a component that parses your XML into an associative array. Get your controller action to pass the uploaded XML to this component, then use the array data to create and save instances of your model(s). I agree a lot of heavy lifting can be

An easy text search algoritm

2006-10-25 Thread Emils
I'v never done any serious search in PHP more than WHERE something LIKE %something% but wanted to try a own idea so I would be able to search for word in my content. My algorim works like this: User submits a title + body. When posted I create split all words and add them to a database table.

Re: Cakephp projects on subfolder best practice

2006-10-25 Thread [EMAIL PROTECTED]
thanks define('ROOT', '/var/www/yourproject'); does the trick for me ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe

gutting and replacing Session

2006-10-25 Thread sbarre
So I've been exploring the CakePHP framework for the last week or so, having decided that it was a good starting point for my latest project. I'm familiar with MVC and the Rails Way so alot of the internals were straightforward, and so far most of the functionality provided will be more than

swap database rows

2006-10-25 Thread [EMAIL PROTECTED]
I'm building a rudamentary backend system which provides methods to upload files and store references to them (along with a few other infos) in the database. The admin tool needs to be able to reorder the list which is displayed from the db data, so I added a field 'index' to use for sort order

RE: CakePHP for Railers

2006-10-25 Thread Jörg W Mittag
Thanks Chris, Chris Hartjes wrote: - join models CakePHP offers that via the same sort of hasMany, belongsTo and hasManyAndBelongsTo functionality. That seems to have been misunderstood. I was thinking of using real join Models in the Domain Model for many-to-many relationships instead

RE: CakePHP for Railers

2006-10-25 Thread Jörg W Mittag
nate wrote: - Acts (acts allow you to decorate a model's behaviour with additional orthogonal aspects and encapsulate that behaviour in a single, central place) We have something called 'Behaviors' in Cake 1.2. There have been a few posts on it in this mailling list which you

Re: CakePHP for Railers

2006-10-25 Thread Chris Hartjes
On 10/25/06, Jörg W Mittag [EMAIL PROTECTED] wrote: - object-relational mapping of inheritance I think CakePHP allows this through object chaining, which to me is a very powerful yet underutilized concept. Can you elaborate on that? I just googled for object chaining and only got a

RE: THTML files not working

2006-10-25 Thread Grant Davies
I'm a noob and have a suggestion, get the eval copy of Nusphere's php ed , hit a page then step through the code in the debugger, I didn't really understand the controller/view mapping until today, when I stepped through the code and figured out how cake looks for your request, maps it to a

RE: Application Architecture

2006-10-25 Thread Grant Davies
Thanks grant. What I've done so far is created a controller to parse the xml, it uses xpath to get the nodes/attributes that I need (I don't need the whole of the xml). No what I want to do is populate an instance of a model asset with the contents of the nodes I captured, I see that the model

Re: CakePHP for Railers

2006-10-25 Thread Felix Geisendörfer
Jrg, thanks for your lengthy post, it was a pretty interesting read. One of the things that I really like as well is creating Models for relationships. I think I heard about it first in David Heinemeier Hansson Keynote Adress at RailsConf '06 (Video, Slides). I've played around with it a

Re: Planning on CakePHP future versions

2006-10-25 Thread Dr. Tarique Sani
On 10/25/06, nate [EMAIL PROTECTED] wrote: we usually completely ignore any bugs reported on the mailing list, as they should be reported on Trac. OK! I will have the programmer who found this put it in trac and hope is it looked into. The first case, however, is probably our fault for not

Re: gutting and replacing Session

2006-10-25 Thread nate
Well, that all sounds about right. All you really need is the SessionComponent that re-implements the proper methods. Any chance you'd want to submit those extra methods for consideration to be included in the core...? --~--~-~--~~~---~--~~ You received this

RE: Planning on CakePHP future versions

2006-10-25 Thread Mariano Iglesias
Tarique, By no means had I suggested you were not involved in the ongoing development of Cake or any other open source project. It was more of a general statement, because as a developer of several projects and owner of free programming sites sometimes you just get frustrated with the amounts of