Ideas about models and associations

2008-09-16 Thread Günther Theilen
Hi! I'm working on a new project and right now I'm struggling a bit to put the requirements together in a proper cake-like way. I use Auth/ACL which is set up and works fine. The users who can log-in belong to three different groups. These groups are defined by a field "role_id" in the user t

problem in cakephp style

2008-09-16 Thread wael altahawi
hi 1) i have installed AppServ 2.5.10: Apache 2.2.8 PHP 5.2.6 MySQL 5.0.51b phpMyAdmin-2.10.3 2) under httpd.conf file i enabled (LoadModule:rewrite_module libexec/mod_rewrite.so) 3) i checked .htaccess override it's ok: Options Indexes MultiViews AllowOverride All Order allow,den

Re: kiosk using cakePhp framework

2008-09-16 Thread Dr. Tarique Sani
On Tue, Sep 16, 2008 at 6:26 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > hi > I am software developer, I want to build a online shopping system for > a kiosk enviornment .So,changes of any configaration is needed?please > advise me. If the kiosk is configured properly then all the touc

Retrieve data with child in index page

2008-09-16 Thread M
I'm using cake1.2 rc2. I have a table called A and A has one or many children in table B or C. So B and C both have foreign key, A_id. And A only has children in either B or C (can't have in both). I want to create an index page that show A has children in B and an index page that show A has chi

Re: Remove password hashing in AuthComponent

2008-09-16 Thread Reggie Mason
Mark, The AuthComponent has an authenticate member. If you set this member to an object with a hashPasswords method, it will be used instead of the default behavior of the AuthComponent. One thing that a.php.programmer left off is to set this member in your app_controller. Here is an example i

Re: Remove password hashing in AuthComponent

2008-09-16 Thread a.php.programmer
cake have a hook method: hashPasswords name]['password'])) { $data[$this->name]['password'] = md5($data[$this->name] ['password']); } return $data; } } ?> On Sep 17, 6:43 am, mark <[EMAIL PROTECTED]> wrote: > I looked around for a solution to removing password ha

localization

2008-09-16 Thread cem
Hi ; I am reading the localization article in the cakePHP . And in that article it says that I have to include the uses('L10n'); in the controllers I want to use . But I want to change the validation errors in the models and some messages in the views what should I do ? The second question abo

Re: Unsigned Integers??

2008-09-16 Thread Nate
On Sep 13, 11:47 pm, Brenton B <[EMAIL PROTECTED]> wrote: > > I'll chalk this up to storage-type dependency ... (ex: MySQL can do > unsigned ints, but others can't) ... Yeah, that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Got Error when try the tutorial of "The CakePHP Blog Tutorial with SMARTY"

2008-09-16 Thread Steven
Hi, I just got an error when try the tutorial of "The CakePHP Blog Tutorial with SMARTY". Tutorial link: http://bakery.cakephp.org/articles/view/the-cakephp-blog-tutorial-with-smarty I think I have followed the instructions exactly as what the tutorial said, but still comes up with the followin

Re: Unsigned Integers??

2008-09-16 Thread villas
Hi, I think only the dev team can explain exactly why Cake is the way it is. However, I thought that you'd probably answered your own question :-) Many of us do not use MySql and we are delighted that so much effort is being made to develop Cake in a DB-agnostic way. The idea is that Cake devel

Remove password hashing in AuthComponent

2008-09-16 Thread mark
I looked around for a solution to removing password hashing in AuthComponent, and the closest thing I found was to overwrite the password method. It explained it in the section of the manual where it talks about changing the hashing type. http://manual.cakephp.org/view/566/Changing-Encryption-Typ

soap with attachment which datatype to use?

2008-09-16 Thread .
how would i do soap attachments? Would I use type binary => xsd:base64binary for an attachment? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@go

Re: Unsigned Integers??

2008-09-16 Thread Brenton B
Really, no one knows? For serious? On Sep 13, 9:47 pm, Brenton B <[EMAIL PROTECTED]> wrote: > So, in MySQL I can create a table with a field that has type integer > with unsigned integer, which as we all know will define the length to > 10 and doubles the maximum possible value. > So why doesn't

Accessing MySQL default values

2008-09-16 Thread John Jackson
Is it possible to get and set default values for MySQL columns in CakePHP? I am wondering if it would be a good idea to use MySQL default values to set the default configurations for table data. For example, I have column quota in table users. Instead of storing the default quota limit in a separ

Re: how to unit test a shell script

2008-09-16 Thread mark_story
Jeurgen, Testing shell classes is a bit tricky right now App::import() currently does not let you target shells so you have to include them regular php style. We are working on ways of improving this though, as testing shells is a big pain right now. -Mark On Sep 16, 9:45 am, JuergenRiemer <[E

Unexpected behavior during unit testing.

2008-09-16 Thread wyrdvans
While writing some unit tests for my app I noticed some behavior that has me a little confused in regards to the setUp and tearDown functions. When doing unit testing with just SimpleTest, the setUp and tearDown functions are the first and last methods to run when a test method is executed. This

Re: Find using dates producing incorrect query

2008-09-16 Thread Kunyo
try $date,'DATE(Post.date) <'=>$end_date))); On Sep 16, 7:22 pm, Benster <[EMAIL PROTECTED]> wrote: > Hi All, > > Newb question... > > Im having problems with a "find" command which searches all records > whose date fields match the range between $date and $end_date as > follows: > > return $this

Re: Find using dates producing incorrect query

2008-09-16 Thread Kunyo
try $date,'DATE(Post.date) <'=>$end_date))); On Sep 16, 7:22 pm, Benster <[EMAIL PROTECTED]> wrote: > Hi All, > > Newb question... > > Im having problems with a "find" command which searches all records > whose date fields match the range between $date and $end_date as > follows: > > return $this

Re: Missing Database Table

2008-09-16 Thread Bernhard J. M. Grün
Hi! This seems to be an ACL table. I think there was a call like "cake acl something" to generate that tables. HTH Bernhard 2008/9/16 [EMAIL PROTECTED] <[EMAIL PROTECTED]> > > Whenever I am oh so sure I have everything setup but I still get > strange errors like this it is always one thing...

mssql problem

2008-09-16 Thread Matt
I'm also having this problem, did you figure it out? --~--~-~--~~~---~--~~ 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, sen

Find using dates producing incorrect query

2008-09-16 Thread Benster
Hi All, Newb question... Im having problems with a "find" command which searches all records whose date fields match the range between $date and $end_date as follows: return $this- >find('all',array('conditions'=>array('DATE(Post.date)'=>'>'. $date,'DATE(Post.date)'=>'<'.$end_date))); The stra

Re: Form data from a view element

2008-09-16 Thread Daniel
I created the form using the line: $form->create('Comment', array('action' => 'add')); Doesn't this specify that it should use the controller associated with the "Comment" model, i.e. the Comments controller? This is how I've done it with all of my other forms... And yes, I realize the table ba

ajax not working when debug=0

2008-09-16 Thread scrapmetal
I have an app that works fine with debug=2, but I get 404 errors when i set debug=0 The message I get is "the requested location /urls/getTemplateData/2 does not exist on this server" On the server side I have the following code in url_templates_controller: function getTemplateData($id) {

Re: ajax editor

2008-09-16 Thread sfmerv
SOLVED! it turns out that you can not have any spaces in the code if you want it to choose a input type=text instead of a textarea. So if your code looks like this Titile txt here you will get a text area if it is this Titile txt here you should get a input type=text area instead. On Sep 15

Re: Websites Using CakePHP

2008-09-16 Thread taokodr
Excellent! Thank you very much, John! Regards, Mike > http://book.cakephp.org/view/510/Sites-in-the-wild > > -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send emai

Re: Best way to validate dates to prevent future dating

2008-09-16 Thread LunarDraco
Here is a sample that I use, Its not exactly what your looking for, but a little tweaking will get you where you need to be: var $validate = array( 'expires' => array('rule'=>array('date','mdy'),'rule'=>array('validateFutureDate'),'on'=>'create') ); function validateFutureDate($value

Re: changing data in the hasAndBelongsToMany tables

2008-09-16 Thread Dérico Filho
Just solved it: $this->Match->save( Array( "Match" => Array( "id" => $match_id ), "Person" => Array(

Re: Websites Using CakePHP

2008-09-16 Thread John David Anderson
On Sep 16, 2008, at 10:41 AM, taokodr wrote: > > Hi Gang! > > Out of curiosity, whatever happened to the area that had the large > list of sites using CakePHP? I keep finding references to this link > (http://groups.google.com/group/cake-php/web/cakephp-in-the-wild? > hl=en), but it goes to a sit

Websites Using CakePHP

2008-09-16 Thread taokodr
Hi Gang! Out of curiosity, whatever happened to the area that had the large list of sites using CakePHP? I keep finding references to this link (http://groups.google.com/group/cake-php/web/cakephp-in-the-wild? hl=en), but it goes to a site that says "You have to be a manager of this group to view

changing data in the hasAndBelongsToMany tables

2008-09-16 Thread Dérico Filho
Hi, I have two tables: matches people linked together by: matches_people Well, on the matches_people table there are other fields but match_id and person_id, for instance: role, a enum type field. The question is how do I save data into matches_people in way I can also update the role fi

Re: MAMP installation

2008-09-16 Thread abba bryant
Having just done this in the past 72 hours I can give one bit of advice. use 'port' => '/var/mysql/mysql.sock', in your db config, where the path points to the mysql socket you wish to use. I pointed it at the default mysql install instead of the MAMP one for example. ( Wh

Re: Form data from a view element

2008-09-16 Thread mark_story
On Sep 16, 9:11 am, Daniel <[EMAIL PROTECTED]> wrote: > Hello, > > I currently have a "comment box" view element that I plan to > embed in various places in my CakePHP application to allow users to > leave comments on various aspects of the site. > > I'm using the form helper inside of t

Re: Some Data Not Saving

2008-09-16 Thread Samuel DeVore
On Mon, Sep 15, 2008 at 5:49 PM, thatsgreat2345 <[EMAIL PROTECTED]> wrote: > > Well here is my problem , I am creating a simple sign up, haven't > added any validation yet but the sign up doesn't seem to want to work. > I set $this->data['User']['confirm_code'] as well as the level of the > user.

Re: Problem with hasAndBelongsToMany association

2008-09-16 Thread salgua1977
I've found the gap! I added in the contact model var $displayField = 'surname'; Thx On 16 Set, 16:26, salgua1977 <[EMAIL PROTECTED]> wrote: > Hi, > > I have an association "hasAndBelongsToMany" between 2 models. It > works, but when I add a related field in a form (example: I have a > form to

Problem with hasAndBelongsToMany association

2008-09-16 Thread salgua1977
Hi, I have an association "hasAndBelongsToMany" between 2 models. It works, but when I add a related field in a form (example: I have a form to add nations, there is an association between nation and contact model, and I want in the nation model a list field to select contacts), this field works,

Re: Handling your own model associations

2008-09-16 Thread mark_story
On Sep 16, 12:31 am, DanielMedia <[EMAIL PROTECTED]> wrote: > Hey all, > > I'm wondering if anyone out there has chosen to bypass Cake's > associations and use a more traditional approach. For example, if I > want to get all the comments in an article, I could write my own > method and call $this-

Re: Why is the Validation Filters Array Processed Backwards and Returns Conservatively?

2008-09-16 Thread BrendonKoz
So then, is there no way to have all errors be returned to the controller for displaying in the view? I've still yet to discover a way. On Sep 16, 6:32 am, grigri <[EMAIL PROTECTED]> wrote: > Interestingly, there's only one test case in the core that deals with > validation order, and it seems i

Re: Missing Database Table

2008-09-16 Thread [EMAIL PROTECTED]
Whenever I am oh so sure I have everything setup but I still get strange errors like this it is always one thing... cache. Empty out all the caches and refresh. Hopefully your table will be available again. On Sep 16, 8:35 am, simpleman996633 <[EMAIL PROTECTED]> wrote: > Hi all, > > After runni

how to unit test a shell script

2008-09-16 Thread JuergenRiemer
Hi, I do the following to unit test a shell script [ learn.test.php ] put in a folder "tests/cases/shells" (that I created) LearnShell = new LearnShell(); } function testOne(){ $this->LearnShell->testFunc(); } } ?> how ever it does not find the Class Lea

Re: Form data from a view element

2008-09-16 Thread David C. Zentgraf
It doesn't matter whether your form comes from an element or a view file, it's generating the same HTML in the end, so check that first. If the form/controller doesn't work it's not a problem of the element. I'd guess that one of your problems is that you want to redirect as the final action

Re: Auction software

2008-09-16 Thread [EMAIL PROTECTED]
It is not part of any api. It is an "automatic" behaviour. It is on line 317 http://api.cakephp.org/time_8php-source.html#l00317 If the date/time you provide is "greater than" the current time it is a future date and treated as such. But the name of the method does not really reflect this flexibi

Re: Auth Redirect Problems

2008-09-16 Thread luke BAKING barker
yeah Tony I am seeming to get this too :/ someone on IRC said to check that things like favicons are correctly being pointed at and so on. can anyone post a sample of some redirect Auth code? Luke On Sep 15, 5:21 pm, Tony Thomas <[EMAIL PROTECTED]> wrote: > I did that. Same problem. > > To expla

Form data from a view element

2008-09-16 Thread Daniel
Hello, I currently have a "comment box" view element that I plan to embed in various places in my CakePHP application to allow users to leave comments on various aspects of the site. I'm using the form helper inside of the element to generate the form to be used to submit the data, how

kiosk using cakePhp framework

2008-09-16 Thread [EMAIL PROTECTED]
hi I am software developer, I want to build a online shopping system for a kiosk enviornment .So,changes of any configaration is needed?please advise me. Apurba --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cak