Re: Adding new model

2006-07-25 Thread D Smith
Thanks for the help :) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED]

Re: saving hasAndBelongsToMany - what´s wrong?

2006-07-25 Thread felle42
Thanks ralph! I made a ticket for it on Trac! Hope they take it. greets felle42 --~--~-~--~~~---~--~~ 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 un

Help with URL logic and routes

2006-07-25 Thread Joe Theory
I understand that this topic has been talked about before but i havent yet seen any thread that made me understand clearly how to accomplish what i wish. let me explain briefly: i am designing some blog software for users of my companies services. i am unable to use subdomains so i was looking t

how to refresh a page or image

2006-07-25 Thread deepa
Hi I have created a page to randomly generate images with words. Once the words from the image are entered, it is validated. If the entered word doesnot match with the word in the image, i am displaying a 'not correct' message through flash as $this->flash("Not correct",'/post/image'); to redir

Re: Regular scriptaculous effects

2006-07-25 Thread Armando Sosa
I have a post on my blog about using event selectors with Cake. It's pretty easy and unobtrusive. http://www.nolimit-studio.com/baking/2006/07/19/unobtrusive-javascript-has-never-been-easier-than-now/ On 7/25/06, 379 the manifesto <[EMAIL PROTECTED]> wrote: > > I would like to use some of Script

Re: saving hasAndBelongsToMany - what´s wrong?

2006-07-25 Thread [EMAIL PROTECTED]
Thank you. Your patch seems to have resolved my problem, though I do need more time to be certain. As I mentioned, I'm not in a position to evaluate your code, and I would appreciate if others would comment on it directly. From my point of view it seems like a good piece of detective work and re-

Re: Updating CakePHP breaks app because of new validates() method

2006-07-25 Thread henthoca
stephenrs wrote: > This is still rumbling around in my head, and one other thing that > would help me understand what's going on is if someone could tell me if > a bug was introduced between the two versions I mentioned, or if the > 1.1.5.3148 version of validates() is exhibiting the intended beha

Re: cake_1.1.6.3264 fix for the testing suite

2006-07-25 Thread Grant Cox
Any bug fixes should be submitted to trac ( https://trac.cakephp.org/ ). However, q question mark indicates this must be the first url parameter, whereas the original ampersand is for any consecutive url parameters. As such, have you tested whether this works when using Cake pretty urls (rather

Re: associations: modeling one to zero-or-one relationship

2006-07-25 Thread David Mintz
I think you must be absolutely right, this makes perfect sense. I look forward to going back to work tomorrow morning so I can try it out! (-: It's obviously, it's simple -- no wonder I couldn't quite understand it. Thanks.On 7/25/06, Grant Cox <[EMAIL PROTECTED]> wrote: I think you are just gett

Re: Where is latest dbo_oracle ?

2006-07-25 Thread pat
no probs, will. do. BTW, I have gone on IRC before but I must be in the wrong time zone (Australia) as it was a ghost town.. :-/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this gro

Re: associations: modeling one to zero-or-one relationship

2006-07-25 Thread Grant Cox
Actually, I should explain why this is actually correct syntax, regardless of what pre-conceived ideas we have from the English meaning of those terms. In this case, your user model does not explicitly define the role, the role defines which user. As such, the role is a child of a user, so the R

Re: associations: modeling one to zero-or-one relationship

2006-07-25 Thread Grant Cox
I think you are just getting confused by the English meanings for "hasOne" and "belongsTo" and so on - I have done the same many times. I have been told on IRC that these names are actually correct for the associations they represent, so I guess we just have to modify our thinking :P A hasOne B

Re: any way to do a VALID_NOT_NULL validator?

2006-07-25 Thread Grant Cox
Not with the standard cake validation methods - as these are not executed for fields that are not set. There have been some comments on trac about this so I'm not sure if it is to be changed in future versions, but for the moment you will need to implement your own validation methods. See the Mo

Validate fields not in the database

2006-07-25 Thread Devo
I'm working my way toward Advanced Validation Errors, but am struggling with simple validation for fields that do no exist in my database. My Cake instance first checks to see if a user has access to the site by checking the database for the user (passwords are not kept here), thereafter checking

How to execute "right join" queries in cake?

2006-07-25 Thread Daniel King
for example: SELECT A.*,count(case when B.id is NULL then NULL else 1 end) as num FROM B right join A on B.a_id=A.id group by A.id I know i can use $model->execute($sql). Is there any other ways, like "left join" can use $belongsTo? --~--~-~--~~~---~--~~ You rece

Regular scriptaculous effects

2006-07-25 Thread 379 the manifesto
I would like to use some of Scriptaculous' effects to hide and show a couple of divs. In non cakephp Apps I would use Event selectors to fire Scriptaculous effects and Prototype Ajax calls. Is it possible to use this sort of approach (event selectors) with cake? Or if anyone could point me at

Application global vars

2006-07-25 Thread 379 the manifesto
Using AppController, is it possible to make certain variables available in all views please? I would like to use a session stored Username on various pages --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake

Re: Help with Deletes

2006-07-25 Thread Rafafa
Hello. I started a similar topic at http://groups.google.com/group/cake-php/browse_thread/thread/5cd53258... With a possible fix. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this gro

Re: Help with Deletes

2006-07-25 Thread Rafafa
Hello. I started a similar topic at http://groups.google.com/group/cake-php/browse_thread/thread/5cd53258... With a possible fix. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this gro

Re: Help with Deletes

2006-07-25 Thread Rafafa
Hello. I started a similar topic at http://groups.google.com/group/cake-php/browse_thread/thread/5cd53258... With a possible fix. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this gro

Re: Delete, hasOne and dependent

2006-07-25 Thread Rafafa
Hello. I started a similar topic at http://groups.google.com/group/cake-php/browse_thread/thread/5cd53258c2af1959 With a possible fix. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to thi

Re: Where is latest dbo_oracle ?

2006-07-25 Thread gwoo
Pat- Nice. Yeah, check out dbo_mysql and see if you can make oracle do the same things. Jump on IRC if you are get stuck . good luck. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to t

Issue with InnoDB tables and cascade deletes. Opinions wanted

2006-07-25 Thread Rafafa
Hello. I am going to ilustrate my point with an example. I have these tables: ## # BEGIN SQL STATEMENTS ## CREATE TABLE `imagenes` ( `id` int(10) unsigned NOT NULL auto_increment, `nombre` tinytext collate utf8_spanish_ci NOT NULL, `ruta` tin

Re: Where is latest dbo_oracle ?

2006-07-25 Thread pat
Strange, 'cause it was really broken, missing escaping of quotes in a few places. Anyway, I _really_ need to get oracle working so I'm happy to do whatever to get it working. I have worked on Oracle for few years so I am quite familiar with it. Where would I see how the dbo_* drivers should be s

Re: FCK eventually sorted out - For AD7Six (and those interested)

2006-07-25 Thread Olivier Percebois-Garve
Hi langdon it should work. Maybe you are being tricked by the iframe ? Langdon Stevenson wrote: Hi Nate Even if you don't use Cake conventions for the textarea field, the data will still show up in $this->params['form'] in the controller. Sorry, I wasn't clear. The

Re: associations: modeling one to zero-or-one relationship

2006-07-25 Thread vtbludgeon
[EMAIL PROTECTED] wrote: > I guess my next question would be: can you somehow consolidate all of > the various jobs into a single 'Job' model? In otherwords, is there > anything so unique about each job that you couldn't represent each job > with the same model? If this is the case, you could si

Did someone already implement the caketimer ?

2006-07-25 Thread francky06l
Hello, I am trying to implement the caketimer in my app ... Well quite a lot of problems, seems a conflict beetween prototype.js and Yahoo.js .. I have an ajax view (mean it updates an ajax view), I have set the timer, the cgi ..and when it loads I get "caketimer" not defined ... I have chan

Re: associations: modeling one to zero-or-one relationship

2006-07-25 Thread [EMAIL PROTECTED]
I guess my next question would be: can you somehow consolidate all of the various jobs into a single 'Job' model? In otherwords, is there anything so unique about each job that you couldn't represent each job with the same model? If this is the case, you could simply give Person a job_id, and th

Re: associations: modeling one to zero-or-one relationship

2006-07-25 Thread vtbludgeon
[EMAIL PROTECTED] wrote: > I'm not sure what's wrong with using $hasOne in the Judge model. If a > Judge MUST be linked to a specific person, and only one person, $hasOne > seems to be the way to do it. I actually tried that, i.e., added a $hasOne = 'person' to my Judge model. Then I defined an

Re: Associating two models multiple ways

2006-07-25 Thread [EMAIL PROTECTED]
You didn't really explain what you meant by "not working" :) Does it mean you get some sort of error when the code runs? Does it return the wrong results? The PHP function print_r is a great way to figure out what went wrong, when you aren't getting the results you're expecting. One thing that

Re: associations: modeling one to zero-or-one relationship

2006-07-25 Thread [EMAIL PROTECTED]
I'm not sure what's wrong with using $hasOne in the Judge model. If a Judge MUST be linked to a specific person, and only one person, $hasOne seems to be the way to do it. Is your concern that a Person might not have an associated Judge model (e.g, they have a different job)? --~--~-~-

any way to do a VALID_NOT_NULL validator?

2006-07-25 Thread thompsa6
Has anyone had any luck implementing a VALID_NOT_NULL validator for cakePHP models? -Adam --~--~-~--~~~---~--~~ 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

associations: modeling one to zero-or-one relationship

2006-07-25 Thread [EMAIL PROTECTED]
Greetings I am starting over with a complex project using Cake. In my database I have a `people` table that has been hitherto represented by an abstract class. Another class called 'Judge' extends Person. The underlying tables look like this, abbreviated for brevity's sake: CREATE TABLE 'peopl

Re: Missing Table

2006-07-25 Thread [EMAIL PROTECTED]
According to the Wiki, that is correct (using the $useTable var): http://wiki.cakephp.org/docs:var:usetable Just out of curiosity, if you DO name a table 'funcionarios' (e.g, the default behavior), do you still get that error? --~--~-~--~~~---~--~~ You received t

Re: Missing Table

2006-07-25 Thread [EMAIL PROTECTED]
According to the Wiki, that is correct (using the $useTable var): http://wiki.cakephp.org/docs:var:usetable Just out of curiosity, if you DO name a table 'funcionarios' (e.g, the default behavior), do you still get that error? --~--~-~--~~~---~--~~ You received t

cake_1.1.6.3264 fix for the testing suite

2006-07-25 Thread thompsa6
All, I uncovered the following error/fix using the integrated SimpleTest suite from the cake svn repository and I thought I would share. In app/tests/tests.php : (error) line:218 App Test Groups || App Test Cases (fix) line:218App Test Groups ||

Re: Eclipse and CakePHP

2006-07-25 Thread Mika
One way to add the .chm file is as an external tool. --~--~-~--~~~---~--~~ 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, s

Seeking CakePHP/CSS/JS Programmer

2006-07-25 Thread HershelSR
A company I represent is seeking freelance CakePHP/CSS/JS programmers. The position entails: - A six month commitment to at least 35 hours of work per week, up to as many as you are able to work - Remuneration between $25-$35 an hour - Telecommute freelance work The project itself is a rebuil

Missing Table

2006-07-25 Thread ivan
Hi everyone, I have this model class: array('foreignKey' => 'CRGO_ID'), 'FuncionarioArea' => array('foreignKey' => 'FNAR_ID')); var $hasMany = array( 'Cliente' => array('foreignKey' => 'FNCN_ID')

Re: $this->autoRender = false; normal behavior ?

2006-07-25 Thread francky06l
I was thinking this was normal in fact. The trick is that the initial page is "Ajax" and I want to return some "div". The problem is that because the initial request is not Ajax (can't be with file upload), Cake will render an HTML view that will screw up the initial page I want to keep .. DO not

Eclipse and CakePHP

2006-07-25 Thread LikeSoy
I heart CakePHP and Eclipse almost equally, and I want to make them best friends. I've looked everywhere (okay, 10 mins on Google) for how to do the following in Eclipse: * Add code templates (and implement them, for that matter) * Add the .chm help file (for the CakePHP API) If anyone has any

Cake from command line

2006-07-25 Thread Repsah
A few time ago I was faced with the need to use cake controllers actions from command line.. a.k.a. calling a controller action from a script outside cake.Very useful (to me) if I need to run jobs at cron which interact with my application without having to write a complete separate application whi

Re: how to retrieve (extra) column in habtm 'link table' ?

2006-07-25 Thread nate
This isn't currently supported per-se, but it is a feature we're working on for 1.2. What you can do in the meantime is create another model for your join table, and use recursive associations to fetch the data beneath the join model. --~--~-~--~~~---~--~~ You re

Re: $this->autoRender = false; normal behavior ?

2006-07-25 Thread John David Anderson (_psychic_)
On Jul 25, 2006, at 10:41 AM, francky06l wrote: > > Hello, > > I just need to know if the following is normal : > > I have view, in which I submit a form and into the controller method I > do : > > $this->autoRender = false; > > When I submit that form, I have another tab opening, blank no data

$this->autoRender = false; normal behavior ?

2006-07-25 Thread francky06l
Hello, I just need to know if the following is normal : I have view, in which I submit a form and into the controller method I do : $this->autoRender = false; When I submit that form, I have another tab opening, blank no data (on Firefox)..Is it the normal behavior, shouldn't I expect just to

Associating two models multiple ways

2006-07-25 Thread Brandon
Hey guys, I'm currently working on converting one of my websites to Cake...and I'm loving it. I've run into one issue that is probably my fault for misunderstanding association declarations. My site has pages (duh!) and each page belongs to a menu. In my menu model, I declare one page as the m

Re: Using JpGraph with CakePHP

2006-07-25 Thread Samuel DeVore
I know one person a few months ago was using it and put it into the vendor directory, then called it from actions in their controller. One issue that they did have was that the encoding was not uniform on the jpgraph php files and that caused some rendering issues. You might search the group for

Using JpGraph with CakePHP

2006-07-25 Thread Marcus
Hi there, I'm wondering if anyone is using the JpGraph library[1] with CakePHP. What is the best way to do this? Cheers, Marcus [1] http://www.aditus.nu/jpgraph/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "C

Re: Session doesn't carry across subdomain

2006-07-25 Thread Clayton Smith
Maybe you could try what is posted here? https://trac.cakephp.org/ticket/830 Clayton brandags wrote: > Hello, > > I have a website where each user gets their own subdomain > (http://whatever.domain.com). > They login from the main site (www.domain.com), but once they login, it > redirects them t

Upload file with Ajax

2006-07-25 Thread francky06l
Hello I am trying to upload some file using Ajax, actually I use en IFRAME .. I do not want, for now, to implement a sophisticated ajax "monitoring" mecanisme .. What is the simple method to have it basically working, would be great with samples .. Actually when I upload using an IFRAME, I have

Session doesn't carry across subdomain

2006-07-25 Thread brandags
Hello, I have a website where each user gets their own subdomain (http://whatever.domain.com). They login from the main site (www.domain.com), but once they login, it redirects them to their subdomain so it looks like their editing their content on their own domain. However, when I redirect them

how to retrieve (extra) column in habtm 'link table' ?

2006-07-25 Thread loonatic
Hello bakers, I have a table linking two other tables. To stay in phpcake examples parlance it looks like this: (my situation is different, i'm just trying to keep it simple & short enough to post) CREATE TABLE posts_authors ( type INTEGER DEFAULT 0, post_id INTEGER REFERENCES

Re: Noob & generateList() ...

2006-07-25 Thread Visor57
Thanx :) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more opti

Re: Form data and Models

2006-07-25 Thread nate
Most form data that comes from elements created with HtmlHelper or FormHelper are available in the Controller in $this->data. Everything else is in $this->params['form']. As far as validation, if you're calling $Model->save($this->data), then $this->data should be available in the model. Otherw

Re: how to use day/month/yearOptionTag(s)

2006-07-25 Thread nate
You're looking for this: http://api.cakephp.org/class_html_helper.html#e4a235601c80c201549a9fb0b364cfe4 --~--~-~--~~~---~--~~ 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

Re: Updating CakePHP breaks app because of new validates() method

2006-07-25 Thread nate
In terms of order-of-operations, save() fires validate(), which fires beforeValidate(). Assuming those calls succeed, beforeSave is fired, and then the data is saved. In your example above, since you have no parameters going to validates(), and the model data is not being set before the validate

Re: saving hasAndBelongsToMany - what´s wrong?

2006-07-25 Thread [EMAIL PROTECTED]
I have also seen this kind of reshuffling, and was just in the process of trying to understand why it was taking place. I'm just a beginner with Cake, and haven't delved into the source code (yet?), but I'm going to try your patch just to see whether it gets rid of the very similar problem I've be

Re: onBeforeFilter in AppController

2006-07-25 Thread nate
Are you sure you didn't mean beforeFilter( ) ? --~--~-~--~~~---~--~~ 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 em

Re: Noob & generateList() ...

2006-07-25 Thread nate
Well, understanding is easier when you use real names instead of abstract ones ;-) How about "Post hasMany Comment," rather than "MyModel hasMany SomeModel". The hasMany/belongsTo relationships are the most common, and probably the easiest to understand. When we establish the relationship above

Re: Where is latest dbo_oracle ?

2006-07-25 Thread nate
Oracle isn't officially supported right now, but we're working on it. That code in CakeBin isn't really structured according to how a Cake driver should be, and it was written a few versions ago. Therefore it's possible that a change in one of the revisions broke it. --~--~-~--~~---

how to use day/month/yearOptionTag(s)

2006-07-25 Thread Jon Bennett
Hi, I've followed the manual instructions on using dayOptionTag etc to create dates, I've got this working fine when adding new records, but I don't appear to be able to get the same fields to display the date when editing a record, my code is as follows: dayOptionTag('News/release_date', null,

Form data and Models

2006-07-25 Thread gopher
I was going to perform my validation for file input fields in beforeValidate(), however $this->data doesn't seem to be available in the Model. What's the correct way to perform custom validation and what is the array that contains all the form data called? Thanks! --~--~-~--~~--

Re: Noob & generateList() ...

2006-07-25 Thread Visor57
[fixed a typo in prev reply...] Ok, for all the noobs out there (like me at the moment!) this is one way to make it work... In your model, you need to specify the association between the models: (in MyModel) class MyModel extends AppModel { var $name = 'MyModel; var $hasMany = '

Re: Noob & generateList() ...

2006-07-25 Thread Visor57
Ok, for all the noobs out there (like me at the moment!) this is one way to make it work... In your model, you need to specify the association between the models: (in MyModel) class MyModel extends AppModel { var $name = 'MyModel; var $hasMany = 'SomeModel'; } (in MyModelControl

how to store multiple values checked in checkbox

2006-07-25 Thread [EMAIL PROTECTED]
Hi, I have a table in which there are multiple records with each having checkboxes.i want when one or more records are chekced ,they should be deleted.I used the following function in my view file:- $html->checkbox('Employee/Emp',null,array('name'=>'ch','unchecked'=>'checked','value'=>"'".$arr_em

Free Online Ajax Couse and Discussion Forum

2006-07-25 Thread Michael Sync
Hi All,Here is the free online couse for those who interest abt Ajax. and If you have any question, please register in our Forum (" http://theajaxworkshop.com/forums ") to ask any question related to Ajax...    10-Week Free AJAX Programming (with Passion!) Online Course Start Date: The 1

Noob & generateList() ...

2006-07-25 Thread Visor57
Someone please check my logic, because this doesn't work as expected from reading the manual... I have a model and its associated controller: MyModel, MyModelsController. I want to populate a variable, myVariable, in MyModelsController with data from another model called SomeModel using the gener

Free Online Ajax Couse and Discussion Forum

2006-07-25 Thread Michael Sync
Hi All,Here is the free online couse for those who interest abt Ajax. and If you have any question, please register in our Forum (" http://theajaxworkshop.com/forums ") to ask any question related to Ajax...    10-Week Free AJAX Programming (with Passion!) Online Course Start Date: The 1st

Re: saving hasAndBelongsToMany - what´s wrong?

2006-07-25 Thread felle42
ok, I found it! the __saveMulti -method in the model class shuffels the $key=>$value association of the given data if there are some keys of the dependent model not given! This is because __saveMulti expects to be given all dependent-keys for that model. But if we have a 0:n-relationship it migh

to avoid mails becoming spam

2006-07-25 Thread bidhu
when i sent mail using phpmailer it is going to spam. i want that go to inbox. If the from address is any popular ids like yahoo or gmail it will go to spam. if it is from ids that are not popular going to inbox. Is it because the spam score becoming high? If so how can we reduce that value --~

refresh image

2006-07-25 Thread deepa
Hi I have created a page to randomly generate images with words. Once the words from the image are entered, it is validated. If the entered word doesnot match with the word in the image, i am displaying a 'not correct' message through flash as $this->flash("Not correct",'/post/image'); to redire

Where is latest dbo_oracle ?

2006-07-25 Thread pat
I downloaded the code from "bin of code" and it doesn't even compile... Anyone else have any tips on getting cakePHP working with Oracle? ta, pat. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group.