Re: Cannot unset string offsets in helpers\ajax.php

2006-10-27 Thread Ismael S. Kafeltz

Did you try to figure out before open this topic?

look the documentation

submit ($title= 'Submit', $options=array())

look what have you done:

ajax->submit('Save', 'posts/update',array('update'=>'posts_list'));

3 params instead of 2 duh


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: installation problem

2006-10-27 Thread Hong

Hi Clark,

do you mean that i have to create a project directory and copy the
files there

but it also sound a little confusing for the cake_core_include_path

regards

Hong


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: ERROR On Update 2 Divs

2006-10-27 Thread Eric

Thanks...
Finally, I got it...
BUT I think the problems is VIEW code is wrong. The whole map about
views is recode.Like http://cakebaker.42dh.com/tags/ajax/  show me.

index.thtml
and also the update.thtml.

BTW, what do u mean by only involve the use of one view, not two?
and Include RequestHandler.?

Thanks


nate wrote:
> I don't think you understand how Ajax div's are supposed to work.  Try
> putting dynamic data in the div's instead of static.  Also, read over
> the examples again.  You'll notice that they only involve the use of
> one view, not two.  Also, make sure to include RequestHandler in the
> list of components in your controller.


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Why Ajax->div update 2 divs_No responding

2006-10-27 Thread Eric

Sorry for the duplicate post. I thought it was an error. Cause I havn't
see it update...



nate wrote:
> The 'bla' is the template.  It's for when you want to use a template
> that isn't named the same as your action name.
>
> @Ismael: refer to my comment on your duplicate post:
> http://groups.google.com/group/cake-php/browse_thread/thread/d4b43f8d7702ee4a/a249f23e462b756c#a249f23e462b756c


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: hasAndBelongsToMany, always bi-directional?

2006-10-27 Thread cherrio

@chris, yes it would, but that was what I was asking:)

@irfan baig, cheers for the definite reply, it is much appreciated, I
just wanted to be sure, thanks again:)



On Oct 27, 8:48 pm, "irfan baig" <[EMAIL PROTECTED]> wrote:
> Each User can have many Albums. Each Album can also have many Users
> ('owned' by many Users, in this case).
>
> It is always bi-directional.
>
> To be clearer, each User in your app is *associated* to more than one
> Album. Similarly, each Album is *associated* (through purchase for
> example) to more than one User.
>
> On 10/27/06, cherrio <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Thanks Kiper for the reply,
>
> > My post came out of reading the Models chapter, as it its example it
> > doesn't describe the reverse relation ship between Tags and Comments.
> > In the other example it does describe (ie. User hasMany Comments,
> > Coment belongsTo User).
>
> > I just want to be sure before continuing, any one else have any
> > thoughts?
>
> > Cheers,
> > Rob
>
> > On Oct 27, 10:32 am, "kiper" <[EMAIL PROTECTED]> wrote:
> > > IF I understand this right then you have to have HABTM on both Models
> > > as well as a third JOIN table in the database to make it work.
> > > Check this out for more info:
>
> > >http://manual.cakephp.org/chapter/models
>
> > > Read the paragraphs under the "Defining and Querying with
> > > hasAndBelongsToMany" heading...
> 
> > > Hope it will make it clearer to you!--
> Best,
> Irfan Baig


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: hasAndBelongsToMany, always bi-directional?

2006-10-27 Thread kiper

>From the Manual:
"The HABTM association is useful when you have two Models that are
linked together with a join table. The join table holds the individual
rows that are related to each other.

The difference between hasMany and hasAndBelongsToMany is that with
hasMany, the associated model is not shared. If a User hasMany
Comments, it is the *only* user associated to those comments. With
HABTM, the associated models are shared."

I'll admit that it could be explained a bit clearer but if you try to
digest what is being said then the only conclusion you (or at least I)
can come to is that a HABTM must be bi-directional (or could it be
multi-directional as well???:).

If you think about it logically you can't have only one
hasAndBelongsToMany since then it will in reality be a
hasMany/belongsTo relationship.

I hope I'm not too confusing here, I am trying to get a clear
understanding of this myself ;)


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Form Call?

2006-10-27 Thread Chris Hartjes

On 10/27/06, Russ <[EMAIL PROTECTED]> wrote:
>
> but what i want to do is have the form on domain1 call the form handler
> on domain2 to and remain on domain 2
>

/me takes a deep breath

Russ, that's exactly what I said.  Here it is in simple terms.

Form exists on domain1.com

So, you have this code here:



...


So, when the user submits they go to domain2.com/process.phpand
stays at domain2.com/process.php

Or am I missing something, because this looks like 'web forms 101' to me.

-- 
Chris Hartjes

"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Form Call?

2006-10-27 Thread Russ

but what i want to do is have the form on domain1 call the form handler
on domain2 to and remain on domain 2


this works below
if you set the action of your form to DOMAIN2, I don't see what you
won't return to DOMAIN2.


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: hasAndBelongsToMany, always bi-directional?

2006-10-27 Thread irfan baig

Each User can have many Albums. Each Album can also have many Users
('owned' by many Users, in this case).

It is always bi-directional.

To be clearer, each User in your app is *associated* to more than one
Album. Similarly, each Album is *associated* (through purchase for
example) to more than one User.


On 10/27/06, cherrio <[EMAIL PROTECTED]> wrote:
>
> Thanks Kiper for the reply,
>
> My post came out of reading the Models chapter, as it its example it
> doesn't describe the reverse relation ship between Tags and Comments.
> In the other example it does describe (ie. User hasMany Comments,
> Coment belongsTo User).
>
> I just want to be sure before continuing, any one else have any
> thoughts?
>
> Cheers,
> Rob
>
>
> On Oct 27, 10:32 am, "kiper" <[EMAIL PROTECTED]> wrote:
> > IF I understand this right then you have to have HABTM on both Models
> > as well as a third JOIN table in the database to make it work.
> > Check this out for more info:
> >
> > http://manual.cakephp.org/chapter/models
> >
> > Read the paragraphs under the "Defining and Querying with
> > hasAndBelongsToMany" heading...
> >
> > Hope it will make it clearer to you!
>
>
> >
>


-- 
Best,
Irfan Baig

--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: hasAndBelongsToMany, always bi-directional?

2006-10-27 Thread Chris Hartjes

On 10/27/06, cherrio <[EMAIL PROTECTED]> wrote:
>
> would there ever be a circumstance where HABTM association isn't
> bi-directional? If so, any example?
>
> Cheers,
> Rob

Wouldn't that be hasMany or belongsTo then? ;)

-- 
Chris Hartjes

"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: hasAndBelongsToMany, always bi-directional?

2006-10-27 Thread cherrio

would there ever be a circumstance where HABTM association isn't
bi-directional? If so, any example?

Cheers,
Rob


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



JOBS: cakephp developer needed for multiple projects on an hourly basis

2006-10-27 Thread Brian French

Note:
i found the jobs posting space provided by cakebaker 
(http://cakebaker.42dh.com/jobs) but it doesn't seem like it gets a lot 
of views, nor did i see any jobs listed, so i'm sorry if this is the 
wrong place to post this, but it seems like the best place to get viewed.

Job info:

We are looking for a CakePHP developer for multiple projects we have. 
Some are projects from scratch and some are projects that need to be 
rewritten from scratch. I am currently the only developer for our 
growing company and as such, i need some help.

The details:
- Pay based on an houlry rate. Please provide your hourly rate.
- At least a 35 hours per week commitment.
- Please provide examples of work you have done using CakePHP.
- Please provide a resume.

If you are interested, please email me directly and i can provide more 
details.
bfrench - at - imageworksstudio - dot - com

Brian French

PS: it would be nice to have an actual application for jobs/positions 
related to CakePHP maybe something like jobs.cakephp.org or something.

--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Ajax submission of form affecting navigation of browser

2006-10-27 Thread Brian French

This is how i do my cakephp ajax forms:


... form data here ...

submit('Save', array('url' =>
'/clients/edit/','update' => 'main','loading'=>'showSaving();')); ?>



hope this can help a little bit.


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Form Call?

2006-10-27 Thread Chris Hartjes

On 10/27/06, Russ <[EMAIL PROTECTED]> wrote:
>
> Im trying to Put the login form in DOMAIN1, and POST data to DOMAIN2
> and return to
> DOMAIN2
>
>

Okay, so maybe some basic PHP form processing help is needed here.

if you set the action of your form to DOMAIN2, I don't see what you
won't return to DOMAIN2.

Or, if you're trying to go from DOMAIN1 (where the form is) to DOMAIN2
(where the form processing happens) and back to DOMAIN1, then all you
need to do is execute a header redirect at the end of the script on
DOMAIN2 that takes you back to DOMAIN1.

If you don't know what a 'header redirect'  or how to do it with PHP,
then I suggest you look it up on google.

-- 
Chris Hartjes

"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Why Ajax->div update 2 divs_No responding

2006-10-27 Thread nate

The 'bla' is the template.  It's for when you want to use a template
that isn't named the same as your action name.

@Ismael: refer to my comment on your duplicate post:
http://groups.google.com/group/cake-php/browse_thread/thread/d4b43f8d7702ee4a/a249f23e462b756c#a249f23e462b756c


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Form Call?

2006-10-27 Thread Russ

Im trying to Put the login form in DOMAIN1, and POST data to DOMAIN2
and return to
DOMAIN2

Jose da Silva wrote:
> HI there
>
> What are you trying to do?
>
> Put the login form in DOMAIN1, and POST data to DOMAIN2 and return to
> DOMAIN2 ? Or do all login process on DOMAIN1 and pass data to DOMAIN2.
>
> Jose Silva
>
>
>
> On Oct 27, 7:46 am, "Russ" <[EMAIL PROTECTED]> wrote:
> > I have a cake app on one domain and it has a login form on it, i want
> > to move the login form from that domain to another one, is it possible
> > to call the login process from one domain to the other?
> > 
> > im trying and its not working :(
> > 
> > thanks


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Cannot unset string offsets in helpers\ajax.php

2006-10-27 Thread Eric

Hi, everyone

I use the $ajax->sumit to save form without refresh. I can see the
whole form except the save button and also got error message like
below:
Fatal error: Cannot unset string offsets in D:\Program
Files\xampp\htdocs\cake\cake\libs\view\helpers\ajax.php on line 697

This is my code about the edit.thtml



submit('Save',
'posts/update',
array('update'=>'posts_list'));?>


Can anyone help me figure out why it happend?


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: ERROR On Update 2 Divs

2006-10-27 Thread nate

I don't think you understand how Ajax div's are supposed to work.  Try
putting dynamic data in the div's instead of static.  Also, read over
the examples again.  You'll notice that they only involve the use of
one view, not two.  Also, make sure to include RequestHandler in the
list of components in your controller.


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Why Ajax->div update 2 divs_No responding

2006-10-27 Thread Eric

ya.
I use the latest verion of scriptaculous-js-1.6.4


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Cookie processor for subdomain

2006-10-27 Thread royceH

Hi all, I'm not sure if this is the correct place for this, but here
goes:

I am trying to write (with not much luck) a cookie processor that works
as follows.  The 1st time someone logs onto my site, I'd like them to
select a sub site they want to be associated with.  The subsite would
be a sub-domain.  From then on, when the person logs on, the cookie
would be read and the person would be redirected to the sub-domain
automatically.

It seems simple enough, but I have trouble getting started.  Any help
or direction is appreciated.

I'm a beginning programmer, so program code would be most appreciated.
Its an Linux Apache, PHP, MySQL environment.

Thanks.


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Why Ajax->div update 2 divs_No responding

2006-10-27 Thread Eric

$this -> render ('bla' , 'ajax' ) ;

What is the 'bla' ?


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: HELP:how to nest the media to the page

2006-10-27 Thread Trevor Burton
customise the Media Components that come with flash and create some flash video (flv) files you can create playlists and stuff and load the videos dynamically - if you use SWFObject to embed flash in your page you can easily grab a variable from the query string and use that to trigger a video or use LocalConnection to have another swf in the page trigger a video to load. 
There are literally 100s of tutorials around the web for doing this sort of thing... google is your friendTOn 10/27/06, 
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
They're embedding the videos into flash to do that. I don't know theimplimentation details, never having done any flash development, butthat's the basics.On Oct 27, 9:00 am, "
[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:> I have some confuse how does the media played in the web page like> YouTube.com> Who can tell me how does it implement?
> Need to use any script?
--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: HELP:how to nest the media to the page

2006-10-27 Thread [EMAIL PROTECTED]

They're embedding the videos into flash to do that. I don't know the
implimentation details, never having done any flash development, but
that's the basics.

On Oct 27, 9:00 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I have some confuse how does the media played in the web page like
> YouTube.com
> Who can tell me how does it implement?
> Need to use any script?


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: HELP:how to nest the media to the page

2006-10-27 Thread Chris Hartjes

On 10/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I have some confuse how does the media played in the web page like
> YouTube.com
> Who can tell me how does it implement?
> Need to use any script?

As far as I know, YouTube's media player is flash.

-- 
Chris Hartjes

"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Problems with mod_rewrite

2006-10-27 Thread [EMAIL PROTECTED]

Thanks. I got it solved. Turned out I needed to add a RewriteBase to
all the htaccess files, even though I was in a root level folder to
start with. The relative redirects were causing issues.

On Oct 27, 12:42 am, "AD7six" <[EMAIL PROTECTED]> wrote:
> Hi Utoxin,
>
> You will probably find that you are redirecting with mod_rewrite to a
> url that doesn't exists and thus are invoking the rewrite rule in a
> loop. The reson for not redirecting to the correct url I can't tell
> you, best to double check the location and contents of your index.php
> files and .htaccess files.
>
> HTH,
>
> AD7six
> Please note:
> The manual/bakery is a good place to start any quest for info.
> The cake search (at the time of writing) erroneously reports less/no
> results for the google group.
> The wiki may contain incorrect info - read at your own risk (it's
> mainly user submitted) :)
> You may get your answer quicker by asking on the IRC Channel (you can
> access it with just a browser here:http://irc.cakephp.org).
>
> On Oct 26, 11:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > Just got this error after setting up Cake on my server. I have other
> > sites using mod_rewrite without any issues, and I'm not familiar enough
> > with it to figure out what's happening myself.
>
> > I'm using a development style install for now (entire cake structure
> > inside my htdocs), and the default htaccess files.
>
> > If you have any other questions, let me know.
>
> > [Thu Oct 26 11:05:21 2006] [error] [client xx.xx.xx.xx] mod_rewrite:
> > maximum number of internal redirects reached. Assuming configuration
> > error. Use 'RewriteOptions MaxRedirects' to increase the limit if
> > neccessary.


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



HELP:how to nest the media to the page

2006-10-27 Thread [EMAIL PROTECTED]

I have some confuse how does the media played in the web page like
YouTube.com
Who can tell me how does it implement?
Need to use any script?


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Conditions using habtm associations

2006-10-27 Thread John David Anderson (_psychic_)


On Oct 27, 2006, at 8:57 AM, Gonçalo Marrafa wrote:

> I would like to know how(if) i can impose conditions to the tuples of
> Foo based on tuples of Bar. For example, can i findAll() only the  
> tuples of
> Foo that have an associated Bar tuple with id = 1 ?
>
> Can Cake do this for me or do i have to hand-write the query?

This may be an oversimplification, but HABTM association arrays have  
a 'conditions' key. You could use that to narrow down which objects  
you want included in joins. Check out the manual for the syntax.

-- John
--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Conditions using habtm associations

2006-10-27 Thread Gonçalo Marrafa

Hi, bakers.

I have two models (Foo and Bar) associated with each other through a habtm
association. When i findAll() on the Foo model i get something like:

Array
(
[0] => Array
(
[Foo] => Array
(
[id] => 1
[name] => Foo one

[Bar] => Array
(
[0] => Array
(
[id] => 1
[name] => Bar one
)

[1] => Array
(
[id] => 2
[name] => Bar two
)

)

)

)


I would like to know how(if) i can impose conditions to the tuples of
Foo based on tuples of Bar. For example, can i findAll() only the tuples of
Foo that have an associated Bar tuple with id = 1 ?

Can Cake do this for me or do i have to hand-write the query?

Thanks in advance.
 
-- 
Gonçalo Marrafa <[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Why Ajax->div update 2 divs_No responding

2006-10-27 Thread Ismael S. Kafeltz

I'm not sure, but in the controller shouldn't be something like this:
$this->render('bla', 'ajax'); <- look the 'ajax'


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: global vars

2006-10-27 Thread Ismael S. Kafeltz

did you try to put in the bootstrap.php in /config/ ?


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Why Ajax->div update 2 divs_No responding

2006-10-27 Thread Daniel Hofstetter

Do you use version 1.5 of the prototype library? I had some problems
with version 1.4 and updating multiple divs, see
http://cakebaker.42dh.com/2006/08/18/updating-multiple-divs-with-ajax-without-crashing-firefox/

HTH

-- 
Daniel Hofstetter
http://cakebaker.42dh.com


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: hasAndBelongsToMany, always bi-directional?

2006-10-27 Thread cherrio

Thanks Kiper for the reply,

My post came out of reading the Models chapter, as it its example it
doesn't describe the reverse relation ship between Tags and Comments.
In the other example it does describe (ie. User hasMany Comments,
Coment belongsTo User).

I just want to be sure before continuing, any one else have any
thoughts?

Cheers,
Rob


On Oct 27, 10:32 am, "kiper" <[EMAIL PROTECTED]> wrote:
> IF I understand this right then you have to have HABTM on both Models
> as well as a third JOIN table in the database to make it work.
> Check this out for more info:
>
> http://manual.cakephp.org/chapter/models
>
> Read the paragraphs under the "Defining and Querying with
> hasAndBelongsToMany" heading...
> 
> Hope it will make it clearer to you!


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



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

2006-10-27 Thread Steniskis

Hi Samuel
I got a script in javascript from GLPI
http://www.glpi-project.org/spip.php?lang=en

javascript//

/**
 * This array is used to remember mark status of rows in browse mode
 */
var marked_row = new Array;

var timeoutglobalvar;
function setdisplay (objet, statut) {
if (objet.style.display != statut) objet.style.display = statut;
}

function cleandisplay(id){
var e=document.getElementById(id);
if (e){
var ie=false;

var appVer = navigator.appVersion.toLowerCase();
var iePos = appVer.indexOf('msie');
if (iePos !=-1) {
var is_minor =
parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
var is_major = parseInt(is_minor);
}
if (navigator.appName.substring(0,9) == "Microsoft")
{ // Check if IE version is 6 or older
if (is_major <= 6) {
ie=true;
}
}

setdisplay(e,'block');

if (ie){
 var selx=0; var sely=0; var selp;
 if(e.offsetParent){
 selp=e;
 while(selp.offsetParent){
selp=selp.offsetParent;
 selx+=selp.offsetLeft;
 sely+=selp.offsetTop;
 }
 }
 selx+=e.offsetLeft;
sely+=e.offsetTop;
 selw=e.offsetWidth;
 selh=e.offsetHeight;
hideSelect(selx,sely,selw,selh);
}
}
}

function cleanhide(id){
var e=document.getElementById(id);
if (e){
var ie=false;

var appVer = navigator.appVersion.toLowerCase();
var iePos = appVer.indexOf('msie');
if (iePos !=-1) {
var is_minor =
parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
var is_major = parseInt(is_minor);
}
if (navigator.appName.substring(0,9) == "Microsoft")
{ // Check if IE version is 6 or older
if (is_major <= 6) {
ie=true;
}
}

if (ie){
 var selx=0; var sely=0; var selp;
 if(e.offsetParent){
 selp=e;
 while(selp.offsetParent){
selp=selp.offsetParent;
 selx+=selp.offsetLeft;
 sely+=selp.offsetTop;
 }
 }
 selx+=e.offsetLeft;
sely+=e.offsetTop;
 selw=e.offsetWidth;
 selh=e.offsetHeight;
showSelect(selx,sely,selw,selh);
}
setdisplay(e,'none');

}
}


function hidemenu(){
var ie=false;

var appVer = navigator.appVersion.toLowerCase();
var iePos = appVer.indexOf('msie');
 if (iePos !=-1) {
 var is_minor =
parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
 var is_major = parseInt(is_minor);
}
 if (navigator.appName.substring(0,9) == "Microsoft")
 { // Check if IE version is 6 or older
if (is_major <= 6) {
ie=true;
}
}

for (var i = 1; i<=10; i++) {
var e=document.getElementById('smenu'+i);
if (e) {
if (ie){
 var selx=0; var sely=0; var selp;
 if(e.offsetParent){
 selp=e;
 while(selp.offsetParent){
selp=selp.offsetParent;
 selx+=selp.offsetLeft;
 sely+=selp.offsetTop;
 }
 }
 selx+=e.offsetLeft;
sely+=e.offsetTop;
 selw=e.offsetWidth;
 selh=e.offsetHeight;
showSelect(selx,sely,selw,selh);
}
setdisplay(e,'none');
}
}
}

function montre(id

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

2006-10-27 Thread DaRollingHobbit

I do agree that a more complex validation routine should be use but my
real problem is I can't trigger even this simple one.

Due to the fact my profile list is generated by my habtm relationship,
I need to keep the name Profile/Profile. But doing so, the error
handling doesn't recognise it as the Profile array belongs to
$this->data and not to $this->data['User'].

Thus, how can I check errors/data constitency on this field?


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Why Ajax->div update 2 divs_No responding

2006-10-27 Thread Eric

Hi everyone,

I used CAKE 1.8 , Uniform Server 3.3, WIN2003, firefox 1.5 and ie 7.0.

I try the fuction about $ajax->link.

I can make the $ajax->link to update single DIv's works perfect either
in FF or IE.

But when I try $ajax->div and $ajax->divEnd, there is no responding at
all.
Can anyone help me to figure it out?
Thanks.

P.S. my code:
tasks_controller.php
   function hello()
{
$this -> layout = 'ajax';


}
views/tasks/index.thtml
Hello

link('Update 2 Divs', '/tasks/hello',
array('update' => array( ' first ' ,' second ' ) ) );?>

div('first'); ?>
   Main Head Updated
divEnd('first'); ?>

div('second'); ?>
   Sub head updated
divEnd('second'); ?>

views/tasks/hello.thtml
 HEllo


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



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

2006-10-27 Thread Steniskis

Hi Samuel
I got a script in javascript from GLPI
http://www.glpi-project.org/spip.php?lang=en

javascript//

/**
 * This array is used to remember mark status of rows in browse mode
 */
var marked_row = new Array;

var timeoutglobalvar;
function setdisplay (objet, statut) {
if (objet.style.display != statut) objet.style.display = statut;
}

function cleandisplay(id){
var e=document.getElementById(id);
if (e){
var ie=false;

var appVer = navigator.appVersion.toLowerCase();
var iePos = appVer.indexOf('msie');
if (iePos !=-1) {
var is_minor =
parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
var is_major = parseInt(is_minor);
}
if (navigator.appName.substring(0,9) == "Microsoft")
{ // Check if IE version is 6 or older
if (is_major <= 6) {
ie=true;
}
}

setdisplay(e,'block');

if (ie){
 var selx=0; var sely=0; var selp;
 if(e.offsetParent){
 selp=e;
 while(selp.offsetParent){
selp=selp.offsetParent;
 selx+=selp.offsetLeft;
 sely+=selp.offsetTop;
 }
 }
 selx+=e.offsetLeft;
sely+=e.offsetTop;
 selw=e.offsetWidth;
 selh=e.offsetHeight;
hideSelect(selx,sely,selw,selh);
}
}
}

function cleanhide(id){
var e=document.getElementById(id);
if (e){
var ie=false;

var appVer = navigator.appVersion.toLowerCase();
var iePos = appVer.indexOf('msie');
if (iePos !=-1) {
var is_minor =
parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
var is_major = parseInt(is_minor);
}
if (navigator.appName.substring(0,9) == "Microsoft")
{ // Check if IE version is 6 or older
if (is_major <= 6) {
ie=true;
}
}

if (ie){
 var selx=0; var sely=0; var selp;
 if(e.offsetParent){
 selp=e;
 while(selp.offsetParent){
selp=selp.offsetParent;
 selx+=selp.offsetLeft;
 sely+=selp.offsetTop;
 }
 }
 selx+=e.offsetLeft;
sely+=e.offsetTop;
 selw=e.offsetWidth;
 selh=e.offsetHeight;
showSelect(selx,sely,selw,selh);
}
setdisplay(e,'none');

}
}


function hidemenu(){
var ie=false;

var appVer = navigator.appVersion.toLowerCase();
var iePos = appVer.indexOf('msie');
 if (iePos !=-1) {
 var is_minor =
parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
 var is_major = parseInt(is_minor);
}
 if (navigator.appName.substring(0,9) == "Microsoft")
 { // Check if IE version is 6 or older
if (is_major <= 6) {
ie=true;
}
}

for (var i = 1; i<=10; i++) {
var e=document.getElementById('smenu'+i);
if (e) {
if (ie){
 var selx=0; var sely=0; var selp;
 if(e.offsetParent){
 selp=e;
 while(selp.offsetParent){
selp=selp.offsetParent;
 selx+=selp.offsetLeft;
 sely+=selp.offsetTop;
 }
 }
 selx+=e.offsetLeft;
sely+=e.offsetTop;
 selw=e.offsetWidth;
 selh=e.offsetHeight;
showSelect(selx,sely,selw,selh);
}
setdisplay(e,'none');
}
}
}

function montre(id

global vars

2006-10-27 Thread dotw

Hi All,
For internationalization, I have put all keys and words in database. I
want to read database only once to fill all theses records in one
global arrays. but I failed. Cake seems clear the values of var though
you are using 'global' key word.

I have test declare the global vars in core.php,startup.php,...
no one does work.
who can give me a hand?

Thanks


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



ERROR On Update 2 Divs

2006-10-27 Thread Eric

Hi everyone,

I used CAKE 1.8 , Uniform Server 3.3, WIN2003, firefox 1.5 and ie 7.0.

I try the fuction about $ajax->link.

I can make the $ajax->link to update single DIv's works perfect either
in FF or IE.

But when I try $ajax->div and $ajax->divEnd, there is no responding at
all.
Can anyone help me to figure it out?
Thanks.

P.S. my code:
tasks_controller.php
   function hello()
{
$this -> layout = 'ajax';


}
views/tasks/index.thtml
Hello

link('Update 2 Divs', '/tasks/hello',
array('update' => array( ' first ' ,' second ' ) ) );?>

div('first'); ?>
   Main Head Updated
divEnd('first'); ?>

div('second'); ?>
   Sub head updated
divEnd('second'); ?>

views/tasks/hello.thtml
 HEllo


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Suggestion with maxlength

2006-10-27 Thread Ismael S. Kafeltz

I searched before open this topic, sorry if it was already made.

I have this problem in early project, i don't really KNOW exactly the
length of varchars. And Cake don't catch MySql errors to me treat.

E.g: 1406: Data too long for column 'cargo' at row 1

This happen when i send a string long than varchar(e.g. 70). So i have
to treat this every field in every model/controler and truncate the
string and/or display a red tag saying that there are erros.

My suggestion is,  if Cake can mimic the databases, so it could *guess*
what type of the field is, in this cae *varchar* of X lenght and it
could *automatically* truncate it by default or leave to the programmer
to decide if it is necessary do treat this manually when save datas.


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Loosing session vars.

2006-10-27 Thread Gonçalo Marrafa

Hi, bakers.

I'm having a strange problem: i'm loosing some session variables when i
go "into" a plugin.

To check if a user is authenticated i'm storing it's data on the
session. While i'm calling methods of a top-level controller i have no
problems but if i call a method from a plugin controller that (and only
that!) variable disappears!

Any clues?

Thanks in advance!

-- 
Gonçalo Marrafa <[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Select tag with optgroup

2006-10-27 Thread Troy Schmidt

Maybe I will have to live on the cutting edge again and get 1.2 this is
the third time it has done something that v1 doesn't do.  Makes me want
it badly!!

On Oct 26, 5:54 pm, "nate" <[EMAIL PROTECTED]> wrote:
> FormHelper::select in Cake 1.2 supports optgroup tags, but the code
> posted above is definitely not it.  To my knowledge, no one has used
> this helper.  If you think it might be of help to you, by all means,
> try it out.


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: beforeSave()

2006-10-27 Thread carlosrg

Ok,

I will have a look at it.

Thanks everybody!


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



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

2006-10-27 Thread kiper

I had another thought. How about tagging date onto all pages in the
online manual?
It will help us when there is a version conflict between the online and
the pdf version!
I hate giving (and getting) outdated advice :)


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: hasAndBelongsToMany, always bi-directional?

2006-10-27 Thread kiper

IF I understand this right then you have to have HABTM on both Models
as well as a third JOIN table in the database to make it work.
Check this out for more info:

http://manual.cakephp.org/chapter/models

Read the paragraphs under the "Defining and Querying with
hasAndBelongsToMany" heading...

Hope it will make it clearer to you!


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Form Call?

2006-10-27 Thread Jose da Silva

HI there

What are you trying to do?

Put the login form in DOMAIN1, and POST data to DOMAIN2 and return to
DOMAIN2 ? Or do all login process on DOMAIN1 and pass data to DOMAIN2.

Jose Silva



On Oct 27, 7:46 am, "Russ" <[EMAIL PROTECTED]> wrote:
> I have a cake app on one domain and it has a login form on it, i want
> to move the login form from that domain to another one, is it possible
> to call the login process from one domain to the other?
> 
> im trying and its not working :(
> 
> thanks


--~--~-~--~~~---~--~~
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 options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---