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 the slash before index.php

Hope this helps

Heiner



> 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}
> (.*) -> catches everything can this line be made more specific?
> 
> 
> 
> On 09/02/07, [EMAIL PROTECTED] <
> [EMAIL PROTECTED]> wrote:
>> 
>> 
>> 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 to tell it which directory for it to work on.
>> 
>> Anyways, try that.  Just add it to all your .htaccess files (I think
>> there are 3).
>> 
>> Let me know how it goes!
>> 
>> On Feb 8, 10:28 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
>>> 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
>> Pagehttp://faq.1and1.com/scripting_languages_supported/configuring_apache...
>>> 
>>> Wordpress using Mod
>> Rewritehttp://elliottback.com/wp/archives/2005/05/06/permalinks-down/
>>> 
>>> I can get it all to work via built in rewrite, it works fine.  Guess I
>> will
>>> have to resign myself to
>>> not using mod rewrite - shame because its cool (tidy & clean)
>>> 
>>> Did / does your host claim to support mod rewrite?
>>> 
>>> On 09/02/07, [EMAIL PROTECTED] <
>>> 
>>> [EMAIL PROTECTED]> wrote:
>>> 
 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.cakephp.org/appendix/blog_tutorial(Section 5).  Skip to
 this part "define ('BASE_URL', env('SCRIPT_NAME'));".
>>> 
 On Feb 8, 3:56 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> 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 (.*) is too broad, this is probably the
 cause
>> of the issue. You likely need to use a more specific terms. The
>> other
>> two lines work fine however:
>>> 
>> RewriteEngine on
>> RewriteRule ^$webroot/[L]
>>> 
>> although it gives 404 errors, seeing as "webroot" doesn't
>> currently
>> exist.
>>> 
> its working without the htaccess, but I would like to get it to work
 with
> since that should work
> on the package that I have.
>>> 
> I think that 1and1 impose some restrictions on mod_rewrite since
>> they
 are a
> Mass Hosting environment
> and I suspect that some of this information is withheld.  I also
>> think
 that
> they did'nt really look into things
>>> 
> although it gives 404 errors, seeing as "webroot" doesn't currently
 exist.
>>> 
> though it does.  Has anyone  managed to get mod rewrite to work on
>> 1and1
> with cakephp or got any suggestions
> is they a way to make this line (below) narrower / less specific?
>>> 
> RewriteRule (.*) webroot/$1[L]
>>> 
>> I read elsewhere on the web that other users have had issues with
>>> 
> mod_rewrite in wordpress
> fore instance and they have been able to tweak the rules.
>>> 
> - S
>> 
>> 
>>> 
>> 
> 
> > 



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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}
(.*) -> catches everything can this line be made more specific?



On 09/02/07, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
>
> 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 to tell it which directory for it to work on.
>
> Anyways, try that.  Just add it to all your .htaccess files (I think
> there are 3).
>
> Let me know how it goes!
>
> On Feb 8, 10:28 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> > 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
> Pagehttp://faq.1and1.com/scripting_languages_supported/configuring_apache...
> >
> > Wordpress using Mod
> Rewritehttp://elliottback.com/wp/archives/2005/05/06/permalinks-down/
> >
> > I can get it all to work via built in rewrite, it works fine.  Guess I
> will
> > have to resign myself to
> > not using mod rewrite - shame because its cool (tidy & clean)
> >
> > Did / does your host claim to support mod rewrite?
> >
> > On 09/02/07, [EMAIL PROTECTED] <
> >
> > [EMAIL PROTECTED]> wrote:
> >
> > > 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.cakephp.org/appendix/blog_tutorial(Section 5).  Skip to
> > > this part "define ('BASE_URL', env('SCRIPT_NAME'));".
> >
> > > On Feb 8, 3:56 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> > > > 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 (.*) is too broad, this is probably the
> > > cause
> > > > > of the issue. You likely need to use a more specific terms. The
> other
> > > > > two lines work fine however:
> >
> > > > > RewriteEngine on
> > > > > RewriteRule ^$webroot/[L]
> >
> > > > > although it gives 404 errors, seeing as "webroot" doesn't
> currently
> > > > > exist.
> >
> > > > its working without the htaccess, but I would like to get it to work
> > > with
> > > > since that should work
> > > > on the package that I have.
> >
> > > > I think that 1and1 impose some restrictions on mod_rewrite since
> they
> > > are a
> > > > Mass Hosting environment
> > > > and I suspect that some of this information is withheld.  I also
> think
> > > that
> > > > they did'nt really look into things
> >
> > > > although it gives 404 errors, seeing as "webroot" doesn't currently
> > > exist.
> >
> > > > though it does.  Has anyone  managed to get mod rewrite to work on
> 1and1
> > > > with cakephp or got any suggestions
> > > > is they a way to make this line (below) narrower / less specific?
> >
> > > > RewriteRule (.*) webroot/$1[L]
> >
> > > > > I read elsewhere on the web that other users have had issues with
> >
> > > > mod_rewrite in wordpress
> > > > fore instance and they have been able to tweak the rules.
> >
> > > > - S
>
>
> >
>

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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:
-
I've finally uploaded cake to my server and now I'm desperately trying
to get it to work:

When I remove the .htaccess files and uncomment the lines in core and
index.php (BASE_URL) my cake urls (as genertaed by the helpers all
look like:

http://www.pauljholden.com/cgi-sys/php4/skunkworx/comments

Which pulls up a screen like:

Security Alert! The PHP CGI cannot be accessed directly. This PHP CGI
binary was compiled with force-cgi-redirect enabled. This means that a
page will only be served up if the REDIRECT_STATUS CGI variable is
set, e.g. via an Apache Action directive.

For more information as to why this behaviour exists, see the manual
page for CGI security.

For more information about changing this behaviour or re-enabling this
webserver, consult the installation file that came with this
distribution, or visit the manual page.

Any ideas?

Here is the instruction:

I've solved this problem by changing a couple of lines of the cake
index file and the core file, which allowed me to revert to using
index.php?url= which works fine.

In cake/index.php $elements = explode('/index.php?url=',$uri); //
added ?url=

In core.php define('BASE_URL', $_SERVER['PATH_INFO'].'?url=');

(There's an identical line in cake/index.php - but I think the core
overwrites it, though it should really only be defined in one place)

Deleted the .htaccess, etc.


On Feb 8, 12:54 am, "apalankat" <[EMAIL PROTECTED]> wrote:
> hi,
> i think it's installed as a CGI, and this is why it does the /cgi-bin/
> cgiwrap/ thing. So the only thing I need is to know what variable (and
> in what file) uses cake to determine the root of the app.
> I have been looking through the files, but i saw ROOT, WWW_ROOT, and
> so many other variables, i need to know which one I have to hardcode
> to make it work.
> Thanks!
>
> On Feb 8, 2:43 am, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > What is your directory structure?  How was cake installed onto the
> > server?  Is PHP installed as a module or as cgi?
> > To me, it looks like PHP is installed as CGI and the server itself is
> > running Virtual Hosting.  Can you confirm these?
>
> > On Feb 7, 2:17 pm, "apalankat" <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
> > > I configured a cake app in my university server, and I have a problem:
> > > all the links created by the application (links to actions,
> > > stylesheets, javascripts) have a "/cgi-bin/cgiwrap/" prepended.
> > > Here's an example from the page /mycakeapp/posts on the server.
> > > Instead of linking the posts with  > > href="/mycakeapp/posts/view/2">post2 it links them with  > > href="/cgi-bin/cgiwrap/mycakeapp/
>
> > > posts/view/2" >post2
>
> > > I don't think anyone ever saw that, so I lost all hope of finding a
> > > solution... but here it is,
> > > Thanks for reading!


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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:
> hi,
> i think it's installed as a CGI, and this is why it does the /cgi-bin/
> cgiwrap/ thing. So the only thing I need is to know what variable (and
> in what file) uses cake to determine the root of the app.
> I have been looking through the files, but i saw ROOT, WWW_ROOT, and
> so many other variables, i need to know which one I have to hardcode
> to make it work.
> Thanks!
>
> On Feb 8, 2:43 am, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > What is your directory structure?  How was cake installed onto the
> > server?  Is PHP installed as a module or as cgi?
> > To me, it looks like PHP is installed as CGI and the server itself is
> > running Virtual Hosting.  Can you confirm these?
>
> > On Feb 7, 2:17 pm, "apalankat" <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
> > > I configured a cake app in my university server, and I have a problem:
> > > all the links created by the application (links to actions,
> > > stylesheets, javascripts) have a "/cgi-bin/cgiwrap/" prepended.
> > > Here's an example from the page /mycakeapp/posts on the server.
> > > Instead of linking the posts with  > > href="/mycakeapp/posts/view/2">post2 it links them with  > > href="/cgi-bin/cgiwrap/mycakeapp/
>
> > > posts/view/2" >post2
>
> > > I don't think anyone ever saw that, so I lost all hope of finding a
> > > solution... but here it is,
> > > Thanks for reading!


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 to tell it which directory for it to work on.

Anyways, try that.  Just add it to all your .htaccess files (I think
there are 3).

Let me know how it goes!

On Feb 8, 10:28 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> 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 
> Pagehttp://faq.1and1.com/scripting_languages_supported/configuring_apache...
>
> Wordpress using Mod 
> Rewritehttp://elliottback.com/wp/archives/2005/05/06/permalinks-down/
>
> I can get it all to work via built in rewrite, it works fine.  Guess I will
> have to resign myself to
> not using mod rewrite - shame because its cool (tidy & clean)
>
> Did / does your host claim to support mod rewrite?
>
> On 09/02/07, [EMAIL PROTECTED] <
>
> [EMAIL PROTECTED]> wrote:
>
> > 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.cakephp.org/appendix/blog_tutorial(Section 5).  Skip to
> > this part "define ('BASE_URL', env('SCRIPT_NAME'));".
>
> > On Feb 8, 3:56 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> > > 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 (.*) is too broad, this is probably the
> > cause
> > > > of the issue. You likely need to use a more specific terms. The other
> > > > two lines work fine however:
>
> > > > RewriteEngine on
> > > > RewriteRule ^$webroot/[L]
>
> > > > although it gives 404 errors, seeing as "webroot" doesn't currently
> > > > exist.
>
> > > its working without the htaccess, but I would like to get it to work
> > with
> > > since that should work
> > > on the package that I have.
>
> > > I think that 1and1 impose some restrictions on mod_rewrite since they
> > are a
> > > Mass Hosting environment
> > > and I suspect that some of this information is withheld.  I also think
> > that
> > > they did'nt really look into things
>
> > > although it gives 404 errors, seeing as "webroot" doesn't currently
> > exist.
>
> > > though it does.  Has anyone  managed to get mod rewrite to work on 1and1
> > > with cakephp or got any suggestions
> > > is they a way to make this line (below) narrower / less specific?
>
> > > RewriteRule (.*) webroot/$1[L]
>
> > > > I read elsewhere on the web that other users have had issues with
>
> > > mod_rewrite in wordpress
> > > fore instance and they have been able to tweak the rules.
>
> > > - S


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 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?hl=en
-~--~~~~--~~--~--~---



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/scripting_languages_supported/configuring_apache_server_using_htaccess/4.html

Wordpress using Mod Rewrite
http://elliottback.com/wp/archives/2005/05/06/permalinks-down/

I can get it all to work via built in rewrite, it works fine.  Guess I will
have to resign myself to
not using mod rewrite - shame because its cool (tidy & clean)

Did / does your host claim to support mod rewrite?

On 09/02/07, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
>
> 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.cakephp.org/appendix/blog_tutorial (Section 5).  Skip to
> this part "define ('BASE_URL', env('SCRIPT_NAME'));".
>
> On Feb 8, 3:56 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> > 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 (.*) is too broad, this is probably the
> cause
> > > of the issue. You likely need to use a more specific terms. The other
> > > two lines work fine however:
> >
> > > RewriteEngine on
> > > RewriteRule ^$webroot/[L]
> >
> > > although it gives 404 errors, seeing as "webroot" doesn't currently
> > > exist.
> >
> > its working without the htaccess, but I would like to get it to work
> with
> > since that should work
> > on the package that I have.
> >
> > I think that 1and1 impose some restrictions on mod_rewrite since they
> are a
> > Mass Hosting environment
> > and I suspect that some of this information is withheld.  I also think
> that
> > they did'nt really look into things
> >
> > although it gives 404 errors, seeing as "webroot" doesn't currently
> exist.
> >
> > though it does.  Has anyone  managed to get mod rewrite to work on 1and1
> > with cakephp or got any suggestions
> > is they a way to make this line (below) narrower / less specific?
> >
> > RewriteRule (.*) webroot/$1[L]
> >
> > > I read elsewhere on the web that other users have had issues with
> >
> > mod_rewrite in wordpress
> > fore instance and they have been able to tweak the rules.
> >
> > - S
>
>
> >
>

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de nate
Enviado el: Viernes, 09 de Febrero de 2007 02:23 a.m.
Para: Cake PHP
Asunto: Re: How to Impliment Right Joins in Cake

In Cake 1.2, there will be an association key called 'type', where you
can set the join type on belongsTo and hasOne associations.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 submit, it works.  Any ideas?


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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.cakephp.org/appendix/blog_tutorial (Section 5).  Skip to
this part "define ('BASE_URL', env('SCRIPT_NAME'));".

On Feb 8, 3:56 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> 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 (.*) is too broad, this is probably the cause
> > of the issue. You likely need to use a more specific terms. The other
> > two lines work fine however:
>
> > RewriteEngine on
> > RewriteRule ^$webroot/[L]
>
> > although it gives 404 errors, seeing as "webroot" doesn't currently
> > exist.
>
> its working without the htaccess, but I would like to get it to work with
> since that should work
> on the package that I have.
>
> I think that 1and1 impose some restrictions on mod_rewrite since they are a
> Mass Hosting environment
> and I suspect that some of this information is withheld.  I also think that
> they did'nt really look into things
>
> although it gives 404 errors, seeing as "webroot" doesn't currently exist.
>
> though it does.  Has anyone  managed to get mod rewrite to work on 1and1
> with cakephp or got any suggestions
> is they a way to make this line (below) narrower / less specific?
>
> RewriteRule (.*) webroot/$1[L]
>
> > I read elsewhere on the web that other users have had issues with
>
> mod_rewrite in wordpress
> fore instance and they have been able to tweak the rules.
>
> - S


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 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.
> However, if some one wants  that all rows in A must appear then we would
> have to impliment Left Join A vs B or Right Join B vs A. How this will be
> implemented?
>
> Ifti Khan


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



? 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


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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.
However, if some one wants  that all rows in A must appear then we would
have to impliment Left Join A vs B or Right Join B vs A. How this will be
implemented?

Ifti Khan

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 think... :)

-- 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?hl=en
-~--~~~~--~~--~--~---



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 far.

Others have mentioned using ant for build management.  I prefer phing
for PHP projects.

> - is there support for database migrations (like rails)

I'd really like to see intelligent schema diff'ing in this space to make
it really easy for developers to work with databases.  This is not at
all something that has to with CakePHP specifically.  Just a general
comment.

> - what is the best text editor for using with cake (linux or windows)

I like Komodo IDE 4.0 with xdebug and kcachegrind.

- --
Darian Anthony Patrick
Principal, Application Development
Criticode LLC
(215) 240-6566 Office
(866) 789-2992 Facsimile
Web:   http://criticode.com
Email: [EMAIL PROTECTED]
JID:   [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFy/doKpzEXPWA4IcRAvPNAJ4jGk93W4jyYJvj6UxvgCCeHawD1QCbBW1U
2KVXOn7uCqwUQ4wKB/Q45vc=
=e/p4
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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' => 'SubDestination',
   'conditions'=> '',
   'order' => '',
   'limit' => '',
   'foreignKey'=> 'sub_id',
   'dependent' => true,
   'exclusive' => false,
   'finderQuery'   => ''
 )
  );

}
and

Table: sub_destinations, Column: sub_id,id, destin, topic

class SubDestination extends AppModel
{
var $name = 'SubDestination';
var $belongsTo = array('Destination' =>
array('className'  => 'Destination',
'conditions' => '',
'order'  => '',
'foreignKey' => 'sub_id'
)
 );


}


Note: I added blongsTo only trying to solve the problem.

The problem is when I use $this->Destination->findAll($conditions) where

$conditions=array ("Destination.destination" => "like '%manage%'","or" =>
array("SubDestination.destin" => "like '%manage%'"));

I recieve an error message: "SQL Error in model Post: 1054: Unknown column '
SubDestination.destin' in 'where clause'"

the sql statement with debug level 3 is SELECT `Destination`.`id`,
`Destination`.`username`, `Destination`.`destination`,
`Destination`.`topic`, `Destination`.`post` FROM `destinations` AS
`Destination` WHERE ((`Destination`.`destination` like '\'%manage%\'') OR
(`SubDestination`.`destin` like '\'%manage%\''))

I also tried the following for condition as helped out by some other guy but
it is also not working.

$conditions=array ("or" => array("Destination.destination" => "like
'%manage%'","SubDestination.destin" => "like '%manage%'"));

Please point the mistake/wrong i m doing.

Thanks.

 Ifti Khan,

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 front-end".

Generally web applications (which is what CakePHP is for), are public
facing - and just because someone can log into your application should
not give them any permissions to your database server.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 that works with cakephp / svn?

I don't know of anything sorry, but if you find a good solution, then I 
would love to hear about it.  I have looked at phpunit a while ago, but 
didn't get to set up.

> - is there support for database migrations (like rails)
> - what is the best text editor for using with cake (linux or windows)

This issue has been covered at length a couple of time recently in this 
group.  My personal choice is Eclipse with the PHP plugin.  I also use 
Ant heavily for builds.

Regards,
Langdon

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 extend these to test your own
application too.  I personally have been using Daniel Hofstetter's
test suite ( http://cakebaker.42dh.com/2006/12/18/testing-with-
cakephp-12-a-preview/ ) for my application, and found it to be very
good.

2 - is there any continuous integration/automatted build and test
solution that works with cakephp / svn?
I am not aware of something for this exact purpose.  But you should be
able to write an ANT task to do this - just execute your tests via
command line, and based on the response do or don't check into SVN.

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

4 - what is the best text editor for using with cake (linux or
windows)
I personally use Notepad++ and Eclipse on Windows.  Search this group
for a number of discussions on this topic.  There is not a dedicated
Cake IDE, but using Eclipse I'm not wanting for anything.

5 - is it easy to create a base web application and extend customs
applications from there?
You'd need to provide more details on what you want, but yes.  You can
use plugins for applications within applications, and using app_model,
app_controller, Components and Behaviours you can abstract a lot of
application functionality away from your models / controllers.



alew3 wrote:
> 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 / svn?
> - is there support for database migrations (like rails)
> - what is the best text editor for using with cake (linux or windows)
> - is it easy to create a base web application and extend customs
> applications from there?
>
> If anyone can shed me a light, It will make my decision easier.
>
> Thanks in advance!


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 / svn?
- is there support for database migrations (like rails)
- what is the best text editor for using with cake (linux or windows)
- is it easy to create a base web application and extend customs
applications from there?

If anyone can shed me a light, It will make my decision easier.

Thanks in advance!


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 (.*) is too broad, this is probably the cause
> of the issue. You likely need to use a more specific terms. The other
> two lines work fine however:
>
> RewriteEngine on
> RewriteRule ^$webroot/[L]
>
> although it gives 404 errors, seeing as "webroot" doesn't currently
> exist.
>
>
its working without the htaccess, but I would like to get it to work with
since that should work
on the package that I have.

I think that 1and1 impose some restrictions on mod_rewrite since they are a
Mass Hosting environment
and I suspect that some of this information is withheld.  I also think that
they did'nt really look into things

although it gives 404 errors, seeing as "webroot" doesn't currently exist.


though it does.  Has anyone  managed to get mod rewrite to work on 1and1
with cakephp or got any suggestions
is they a way to make this line (below) narrower / less specific?

RewriteRule (.*) webroot/$1[L]
>
> I read elsewhere on the web that other users have had issues with
mod_rewrite in wordpress
fore instance and they have been able to tweak the rules.

- S

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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..." is shown while all divs are updated. How
can I make it show things like "Loading first div", "Loading second
div" and so on? I know that two divs (one shows "Loading first div",
and the other shows "Loading second div") will simply solve the
problem, but I am planning to increase the number of contents divs up
to 10, and don't want to have as many "progress bar" divs as the
contents divs. Are there any ways to use one "progress bar" div for
all contents divs?
My second question is "This code example works. But can I make more
improvements?"

//index.thtml
 'view_first',
'url'  => '/demos/first/',
'type'  => 'asynchronous',
'loading'  =>
"Element.hide('view_first');Element.show('loading')",
'complete' => "Effect.Appear('view_first')"
);
echo $javascript->event('window','load',$ajax-
>remoteFunction($options),false);
?>

 'view_second',
'url'  => '/demos/second/',
'type'  => 'asynchronous',
'loading'  =>
"Element.hide('view_second');Element.show('loading')",
'complete' => "Effect.Appear('view_second')"
);
echo $javascript->event('window','load',$ajax-
>remoteFunction($options),false);
?>

Loading...




--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
>
> 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 smart, be cool, and share your knowledge.
>
> BAKE ON!
>
> blog: http://www.MarianoIglesias.com.ar
> 
> De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> de Sam Sherlock
> Enviado el: Jueves, 08 de Febrero de 2007 06:36 p.m.
> Para: cake-php@googlegroups.com
> Asunto: Re: why use jQuery instead of Prototype
>
> as Donald Rumsfeld would put it: its a question of known knowns,
> known unknowns unknown knowns and unknown unknowns.
>
>
>
> >
>

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar

De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Sam Sherlock
Enviado el: Jueves, 08 de Febrero de 2007 06:36 p.m.
Para: cake-php@googlegroups.com
Asunto: Re: why use jQuery instead of Prototype

as Donald Rumsfeld would put it: its a question of known knowns, 
known unknowns unknown knowns and unknown unknowns. 



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 this table. When writing (PHP) web
applications, I got used to authenticating directly to the database to
provide greater security and also to provide security when logging in
on the database with for example an MS access front-end.

Is it feasible to write a cake plugin to perform this authentication
and ACL checking on a database level?

Thanks in advance for you comments.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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
> since it has code for prototype built in. With jquery this is not needed

 Since it's not even a DEV release, cake 1.2 , and you found a bug
(an issue ? :) , please report it :]

after I have finished what I am doing this evening (behind deadline & still
more to do)  I will reinstall cake 1.2
and check the pagination again.

> don't know about dojo, yui

I took to those like a duck takes to lava :)

>but i'm having a VERY hard time to
optimize Interface's sortable

I have had trouble with imagebox in IE which might be due to compression,
or more specifically my current implementation.

as Donald Rumsfeld would put it: its a question of known knowns,
known unknowns unknown knowns and unknown unknowns.

and in the words of the Dude
"New sh*t has come to light! "

thanks to this thread I ma privy to more now.


On 08/02/07, DJ Spark <[EMAIL PROTECTED]> wrote:
>
>
> 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 now that jquery 1.1.1 is out its more compact than before and faster
> than it was
> > also there is the interface lib for jquery which is I think fully
> featured.
>
> Total lie :)
> it's bigger than before (8KB more, in the compressed version, going 20KB)
> interface 1.1.2 is 100KB uncompressed , but it's pretty modular (you
> might use only 4 or five modules: to use sortables, for instance, it's
> 20KB).
> If you use the very same compressor to Prototype, it goes to 30KB,
> and scriptaculous lib , if I remember correctly, 40KB, complete (it
> has bigger modules, though)
> About speed, it's harder to tell, but i'm having a VERY hard time to
> optimize Interface's sortable, drop for a very complex layout with
> many items to be sorted: it was taking about 12 seconds to START a
> drag. After messing around, it went to less than one second. And the
> sortables DO NOT work with tables, If you need, you must go to
> scriptaculous (don't know about dojo, yui)
>
>
>
> > It much easier to learn and code than prototype (IMHO) - and the jquery
> list is very active.
>
>   Yes, there was a big difference here.
>   But now, prototype crew woke up and set a docs site, started writing
> stuff for non-hardcore programmers, a better release cycle, but i'm
> not sure about the prototype mailing list.
>   And it's faster to learn prototype, indeed, although it's not as
> powerful as prototype. But we  never need that power, do we ? :D
>
>
> > For instance in cakePHP 1.2 I am finding some issues with using the
> paginator helper
> > since it has code for prototype built in. With jquery this is not needed
>
>   Since it's not even a DEV release, cake 1.2 , and you found a bug
> (an issue ? :) , please report it :]
>
>
> > as you attach events to elements via classname or ids foreinstance.  I
> have a jLink class
> > which I use to change the content of a page.  Below is the jQuery code
> that attaches the > binds the code to anchors with
>
>prototype works in the same way even before jquery's first release.
> the code maybe a little more verbose, but just a few lines.
>
> // http://foo.com";>Click me
> Event.observe('clicker', 'click', functionName);
>
> if you are not using IDs, you may do it this way
>
> $$('div#page a.jLink').each(
>   Event.observe(this, 'click', functionName);
> );
>
>
> http://ajaxian.com/archives/prototype-adds-css-selector-function-divpage-psummary-img
> (january 18th, 2006)
>
>
>   I'm a big fan of jquery's pragmatism, but it's not a medicine for
> everything, be aware of that ;)
>   And question everything you hear. always.
>
>   Spark
>
>
> On 2/8/07, Sam Sherlock <[EMAIL PROTECTED]> wrote:
> > 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 the past
> > http://docs.jquery.com/Tutorials
> > http://15daysofjquery.com/category/tutorials/
> > http://dzone.com/rsslinks/the_10_minute_jquery_tutorial.html
> >
> > AFAIK prototype require more code than jquery and is generally not
> > unobtrusive, I may be wrong about this
> >
> > and now that jquery 1.1.1 is out its more compact than before and faster
> > than it was
> > also there is the interface lib for jquery which is I think fully
> featured.
> >
> > It much easier to learn and code than prototype (IMHO) - and

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
> > (film_id) and the user's id (user_id). I am making a list of the
> > "User's Top Favorites" which takes the films that occur this most in
> > this table. Right now, I have to do a SQL query to get these id's that
> > occur the most, and then put them in an array, and then do a findAll
> > with those ids to get the film's information.
>
> > I was wondering if anyone could point me to a cleaner way to
> > accomplish this? The real thing that made me go this direction was
> > that I could not find a way to count occurances of a value in a column
> > and then order them.
>
> > Here is the code I currently have:
>
> > // grabs the 3 ids that occur the most
> > $fav = $this->Favorite->query(
> > 'SELECT film_id, COUNT(film_id) FROM fn_favorites
> > GROUP BY film_id
> > ORDER BY COUNT(film_id) DESC
> > LIMIT 3');
> > // assign id's into an array
> > $fav = array( $fav[0]['fn_favorites']['film_id'],
> > 
> > $fav[1]['fn_favorites']['film_id'],
> > 
> > $fav[2]['fn_favorites']['film_id']);
> > //grab film information on the 3 top favorites
> > $fav = $this->Film->findAll( array("Film.id" => $fav ) );
> > $this->set( 'fav', $fav );
>
> > Thanks in advance!
> > ~ Dan
>
> http://groups.google.com/group/cake-php/search?group=cake-php&q=%22GR...http://groups.google.com/group/cake-php/search?group=cake-php&q=%22fi...
>
> HTH,
>
> AD7six
> Please note:
> The manual/bakery is a good place to start any quest for info.
> 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).


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 week.
>
> thanks,
>
> lukemack.
>
>
> >
>

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 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?hl=en
-~--~~~~--~~--~--~---



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

---

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: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de [EMAIL PROTECTED]
Enviado el: Jueves, 08 de Febrero de 2007 05:32 p.m.
Para: Cake PHP
Asunto: Recommend any awesome Cake books?

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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



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 everything in rails to be in CakePHP.


Run the bake.php script in /cake/scripts/bake.php.

-- 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?hl=en
-~--~~~~--~~--~--~---



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* console*  generate* plugin*   runner*
> ../  breakpointer*  destroy*  performance/  process/  server*
>
> for example:
>
> % ./script/generate model Person
>
> will generate the necessary files for the model and the database
> migration
>
> % ./script/destroy model Person
>
> this command would delete the Person model and all supporting files
>
> Bottomline... i am just wondering what the equivalent would be in
> Cake or am i to assume that if i wanted to create a new model, or
> controller, or view I would have to do this all by hand (which isn't
> that painful... just not as quick and easy as rails...)
>
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 real question and an idiot

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 edit permission.

please help me, how can i use formHelper this situation.

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?hl=en
-~--~~~~--~~--~--~---



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/  process/  server*

for example:

% ./script/generate model Person

will generate the necessary files for the model and the database
migration

% ./script/destroy model Person

this command would delete the Person model and all supporting files

Bottomline... i am just wondering what the equivalent would be in
Cake or am i to assume that if i wanted to create a new model, or
controller, or view I would have to do this all by hand (which isn't
that painful... just not as quick and easy as rails...)


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



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 now that jquery 1.1.1 is out its more compact than before and faster than 
> it was
> also there is the interface lib for jquery which is I think fully featured.

 Total lie :)
 it's bigger than before (8KB more, in the compressed version, going 20KB)
 interface 1.1.2 is 100KB uncompressed , but it's pretty modular (you
might use only 4 or five modules: to use sortables, for instance, it's
20KB).
 If you use the very same compressor to Prototype, it goes to 30KB,
and scriptaculous lib , if I remember correctly, 40KB, complete (it
has bigger modules, though)
 About speed, it's harder to tell, but i'm having a VERY hard time to
optimize Interface's sortable, drop for a very complex layout with
many items to be sorted: it was taking about 12 seconds to START a
drag. After messing around, it went to less than one second. And the
sortables DO NOT work with tables, If you need, you must go to
scriptaculous (don't know about dojo, yui)



> It much easier to learn and code than prototype (IMHO) - and the jquery list 
> is very active.

  Yes, there was a big difference here.
  But now, prototype crew woke up and set a docs site, started writing
stuff for non-hardcore programmers, a better release cycle, but i'm
not sure about the prototype mailing list.
  And it's faster to learn prototype, indeed, although it's not as
powerful as prototype. But we  never need that power, do we ? :D


> For instance in cakePHP 1.2 I am finding some issues with using the paginator 
> helper
> since it has code for prototype built in. With jquery this is not needed

  Since it's not even a DEV release, cake 1.2 , and you found a bug
(an issue ? :) , please report it :]


> as you attach events to elements via classname or ids foreinstance.  I have a 
> jLink class
> which I use to change the content of a page.  Below is the jQuery code that 
> attaches the > binds the code to anchors with

   prototype works in the same way even before jquery's first release.
the code maybe a little more verbose, but just a few lines.

// http://foo.com";>Click me
Event.observe('clicker', 'click', functionName);

if you are not using IDs, you may do it this way

$$('div#page a.jLink').each(
  Event.observe(this, 'click', functionName);
);

http://ajaxian.com/archives/prototype-adds-css-selector-function-divpage-psummary-img
(january 18th, 2006)


  I'm a big fan of jquery's pragmatism, but it's not a medicine for
everything, be aware of that ;)
  And question everything you hear. always.

  Spark


On 2/8/07, Sam Sherlock <[EMAIL PROTECTED]> wrote:
> 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 the past
> http://docs.jquery.com/Tutorials
> http://15daysofjquery.com/category/tutorials/
> http://dzone.com/rsslinks/the_10_minute_jquery_tutorial.html
>
> AFAIK prototype require more code than jquery and is generally not
> unobtrusive, I may be wrong about this
>
> and now that jquery 1.1.1 is out its more compact than before and faster
> than it was
> also there is the interface lib for jquery which is I think fully featured.
>
> It much easier to learn and code than prototype (IMHO) - and the jquery list
> is very active.
>
> For instance in cakePHP 1.2 I am finding some issues with using the
> paginator helper since it has code for prototype built in. With jquery this
> is not needed
>
> as you attach events to elements via classname or ids foreinstance.  I have
> a jLink class which I use to change the content of a page.  Below is the
> jQuery code that attaches the binds the code to anchors with
>
> // jLink - now add events
> $("a.jLink").click(function(event) {
>
>event.stopPropagation ();
>
>event.preventDefault();
>
>
>jLinkCall(this.href);
> });
>  // ### Begin jLink Events ###
>
> function jLinkCall(jHref)
> {
>
> // extract the id from this.href
> var htmlDoc = new String(jHref);
>
> // CODE TO PROCESS THE HREF {WHATEVER YOU NEED TO DO}
> ...
>
> // SLIDE UP THE MAIN DIV
> $("div#main").slideUp("fast").empty();
>
> // REQUEST JSON CONTENT
> $.getJSON("/articles/data/" + htmlDoc,params,function(json) {
> // debug in firebug
> console.debug(json);
> );
> } // END jLinkCall()
>
> in the time it has taken me to prepare this others have shed some light.
>
> I will be looking in to this information which I will be looking into
> myself.
>
> bake on !!
>
>
> On 08/02/07, fredBH <[EMAIL PROTECTED]> wrote:
> >
> > hi everyone!
> >
>

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:
>
> http://blog.evansagge.com
>
> Otherwise we would have two versions of the same library floating around.
> Not particularly DRY if you ask me ;)
>
> -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: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> de MrTufty
> Enviado el: Jueves, 08 de Febrero de 2007 12:14 p.m.
> Para: Cake PHP
> Asunto: Re: More 1.2 validation
>
> When I get this sorted out and working in a way that makes sense to
> everyone, I'll post it up somewhere as a complete package to drop in.
> And probably stick it up on the Bakery or Trac, if enough people are
> interested in seeing it there.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



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 setting
features, and value 3 will have setting featurs. and no value will
have the same setting. I set a view page change.thtml, so that I can
update setting. I am learning, and very slow. I couldn't firgure out
how to do it. So far I have the following problems:
1. Everytime hit submit, it doesn't save teh change I made. What I
want is to save all the changes I made, it has at least 2 rows or 2
fields. I tried to used saveField, it didn't work also.
2. Another problem is javascript I used to validate that no two
settings have the same value. I don't know how to compare the selected
value since all the select have the same name. You can see all input
have the same name, all select have the same name, as below source
code from firefox:
   
 

columns
reviews
videos
features


 
columns
reviews
videos

features


Here is my code for change.thtml:
*
Settings  <- Back