Re: mod rewrite issue with 1and1 servers

2007-02-08 Thread kitten
Hi :) I got Cake with mod_rewrite working on 1und1 servers (the german branch...) with a little change to the .htaccess in webroot: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L] Please note

Re: mod rewrite issue with 1and1 servers

2007-02-08 Thread Sam Sherlock
thanks - I am certain this can be made to happen a different format of error 404 this time. A bit plainer than before, their usual error 404 has a load of adverts on it perhaps making that line less specific? I dunno how that could be done. maybe {yeah I am not fully ofay with mod rewrite} (.*)

Re: Strange behaviour

2007-02-08 Thread [EMAIL PROTECTED]
I think I found something for you to try when you ge tthe time. There is a bug about cakephp and cgi on apache servers. Here is the link: https://trac.cakephp.org/ticket/66 The problem doesn't seem exactly like yours but, maybe the fix can help get rid of the cgi link replacements. The problem

Re: Strange behaviour

2007-02-08 Thread [EMAIL PROTECTED]
$this->webroot will give you the the webroot. I am going to set up an apache server this weekend with cgi php instead of using modules. I'll see what I can figure out. Hang in there and don't give up, I am searching for an answer :) On Feb 8, 12:54 am, "apalankat" <[EMAIL PROTECTED]> wrote: >

Re: mod rewrite issue with 1and1 servers

2007-02-08 Thread [EMAIL PROTECTED]
Hrmm, don't give up just yet! I just read the FAQ and it seems, if indeed you have the type of hosting control mentioned in this FAQ, try to add this code to the .htaccess file. AllowOverride All The FAQ tells me that mod_rewrite is enabled and should work for you but, you probably have

Re: Accesing AJAX Form Post data

2007-02-08 Thread Wey
Here's the relevant code: formTag('/ShoppingCarts/show','post'); /* ... form fields ... */ echo $ajax->submit('Update Quantity', array('url' => '/ShoppingCarts/ update_quantity', 'complete' => 'contents')); ?> --~--~-~--~~~---~--~~ You received this message be

Re: mod rewrite issue with 1and1 servers

2007-02-08 Thread Sam Sherlock
Thanks for the response. Changing AllowOverride from None to All is what got it working on my WAMP server as I understand Mod Rewrite won't work unless its set to All. As mod rewrite does work on the package (there are some rudimentary examples in their FAQ) Their FAQ Page http://faq.1and1.com/sc

RE: How to Impliment Right Joins in Cake

2007-02-08 Thread Mariano Iglesias
Sweet :) -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De:

Accesing AJAX Form Post data

2007-02-08 Thread Wey
Hi everyone, I just started working with CakePHP about a month ago. I'm currently trying to get a From submission to work through AJAX. It's making the call, but the form data doesn't seem to be getting to the controller. I'm using the $ajax->submit() to do the submission. With a regular HTML su

Re: mod rewrite issue with 1and1 servers

2007-02-08 Thread [EMAIL PROTECTED]
Looks like you will have to use the built-in rewrite rule. I have had problem with a server running virtual hosting... they need to change AllowOverride to All in their httpd.conf file as well as the one in your virtual conf file. Check out the built in rewrite services, here --> http://manual.c

Re: How to Impliment Right Joins in Cake

2007-02-08 Thread nate
In Cake 1.2, there will be an association key called 'type', where you can set the join type on belongsTo and hasOne associations. On Feb 8, 11:48 pm, "Iftikhar Khan" <[EMAIL PROTECTED]> wrote: > If someone have the idea about: > > 1. If model A is associated by hasMany with Model B, Is this ne

? about findAllThreaded and hasMany

2007-02-08 Thread river_jetties
I have a controller that makes a call to a findAllThreaded for "menu headers". Now each of these "menu headers" has a has-many relationship to "menu items". How would I make the conditional syntax for the findAllThreaded so that it will only select menu items that are active? thanks, jonathan

How to Impliment Right Joins in Cake

2007-02-08 Thread Iftikhar Khan
If someone have the idea about: 1. If model A is associated by hasMany with Model B, Is this neccessary that B must have belongsTo with A 2. when Model A hasMany with B, Cake impliments Left Join on B vs A. In this case obviously the rows which dont have related rows in B will not be shown. How

Re: Enterprise features with cakephp

2007-02-08 Thread John David Anderson (_psychic_)
On Feb 8, 2007, at 9:14 PM, Grant Cox wrote: > 3 - is there support for database migrations (like rails) > Not in the cake core. But Joel Moss has created a package to do this > (Cake Migrations), see > http://bakery.cakephp.org/articles/view/161 Migrations may come to the core sooner than you

Re: Enterprise features with cakephp

2007-02-08 Thread Darian Anthony Patrick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 alew3 wrote: > - is there any continuous integration/automatted build and test > solution that works with cakephp / svn? There currently is no mature PHP-specific CI server like CruiseControl is to Java. I started writing one but haven't gotten very

Problem in Find for Models having hasMany Association

2007-02-08 Thread Iftikhar Khan
Hi All; I have two models Destination and SubDestination as follows: Table: destinations, Column: id, destination, topic class Destination extends AppModel { var $name = 'Destination'; var $hasMany = array('SubDestination' => array('className' => 'SubDestina

Re: Authentication against a postgreSQL database

2007-02-08 Thread Grant Cox
Are you saying that you want your application level authentication to be defined by your database's authentication, rather than by information stored in the database? Can you explain why this is a good idea? I'm not sure what you mean by "logging in on the database with for example an MS access

Re: Enterprise features with cakephp

2007-02-08 Thread Langdon Stevenson
Hi alew3 > I'm considering adopting cakephp as our default framework at our > software shop, but I'm still unsure of the support of cake on the > following, > > - how are unit tests integrated / created in cakephp ? > - is there any continuous integration/automatted build and test > solution tha

Re: Enterprise features with cakephp

2007-02-08 Thread Grant Cox
1 - how are unit tests integrated / created in cakephp ? In the newest dev release the core cake unit tests are included in the package - see http://bakery.cakephp.org/articles/view/232 and http://cakebaker.42dh.com/2007/02/05/testing-the-core-two-new-releases/ I believe it should be simple to ex

Enterprise features with cakephp

2007-02-08 Thread alew3
I'm considering adopting cakephp as our default framework at our software shop, but I'm still unsure of the support of cake on the following, - how are unit tests integrated / created in cakephp ? - is there any continuous integration/automatted build and test solution that works with cakephp / s

mod rewrite issue with 1and1 servers

2007-02-08 Thread Sam Sherlock
I have managed to extract information from the support guys at the hosting company here is what they say about the mod_rewrite rules of cake > It would seem that the second line of code is simply not valid. This > code here: > > RewriteRule (.*) webroot/$1[L] > > it is likely that matching (.*

one "progress bar" for multiple s

2007-02-08 Thread skyblueink
Hello, bakers! In the example below, I'm calling two ajax requests in sequence so that two divs(id=view_first, view_second) are updated totally independantly. Since updating requires some time, I have a "progress bar" div(id=loading) to show which div is being updated. But currently, only "Loading

Re: why use jQuery instead of Prototype

2007-02-08 Thread Sam Sherlock
not being political, thats an adage that I think applies to web development hence new I enjoy being privy to some new stuff; less room politics makes more room for programming at first I sure you comment and thought about it, next the dry humour came to my attention bake on! ;) On 08/02/07, Mar

RE: why use jQuery instead of Prototype

2007-02-08 Thread Mariano Iglesias
if (in_array(PARTICIPANT_TYPE_CODER, $this->Group->getParticipantTypes())) { $this->Group->Topic->setPolitics(false); } ;) -MI --- Remember, smart coders answer ten questions for every question they ask. So be sma

Authentication against a postgreSQL database

2007-02-08 Thread daveg
Hi all, I'm currently in the process of testing cakephp for some web application. I was wondering something about authentication. cakePHP follows a model where there is 1 general database user and stores the usernames and information in a separate user table and performs authentication against th

Re: why use jQuery instead of Prototype

2007-02-08 Thread Sam Sherlock
Thanks for the information, it seems on reflection my disagreements with prototype stem from my personal misgivings with client slide scripting. I have just taken to jQuery more than the other alternatives :) > For instance in cakePHP 1.2 I am finding some issues with using the paginator helper >

Re: Better way to do this?

2007-02-08 Thread Dan Bair
Perfect. Thanks! On Feb 8, 7:11 am, "AD7six" <[EMAIL PROTECTED]> wrote: > On Feb 8, 7:49 am, "Dan Bair" <[EMAIL PROTECTED]> wrote: > > > > > Hello Bakers, > > > Currently I have a table that holds the favorite films of users > > (fn_favorites). In each row in this table, it holds the film's id >

Re: irc.cakephp.org down?

2007-02-08 Thread Eric C Blount
I cannot get to it either. Eric On 2/7/07, lukemack <[EMAIL PROTECTED]> wrote: > > > hi, > > can anyone else access the web interface to the #cakephp irc channel > at http://irc.cakephp.org/irc.html? I'm forced to use this as I am > behind a firewall at the moment. i was able to access it last we

Re: Recommend any awesome Cake books?

2007-02-08 Thread [EMAIL PROTECTED]
a quick google search has produced this list: http://astore.amazon.com/cakesoftwaref-20 anybody have any experience with any of these? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to t

RE: Recommend any awesome Cake books?

2007-02-08 Thread Mariano Iglesias
http://astore.amazon.com/cakesoftwaref-20 Those are books recommended by The Cake Software Foundation. CakePHP Recipes (http://astore.amazon.com/cakesoftwaref-20/detail/0321497732/104-5619952-634 4763) has not yet been published but AFAIK will be the first CakePHP book out there. -MI -

Re: rails vs cake

2007-02-08 Thread John David Anderson (_psychic_)
On Feb 8, 2007, at 1:42 PM, [EMAIL PROTECTED] wrote: > > Ok, sorry to keep referring to rails, but i'm just trying to wrap my > head around all of the differences between the two frameworks... CakePHP is rails-like, though it isn't a port. We take some cues from rails, but don't expect everyt

Re: rails vs cake

2007-02-08 Thread Samuel DeVore
php cake/scripts/bake.php On 2/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Ok, sorry to keep referring to rails, but i'm just trying to wrap my > head around all of the differences between the two frameworks... > > In rails there are a number of command line functions: > > ./ about*

Re: Recommend any awesome Cake books?

2007-02-08 Thread Samuel DeVore
you would have to wait until there is one. On 2/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm looking to buy a Cake book shortly... any recommendations? > > > > -- == S. DeVore (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a rea

need help - formHelper

2007-02-08 Thread palPalani
Hi friends, I am using CakePHP 1.2 development version. i need help for generating form fields with the following method: 1. name: All the fields should have help link or customised tool tip. 2. name: CakePHP When i open the data it will the above method, becouse, this user don't ed

rails vs cake

2007-02-08 Thread [EMAIL PROTECTED]
Ok, sorry to keep referring to rails, but i'm just trying to wrap my head around all of the differences between the two frameworks... In rails there are a number of command line functions: ./ about* console* generate* plugin* runner* ../ breakpointer* destroy* performance/ p

Recommend any awesome Cake books?

2007-02-08 Thread [EMAIL PROTECTED]
I'm looking to buy a Cake book shortly... any recommendations? --~--~-~--~~~---~--~~ 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 thi

Re: why use jQuery instead of Prototype

2007-02-08 Thread DJ Spark
Hi sam, > AFAIK prototype require more code than jquery and is generally not > unobtrusive, I may be > wrong about this Prototype maybe or maybe not obstrusive. The same with jquery. Cake's implementation is a little obtrusive, but i heard something about 1.2 being totally different. > and n

Re: More 1.2 validation

2007-02-08 Thread MrTufty
Indeed Mariano, I'll do that. I'm certainly not looking to steal Evan's limelight on this one, compared to what he's done, my stuff is just minor tweaks :) On Feb 8, 7:42 pm, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > You may want to combine efforts with Evan who is the original developer: >

how to validate and cannot save mutiple rows

2007-02-08 Thread lynda
I appreciate any help and advice. I have a table settings with 2 fields: value(primaryKey) and setting, value is integer, setting is string. valuesetting 1 reviews 2 columns 3 features 4 categories I want to switch settings, for example, value 1 will have s

RE: More 1.2 validation

2007-02-08 Thread Mariano Iglesias
You may want to combine efforts with Evan who is the original developer: http://blog.evansagge.com Otherwise we would have two versions of the same library floating around. Not particularly DRY if you ask me ;) -MI --- Re

Re: Does Cake have the ./script/console similar to ruby on rails

2007-02-08 Thread Chris Hartjes
On 2/8/07, nate <[EMAIL PROTECTED]> wrote: > > Well yeah, you can do the interactive mode in PHP, but we should > probably have a wrapper for doing Cake-specific stuff. Not to echo > John or anything, but any takers on getting that one started up? > I know I will probably regret this...but I thi

Re: Does Cake have the ./script/console similar to ruby on rails

2007-02-08 Thread nate
Well yeah, you can do the interactive mode in PHP, but we should probably have a wrapper for doing Cake-specific stuff. Not to echo John or anything, but any takers on getting that one started up? On Feb 8, 2:34 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Correction... you guys rock! T

RE: Does Cake have the ./script/console similar to ruby on rails

2007-02-08 Thread Mariano Iglesias
Did someone say "too much information"? Haha, just kidding mate. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://ww

Re: Does Cake have the ./script/console similar to ruby on rails

2007-02-08 Thread [EMAIL PROTECTED]
Correction... you guys rock! The reason i am selecting Cake over any other PHP framework is the quick responses from this user group. The ./script/console in rubyonrails is by far one of my favorite features. It allows you to interact with your models and controllers without using any views. I

Re: why use jQuery instead of Prototype

2007-02-08 Thread Sam Sherlock
thx John. and all those extra links are bursting with information. -S On 08/02/07, Olwen Williams <[EMAIL PROTECTED]> wrote: > > > I haven't looked at jquery, but have got a site using prototype. I > discovered that prototype was (from memory) over 50K which was > overkill for what I was doing.

Re: Does Cake have the ./script/console similar to ruby on rails

2007-02-08 Thread Chris Hartjes
On 2/8/07, nate <[EMAIL PROTECTED]> wrote: > > Uh, interactive mode anybody? > > http://us3.php.net/features.commandline > Ah ha! Nicely done, Nate. I like that Nate constantly points out the things I don't know. Sort of like my wife. ;) -- Chris Hartjes My motto for 2007: "Just build it, d

Re: Does Cake have the ./script/console similar to ruby on rails

2007-02-08 Thread nate
Uh, interactive mode anybody? http://us3.php.net/features.commandline --~--~-~--~~~---~--~~ 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

Re: Does Cake have the ./script/console similar to ruby on rails

2007-02-08 Thread Chris Hartjes
On 2/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Does Cake have the ./script/console similar to ruby on rails? > > if so then Cake rocks!!! if not, then why not??!! > Well, if someone would create an interactive shell for PHP, then we would be okay... I like using the console for my R

Re: Does Cake have the ./script/console similar to ruby on rails

2007-02-08 Thread John David Anderson (_psychic_)
On Feb 8, 2007, at 11:42 AM, [EMAIL PROTECTED] wrote: > > Does Cake have the ./script/console similar to ruby on rails? Nope, not yet. > if so then Cake rocks!!! Well, I'd argue that it rocks now. 'Could always use improving, though. > if not, then why not??!! Care to start working on it? ;

Re: More 1.2 validation

2007-02-08 Thread MrTufty
Bug fix for the validateRequired / validateNotEmpty: function _evaluate($validation, $messageOnFail, $fieldName = null, $params = array()) { if ($validation) { return true; } if(!preg_match("/does not match pattern/",$messageOnFail) && ! preg_m

Does Cake have the ./script/console similar to ruby on rails

2007-02-08 Thread [EMAIL PROTECTED]
Does Cake have the ./script/console similar to ruby on rails? if so then Cake rocks!!! if not, then why not??!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to

Re: why use jQuery instead of Prototype

2007-02-08 Thread Olwen Williams
I haven't looked at jquery, but have got a site using prototype. I discovered that prototype was (from memory) over 50K which was overkill for what I was doing. Following some instructions I found on the web I cut it down to around 11k (by omitting parts I don't use) On 09/02/07, Mikee Freedom

Re: why use jQuery instead of Prototype

2007-02-08 Thread Mikee Freedom
I also appreciate the links. Wealth of knowledge on the subject to be found within. Thanks again. Cheers, mikee On 09/02/07, fredBH <[EMAIL PROTECTED]> wrote: > > well... > thx for all awnsers > > I had bookmarked all link and im reading right now... > I have more interest about ajax jquery imp

Re: why use jQuery instead of Prototype

2007-02-08 Thread fredBH
well... thx for all awnsers I had bookmarked all link and im reading right now... I have more interest about ajax jquery implementation in cakephp... I use prototype code provide from AjaxHelper and i dont see/have problems... My question is because i see some guys porting to jQuery instead defau

Re: why use jQuery instead of Prototype

2007-02-08 Thread John David Anderson (_psychic_)
On Feb 8, 2007, at 9:49 AM, Sam Sherlock wrote: > AFAIK prototype require more code than jquery maybe().onlyBecause().jQueryLikesTo().stringEverything().alongLikeThis (); The gain is that you may write less code, but the drawback is that it is harder to read. > and is generally not unobtrus

Re: why use jQuery instead of Prototype

2007-02-08 Thread Sam Sherlock
Hi fredBH, I find jquery much easier to use and code than prototype (actually I never did make any real progress with prototype) Having said that the use of prototype is more widespread than jquery, and so there are more tutorials for prototype. heres some tutorials that I have found useful in t

Re: why use jQuery instead of Prototype

2007-02-08 Thread Ámon Tamás
fredBH wrote: > hi everyone! > > im going to start develop and im see some guys using jquery... others > using normal ajax cake prototype... and i just wanna know what the > diference of them... > I had searched about jquery but i dont understand how can it change > about ajax call from Prototype

Re: why use jQuery instead of Prototype

2007-02-08 Thread Erich C. Beyrent
This article specifically is pretty good: http://borkweb.com/story/the-ajax-experience-jquery-toolkit -Erich- fredBH wrote: > hi everyone! > > im going to start develop and im see some guys using jquery... others > using normal ajax cake prototype... and i just wanna know what the > diference

Re: why use jQuery instead of Prototype

2007-02-08 Thread Erich C. Beyrent
Check out http://www.borkweb.com and http://www.nosheep.net - search for jquery and you'll find a bunch of examples. HTH -Erich- fredBH wrote: > hi everyone! > > im going to start develop and im see some guys using jquery... others > using normal ajax cake prototype... and i just wanna know w

why use jQuery instead of Prototype

2007-02-08 Thread fredBH
hi everyone! im going to start develop and im see some guys using jquery... others using normal ajax cake prototype... and i just wanna know what the diference of them... I had searched about jquery but i dont understand how can it change about ajax call from Prototype... Can someone help showin

Re: Passing functions to views

2007-02-08 Thread Károly Kiripolszky
Mostly because I don't know how to use the HtmlHelper in the controller... :P --~--~-~--~~~---~--~~ 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 unsub

Re: how to use mysql specific function ?

2007-02-08 Thread Luigi
I try this : $tests=$this->Resultat->findAll(null, array('id', 'IF ( `message` IS NULL , NULL ,1)'), null, nul

Re: Route problem

2007-02-08 Thread Ámon Tamás
Max wrote: > I am looking for the same solution.. Hmmm. I think it is a very difficult thing... :) I like to make something similar like in drupal i18n module. This is working in the same way. I try to see the routes but do not find any solution. Is there any tutorial or examples about routes?

Re: Passing non-model variables from controller to view to setting and retreiving HTML form tags

2007-02-08 Thread Daghe9193
Grant, Thanks for the tip.I must be doing something subtly wrong with your suggestion. I set the $this->data['Display']['currency'] in my index controller method. When adding the echo $html- >checkbox( 'Display/currency' ); I get "Cannot instantiate non- existent class: display ".Init

Re: Routes, pages and controllers

2007-02-08 Thread CreepieDeCrapper
Good information guys, thanks. I'm trying to do the opposite of Ian, in a way. I would like to setup a route that connects a particular controller if a request is made that is not found. Iow, something like this: domain.com/anythingyouwant => MyController domain.com/hello_world => MyController do

Re: More 1.2 validation

2007-02-08 Thread MrTufty
Damn, I didn't pick that one up either. Will bug fix that later on. A possible modification would be to add an extra parameter to each function specifying whether or not to output the message - but that might make things more complicated than they need to be. When I get this sorted out and worki

Re: Better way to do this?

2007-02-08 Thread AD7six
On Feb 8, 7:49 am, "Dan Bair" <[EMAIL PROTECTED]> wrote: > Hello Bakers, > > Currently I have a table that holds the favorite films of users > (fn_favorites). In each row in this table, it holds the film's id > (film_id) and the user's id (user_id). I am making a list of the > "User's Top Favori

Re: Passing functions to views

2007-02-08 Thread AD7six
On Feb 8, 1:53 pm, "Károly Kiripolszky" <[EMAIL PROTECTED]> wrote: > Writing a function in an existing file instead of creating another > source file (and also a class) is more simple for me. why pass the function, instead of passing the data after using the function..? AD7six Please note: The

Re: How to specify layout once

2007-02-08 Thread AD7six
On Feb 8, 3:10 pm, "Ryan" <[EMAIL PROTECTED]> wrote: > Set it in your beforeRender() function in your controller. > > Regards, > Ryan Rosehttp://www.digiwize.com > > On Feb 8, 8:58 am, "Mark Steudel" <[EMAIL PROTECTED]> wrote: > > > So I have admin functions in my controller. I can change the la

Re: how to use mysql specific function ?

2007-02-08 Thread AD7six
On Feb 8, 3:09 pm, Luigi <[EMAIL PROTECTED]> wrote: > Yes that's what I try first: > > $tests=$this->Resultat->findAll(null, > array('id', > 'IF ( message IS NULL , NULL , > 1)'), >

Re: how to use mysql specific function ?

2007-02-08 Thread Luigi
That's what I try but te result isn't better, I also try 'as Resultat.sg' but it dosen' change anything. Array ( [0] => Array ( [Resultat] => Array ( [id] => 102 ) [0] => Array ( [sg] => ) ) [1] => Array ( [Resultat] => Array ( [id] => 103 ) [0] => Array ( [sg] => ) ) ) And now I ve any other id

Re: How to specify layout once

2007-02-08 Thread Ryan
Set it in your beforeRender() function in your controller. Regards, Ryan Rose http://www.digiwize.com On Feb 8, 8:58 am, "Mark Steudel" <[EMAIL PROTECTED]> wrote: > So I have admin functions in my controller. I can change the layout used by > doing: > > $this->layout = 'admin'; > > But instead o

Re: how to use mysql specific function ?

2007-02-08 Thread Ámon Tamás
Luigi wrote: > Yes that's what I try first: > > $tests=$this->Resultat->findAll(null, > array('id', > 'IF ( message IS NULL , > NULL , 1)'), > null, >

RE: How to specify layout once

2007-02-08 Thread Mariano Iglesias
You could do so in beforeFilter() by previously checking which controller is being executed. Or better yet re-define beforeFilter() at the controller level, set the layout, and make sure you call parent::beforeFilter() -MI -

Re: More 1.2 validation

2007-02-08 Thread mcgordon
Good catch. I hadn't considered the default messages getting added to the array. Be careful of validateRequired calling validateNotEmpty. You'll want to add a check for that error message as well or you'll see both "field should not be empty" and "field is required" for the same field. --~--~--

Re: how to use mysql specific function ?

2007-02-08 Thread Luigi
Yes that's what I try first: $tests=$this->Resultat->findAll(null, array('id', 'IF ( message IS NULL , NULL , 1)'), null,

Re: Passing functions to views

2007-02-08 Thread Károly Kiripolszky
Writing a function in an existing file instead of creating another source file (and also a class) is more simple for me. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send

Re: Problems with generateList and selectTag ... generateList adding a "Where" clause that I don't want...

2007-02-08 Thread [EMAIL PROTECTED]
I agree, I'm not sure what it's doing either, it's a suggestion I found somewhere else yesterday (which obviously isn't doing anything...) In fact, even with the change you've suggested below, I'm still getting a message from the debug output that indicates. getList 1064: You have an error in yo

How to specify layout once

2007-02-08 Thread Mark Steudel
So I have admin functions in my controller. I can change the layout used by doing: $this->layout = 'admin'; But instead of adding that line in for each of my admin actions I was wondering if there was a way to do it just once. Mark --~--~-~--~~~---~--~~ You rec

Re: Routes, pages and controllers

2007-02-08 Thread [EMAIL PROTECTED]
Thanks, I will give it a try On 8 Feb, 11:31, "MrTufty" <[EMAIL PROTECTED]> wrote: > Ok... not sure of the exact syntax of this, but give this a try: > > $Route->connect('/members/:action', array('controller' => 'members')); > > You may also want to go a completely different way round the problem

Re: how to use mysql specific function ?

2007-02-08 Thread Ámon Tamás
[EMAIL PROTECTED] wrote: > Can you give me a litte bit more explaination on how to make it in the > model? Somethign like this a new function in the resultstat model: function sg() { return $this->findAll("a=b", "Resultat.id , IF ( Resultat.message IS NULL , NULL , 1)"); look the findAll in t

Re: More 1.2 validation

2007-02-08 Thread MrTufty
True, I'd not considered that part of the hackiness either. For now, I've gone ahead and done it. The solution isn't perfect - other tweaks will need to be made to the other functions in the Error helper, for instance - but it does appear to work. Here's my code: //error.php - modelErrors() fun

Re: More 1.2 validation

2007-02-08 Thread mcgordon
I totally agree that my solution is a hack. The deeper array would definitely be the way to go for multiple error mesages. The only reason I didnt suggest it is that the validationErrors array is part of the core model class and I dont want to play around with its structure in case it breaks othe

Re: More 1.2 validation

2007-02-08 Thread MrTufty
I'll take that as a challenge then :) The workaround would be quite effective, but not ideal as you say... One thing I considered, although it's probably not optimal, is to store the messages in another slightly deeper array. So when assigning the error messages, I'd use: $this->model->validat

Re: how to use mysql specific function ?

2007-02-08 Thread [EMAIL PROTECTED]
Can you give me a litte bit more explaination on how to make it in the model? thanks On 8 fév, 12:23, Ámon Tamás <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I'm trying to execute a query like this one : > > > SELECT Resultat.id , IF ( Resultat.message IS NULL , NULL , 1) > > FROM `

Re: More 1.2 validation

2007-02-08 Thread mcgordon
For multiple validation rules on the same field, each failure will overwrite the existing message with its own message, so in your case, for usernames, if your validation rules looked like this: 'username' => array( 'required' => array('message' =>'You must choose a username') ,'pattern'

Re: Passing functions to views

2007-02-08 Thread Ryan
Why not use a view helper for this instead? This is exactly what they are made for. Regards, Ryan Rose http://www.digiwize.com On Feb 8, 5:49 am, "Károly Kiripolszky" <[EMAIL PROTECTED]> wrote: > Hi ppl! > > I discovered that it is possible to pass functions defined in the > controller to the v

RE: Fatal Error

2007-02-08 Thread Mariano Iglesias
Care to share with the rest what the problem was and how you solve it? This way it'll be on Google Groups for whoever searches this problem in the future. -MI --- Remember, smart coders answer ten questions for every questi

Passing functions to views

2007-02-08 Thread Károly Kiripolszky
Hi ppl! I discovered that it is possible to pass functions defined in the controller to the view. However I must prefix the $this->set() statement with an @ symbol or else PHP claims that there's and undefined constant in the view at the line you try to call it. For example I define my title form

Re: Associations stored in a table?!

2007-02-08 Thread Max
I believe it will just increase complexity than being more flexible... However, I would like to know more about your example and why you need to do this ? On Feb 8, 1:53 am, "Hawk|" <[EMAIL PROTECTED]> wrote: > Hi, > > i wonder if it would be possible to store the associations in a table > inst

Re: Route problem

2007-02-08 Thread Max
I am looking for the same solution.. On Feb 8, 12:38 am, Ámon Tamás <[EMAIL PROTECTED]> wrote: > Hello, > > I have a site with cake with normal routing (like /controller/action/). > And I like to make it multilingual. I wondering to change every link to > /lngcode/controller/action, where is lngc

Re: Fatal Error

2007-02-08 Thread zafoeta
Hi all, thanks a lot to all!!! At the end i was able to set it up. Great help. walter. --~--~-~--~~~---~--~~ 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.c

Re: More 1.2 validation

2007-02-08 Thread MrTufty
Excellent! Thank you Marcel, you've been a star; my code now works as expected and I can get on with developing the other parts of my system now. I second the call that this level of functionality should be added to the core - it's so useful. Potentially in time the current validation class might

Re: More 1.2 validation

2007-02-08 Thread mcgordon
contentTag is deprecated in 1.1 and they've taken it out of 1.2 altogether. Just stick straight HTML in your helper. This is what my modelErrors function looks like: function modelErrors() { $html =& new HtmlHelper; $models = func_get_args(); $list = ''; foreach

Re: Routes, pages and controllers

2007-02-08 Thread MrTufty
Ok... not sure of the exact syntax of this, but give this a try: $Route->connect('/members/:action', array('controller' => 'members')); You may also want to go a completely different way round the problem. For a couple of sites I've developed with Cake so far, I've used the following syntax (act

Re: how to use mysql specific function ?

2007-02-08 Thread Ámon Tamás
[EMAIL PROTECTED] wrote: > I'm trying to execute a query like this one : > > SELECT Resultat.id , IF ( Resultat.message IS NULL , NULL , 1) > FROM `resultats` AS `Resultat` > WHERE ... > > or > > SELECT Resultat.id , LENGTH(Resultat.message) > FROM `resultats` AS `Resultat` > WHERE ... > > and

Re: More 1.2 validation

2007-02-08 Thread MrTufty
Thanks again :) I'm still having a few problems, the ErrorHelper provided uses a method of the HTML Helper which doesn't appear to exist - it outputs by using $html->contentTag(), which doesn't work. I've looked through the HTML Helper itself and it seems to be using output in the format of $this

Re: Routes, pages and controllers

2007-02-08 Thread [EMAIL PROTECTED]
Hi Thanks for your reply. I did actually try that, and it worked for the specified controller action, but then it didn't work for other actions. For example, site.com/members would go to the members index action, but site.com/members/manage would look for a page called manage that was a subpage o

Re: More 1.2 validation

2007-02-08 Thread mcgordon
The problem is in the class name "Validation" which is the same as the core class name. If you rename it the conflict goes away. You've got to change two things in the code, first the name of the class in the class definition (file validation.php). The author's name is Evan so I renamed his cla

how to use mysql specific function ?

2007-02-08 Thread [EMAIL PROTECTED]
I'm trying to execute a query like this one : SELECT Resultat.id , IF ( Resultat.message IS NULL , NULL , 1) FROM `resultats` AS `Resultat` WHERE ... or SELECT Resultat.id , LENGTH(Resultat.message) FROM `resultats` AS `Resultat` WHERE ... and to return the result as Array of records I know t

  1   2   >