Re: Moving /pages/ to /

2006-06-13 Thread JohnRobert

Thanks guys! I'll give this a try when i get a bit of free time.

Great blog too Felix! I did have a look on there yesterday, but
couldn't find that post!


--~--~-~--~~~---~--~~
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: Can't set checkbox "checked"

2006-06-13 Thread RosSoft

mutabor solved it with gwoo solution


--~--~-~--~~~---~--~~
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: CakePHP LDAP?

2006-06-13 Thread RosSoft

Samuel: Is that necessary in PHP4 ? Can you verify it?
Because AppModel extends Model -->extends Object

And Object class implements the php4 constructor for compatibility with
__construct


--~--~-~--~~~---~--~~
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: Naming Conventions and Case Sensitivity (Linux & Windows)

2006-06-13 Thread Grant Cox

As you say, the problem will probably be case sensitivity - which is a
filesystem issue.  So, ensure that the file names have the same case as
what you are including - from what you've posted above your helper and
component should be Myform.php (capital M), as this is what you have in
your $helpers and $components arrays.

HTH,
Grant Cox


--~--~-~--~~~---~--~~
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: CakePHP LDAP?

2006-06-13 Thread Levi

ok thanks samuel


--~--~-~--~~~---~--~~
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: CakePHP LDAP?

2006-06-13 Thread Samuel DeVore
I think that the only changes I made were to add function LdapUser () {  $this->__contruct();}On 6/13/06, Levi <
[EMAIL PROTECTED]> wrote:Hi SamuelWhat modifications you made when you implement it in PHP4? I'm very
interested with this Model...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: CakePHP Wiki: In Loving Memory

2006-06-13 Thread [EMAIL PROTECTED]

I'd have been lost the last few weeks without the Wiki.

The manual is great but has some way to go before it makes the Wiki
truly obsolete.

BTW: I appreciate the efforts in getting the docs up to par, it's a big
job. 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
-~--~~~~--~~--~--~---



Naming Conventions and Case Sensitivity (Linux & Windows)

2006-06-13 Thread brandags

I've written a form component and helper
(http://cakeforge.org/snippet/detail.php?type=package&id=17) that work
fine in Windows, but when I upload them to Linux, I get an error.  A
variable that is being set in the component does not seem to be
available in the view, when on Linux. But it works fine in Windows. I
assume this is because of some case-sensitivity issue since Linux is
case-sensitive. Maybe I'm making a mistake with naming conventions or
using the wrong case somewhere.

Can anyone see what I'm doing wrong in my declarations?

/controllers//components/myform.php
class MyformComponent extends Object
{
function startup( &$controller )
{
$validations = array() ;
foreach( $controller->modelNames as $model )
{
$validations += $controller->$model->validate ;
}

$this->controller = $controller;
$this->controller->set( 'formData', array(
'validations' => $validations,
'data' => $this->controller->data )
);
}
}

/controllers/photographers_controller.php
class PhotographersController extends AppController
{
var $name = 'Photographers'; // for PHP4
var $helpers = array('Html', 'form', 'Myform','Javascript', 'Error');
var $components = array('Myform');
...
}

/views/helpers/myform.php
class MyformHelper extends FormHelper
{
...
}

/views/photographers/add.thtml


The view is where the error is - I only showed the line with the
problem.  Here is the error message:

Notice: Undefined variable: formData in
/.../app/views/photographers/add.thtml on line 12

I have debugged it enough to know that the component's startup()
function is running and that $formData is getting set in the component
(a pr() inside the startup function shows the $formData variable full
of data), but somehow the variable $formData doesn't seem to be getting
to the view in Linux.  Any ideas what would be causing this?

Thanks,
Brandon


--~--~-~--~~~---~--~~
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: Moving /pages/ to /

2006-06-13 Thread tjquoll

That's pretty cool. I've been playing with a similar idea in a cms I'm
building for our main business site. I've been searching the code
looking for an alternative to doing the  "foreach
($paths->controllerPaths as $path)" trick to get the controller names
but haven't found any otherway yet.

To Cakeify small legacy html sites I've been doing something like

if(preg_match("/^(.*)\.html/i","$from_url", $matches)){
$from_url = "pages/".$matches[1];
}

in routes.php to map .html files in / to /pages.

eg. /file.html goes to /pages/file




Felix Geisendörfer wrote:
> I think I've already created what you are looking for. Good luck with it
> ; ):
>
> http://www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp/
>
> I only use it on my webdesign page (see below), but it seems to work
> pretty well so far.
>
> Best Regards,
> Felix Geisendörfer aka the_undefined
> --
> http://www.thinkingphp.org
> http://www.fg-webdesign.de
>
>
> JohnRobert schrieb:
> > Before I begin, I'm quite new to cake php (about 2 days using it). So
> > far so good!
> >
> > Before I can fully commit, I need to be able to create static pages
> > under / rather than only under /pages/. I had a go at changing some
> > routes, to no avail!
> >
> > Before we continue, I'd also like to note I want /news/ /edit/ etc.. to
> > behave in the default manner, i.e - running their equvilent controller
> > and doing what they'ed do on a fresh install, so / isn't *only* a place
> > for static pages, but also a few controllers of my choosing.
> >
> > I'd imagine this requires defining each controller in the routes
> > config, I'm just not too sure how to do it, I found the manual a bit
> > confusing.
> >
> >
> > >
> >
> >
>
> --090608090300010103060907
> Content-Type: text/html; charset=ISO-8859-15
> Content-Transfer-Encoding: quoted-printable
> X-Google-AttachSize: 1707
>
> 
> 
> 
> http-equiv="Content-Type">
>   
> 
> 
> I think I've already created what you are looking for. Good luck with
> it ; ):
> 
>  href="http://www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp/";>http://www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp/
> 
> I only use it on my webdesign page (see below), but it seems to work
> pretty well so far.
> 
> Best Regards,
> Felix Geisendörfer aka the_undefined
> --
> http://www.thinkingphp.org";>http://www.thinkingphp.org
> http://www.fg-webdesign.de";>http://www.fg-webdesign.de
> 
> 
> 
> JohnRobert schrieb:
>   cite="[EMAIL PROTECTED]"
>  type="cite">
>   Before I begin, I'm quite new to cake php (about 2 days using 
> it). So
> far so good!
>
> Before I can fully commit, I need to be able to create static pages
> under / rather than only under /pages/. I had a go at changing some
> routes, to no avail!
>
> Before we continue, I'd also like to note I want /news/ /edit/ etc.. to
> behave in the default manner, i.e - running their equvilent controller
> and doing what they'ed do on a fresh install, so / isn't *only* a place
> for static pages, but also a few controllers of my choosing.
>
> I'd imagine this requires defining each controller in the routes
> config, I'm just not too sure how to do it, I found the manual a bit
> confusing.
>
>
>
>
>   
> 
> 
> 
> 
> --090608090300010103060907--


--~--~-~--~~~---~--~~
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: CakePHP LDAP?

2006-06-13 Thread Levi

Hi Samuel

What modifications you made when you implement it in PHP4? I'm very
interested with this Model...

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: first site

2006-06-13 Thread Russ

ok to make sure i got this i cerated a new controller called it
about_controller.php
I used this code in it:


pulls up the page fine as this http://localhost/php/index.php/about

I tried to use core.php retty urls but that aint working
i used the blog tutorial route fix to make in land on model intro
but for some reason i can't make it go to http://localhost/php/about
it seems i nedd the index.php in 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
-~--~~~~--~~--~--~---



Re: first site

2006-06-13 Thread Russ

awsome thanks i was missing it :)

my other stupid idiot of the day question is how do i get rid of this?
http://localhost/php/index.php/about
and make it
http://localhost/php/about

removing the index.php currently i editted my route dir to remove the
default floder it was landing in called intro.


--~--~-~--~~~---~--~~
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: CakePHP Wiki: In Loving Memory

2006-06-13 Thread Jose Cedeno
Is there a demo or beta site of the Bakery ? I think it would be useful to get some input before the Bakery comes out of the oven.What is going to be the style of the Bakery ? Just articles ? if so how we'll we able to keep track of those ? Will the Bakery allow for user comments or users providing tips to other users ?
JoseOn 6/13/06, gwoo <[EMAIL PROTECTED]> wrote:
Eventually they will direct you to the bakery where you can searchand have a good time with information that is much more relevant,useful, and correct.
--~--~-~--~~~---~--~~
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: CakePHP Wiki: In Loving Memory

2006-06-13 Thread gwoo

Eventually they will direct you to the bakery where you can search  
and have a good time with information that is much more relevant,  
useful, and correct.


--~--~-~--~~~---~--~~
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: CakePHP Wiki: In Loving Memory

2006-06-13 Thread Alister Bulman

On 14/06/06, gwoo <[EMAIL PROTECTED]> wrote:
>
> All the valuable content from the wiki will be transitioned to the
> Manual or the Bakery.
> Eventually, the wiki domain will point to the Bakery.
> The reason is that much of the information on the wiki causes
> confusion and the Bakery will give us a better place to make sure the
> content is correct.
> There is no point in leaving links to mis-information.

Will links break though?

--~--~-~--~~~---~--~~
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: CakePHP Wiki: In Loving Memory

2006-06-13 Thread gwoo

All the valuable content from the wiki will be transitioned to the  
Manual or the Bakery.
Eventually, the wiki domain will point to the Bakery.
The reason is that much of the information on the wiki causes  
confusion and the Bakery will give us a better place to make sure the  
content is correct.
There is no point in leaving links to mis-information.

Bake on.


--~--~-~--~~~---~--~~
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: CakePHP Wiki: In Loving Memory

2006-06-13 Thread Alister Bulman

On 13/06/06, John David Anderson <[EMAIL PROTECTED]> wrote:
> Don't you worry. Our friend the Wiki is in for a stay in purgatory
> before he's completely let go.
>
> Well be keeping him around until we're sure we haven't missed anything.

But do you intend to actually delete the wiki entirely?  Even if it's
a year away, I'd still think it would be best to leave it there in
some form - heck, spider the domain and put it up as plain heml pages
at the same URLs, but don't break the web-links to it.

Alister

--~--~-~--~~~---~--~~
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: CakePHP Wiki: In Loving Memory

2006-06-13 Thread John David Anderson

Don't you worry. Our friend the Wiki is in for a stay in purgatory  
before he's completely let go.

Well be keeping him around until we're sure we haven't missed anything.

Don't let that be an excuse for not ticketing things you want to see  
in the manual, or getting some content ready for the Bakery, though.  
Everyone needs to act like we're pulling the plug tomorrow. ;o)

-- John

On Jun 13, 2006, at 4:25 PM, Alister Bulman wrote:

>
> On 13/06/06, John David Anderson (_psychic_) <[EMAIL PROTECTED]>  
> wrote:
>> Dearly beloved, we are gathered here today to remember a friend.
>> Storm or fair weather, he was there for us. This friend is one we all
>> know: the Wiki.
>
> There's a lot of things that link to the wiki.  While I agree that
> there can be a better collection of documentation, I would suggest not
> simply dropping it entirely. Make it read-only for all but a few
> people, and just have them put onto the pages a link to the better
> information, and tell everyone the wiki page is depreciated, but
> please don't break links.
>
> Alister
>
> >


--~--~-~--~~~---~--~~
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: CakePHP Wiki: In Loving Memory

2006-06-13 Thread Alister Bulman

On 13/06/06, John David Anderson (_psychic_) <[EMAIL PROTECTED]> wrote:
> Dearly beloved, we are gathered here today to remember a friend.
> Storm or fair weather, he was there for us. This friend is one we all
> know: the Wiki.

There's a lot of things that link to the wiki.  While I agree that
there can be a better collection of documentation, I would suggest not
simply dropping it entirely. Make it read-only for all but a few
people, and just have them put onto the pages a link to the better
information, and tell everyone the wiki page is depreciated, but
please don't break links.

Alister

--~--~-~--~~~---~--~~
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: Moving /pages/ to /

2006-06-13 Thread Felix Geisendörfer




I think I've already created what you are looking for. Good luck with
it ; ):

http://www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp/

I only use it on my webdesign page (see below), but it seems to work
pretty well so far.

Best Regards,
Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de



JohnRobert schrieb:

  Before I begin, I'm quite new to cake php (about 2 days using it). So
far so good!

Before I can fully commit, I need to be able to create static pages
under / rather than only under /pages/. I had a go at changing some
routes, to no avail!

Before we continue, I'd also like to note I want /news/ /edit/ etc.. to
behave in the default manner, i.e - running their equvilent controller
and doing what they'ed do on a fresh install, so / isn't *only* a place
for static pages, but also a few controllers of my choosing.

I'd imagine this requires defining each controller in the routes
config, I'm just not too sure how to do it, I found the manual a bit
confusing.




  


--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---





Moving /pages/ to /

2006-06-13 Thread JohnRobert

Before I begin, I'm quite new to cake php (about 2 days using it). So
far so good!

Before I can fully commit, I need to be able to create static pages
under / rather than only under /pages/. I had a go at changing some
routes, to no avail!

Before we continue, I'd also like to note I want /news/ /edit/ etc.. to
behave in the default manner, i.e - running their equvilent controller
and doing what they'ed do on a fresh install, so / isn't *only* a place
for static pages, but also a few controllers of my choosing.

I'd imagine this requires defining each controller in the routes
config, I'm just not too sure how to do it, I found the manual a bit
confusing.


--~--~-~--~~~---~--~~
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: Can't set checkbox "checked"

2006-06-13 Thread mutabor


gwoo wrote:
> paste your controller and view in the cakebin.
> http://cakephp.org/pastes/add
>
> or jump on irc http://irc.cakephp.org
>
> we can fix you up.

Thank you, I will try.

it seems this is my own bug so far ...


--~--~-~--~~~---~--~~
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: first site

2006-06-13 Thread AD7six

Hi Russ,

If you follow the tutorial (to the letter) you'll find that a lot of
your questions will be answered before you get to them.

Re uses, it's better to look and then ask ;)

http://groups.google.com/group/cake-php/browse_thread/thread/785a8b3241995a91/269a1d8d8f839aac?q=uses+null&rnum=3#269a1d8d8f839aac
http://cakephp.org/search/index/uses%20null

Cheers,

AD7six


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



GooooooooooooooooaaaaaaaLLLLL

2006-06-13 Thread Fernando





Brazil Hexa

gwoo escreveu:

  paste your controller and view in the cakebin.
http://cakephp.org/pastes/add

or jump on irc http://irc.cakephp.org

we can fix you up.



  


--~--~-~--~~~---~--~~
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: first site

2006-06-13 Thread Russ

i am following that were would the $uses=null go?


--~--~-~--~~~---~--~~
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: Can't set checkbox "checked"

2006-06-13 Thread gwoo

paste your controller and view in the cakebin.
http://cakephp.org/pastes/add

or jump on irc http://irc.cakephp.org

we can fix you up.


--~--~-~--~~~---~--~~
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 w/ Graham Bird's Task List Tutorial

2006-06-13 Thread jeannie109

Thanks, najjanna -- that worked just fine.  I tried emailing Graham
directly, but did not get an answer.  Most things are working ok,
accept for on a Refresh, if you click on Job Undone (uncheck one of the
completed jobs below) it gives an error message Not Found
The requested URL /tasks_done/71 was not found on this server.  Also,
the input box is not clearing when you enter a new job.  Any
suggestions.

http://jobboard.bernardtransportation.com/CAKE/tasks

Thank you everyone for all your suggestions and help.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: first site

2006-06-13 Thread AD7six

Hi Russ,

It looks like you have the right idea, for any page that doesn't
use/need a model set $uses = NULL.

That said: I would suggest following this
http://manual.cakephp.org/chapter/18 and then asking the questions that
remain - you'll find it to be less time overall in terms of developing
what you want to do.

For any pages that don't contain any logic - put them in
/app/pages/NAME.thtml and you can see them by calling /pages/NAME.

Cheers,

AD7six


--~--~-~--~~~---~--~~
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: Zend's Devzone Article about Baking Day

2006-06-13 Thread CalE

John and Gustavo,

John:
>>Good to hear from you - Cake's ACL still has some of your original
>>ideas in it.
You need to get those out of there and replace them with some GOOD
ideas.  :)

>>During a dev meeting today, we talked about it. We'd like to
>>brainstorm up some possibilities for article topics and get back to you.
I'll look forward to hearing from you. Glad y'all are interested.

Gustavo Carreno:
> On 6/13/06, CalE <[EMAIL PROTECTED]> wrote:
> Best of luck with Zend and that new hat: Editor ;).
> Personally I think you should put an "aka (roving reporter)" after it,
> cuz it siuts you quite well !!!
Yea, I had mixed feelings about losing my 'roving reporter' status but
as with everything in life change is inevitable.

=C=


--~--~-~--~~~---~--~~
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: Can't set checkbox "checked"

2006-06-13 Thread mutabor


gwoo wrote:
> you need to specify a checkbox value
> checkbox('Download/is_track',null,array
> ('value'=>'1'))?>
>
> Then in your controller you just set
> $this->data['Download']['is_track'] in the controller

Thank you gwoo,  but

checkbox('Download/is_track',null,array('value'=>'1'))?>

does not also work for me. Madness. The checkbox is still not checked.
The only way I found to set it checked is

checkbox('Download/is_track',null,array('value'=>''))?>

This is the first problem with Cake I run into after have created
almost whole site. It's pity.


--~--~-~--~~~---~--~~
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: Can't set checkbox "checked"

2006-06-13 Thread gwoo

you need to specify a checkbox value
checkbox('Download/is_track',null,array 
('value'=>'1'))?>

Then in your controller you just set
$this->data['Download']['is_track'] in the 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: Can't set checkbox "checked"

2006-06-13 Thread mutabor


[EMAIL PROTECTED] wrote:
> http://api.cakephp.org/html_8php-source.html#l00259
>
> Looking at the API and the corresponding code.  Looks like that if you
> pass 'value' = > 'checked' that would do it.

Thank you for reply.

But 'value' = > 'checked' also does not work.

I looked through API :

00260 $value = $this->tagValue($fieldName);

this line returns $value = ''

so in case I put following:

checkbox('Download/is_track', null, array('value' =>''))?>

checkbox become checked. But this is quite illogical.

And also I am not sure why "checked" attribute is overridden in this
checkbox function


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



first site

2006-06-13 Thread Russ

what i am doing now is creating structure of site

ie: (home, contact, faq's, submit, contact,)

now imf trying to write fuctions

here is what i have so far all the pages will have data on it
eventually but right now i want to render just the html.

how would i do it? im confused, do i have to write a module and table
for every page?

cant i just write a function to render a page like the about page?

here is my main controller

render();

}

}
?>

can i add a line like this to render about or am i lost?

function about()
{

$this->render();

}

thanks right now i just want to do page calls but they will all have
data on them.

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
-~--~~~~--~~--~--~---



CakePHP Wiki: In Loving Memory

2006-06-13 Thread John David Anderson (_psychic_)

Dearly beloved, we are gathered here today to remember a friend.  
Storm or fair weather, he was there for us. This friend is one we all  
know: the Wiki.

As we approach a new release, we're saying goodbye to our dearest of  
friends, the CakePHP Wiki. His service rendered was noble, but as  
CakePHP has matured to become the biggest, most awesome web framework  
there is, we're up for something new.

Now that the CakePHP Manual is becoming more complete, we've realized  
that we need a better way for you folks to contribute to the  
documentation efforts. The Wiki has filled that position until now:  
but we've found that its hard to keep tabs on and hard to update.  
Even as you read this message, we're working to provide a new tool  
called the CakePHP Bakery. This new tool will allow community members  
to contribute articles of any size and tie it to a specific CakePHP  
release. This also allows the CakePHP development team to help  
authors craft content that is 100% correct. Stay tuned for more on  
the Bakery.

What does this mean for you?

- First, if you have content on the wiki you like, you'll need to get  
a copy of it before the Wiki merges with the infinite sometime next  
week.

- Secondly: get that content either in the Manual (by submitting a  
ticket to Trac[1]), or polish it up for a good publish in the Bakery!  
Please help us with this effort! If you see a section that would fit  
in the manual, please log a ticket and provide a link to the relevant  
section in the wiki.

I'm committed to making the docs better, and hopefully with your  
help, we can get everything polished up and transformed from outdated  
wiki material to official Manual content or Bakery tutorials.

Your friend,

John David Anderson
aka _psychic_
CakePHP Docs




--~--~-~--~~~---~--~~
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: Proof of concept: Custom validation using beforeValidate

2006-06-13 Thread gwoo

I prefer to have my messages in the view.


--~--~-~--~~~---~--~~
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: hasmany saves and validations

2006-06-13 Thread [EMAIL PROTECTED]

$this->ModelA->save('ModelA' => $data['ModelA'],true);
$this->ModelB->save('ModelB' =>  $data['ModelB'],true);

As far as I know no other way around the save and double validation.

If there was a CakePHP cascade option I am sure it would just be a
shortcut to writing these two lines.  And then that would pose more
problems that solutions.


--~--~-~--~~~---~--~~
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: Where do I put custom validators?

2006-06-13 Thread brandags

Thanks! That works great.


--~--~-~--~~~---~--~~
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: othAuth and default sessions

2006-06-13 Thread CraZyLeGs

var $othAuthRestrictions = "*" in AppController means every action of
every controller is restricted, that is the use that logs in needs to
have his group have permissions,
permissions are of this format:
1) *
2) CAKE_ADMIN
3) CAKE_ADMIN/controller/*
4) controller/action/p/a/r/a/m
5) controller/*

so make sure you have the permissions right.

a new version of othAuth is in preparation, will be anounced when it's
fully tested.


--~--~-~--~~~---~--~~
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: $ajaxOptions (updateElement, afterUpdateElement) for autocomplete

2006-06-13 Thread [EMAIL PROTECTED]

Boris there is many times that I all but gave up on the AjaxHelper.  It
is seriously lacking full support for the scriptaculous library that it
was made to support.  I have tried to work on it many times in the
past, but at that point just couldn't understand it.  It seems that any
of the ajax methods will pass the ajaxOptions parameter off to a couple
different methods to process it.

I also couldn't understand why CakePHP chose to rename the standard
ajaxOptions named in scriptacoulous.  So, when we look at scriptaculous
examples we have to have the CakePHP rosetta stone to translate
afterUpdateElement to after in CakePHP land.

Now that I have a better understand of AJAX and CakePHP I might take
another crack at cleaning up this helper that is in desperate need of
housecleaning.


--~--~-~--~~~---~--~~
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: custom session name

2006-06-13 Thread AD7six

I think you should maybe read what that constant is for before
effectively deleting it ;)

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

Possibly (as I also don´t know what you are wanting to do) you want to
change CAKE_SESSION_COOKIE or CAKE_SESSION_STRING.

Cheers,

AD7six


--~--~-~--~~~---~--~~
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: One view Including other views

2006-06-13 Thread [EMAIL PROTECTED]

Yes for ajax what you would do is

$display = $this->requestaction('/controller/ajaxmethod',
array('return', 'bare'));
$this->set('display', $display);

Then in your main view this is an echo $display;  Then from then on out
the ajax will update the div.  Or if they refresh it will grab that
ajax method again.

Also, to degrade without javascript you need to use the RequestHandler
to see if the call isAjax or not and if it isn't then that ajaxmethod
will need to redirect back to it's called method to refresh the page.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



hasmany saves and validations

2006-06-13 Thread [EMAIL PROTECTED]

Another newbie question: can some one point me to a tutorial or explain
how to validate an 'add' method that would simultaneously add records
to two related tables?

basically, there is a ticket field and each ticket hasmany comments.
conversely each comment belongsto only one ticket. in order to start a
ticket, you must add one comment at the same time on the same form.

the queries work fine when viewing the data, but when validating, i

1) have to do validation twice, once on each model, and
2) have to save twice.

is there an easy solution? i found that other people asked similar
questions here, but most of the posts were old and the solutions hacks.
is there a cakephp way?


--~--~-~--~~~---~--~~
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: Can't set checkbox "checked"

2006-06-13 Thread [EMAIL PROTECTED]

http://api.cakephp.org/html_8php-source.html#l00259

Looking at the API and the corresponding code.  Looks like that if you
pass 'value' = > 'checked' that would do it.


--~--~-~--~~~---~--~~
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: pages controller and setting a different layout

2006-06-13 Thread [EMAIL PROTECTED]

$this->render(view, layout);

It is set to autorender by default and layout is set to default by
default.

So, you could pass the parameter and either make the parameter the
exact layout name and just do a test for it not being null to render
with $layout set.

function method($page = null, $layout = null)
{
  ..some code..
  if ($layout != null) {
$this->render('method', $layout);
  }
}


--~--~-~--~~~---~--~~
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: How optimize application?

2006-06-13 Thread [EMAIL PROTECTED]

This may help too - I sort of accidentally stumbled on to this method
while I was working on a project with this thread in mind:

bindModel(array(
'hasMany' => array(
'Comment' => array(
'className' => 'Comment',
'conditions' => $conditions,
'order' => $order,
'limit' => $limit,
'foreignKey' => 'user_id',
'dependent' => true,
'exclusive' => false,
'finderSql' => '',
'counterSql' => ''
)
)
));
}

function beforeDelete()
{
if(parent::beforeDelete())
{
// attach comment model to user so all user's comments 
get wiped on
->del
$this->bindComment();

return true;
}
}

}

?>

Basically now, no matter where a "User" is deleted from, it will bind
the Comments model as "dependent" beforehand, and then delete all
Comments associated with the User being removed.  This way I don't
always have to have Comments bound to my User, but where I do want user
comments, I can say $User->bindComment();


--~--~-~--~~~---~--~~
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: Zend's Devzone Article about Baking Day

2006-06-13 Thread Gustavo Carreno

On 6/13/06, CalE <[EMAIL PROTECTED]> wrote:
> Yep, same one.  Back then I was Director of IT for Jupiter Hosting and
> we were considering CakePHP for a large development project. (I'm not
> sure what they eventually chose)  I've since moved on and am now
> working at Zend. I still follow Cake closely because the time I spent
> on the irc channel and the mailing list gave me a deep respect for the
> development team.

Good to know that you are still around Cal, it's good to have you!!

Best of luck with Zend and that new hat: Editor ;).
Personally I think you should put an "aka (roving reporter)" after it,
cuz it siuts you quite well !!!

-- 
Gustavo Carreno
---
< If you know Red Hat you know Red Hat,
If you know Slackware you know Linux >

--~--~-~--~~~---~--~~
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: How to with layout/templates?

2006-06-13 Thread yusuf

yes, i was trying to get at "theme"ing. thanks.



John Zimmerman [gmail] wrote:
> Chris Kausel created a class called Icing which I have not tried but I
> believe is trying to address some of the concerns that you have.
>
> You can view the code at
> http://cakeforge.org/snippet/detail.php?type=snippet&id=67
>
> Cake does not have built in support for the traditional "Theme" idea which I
> believe is what you are trying to accomplish, but if you keep your views
> restricted to the basics, styled only by CSS, and keep the actual look and
> feel in the stylesheets and your default layout, then when a design change
> needs to happen you only have 2-3 files to alter
> (app/views/layouts/default.thtml and the corresponding stylesheets).
>
> On 6/9/06, bigdog <[EMAIL PROTECTED]> wrote:
> >
> >
> > This might be a good start:  http://manual.cakephp.org/chapter/8 ;
> > [header][-->][footer]
> >
> > Each controller stores a template.  So that is where you would be
> > updating "$content_for_layout" for your templates
> >
> >
> > >
> >
>
> --=_Part_60531_6843881.1149961904314
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 1413
>
> Chris Kausel created a class called Icing which I have not tried but I 
> believe is trying to address some of the concerns that you have.You 
> can view the code at  href="http://cakeforge.org/snippet/detail.php?type=snippet&id=67";>
> http://cakeforge.org/snippet/detail.php?type=snippet&id=67Cake
>  does not have built in support for the traditional "Theme" idea 
> which I believe is what you are trying to accomplish, but if you keep your 
> views restricted to the basics, styled only by CSS, and keep the actual look 
> and feel in the stylesheets and your default layout, then when a design 
> change needs to happen you only have 2-3 files to alter 
> (app/views/layouts/default.thtml and the corresponding stylesheets).
> On 6/9/06,  class="gmail_sendername">bigdog  PROTECTED]">[EMAIL PROTECTED]> wrote: class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 
> 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> This might be a good start:   href="http://manual.cakephp.org/chapter/8";>http://manual.cakephp.org/chapter/8
>  ;[header][--> ?>][footer]Each controller stores a template.  So that 
> is where you would be
> updating "$content_for_layout" for your 
> templates
> 
> --=_Part_60531_6843881.1149961904314--


--~--~-~--~~~---~--~~
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: Zend's Devzone Article about Baking Day

2006-06-13 Thread John David Anderson


On Jun 13, 2006, at 10:28 AM, CalE wrote:
> Yep, same one.  Back then I was Director of IT for Jupiter Hosting and
> we were considering CakePHP for a large development project. (I'm not
> sure what they eventually chose)  I've since moved on and am now
> working at Zend. I still follow Cake closely because the time I spent
> on the irc channel and the mailing list gave me a deep respect for the
> development team.

Good to hear from you - Cake's ACL still has some of your original  
ideas in it.

> I wish you guys the best and if I can ever do anything, just drop me a
> line.

We really appreciate the plug for Cake. Good press is always much  
appreciated.

> Oh, hey, shameless plug here. I'm trolling for authors for articles.
> Anything tutorial like that is PHP (not necessarily Zend) based.
> Anyone interested in writing an in depth CakePHP Tutorial?  :)

During a dev meeting today, we talked about it. We'd like to  
brainstorm up some possibilities for article topics and get back to you.

-- 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
-~--~~~~--~~--~--~---



Re: Auditing database actions

2006-06-13 Thread Russell

I think you could do this by overriding the save function.

1. If you haven't already, make a copy of the cake/app_model.php and
put it in your app folder.

2. Copy the save function from model_php5.php or model_php4.php and
paste in into app_model.php in your app folder.

3. In the newly pasted save function in app/app_model.php, find the
line with $this->hasField('created').

4. Add some code inside of those if blocks to handle your create_user
and modify_user fields.


--~--~-~--~~~---~--~~
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: Zend's Devzone Article about Baking Day

2006-06-13 Thread CalE

John David Anderson (_psychic_) wrote:
> Hmmm
>
> When the IRC channel first opened, there was a CalE that hung around
> quite a bit. Makes me wonder if we've got friends at Zend now. Anyone
> else remember him?

John,

Yep, same one.  Back then I was Director of IT for Jupiter Hosting and
we were considering CakePHP for a large development project. (I'm not
sure what they eventually chose)  I've since moved on and am now
working at Zend. I still follow Cake closely because the time I spent
on the irc channel and the mailing list gave me a deep respect for the
development team.

I wish you guys the best and if I can ever do anything, just drop me a
line.

Oh, hey, shameless plug here. I'm trolling for authors for articles.
Anything tutorial like that is PHP (not necessarily Zend) based.
Anyone interested in writing an in depth CakePHP Tutorial?  :)

=C=
Cal Evans
Editor
http://devzone.zend.com
[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
-~--~~~~--~~--~--~---



pages controller and setting a different layout

2006-06-13 Thread [EMAIL PROTECTED]

Hi

I searched on Groups and asked to no avail on IRC. So now asking here!

I have a bunch of static pages for my app, so am very happy using the
pages controller to display these, it works well. But for some pages I
needed to set a diff layout. I couldnt easily see how to extend
PagesController as it seems to have little helper pieces of code, so I
adjusted its code to check if $page - passed by Route - was to havea
diff layout set.

This means for each non standard page I now have to put a linein my
routes config file.

But I was wonderingif there was a easier way for to have a diff. layout
set for a pages - based on a parameter pass or similar?

I am pretty new to this version of cake, although I did try it ages
ago, so I'm sure I am missing something. 

thanks

regards 

Luke


--~--~-~--~~~---~--~~
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: Where do I put custom validators?

2006-06-13 Thread AD7six

Hi Brandon,

A good place is probably your app/config/bootstrap.php file.

It will always be empty (I think) so you can safely leave it in place
when you upgrade cake without worrying that you are missing a new
constant/feature needed for the Cake core.

Cheers,

AD7six


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Can't set checkbox "checked"

2006-06-13 Thread mutabor

Hi all!
Firstly - I am completely newbie in Cake.

My problem is - in edit mode in my admin side I need to set checkbox
for is_track field [TINYINT(1)] checked and have no idea how to do it.

The way I am  trying to do it:

 VIEW:

checkbox('Download/is_track', null, array('value' =>1,
'checked'=>'checked'))?> - does not work

anybody help please :)


--~--~-~--~~~---~--~~
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: Zend's Devzone Article about Baking Day

2006-06-13 Thread Armando Sosa
If you are already registered on del.icio.us, everything you need to is clicking on this link:
http://del.icio.us/post?url="">and help push bakingday to the del.icio.us/popular (it was there last week, for a few minutes)
On 6/13/06, Gustavo Carreno <[EMAIL PROTECTED]> wrote:
Hey guys / galsStatus report:del.icio.us has an entry for bakingday, 1 hour ago. I don't know howthe system work, cuz I'm not a user, but can we "mod" up that entry
(is "save this" The right name ?) ? [1]I'm a newsvine user and have seeded a news there so please help mepromoting it: [2][1] http://del.icio.us/tamquam
[2] http://slax.newsvine.com/_news/2006/06/13/253585-baking-day-24-hours-of-cakephp-coding--< If you know Red Hat you know Red Hat,
If you know Slackware you know Linux >-- Armando Sosawww.nolimit-studio.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: custom session name

2006-06-13 Thread [EMAIL PROTECTED]

What I am trying to do is the following:

I have a simple authentication system in place for a site that can't
change. I must use PHP sessions named in a specific way. I was using
cakephp to build one section of the application, and would like it to
recognize the pre-existing session name. The cake PHP session seems to
'overwrite' the pre-existing session unless I change this:

define('CAKE_SESSION_SAVE', 'php');

to this

define('MY_PRE-EXISTING_SESSION_NAME', 'php');

now I have access to the session data. however I get the notices posted
above. again, i can't change the session stuff, it must be PHP-based
and named as i have it, not db.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



One view Including other views

2006-06-13 Thread Gonçalo Marrafa

Hi.

Is there a way of including other views, inside a given view? The idea is
similar to elements but, instead of being global, they would be elements
valid only for one controller's views.

I'm asking you this because i was just trying the AJAX task list tutorial
(http://www.grahambird.co.uk/cake/tutorials/ajax.php). If you look at it,
in the index view, the todo and done divs have the same code as the todo
and done views. It would be better to have the code only in one
place and simply insert it where needed. As i stated earlier, it's kinda
like elements, but constrained to one controller.

Can it be done?

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
-~--~~~~--~~--~--~---



Where do I put custom validators?

2006-06-13 Thread brandags

In cake/libs/validators.php there are four regular expressions for
validators. I would love to add to this list, but know I'm not supposed
to touch anything in the cake folder.
How do I add more global validator regular expressions to my app?

Thanks,
Brandon


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Auditing database actions

2006-06-13 Thread Peter

Hello All!!

I am a new member of the group and very new to Cake.  I have previously
been developing sites using Mojavi, but development of the framework
seems to have stalled.

My question is in regards to auditing user actions against database
tables.

I see that Cake has built in support of some auditing when tables have
the created and modified columns included in them.  I would like to
take the auditing a bit further and also capture the user name or id of
the person making the modified.  In essence, all my tables have 4
standard columns created, modified, create_user, modify_user.  can
someone point me in the right direction as to what classes would need
to be modified in the cake library to make this happen?

regards,

peter


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Zend's Devzone Article about Baking Day

2006-06-13 Thread Gustavo Carreno

Hey guys / gals

Status report:
del.icio.us has an entry for bakingday, 1 hour ago. I don't know how
the system work, cuz I'm not a user, but can we "mod" up that entry
(is "save this" The right name ?) ? [1]

I'm a newsvine user and have seeded a news there so please help me
promoting it: [2]

[1] http://del.icio.us/tamquam
[2] 
http://slax.newsvine.com/_news/2006/06/13/253585-baking-day-24-hours-of-cakephp-coding
-- 
< If you know Red Hat you know Red Hat,
If you know Slackware you know Linux >

--~--~-~--~~~---~--~~
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: How optimize application?

2006-06-13 Thread [EMAIL PROTECTED]


kiniu wrote:
> And you are right with bindModel function. When I removed
> hasAndBelongsToMany association from one of my model and binded it in
> action function del() $model->del() function didn't remove associations
> from DB.

actually if you call your bindModel function before you $model->del,
and you setup your association as "dependent", your associated models
will get properly deleted (I just got this to work last night)

http://rd11.com/posts/view/19 <- that may help you a little


--~--~-~--~~~---~--~~
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: Zend's Devzone Article about Baking Day

2006-06-13 Thread Gustavo Carreno

On 6/13/06, Armando Sosa <[EMAIL PROTECTED]> wrote:
> Thanks Gustavo
>
> If anybody has sponsor ideas please tell me. It's harder than I initially
> tought mostly because my poor english abilities. So if there's somebody with
> good PR skills who want to help me on that, please tell.

I've sent you a mail via your nolimits-studio[1] site that needs an answer.
Please read it and we'll try slashdot, k ?

[1] nolimit: http://www.nolimit-studio.com/

-- 
< If you know Red Hat you know Red Hat,
If you know Slackware you know Linux >

--~--~-~--~~~---~--~~
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: Zend's Devzone Article about Baking Day

2006-06-13 Thread Armando Sosa
Thanks GustavoIf anybody has sponsor ideas please tell me. It's harder than I initially tought mostly because my poor english abilities. So if there's somebody with good PR skills who want to help me on that, please tell.
On 6/13/06, John David Anderson (_psychic_) <[EMAIL PROTECTED]> wrote:
HmmmWhen the IRC channel first opened, there was a CalE that hung aroundquite a bit. Makes me wonder if we've got friends at Zend now. Anyoneelse remember him?Everyone make sure and register for the event!
-- JohnOn Jun 13, 2006, at 6:36 AM, Gustavo Carreno wrote:>> Hey guys/gals,>> Looks like our little corner of the world is being tracked by the> big ones.> Cal Evans, the recently appointed editor of Zend's Devzone, has
> written an article[1] talking about Armando Sosa's[2] initiative:> BakinDay[3].> I really do hope that this can bring more attention to Armando's> BakingDay in terms of sponsorship. I like CakePHP and giving Rails a
> run for theyr money pleases me very much ;)>>> [1] ...BAKE ME A CAKE AS FAST AS YOU CAN:> http://devzone.zend.com/node/view/id/530
> [2] Baking with Sosa: http://www.nolimit-studio.com/baking/> [3] Baking Day: http://www.bakinday.com> --
> < If you know Red Hat you know Red Hat,> If you know Slackware you know Linux >>> >-- Armando Sosawww.nolimit-studio.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: Zend's Devzone Article about Baking Day

2006-06-13 Thread John David Anderson (_psychic_)

Hmmm

When the IRC channel first opened, there was a CalE that hung around  
quite a bit. Makes me wonder if we've got friends at Zend now. Anyone  
else remember him?

Everyone make sure and register for the event!

-- John

On Jun 13, 2006, at 6:36 AM, Gustavo Carreno wrote:

>
> Hey guys/gals,
>
> Looks like our little corner of the world is being tracked by the  
> big ones.
> Cal Evans, the recently appointed editor of Zend's Devzone, has
> written an article[1] talking about Armando Sosa's[2] initiative:
> BakinDay[3].
> I really do hope that this can bring more attention to Armando's
> BakingDay in terms of sponsorship. I like CakePHP and giving Rails a
> run for theyr money pleases me very much ;)
>
>
> [1] ...BAKE ME A CAKE AS FAST AS YOU CAN:
> http://devzone.zend.com/node/view/id/530
> [2] Baking with Sosa: http://www.nolimit-studio.com/baking/
> [3] Baking Day: http://www.bakinday.com
> -- 
> < If you know Red Hat you know Red Hat,
> If you know Slackware you know Linux >
>
> >


--~--~-~--~~~---~--~~
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: $ajaxOptions (updateElement, afterUpdateElement) for autocomplete

2006-06-13 Thread nate

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

Read the "Ajax" section.  These are the keys supported by AjaxHelper.
If there are additional keys that aren't supported that should be, you
can open an enhancement ticket at https://trac.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
-~--~~~~--~~--~--~---



Re: How optimize application?

2006-06-13 Thread Chris Cassell

> And you are right with bindModel function. When I removed
> hasAndBelongsToMany association from one of my model and binded it in
> action function del() $model->del() function didn't remove associations
> from DB.
I've been in a similar situation. I'm building an app that has around 30
models and was suffering from really slow performance. Some time ago I
removed most of the associations from the models and built them dynamically
using bindModel() where needed. The thing to really watch out for are models
that become recursive when loading--models that each have associations with
one another. For example, I've got an Event model and a Space model. An
Event belongsTo a Space and a Space hasMany Events. I've also go a whole
bunch more associations that are linked to both those models. The problem
lies in the fact that the relationship between the two is created over and
over again at several depths in the association tree. So what I've done is
eliminated the associations for these models in particular (Event and Space)
so that the common associations don't keep loading recursively. This has
helped tremendously.

Nate's right, you lose a lot of magic when you do this and end up doing a
lot of things manually, but the performance gains are worth it in my
opinion.

Another thing to consider is the platform that you're developing on. I've
been developing and planning on deploying on OSX. After being very
dissatisfied with the performance on the Xserve, even with the caching
software, etc. installed, I decided to try it out on a FreeBSD box, and
that's made such a big difference that the client decided to switch
platforms. We saw performance increases of 3-10 times on the FreeBSD box vs
the higher-speced Xserve (faster processor and more memory).


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Zend's Devzone Article about Baking Day

2006-06-13 Thread Gustavo Carreno

Hey guys/gals,

Looks like our little corner of the world is being tracked by the big ones.
Cal Evans, the recently appointed editor of Zend's Devzone, has
written an article[1] talking about Armando Sosa's[2] initiative:
BakinDay[3].
I really do hope that this can bring more attention to Armando's
BakingDay in terms of sponsorship. I like CakePHP and giving Rails a
run for theyr money pleases me very much ;)


[1] ...BAKE ME A CAKE AS FAST AS YOU CAN:
http://devzone.zend.com/node/view/id/530
[2] Baking with Sosa: http://www.nolimit-studio.com/baking/
[3] Baking Day: http://www.bakinday.com
-- 
< If you know Red Hat you know Red Hat,
If you know Slackware you know Linux >

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



$ajaxOptions (updateElement, afterUpdateElement) for autocomplete

2006-06-13 Thread [EMAIL PROTECTED]

I've been triying to include some parameters in the Ajax helper from
cake, I thought by just adding the (updateElement, afterUpdateElement)
in the array $ajaxOptions you could make these parameters work but they
don't, I dont't know what Iam doing wrong I have revised the ajax
helper script and I cant't make it work I think I will make just my own
helper for autocomplete, I think that would be faster and better.

//These all all the available options for most of the ajax helpers but
I can't just add to this array (updateElement, afterUpdateElement). to
make them work

and when I call the ajax helper:

$ajax->autoComplete('users/serach', array('size'=>30,
'afterUpdateElement'=>'addUser')

//The autocomplete works fine

var $ajaxOptions = array('type', 'confirm', 'condition', 'before',
'after', 'fallback', 'update', 'loading', 'loaded', 'interactive',
'complete', 'with', 'url', 'method', 'position', 'form', 'parameters',
'evalScripts', 'asynchronous', 'onComplete', 'onUninitialized',
'onLoading', 'onLoaded', 'onInteractive', 'insertion',
'requestHeaders');


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



testing controller with simpletest

2006-06-13 Thread rinda

I am managed to do simple testing ( monkey singularization ).
http://wiki.cakephp.org/tutorials:testing_cake_apps

But how do I test controller?
This is my controller:

class HomeController extends AppController
{
  var $helpers = array('Javascript');
  var $components = array('Page');
  var $uses = null;

  function index()
  {
$this->Page->setUpTemplate();

//index page specific
$this->set('workshop',
$this->Page->doc->page->language[$this->Page->lang_index]->workshop->CDATA());
.

This is my home controller test:
class HomeTest extends UnitTestCase
{
  function testindex()
  {
$lang = $this->controller->Page->lang_index;
$this->assertEqual($lang, 1);
  }
..

I want to test the lang variable but when I test it, $lang is null
which mean controller is not there Thank 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: New JavaScript Features

2006-06-13 Thread Jeroen Janssen

Sjeezz...

I was just talking about this five minutes ago with a friend and he
pointed to this posting...
guess I have to update to the latest CakePHP stuff and do some
experimenting :)

Thanks a lot!


--~--~-~--~~~---~--~~
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: How optimize application?

2006-06-13 Thread kiniu


[EMAIL PROTECTED] wrote:
> with debug set to zero doesn't CakePHP cache the model views for 24
> hours at a time?  So, once you went live it is going to cache the model
> for 24 hours at a time.  And if you don't need those models then why
> are you making associations for them?
>

If you are building big business application then almost all models are
associated some how.

> You need to be careful using bindModel all over the place.  Cause then
> instead of CakePHP building the association for use later it has to
> build it for each request you make.  You can save yourself on the
> actual query by using the $recursive parameter.  This will limit the
> SQL query to just the model (table) you are working on if set to zero.
>

I know about $recursive variable. But it is not the point. The point is
that all Models classes are constructed.

And you are right with bindModel function. When I removed
hasAndBelongsToMany association from one of my model and binded it in
action function del() $model->del() function didn't remove associations
from DB.


--~--~-~--~~~---~--~~
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: Proof of concept: Custom validation using beforeValidate

2006-06-13 Thread Ryan Ginstrom

> [mailto:[EMAIL PROTECTED] On Behalf Of gwoo
> you can do most of this without any other helpers or changes to the  
> core code.
> 
> function beforeValidate() {
> 
>  $this->invalidate('username_taken');
>  return false ;
> }
> 
> the in your view
> $html->tagErrorMsg('User/username_taken', 'This username is already  
> taken. Please choose another');

I had thought about this approach, but I saw a couple problems. First, your
views need to know about your business logic so they know the types of errors
that can occur. And every time your business logic changes, you need to go
mucking about with your views to change the possible error messages. Having
this all in the model allows you to encapsulate error handling.

Also, when you localize your site, I think it will be easier to have all your
error-message logic in one place, so you can more easily retrieve and set
localized error messages from the database.

--
Regards,
Ryan Ginstrom


--~--~-~--~~~---~--~~
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 w/ Graham Bird's Task List Tutorial

2006-06-13 Thread olle

FYI: Graham's been notified of this URL trouble.

My fix for the conundrum was to wrap "/tasks/done/" in Cake's
$html->url() method, to get a full URL to it.

I emailed him this, he answered he'd include that solution, and that
fix will probably be in the tutorial forthwith.

Hope you have fun with AJAX. 

   Olle


--~--~-~--~~~---~--~~
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: Proof of concept: Custom validation using beforeValidate

2006-06-13 Thread Ryan Ginstrom

> [mailto:[EMAIL PROTECTED] On Behalf Of RosSoft
> invalidate() sets a row in an array with a value of 1. Change
> invalidate() to set the string as value (then the errors will be
> available in your controller and helpers)

Nice. So I could override invalidate in app_model:

/*  +++  */
function invalidate( $field, $errMsg = null ) 
{
   if (!is_array($this->validationErrors)) 
   {
   $this->validationErrors = array();
   }
   if ( $errMsg == null )
   {
  $bits = explode('_', $field) ;
  $nameBits = array() ;
  foreach( $bits as $bit )
  {
 $nameBits[] = ucfirst( $bit ) ;
  }
  $name = join( ' ', $nameBits ) ;
  $msg = "Invalid $name value" ;
   }
   else
   {
  $msg = $errMsg ;
   }

   $this->validationErrors[$field] = $msg ;
}
/*  +++  */

Then in my beforeValidate():

/*  +++  */
 function beforeValidate()
 {
   $this->invalidate( 'username', 'User name already taken' ) ;
   return false ;
 }
/*  +++  */

Then, using ErrorHelper::tagErrorMsg as a drop-in replacement for
HtmlHelper::tagErrorMsg :

/*  +++  */
class ErrorHelper extends Helper 
{
   var $helpers = array( 'Html' ) ;
   
   function tagErrorMsg( $field ) 
   {
  $this->Html->setFormTag($field) ;
  $msg = $this->Html->tagIsInvalid($this->Html->model,
$this->Html->field) ;
  if ( !$msg )
  {
 return null ;
  }
  return sprintf('%s', $msg ) ;
   }
}
/*  +++  */

// 

How does that look?

--
Regards,
Ryan Ginstrom


--~--~-~--~~~---~--~~
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 w/ Graham Bird's Task List Tutorial

2006-06-13 Thread najjannaj

I had the Same Problem, you must replace:
"new Ajax.Updater(\'tasks_done\',\'/tasks/done/' ."
with
"new Ajax.Updater(\'tasks_done\',\'/CAKE/tasks/done/' ."
This should be the correct path for your Install. Test it!

Greetz
najjannaj


--~--~-~--~~~---~--~~
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: Proof of concept: Custom validation using beforeValidate

2006-06-13 Thread gwoo

you can do most of this without any other helpers or changes to the  
core code.

function beforeValidate() {

 $this->invalidate('username_taken');
 return false ;
}

the in your view
$html->tagErrorMsg('User/username_taken', 'This username is already  
taken. Please choose another');

Then you can use validates and save as normal.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---