How i18n loads translation files?

2007-11-26 Thread Cristian Vrabie

 From your cake source digging, what do you know? Does the 
internationalization system caches the traslation files in shared memory 
or it loads (or performs search on file)  them for every page acces?

--~--~-~--~~~---~--~~
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: Cake and ThemeView class

2007-11-26 Thread foxmask

Hi,
i already tried it, and also, as suggest in another thread, copying
from cake/view/theme.php in the myapp/view directory
that does not solve the issue.
may be the theme management is not ready yet .
Kind Regards.

On 27 nov, 02:48, Gwoo <[EMAIL PROTECTED]> wrote:
> try setting var $view = 'Theme';
--~--~-~--~~~---~--~~
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: Can we put controller into sub folder ?

2007-11-26 Thread Daniel Hofstetter

The solution I described in the article linked by Sam doesn't have an
effect on the url, i.e. if you put some controllers into a "user"
folder, then they are not automatically accessible under
yourdomain.com/user/controllername/. You would have to define one or
more routes for this purpose.

HTH

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



Re: Newbie: HABTM select

2007-11-26 Thread Bertot Remy

Hello,

In case you wants to paginate the result here is the way:
1. Create a model companies_tag, with the association 
$belongsTo("Company","Tag",[...]).
2. In your company controller, use this model ($uses) and redefine the 
paginate var by adding something like
$paginate = array(
"CompaniesTag" => array('limit' => 10, 'page' => 1, 'order' => 
array('Company.created'=> 'DESC'),"recursiv"=>2)
);

3. Then in you index function
$cond = array('Tag.id' => $tag_id);
$companies = $this->paginate('CompaniesTag', $cond);

4. In your view give an hand to the paginator helper:
$paginator->options = array('model'=>"CompaniesTag", [...]);

Everything is way better explained by cakebaker here:
 
http://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-relationship/
Hope this help!

Rémy

> I have two tables, companies and tags, joined by a companies_tags
> table. If I add/edit a company, Cake populates a tags listbox just
> fine.
>
> How can I get a list of the companies that contain certain tags? If I
> try to set a condition "Tag.tag_id IN (1, 2, 3)", I get an SQL error
> (field tags.tag_id not found)
>
> Is there a decent way to do this within the framework? If I want to
> group these companies by their tags, how do I do that? Do I use the
> model query() 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?hl=en
-~--~~~~--~~--~--~---



Tree behaviour help

2007-11-26 Thread CakeMan

Hi Guys,

I am looking for working with Tree behaviour however i am finding any
Tutorials or article for it. I am having cake1.2 pre beta.

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



mysql_connect() fails although mySql support is enabled.

2007-11-26 Thread lynch



I tried to get into ACL-stuff over console commands, but I always got
the the following error.


Fatal error: Call to undefined function:  mysql_connect() in
#/cake/cake/libs/model/datasources/dbo/dbo_mysql.php
on line 101

After a short search i found the solution to prepare the cli php.ini.
I added the extension=mysql.so,
but I still got the same errror. Since this i tried a lot, even the
phpinfo() said "MySql Support Enabled".

So it was not the obvious Solution, or? I´m Thankful for every
request.


PS Sorry for robbish english :)

--~--~-~--~~~---~--~~
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: Can we put controller into sub folder ?

2007-11-26 Thread Samuel DeVore

http://cakebaker.42dh.com/2007/11/22/organizing-your-code-with-folders/

On Nov 26, 2007 8:16 PM, paydjo <[EMAIL PROTECTED]> wrote:
> can we put controller into sub folder.
> example:
> I separated user_controller into guest, member, admin
> so I want to put it into separate file in
> - /app/controllers/user/admin_controller.php
> - /app/controllers/user/guest_controller.php
> - /app/controllers/user/member_controller.php
>
> and we can access from url
> http://localhost/user/admin/
> http://localhost/user/admin/add/
> http://localhost/user/admin/delete/3/
>
> http://localhost/user/member/
>  http://localhost/user/member/view/3/
>
>
> --
> http://paydjo.net
>  >
>



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

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

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



Can we put controller into sub folder ?

2007-11-26 Thread paydjo
can we put controller into sub folder.
example:
I separated user_controller into guest, member, admin
so I want to put it into separate file in
- /app/controllers/user/admin_controller.php
- /app/controllers/user/guest_controller.php
- /app/controllers/user/member_controller.php

and we can access from url
http://localhost/user/admin/
http://localhost/user/admin/add/
http://localhost/user/admin/delete/3/

http://localhost/user/member/
http://localhost/user/member/view/3/


-- 
http://paydjo.net

--~--~-~--~~~---~--~~
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 do I access variables set in App Controller in View?

2007-11-26 Thread Gwoo

beforeRender is usually better for that stuff than beforeFilter
because its possible that you are overwriting user somewhere in you
controllers.
--~--~-~--~~~---~--~~
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: Model.index.field notation gone?

2007-11-26 Thread Gwoo

Can you paste some sample code? Check out the helper.test and
form.test to see if your case is covered.
--~--~-~--~~~---~--~~
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 do I access variables set in App Controller in View?

2007-11-26 Thread [EMAIL PROTECTED]

Is there a special way to refer to variables that are set in the app
controller?

I have:

class AppController extends Controller {


var $helpers = array('Html','Ajax','Javascript');


function beforeFilter() {
if($this->Session->check('User')){
$this->set('user', 
$this->User->findById($this->Session-
>read('User.id')));
}else{
$this->set('user', 'emptysession');
}
}



}


View:






I get "Undefined variable: user".

I'm sure this is easy but I've searched all around and can't find an
answer.  Thanks for any help you can provide.
--~--~-~--~~~---~--~~
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: Cake and ThemeView class

2007-11-26 Thread Gwoo

try setting var $view = 'Theme';
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Newbie: HABTM select

2007-11-26 Thread [EMAIL PROTECTED]

I have two tables, companies and tags, joined by a companies_tags
table. If I add/edit a company, Cake populates a tags listbox just
fine.

How can I get a list of the companies that contain certain tags? If I
try to set a condition "Tag.tag_id IN (1, 2, 3)", I get an SQL error
(field tags.tag_id not found)

Is there a decent way to do this within the framework? If I want to
group these companies by their tags, how do I do that? Do I use the
model query() 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?hl=en
-~--~~~~--~~--~--~---



Re: Cake and ThemeView class

2007-11-26 Thread foxmask


any suggestion on how we have to proceed to be able to use themes ?

Kind Regards

On Nov 26, 4:19 pm, foxmask <[EMAIL PROTECTED]> wrote:
> hello,
> i'm trying to use this class to be able to use theme with cake but i
> really dont know how to do.
> i've created :
> webroot/themed/foobar/layouts
> webroot/themed/foobar/elements
> put default.php in layout directory
> and in the app_controller did
>
> public $theme = PT_DEFAULT_THEME;
>
> class AppController extends Controller {
>
> public $theme = PT_DEFAULT_THEME;
>
> public function __construct() {
>
> parent::__construct();
> }}
>
> ps :  PT_DEFAULT_THEME is set in bootstrap.php.
>
> Any tips ?
> kind regards.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Model.index.field notation gone?

2007-11-26 Thread releod

I just updated to the latest nightly build, and now some of my form
elements are broken.

They _were_ using model.index.field notation, can someone suggest what
other options I can use, or how to re-enable it.

Is this something that will be worked out for good or is it a bug
causing it not to work suddenly.

I am using revision 6087 from the 1.2.x.x trunk

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



Problem with IPN notify_url

2007-11-26 Thread xz8888

Hi,

I am new to Cakephp and I have been trying to integrate paypal IPN
with cakephp.

In the notify_url I have set the url to /***/orders/ipn.

However, the ipn doesn't seem response when the order is completed.

Is it something to do with the url I have set

Here is the form that submit to paypal

 https://www.sandbox.paypal.com/cgi-bin/webscr";
method="post">












 


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



Using curl_multi_* across several modules

2007-11-26 Thread Sean Walberg
I've got a series of web services implemented as models that a controller
might call as such:

$a = $this->WebService1->findByName($searchstring1);
$b = $this->WebService2->findByName($searchstring2)
$c = $this->WebService3->findByName($searchstring3)
// Do something with $a, $b, and $c, then pass it to the view

Each model implements some form of caching, but in the event of a cache-miss
the user has to wait for all 3 web services to execute concurrently.

I'd like to use curl_multi_exec to make the calls go in parallel, but the
curl object isn't exposed to the world, and the blocking model doesn't work
anymore.  Is there anything prettier than

$curl_a = $this->WebService1->setupFindByName($searchstring1);
$curl_b = $this->WebService2->setupFindByName($searchstring2)
$curl_c = $this->WebService3->setupFindByName($searchstring3)

// curl_multi_add_handle ...
// do { curl_multi_exec... } while $(waiting)

$a = $this->WebService1->findByName(curl_multi_getcontent($curl_a));
$b = $this->WebService1->findByName(curl_multi_getcontent($curl_b));
$c = $this->WebService1->findByName(curl_multi_getcontent($curl_b));

Would this be wrapped in another model? Or is there another form more
appropriate for this?

Thanks

Sean

-- 
Sean Walberg <[EMAIL PROTECTED]>http://ertw.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?hl=en
-~--~~~~--~~--~--~---



Re: .htaccess password in CAKE

2007-11-26 Thread Dragos Chiriac

Mazgalici wrote:
> Does anybody know how to put a passoword on .htaccess file for a
> direcory for example http://localhost/admin ?
>
> Thanks
> >
>
>   
Hi, though it seems a stupid question it is not, and you'll see why :

Part one, preety straight forward :

Put a .htaccess in the dir you want to protect

AuthUserFile /my/passwd/file
AuthName "Title"
AuthType Basic
Require valid-user

/my/passwd/file is created with the following command :
htpasswd -c /my/passwd/file bob

PS: Does not really have much to do with cake.

Part 2 

/admin (as cake uses rewrites) is not actually a directory. So then you have a 
problem :)
Solvable though , putting in the docroot a htaccess with something like :


  AuthType Basic
  AuthName "Title"
  AuthUserFile /my/passwd/file
  Require valid-user


Of course if you need to match a regexp :


  AuthType Basic
  AuthName "Title"
  AuthUserFile /my/passwd/file
  Require valid-user


Hopefully it works, most is from memory, I think I installed to many TRACs 
lately.

This part have something tangential with cake anyway.

And if we are so offtopic, in my language Mazgalici means "the ones that 
smears/scribbles" :).

Kind regards,
D



--~--~-~--~~~---~--~~
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: published/unpublished mode with search conditions

2007-11-26 Thread Mariano Iglesias

The Soft Deletable behavior has been updated and now also supports string
based conditions:

http://bakery.cakephp.org/articles/view/soft-delete-behavior

-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 Marcin Domanski aka kabturek
Enviado el: Sábado, 24 de Noviembre de 2007 09:33 p.m.
Para: Cake PHP
Asunto: Re: published/unpublished mode with search conditions

Hey, You can look at the Soft Delete behavior as an example - it ads a
default condition 'deleted' = 0 to all queries if you don't have a
'delete' key in the conditions.


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



.htaccess password in CAKE

2007-11-26 Thread Mazgalici

Does anybody know how to put a passoword on .htaccess file for a
direcory for example http://localhost/admin ?

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



Re: Save multipel posts at once

2007-11-26 Thread hydra12

Here's a post on my blog that talks about saving several records to
your database at once:

http://www.ntatd.org/mark/?p=28

I hope that helps!
hydra12

On Nov 22, 12:57 pm, laeffe <[EMAIL PROTECTED]> wrote:
> I'm trying to create a page that will submit multipel posts for an
> model. But i cant figure out how to do it the cake way.. any ideas
> anyone?
>
> //Laeffe
--~--~-~--~~~---~--~~
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: Please review my way of saving a Associaton Model

2007-11-26 Thread nate

The *other* only benefit is that you're storing your business logic in
your business entities where it belongs, demonstrating better
encapsulation and reducing the likelihood of code duplication.

On Nov 26, 10:12 am, mbavio <[EMAIL PROTECTED]> wrote:
> Instead of making an if, you can put that code in an afterSave
> callback. But it´s the same, the olny benefit will be that you are
> following the Fat Model, Skinny Controller concept.
>
> Cheers. Martin Bavio.
>
> On Nov 24, 10:21 pm, josoroma <[EMAIL PROTECTED]> wrote:
>
> > In my benchlink_controller.php im saving the benchlink model data and
> > the report model data associated.
>
> > function add() {
>
> > if (!empty($this->data)) {
>
> > $this->cleanUpFields();
>
> > $this->Benchlink->create();
>
> > if ($this->Benchlink->save($this->data)) {
>
> > $this->data['Report']['id'] = 
> > $this->Benchlink->getLastInsertId();
>
> > $this->Report->save($this->data);
>
> > $this->Session->setFlash('The Benchlink has 
> > been saved');
> > $this->redirect(array('action'=>'index'), 
> > null, true);
>
> > } else {
>
> > $this->Session->setFlash('The Benchlink 
> > could not be saved.
> > Please, try again.');
>
> > }
> > }
> > }
>
> > There exists a better way, maybe using aftersaving?
>
> > 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
-~--~~~~--~~--~--~---



Sub-classing Paginator?

2007-11-26 Thread Buzzholio

I'm writing an application for FaceBook (using version 1.2 of Cake). I
am having trouble getting paginator to work. Paginator works great
when I run it locally, but when running as a FaceBook application, it
returns urls that relate to FaceBook. I need to take what ever is
returned by Paginator and stuff-in the address of my server.

It seems like the good OO thing to do would be to sub-class Paginator.
I don't know how many functions would need to be overrided to
accomplish my goal. The great thing about Paginator is it's
"magic" (it just works). If I have to understand the bowels of
Paginator, it may be better to create my own Pagination functions from
scratch. Any advice would be welcomed!

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



Re: suggestion for cake query

2007-11-26 Thread keymaster

The following kludge did the trick:

The key was to figure out which model to go through for the findAll(),
and which relationship to redefine as hasOne so it will be included in
the query.

Here is the snippet fyi:

// Redefine Order <-> OrderProduct relationship to get Order included
in the query.

$this->Order-> unbindModel(array('hasMany' =>
array('OrderProduct' )));
$this->Order-> bindModel(array('hasOne' => array('OrderProduct' )));

// Specify the group condition using the Account.group_id instead of
Group.id, so we don't need the Group model

$where = "OrderProduct.from_date >= '".$fromDate."' AND
OrderProduct.to_date <= '".$toDate."' AND Account.group_id = '3' ";

// Zero level of recursion should suffice to get the OrderProduct
model included, now that it is hasOne. We can start from the Order
model and the Account model will be included through the Order
belongsTo Account.

$data = $this->Order->findAll($where,null,null,null,null, 0);
--~--~-~--~~~---~--~~
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: setting default for datetime field in FormHelper

2007-11-26 Thread releod

I found you can set minYear / maxYear, for the year range. Do not
really need it on the other fields.
Of course I discover that part after posting.

Thanks though!



On Nov 26, 1:26 pm, "Christopher E. Franklin, Sr."
<[EMAIL PROTECTED]> wrote:
> You should be able to set a default by passing a unix timestamp to the
> field $selected.
> $selected = strtotime('Jan 6, 1978 07:00');
> $form->dateTime('Field.name', 'DMY', 12, $selected, array(), false);
>
> about setting up the range? No clue besides making your own helper or
> modifying cake code.
>
> On Nov 26, 10:16 am, releod <[EMAIL PROTECTED]> wrote:
>
> > Hello, I was wondering if anyone could shed some light on how to pre-
> > populate a datetime FormHelper field. I have read through the API, and
> > I get the basics of it, but I guess not fully because now I am here
> > asking for some guidance :)
>
> > Two things I am interested in, is there a way to specify a default
> > time, if POST date is not available for the datetime field?
>
> > The other would be how to specify a range, so instead of going all the
> > way up to 2027, it would be 2010 or something.
>
> > 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
-~--~~~~--~~--~--~---



Re: suggestion for cake query

2007-11-26 Thread rtconner

In theory the following code should work. I don't know if it will or
not though, because I'm not sure how deep you can set the recursive
flag.

OrderProduct=>recursive = 4;
OrderProduct->find(array("OrderProduct.fromDate > '2007-10-01'",
'Group.id'=>3))

On Nov 26, 11:15 am, keymaster <[EMAIL PROTECTED]> wrote:
> Looking for a suggestion on how to cake-formulate the following query
> with FindAll:
>
> Associations:
> ==
>
> Group hasMany Account; Account belongsTo Group
> Account hasMany Order;  Order belongsTo Account
> Order hasMany OrderProduct;   OrderProduct belongsTo Order
>
> Query:
> =
>
> I want to find all OrderProducts with (OrderProduct.fromDate >
> '2007-10-01') AND Group.id = '3'
>
> How can I use FindAll () to do that? (notice the where conditions on
> Group and OrderProduct
>
> Or, do I need to use a custom query()?
>
> Thanks very much.
--~--~-~--~~~---~--~~
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: setting default for datetime field in FormHelper

2007-11-26 Thread Christopher E. Franklin, Sr.

You should be able to set a default by passing a unix timestamp to the
field $selected.
$selected = strtotime('Jan 6, 1978 07:00');
$form->dateTime('Field.name', 'DMY', 12, $selected, array(), false);

about setting up the range? No clue besides making your own helper or
modifying cake code.

On Nov 26, 10:16 am, releod <[EMAIL PROTECTED]> wrote:
> Hello, I was wondering if anyone could shed some light on how to pre-
> populate a datetime FormHelper field. I have read through the API, and
> I get the basics of it, but I guess not fully because now I am here
> asking for some guidance :)
>
> Two things I am interested in, is there a way to specify a default
> time, if POST date is not available for the datetime field?
>
> The other would be how to specify a range, so instead of going all the
> way up to 2027, it would be 2010 or something.
>
> 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
-~--~~~~--~~--~--~---



Re: Dynamic table

2007-11-26 Thread rtconner

If it was me, I'd have a Model with no table attatched and then add a
function to create the tables in 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?hl=en
-~--~~~~--~~--~--~---



Re: Dynamic table

2007-11-26 Thread Christopher E. Franklin, Sr.

I think here, you are going to have to "roll your own" sql statements
within the function of the controller.

On Nov 26, 10:01 am, dandreta <[EMAIL PROTECTED]> wrote:
> I have two models:ModelA and Model B.
> ModelA hasMany ModelB.
> In the add view of ModelA, I want to create a table dynamically with a
> button(AddB) and clicking it, adds a new row with the inputs of the
> fields of the ModelB.
> At the end of the view I have a submit button and I want that on
> clicking it, all B elements  that I have introduced will store in the
> database  .
> How can I do it?
> Any link or suggestion?
> Thanks and regards
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



setting default for datetime field in FormHelper

2007-11-26 Thread releod

Hello, I was wondering if anyone could shed some light on how to pre-
populate a datetime FormHelper field. I have read through the API, and
I get the basics of it, but I guess not fully because now I am here
asking for some guidance :)

Two things I am interested in, is there a way to specify a default
time, if POST date is not available for the datetime field?

The other would be how to specify a range, so instead of going all the
way up to 2027, it would be 2010 or something.

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



suggestion for cake query

2007-11-26 Thread keymaster

Looking for a suggestion on how to cake-formulate the following query
with FindAll:

Associations:
==

Group hasMany Account; Account belongsTo Group
Account hasMany Order;  Order belongsTo Account
Order hasMany OrderProduct;   OrderProduct belongsTo Order

Query:
=

I want to find all OrderProducts with (OrderProduct.fromDate >
'2007-10-01') AND Group.id = '3'

How can I use FindAll () to do that? (notice the where conditions on
Group and OrderProduct

Or, do I need to use a custom query()?

Thanks very much.
--~--~-~--~~~---~--~~
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: email component - smtp auth (SOLVED?)

2007-11-26 Thread Gorka

I had this same issue, the server was responding "235 GO AHEAD" ans
not "OK authenticated". This fixed the error on send, though emails
still don't seem to arrive.

On 29 oct, 21:35, atomic <[EMAIL PROTECTED]> wrote:
> I had some problems sending mail using smtp auth.
> MTA (postfix) always told me "lost connection after auth"
>
> The email component is testing for "OK Authenticated"
> which seems not RFC compliant to me, so i changend testing
> for return value into "235".
>
> email.php line 744:
> if (stristr($response, '235') === false)
>
> This should match most common used MTA.
>
> Regards,
> Andreas
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Dynamic table

2007-11-26 Thread dandreta

I have two models:ModelA and Model B.
ModelA hasMany ModelB.
In the add view of ModelA, I want to create a table dynamically with a
button(AddB) and clicking it, adds a new row with the inputs of the
fields of the ModelB.
At the end of the view I have a submit button and I want that on
clicking it, all B elements  that I have introduced will store in the
database  .
How can I do it?
Any link or suggestion?
Thanks and regards
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



path from Router::url

2007-11-26 Thread iGL

Hi,
My question is probably that of a beginner: I has not been a long time
since I started to use CakePHP.

I need pathinfo in my controller. Thats what I am doing:
$p1=Router::url("/",false); //that's my RewiteBase
$p2=Router::url("",false);

$pc=substr($p2,strlen($p1)-1);

And then I use $pc: that's what I need.

My question is:
Is there another, smarter, "baker" way to detect and remove
temporarily the rewritebase part of the path?

Thank you in advance.


Greetings,
Giorgi

--~--~-~--~~~---~--~~
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: Looking for an example with Extjs lib

2007-11-26 Thread hydra12

OK, I now have an example to share.  It's fairly long, so I won't post
it here, but you can find it on my blog.  http://www.ntatd.org/mark/?p=29
I hope that helps you some.  If you have any questions, let me know.
hydra12

On Nov 21, 5:19 pm, aniston <[EMAIL PROTECTED]> wrote:
> Thankx Hydra, will wait for your examples, in the mean time have a
> nice vacation wherever you are :)
> ..aniston
>
> On 21 Nov, 15:41, hydra12 <[EMAIL PROTECTED]> wrote:
>
> > I have used extjs with cake a few times.  I'll send you some examples
> > later, but I'm on vacation right now and away from my dev. machine.
>
> > hydra12
>
> > On Nov 21, 5:42 am, aniston <[EMAIL PROTECTED]> wrote:
>
> > > Hello, I found the edit-grid example of extjs very neat and was
> > > looking for an example setup with cake  if anyone has used this
> > > alreadyhttp://extjs.com/deploy/dev/examples/grid/edit-grid.html
>
> > > Must admit i'm a new to AJAX and Javascript and risk a kicking from
> > > the grus and pros who might dislike the asking for an example straight
> > > out but I found it easier to "Learn by example" and then dig into the
> > > code to suit it to my needs.
>
> > > On the practical end I tried including the ext-base.js, ext-core.js
> > > and ext-all.js incl. the edit-grid.js  libs with the default.thtml but
> > > ended up with Ext is not defined errors (trying to recreate a working
> > > sample of a standard 3x3 table)
>
> > > any help in howto start with this is appreciated.
>
> > > ciao,
> > > aniston
--~--~-~--~~~---~--~~
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: Problems modeling User - Friend HABTM associations

2007-11-26 Thread Samuel DeVore

On Nov 26, 2007 8:08 AM, nate <[EMAIL PROTECTED]> wrote:
>
> Also, unless you're using some other code that's not posted here,
> there's no method in CakePHP called unbindAll.

could be this one

http://othy.wordpress.com/2006/06/03/unbind-all-associations-except-some/

Sam D


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

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

--~--~-~--~~~---~--~~
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 can i use filters?

2007-11-26 Thread [EMAIL PROTECTED]

Hi all

I'm a totally beginner with CakePHP and need some help.

I have a user list with pagination, who shows me all users. It works
fine. But, all users are in different usergroups, and I like to have a
select-box, where I can choose one of the usergroups. After that, it
should show me all users who are in the selected group.

1. How can I list all usergroups in the Users-Controller?
2. How can I filter the user list with the selected usergroup?

Thank you very much and sorry for my bad english. =)

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



Cake and ThemeView class

2007-11-26 Thread foxmask

hello,
i'm trying to use this class to be able to use theme with cake but i
really dont know how to do.
i've created :
webroot/themed/foobar/layouts
webroot/themed/foobar/elements
put default.php in layout directory
and in the app_controller did

public $theme = PT_DEFAULT_THEME;

class AppController extends Controller {

public $theme = PT_DEFAULT_THEME;

public function __construct() {

parent::__construct();
}
}
ps :  PT_DEFAULT_THEME is set in bootstrap.php.

Any tips ?
kind regards.

--~--~-~--~~~---~--~~
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: Please review my way of saving a Associaton Model

2007-11-26 Thread mbavio

Instead of making an if, you can put that code in an afterSave
callback. But it´s the same, the olny benefit will be that you are
following the Fat Model, Skinny Controller concept.

Cheers. Martin Bavio.

On Nov 24, 10:21 pm, josoroma <[EMAIL PROTECTED]> wrote:
> In my benchlink_controller.php im saving the benchlink model data and
> the report model data associated.
>
> function add() {
>
> if (!empty($this->data)) {
>
> $this->cleanUpFields();
>
> $this->Benchlink->create();
>
> if ($this->Benchlink->save($this->data)) {
>
> $this->data['Report']['id'] = 
> $this->Benchlink->getLastInsertId();
>
> $this->Report->save($this->data);
>
> $this->Session->setFlash('The Benchlink has 
> been saved');
> $this->redirect(array('action'=>'index'), 
> null, true);
>
> } else {
>
> $this->Session->setFlash('The Benchlink could 
> not be saved.
> Please, try again.');
>
> }
> }
> }
>
> There exists a better way, maybe using aftersaving?
>
> 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
-~--~~~~--~~--~--~---



Re: Problems modeling User - Friend HABTM associations

2007-11-26 Thread nate

Also, unless you're using some other code that's not posted here,
there's no method in CakePHP called unbindAll.

On Nov 26, 3:32 am, Nasko <[EMAIL PROTECTED]> wrote:
> Could anyone help me out with this one? I'm really stuck :-(
--~--~-~--~~~---~--~~
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: Problems modeling User - Friend HABTM associations

2007-11-26 Thread nate

Take the associations out of your UserFriend model.  They're implied,
as UserFriend is already being used to join User and Friend.

On Nov 26, 3:32 am, Nasko <[EMAIL PROTECTED]> wrote:
> Could anyone help me out with this one? I'm really stuck :-(
--~--~-~--~~~---~--~~
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: Clear definitions for M V C? (newbie)

2007-11-26 Thread Sam Sherlock
I would have a look at some other examples

http://cakebaker.wordpress.com/2006/04/15/file-upload-with-cakephp/
http://bakery.cakephp.org/articles/view/multiple-files-upload-in-v1-2
http://james.revillini.com/2007/03/24/swfuploadcomponent-a-cakephp-component-for-handling-file-uploads/

AFAIU

the views will be the form to upload  and an index view to display a list of
files uploaded

fat models are advised. the bulk of your code should* be in the models
rather than the controller

the model database interaction

the controller extracting info from the model and preparing it for the view.

Where possible the model should return data that is as prepared as possible,
greater (re)use of code can be further achieved with components and helpers
- more so components for file uploading



On 26/11/2007, powtac <[EMAIL PROTECTED]> wrote:
>
>
> Yes, but...
> For example I have a pice of code which handles a file upload. What
> "question" can I ask to figure out if this is a model or a 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?hl=en
-~--~~~~--~~--~--~---



Please help -- Acl node inheritance

2007-11-26 Thread Dodger


Hi,

My ARO tree:

[1]
[2]
[3]
[4]

My ACO tree:

[1] Root
[2] Pages
[3] display

A permission in the aros_acos table:

id, aro_id, aco_id, _create, _read, _update, _delete
1, 4, 2, '0', '0', '0', '0'

i.e. Grant ARO 4 access to ACO 2 ('Pages' controller).

However, this check returns false:

$this->Acl->check(array('model' => 'Group', 'foreign_key' => 4),
'Root/Pages/display')

So does this one (without the 'Root/' prefix):

$this->Acl->check(array('model' => 'Group', 'foreign_key' => 4),
'Pages/display')

What's wrong? Don't child nodes inherit from their parents?

I actually changed the aco_id in the permission to 1 and 2 as well, and
check() still does not return true.

... help! :-)

Glen.
-- 
View this message in context: 
http://www.nabble.com/Please-helpAcl-node-inheritance-tf4874972.html#a13949004
Sent from the CakePHP mailing list archive at Nabble.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?hl=en
-~--~~~~--~~--~--~---



Re: Clear definitions for M V C? (newbie)

2007-11-26 Thread powtac

Yes, but...
For example I have a pice of code which handles a file upload. What
"question" can I ask to figure out if this is a model or a 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?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-11-26 Thread avairet

Hello Michael,

All it's clear for Code completion now and I will search the better
method to get this completion in Eclipse PDT, whitout surcharging
files.

Otherwise my question about "Helpers/Components" loading is not about
the Code completion but about Cake himself!
Because of sentence in your post at 16 november: "Now here we have the
problem that the stuff in these arrays is actually loaded."
But it does not matter, I will baking again and again to understand
very well, how to make a good cooking ;o))

Thank's again for your sympathy!

Aurélien



On 21 nov, 18:16, schneimi <[EMAIL PROTECTED]> wrote:
> Hi Aurélien,
>
> > Hi Michael and thank you very much for your baking advice!
>
> You're very welcome!
>
> > For a small application like yours, obviously it's nice to write all
> > PHPDoc comments for Models in AppController and more nice if nothing
> > is loading!
> > But in my case, the application is big and we are 4 developpers to
> > code... so I think it's not good to surcharge the AppController file
> > with many PHPDocs comments.
> > Because the file will become unreadable and because we don't know all
> > the models we are using or we will use along the application's life.
> > (Sorry, I'm not sure this sentence is clear?!)
>
> I agree, it's not nice to have that code in the AppController, but
> it's at least one central place where you can put it, update it and if
> you want, remove it before delivering. You can also put it in the root
> Controller-Class so it will not appear directly in your application,
> but you will always have to update that code along the development.
>
> > Otherwise, why Helpers/Components are loaded and Models are not?
>
> Helpers aren't loaded either (Components are treated like Models), in
> this case it's code that is even never executed (because of the
> exit()). So both times it's pretty much nothing but useless code to
> get eclipse doing thecompletion.
>
> The difference is that one time you want thecompletionon certain
> class-variables ($this->...), the other time you want to have thecompletionin 
> your views on basically undefined variables.
>
> Happy baking,
>
> Michael
>
> avairet schrieb:
>
> > Hi Michael and thank you very much for your baking advice!
>
> > For a small application like yours, obviously it's nice to write all
> > PHPDoc comments for Models in AppController and more nice if nothing
> > is loading!
> > But in my case, the application is big and we are 4 developpers to
> > code... so I think it's not good to surcharge the AppController file
> > with many PHPDocs comments.
> > Because the file will become unreadable and because we don't know all
> > the models we are using or we will use along the application's life.
> > (Sorry, I'm not sure this sentence is clear?!)
>
> > Otherwise, why Helpers/Components are loaded and Models are not?
>
> > Bye,
>
> > Aur�lien
--~--~-~--~~~---~--~~
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: Clear definitions for M V C? (newbie)

2007-11-26 Thread djiize

Controller: business logic
Model: data logic
View: presentation logic
http://en.wikipedia.org/wiki/Model-view-controller
http://manual.cakephp.org/chapter/basic_concepts

On Nov 26, 1:11 pm, powtac <[EMAIL PROTECTED]> wrote:
> Hi, Im trying to move an existing project into cakephp (and also into
> a MVC-modell).
> What questions can I use to find out if
> -an existing part of code
> -an existing functionality
> -an existing database table
> is a model or a controller or only a 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?hl=en
-~--~~~~--~~--~--~---



Re: cakephp-fr

2007-11-26 Thread avairet

Hello Kanian,

This discussion is now on the Cakephp-fr Groups: 
http://groups.google.com/group/cakephp-fr
You're welcome!

Aurélien

On 26 nov, 11:47, kanian <[EMAIL PROTECTED]> wrote:
> Have you registered the domain as yours yet?
> I do speak french, and eventhough I am not a Cake expert, I believe
> that translating the docs is a doable task. I can commit myself to
> such a project. Still as avairet says, there needs to be leadership.
> Why not you? Since it's your idea... I am now waiting for you to launh
> the website, to make clear what are the role to play when we engage
> ourselves.
> Donc je n'attend que ton signal.
>
> On Nov 24, 10:46 am, pluriels <[EMAIL PROTECTED]> wrote:
>
> > cakephp-fr.org will be free tomorrow !
> > I wanted the reuse the domain name because of the Search Engine
> > Optimisation.
>
> > It will be faster with the existing backlinks.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Clear definitions for M V C? (newbie)

2007-11-26 Thread powtac

Hi, Im trying to move an existing project into cakephp (and also into
a MVC-modell).
What questions can I use to find out if
-an existing part of code
-an existing functionality
-an existing database table
is a model or a controller or only a 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?hl=en
-~--~~~~--~~--~--~---



Re: cakephp-fr

2007-11-26 Thread kanian

Have you registered the domain as yours yet?
I do speak french, and eventhough I am not a Cake expert, I believe
that translating the docs is a doable task. I can commit myself to
such a project. Still as avairet says, there needs to be leadership.
Why not you? Since it's your idea... I am now waiting for you to launh
the website, to make clear what are the role to play when we engage
ourselves.
Donc je n'attend que ton signal.

On Nov 24, 10:46 am, pluriels <[EMAIL PROTECTED]> wrote:
> cakephp-fr.org will be free tomorrow !
> I wanted the reuse the domain name because of the Search Engine
> Optimisation.
>
> It will be faster with the existing backlinks.

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



configuring cakephp

2007-11-26 Thread GunabalanS

configuring cakephp

Refer:
http://manual.cakephp.org/chapter/installing

point no
5) Configuring Apache and mod_rewrite

when put the cakePHP folder in doc root
if the following  error comes

Warning: session_start() [function.session-start]: open(/var/lib/php/
session/sess_fkfel4sr31ee3qb4i5a0birqj6, O_RDWR) failed: Permission
denied (13) in /home/gunabalans/public_html/website/cake/cake/libs/
session.php on line 484

solution:

cd var/lib/php/


sudo /bin/chown -R apache:apache session/

make sure in

cd etc/httpd/conf

sudo vi httpd.conf

# this setting for php-smarty
#User nobody
#Group nobody

#this setting for php-cake or other defalult setting for apache
User apache
Group apache




###AllowOverride is set to All for the correct
Directory.##

Make sure that an .htaccess override is allowed: in your httpd.conf,
you should have a section that defines a section for each Directory on
your server. Make sure the AllowOverride is set to All for the correct
Directory.
#

## httpd.conf     file  ##


# Each directory to which Apache has access can be configured with
respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.

# do the following changes or just copy and replace


Options FollowSymLinks
#AllowOverride None #this part has been commented
 AllowOverride All  #this line is newly added




LoadModule rewrite_module modules/mod_rewrite.so

##
to check that

cd etc/httpd/modules/
ls

you can see the list of modules


*

now you will be fine


--~--~-~--~~~---~--~~
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: bake function, Fatal Error, Call to undefined function mysql_connect()...

2007-11-26 Thread Sam Luo

Problem got solved!!!  Happy!

1.  Add line   PHPIniDir "C:/Sserver/PHP"  at the bottom of
httpd.conf  file( the configure file of apache).
2, Move php.ini to the PHP installation folder.
3. restart  apache server.
4. Check tag "Loaded Configuration File"  in phpinfo() to make sure
the proper php.ini has been loaded, and mysql has enabled.

Recommdatoin: add   (PHP installation path) and (PHP installation path/
ext) into "path" in system environment variable of windows,

Then you should be able to run php cake\scripts\bake.php

lol

--~--~-~--~~~---~--~~
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: bake function, Fatal Error, Call to undefined function mysql_connect()...

2007-11-26 Thread Daniel Hofstetter

Hi Sam,

That sounds like the mysql module is not enabled for the command line,
there is a separate php.ini for php-cli (at least here on Linux).

HTH

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



Re: Strange recursion problem (i think) - hopefully someone can shed some light (code inc.)

2007-11-26 Thread designvoid

Sorted! It was that plural, dropped the 's' and BINGO!

d.

On Nov 24, 7:15 pm, designvoid <[EMAIL PROTECTED]> wrote:
> The uses array is only there to test the Variations call, I would
> remove it in finished thing.
>
> The plurals are the names of the arrays I thought, and as such didn't
> matter what I called them..?
>
> Also, I dont like the convention of naming id fields 'just' id, I'm
> cool with the config options tho, I can handle that...
>
> Cheers for the points tho, I'll definately check out that 'belongs'
> issue!
>
> Cheers,
>
> d.
>
> On Nov 24, 10:20 am, "DJ Spark" <[EMAIL PROTECTED]> wrote:
>
> >  also, you don't need, usually, to use more than one model per
> > controller ( uses('Model1', 'Model2') ), if they are associated
> > somehow:
> > this
> >  $this->Variations->findAll()
>
> > could be
> >  $this->Product->Variation->findAll()
>
> >  I didn't run any tests, but I can see some points:
>
> > class VariationOption extends AppModel
> > {
> >var $name = 'VariationOption';
> >var $primaryKey = 'vo_id';
>
> >  // Add this to ensure the association
> >var $belongsTo = 'Variation';
>
> > }
>
> > Also, in the Product association, I can see a plural there
>
> > var $hasAndBelongsToMany = array('Variations' =>
> >   array('className'=> 'Variation',
>
> > try changing it to singular form:
>
> > var $hasAndBelongsToMany = array('Variation' =>
> >   array('className'=> 'Variation',
>
> > And setting the HABTM association also on the VariationOption model
>
> > If you area starting with cake, i'd also suggest to *really* use all
> > cake conventions, like db table 'id' :)
> > Doing so, you would need all those HABTM options, like table_name,
> > primary key, et cetera.
>
> > Spark
>
> > On Nov 23, 2007 9:01 PM, designvoid <[EMAIL PROTECTED]> wrote:
>
> > > I have full debug on and all the queries seem to be correct.
>
> > > If I change:
>
> > > $this->set('products', $this->Product->findAll());
>
> > > to
>
> > > $this->set('products', $this->Variations->findAll());
>
> > > it it comes back with the variations and associated options fine! So
> > > it seems the join between 'groups' the 2 is screwy somewhere... i can
> > > return products and vars and vars and options but not all in one go!
> > > LOL!
>
> > > d.
>
> > > On Nov 23, 9:58 pm, bingo <[EMAIL PROTECTED]> wrote:
> > > > hi designvoid
>
> > > > I am 100% confident it has something to do with how setup HABTM
> > > > (belongsTo, etc) relationships. CakePHP is pretty good in dealing with
> > > > recursive queries. One way to figure out what's happing is to use
> > > > debug mode  = 2 . That will print out all the SQL queries and will
> > > > allow to see what's going on.
>
> > > > Regards,
>
> > > > On Nov 23, 3:15 pm, designvoid <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi Bingo,
>
> > > > > Cheers for the heads up on that - I'll definately give it a shot!
>
> > > > > I'm still wondering tho, is it my code that is the problem or a
> > > > > limitation of Cake? I'd like to fully understand why this issue is
> > > > > occuring before moving on to other scripts etc...
>
> > > > > d.
>
> > > > > On Nov 23, 8:00 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > > > > > hi designvoid,
>
> > > > > > I would suggest you that you get that script. In my experience of
> > > > > > using CakePHP, I found it very useful. But I started using that 
> > > > > > script
> > > > > > before CakePHP 1.2 came into existence and continuing to still use 
> > > > > > it
> > > > > > in 1.2. You might also want to see if 1.2 has any such 
> > > > > > functionality.
>
> > > > > > Regards
>
> > > > > > On Nov 23, 1:49 pm, designvoid <[EMAIL PROTECTED]> wrote:
>
> > > > > > > I'm not using that script, I'm relatively new to Cake, making good
> > > > > > > progress but this has stumped me...
>
> > > > > > > Is that script needed to do what I want? Or is there a way in 
> > > > > > > vanilla
> > > > > > > Cake?
>
> > > > > > > t.
>
> > > > > > > On Nov 23, 6:19 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > I guess you need to set  (assuming you are using unbindModel 
> > > > > > > > scripthttp://bakery.cakephp.org/articles/view/an-improvement-to-unbindmodel...)
>
> > > > > > > > $this->Product->Variations->expects('Options);
> > > > > > > > $this->Product->expects('Variations);
> > > > > > > > $this->set('products', $this->Product->findAll());
>
> > > > > > > > bingo
>
> > > > > > > > On Nov 23, 12:59 pm, designvoid <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > Hi all,
>
> > > > > > > > > I'm having a wierd issue when trying to use 3 models together 
> > > > > > > > > via 1
> > > > > > > > > findAll()... I'll paste the code then, explain what's 
> > > > > > > > > happening,
> > > > > > > > > fingers crossed one I you fine folk will be able to give a me 
> > > > > > > > > a
> > > > > > > > > pointer as to what I'm missing...
>
> > > > > > > > > Basic overview:
>
> > > > > > > > > Products ha

Re: Problem in displaying the css,images in layout..

2007-11-26 Thread Ryan Escarez

The subject and the body message seems to be not appropriate...

To answer your subject question: Make sure that you enabled the
mod_rewrite & AllowOverride All in apache config file


To answer your body question: Once you tried the above answer, you may
try executing again your script and hopefully this solve your problem.



On 11/26/07, shri <[EMAIL PROTECTED]> wrote:
>
> Hi friends...
>
>  i have some problem in Cakephp configuration ..
>
> My Cakephp folder is c:/wamp/www/cake_1.0.2
>
> While execute my coding it display the input box and so on. But
> when I click the submit button. It display File not found Error..
>
> Help me to solve this problem..
>
> >
>


-- 
Ryan Escarez
CEBB F1E4 1E39 EC48 F05D  6B72 9C11 DD88 5E39 E471
$ gpg --keyserver pgp.mit.edu --recv-keys 0x5E39E471
main(k){float i,j,r,x,y=-16;while(puts(""),y++<15)
for(x=0;x++<84;putchar(" .:-;!/>)|&IH%*#"[k&15]))
for(i=k=r=0;j=r*r-i*i-2+x/25,i=2*r*i+y/10,j*j+i*i<11&&k++<111;r=j);}


Do you want to win up to P1,000.00 this very minute? Be the 1st to
send WAGI to 2007 and get that chance EVERY MINUTE!  You can also win
up to P1,000,000.00 this week! Just send WAGI to 2007 now! (Open only
to Globe subscribers)

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



bake function, Fatal Error, Call to undefined function mysql_connect()...

2007-11-26 Thread Sam Luo

I tried the nightly release, I replaced all componenets: doc, vendor,
cake, but app. All my webs work properly, but the baking function,
when I use "php bake.php" in windows command line, I got "Fatal error.
Call to undefined function mysql_connect()". And I can use
phpmyadmin, which means my mysql and php configurations must be all
right, for confirmation, I checked the phpinfo(), there is the mysql
enabled, and I did uncomment the php_mysql.dll in php.ini. I checked
all possibilities, anybody can help me plz!!  urgently, I got to
finish my project in these two days. PLEASE 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?hl=en
-~--~~~~--~~--~--~---



Help with multiple ajax forms

2007-11-26 Thread Wi1d

Hello Google CakePHP Group,

I'm stumped and thought I'd submit. I'm wanting to create multiple
task list and related task on a single view. This view also has
multiple forms created using $ajax->form and $ajax->submit that will
let me add task to their related tasklist. For some reason that I
cannot figure out $this->data['Task']['title'] is only set on the
first form and not on any of the following forms.

Here is the code for my view:

[code]
Task Lists


link('Create Tasklist',
array('controller'=>'tasklists', 'action'=>'add', $projects['Project']
['id'])); ?>


".$tasklist['tasklist']."\n";
echo "\n";

echo $ajax->div('current_list_'.$tasklist['id'],
array('class'=>'currentTasklist'))."\n";

for ($i=0; $i < count($tasklist['Task']); $i++) {
$task = $tasklist['Task'][$i];
if($task['done'] == 0) {
echo $ajax->div('current_'.$task['id'],
array('class'=>'task'))."\n";
echo '
'."\n";
echo $form->label(null, $task['title'],
array('for'=>'current_check_'.$task['id']))."\n";
echo $ajax->divEnd('current_'.$task['id'])."\n";
}
}
echo $ajax->divEnd('current_list_'.$tasklist['id'])."\n";
?>

link('Add Task', 'javascript:;',
array('onclick'=>"Element.toggle('add_tasklist_".
$tasklist['id']."')"))."\n";
?>
div('add_tasklist_'.$tasklist['id'],
array('class'=>'addTaskForm', 'style'=>'display: none;'))."\n";
echo $ajax->form('taskadd/'.$projects['Project']['id'].'/'.
$tasklist['id'], 'post', array('update'=>'current_list_'.
$tasklist['id']))."\n";
echo $form->input('Task.title_'.$tasklist['id'],
array('id'=>'TaskTitle_'.$tasklist['id']))."\n";
echo $ajax->submit('Add Task', 
array('url'=>'/projects/taskadd/'.
$projects['Project']['id'].'/'.$tasklist['id'],
'update'=>'current_list_'.$tasklist['id']))."\n";
echo $ajax->divEnd('add_tasklist_'.$tasklist['id'])."\n";
?>
div('complete_list_'.$tasklist['id'],
array('class'=>'completeTasklist'))."\n";

for($i=0; $i < count($tasklist['Task']); $i++) {
$task = $tasklist['Task'][$i];
if($task['done'] == 1) {
echo $ajax->div('complete_'.$task['id'],
array('class'=>'task'))."\n";
echo ''."\n";
echo $form->label(null, $task['title'],
array('for'=>'complete_check_'.$task['id']))."\n";
echo $ajax->divEnd('complete_'.$task['id'])."\n";
}
}
echo $ajax->divEnd('complete_list_'.$tasklist['id'])."\n";
?>

[/code]

Here is the code for my controllers action:
[code]
public function taskadd($project_id = null, $tasklist_id = null) {
$this->layout = 'ajax';
$this->Tasklist->recursive = 1;
die(pr($this->params));
die(pr($this->data));

if (!$project_id && !$tasklist_id) {
$this->Session->setFlash('Invalid Project.');
$this->redirect(array('action','tasklists'), null, 
true);
}

if(isset($tasklist_id)) {
$this->data['Task']['tasklist_id'] = $tasklist_id;
$this->data['Task']['done'] = 0;
die(pr($this->data));
}
else {
$this->Session->setFlash('Invalid Project.');
$this->redirect(array('action'=>'tasklists'), null, 
true);
}

if (!empty($this->data)) {
$this->cleanUpFields();
$this->Project->recursive = 2;
if($this->Task->save($this->data)) {
$this->set('current_tasklist', 
$this->data['Task']
['tasklist_id']);
$this->set('tasklist', 
$this->Tasklist->read(null, $this-
>data['Task']['tasklist_id']));
$this->render('current', 'ajax');
}
}
}
[/code]
--~--~-~--~~~---~--~~
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: cakephp-fr

2007-11-26 Thread avairet

Bonjour à tous !

Oui, parlons un peu français, puisque nous sommes sur ce post pour
évoquer une communauté francophone autour de Cake !

J'utilise Cake depuis deux mois environ, suite à une décision du chef
de projet de la boîte où je suis actuellement en mission.
Et l'une des difficultés importantes que nous ayons eu à traiter était
bien sûr le manque de documentation et d'entraide en français.
Le site cakepourtous.org est un bon début pour installer et débuter
avec Cake, mais il est évident qu'il n'a pas été mis à jour récemment.
Son auteur intervient dans la Bakery et parfois sur ce groupe il me
semble. L'avez-vous contacté ?

Le gros problème de l'engagement, même restreint, dans une communauté,
c'est le temps disponible !
Or, la plupart d'entre nous ne peuvent pas consacrer beaucoup de temps
à cela, soit qu'ils aient un job prenant, soit qu'ils aient des
projets personnels également prenant... Il faut donc un "leader" ou un
"groupe leader", qui puisse donner beaucoup de son temps à la
communauté.

Pour ma part, je suis vivement intéressé par la participation à une
communauté OpenSource. C'est un atout et un enrichissement pour un
développeur.
Pourquoi pas celle de Cake ? Il est vrai que ce framework mérite
d'être mieux connu et plus utilisé, comparativement à Symfony.

Alors, si un élan communautaire solide se dessine, je suis prêt à
donner un peu de mon temps, sur le boulot et sur mes loisirs.
Toutefois, mon niveau actuel avec Cake ne m'autorise pas à aider sur
les aspects très technique/programmation, mais je peux aider pour des
petites traductions, des tutos sur l'installation, la configuration,
l'utilisation avec Eclipse/PDT/Subclipse, intégration FCKEditor... Des
collègues seraient égaklement intéressés.

Tenez moi informé.

Aurélien


On 24 nov, 09:46, pluriels <[EMAIL PROTECTED]> wrote:
> cakephp-fr.org will be free tomorrow !
> I wanted the reuse the domain name because of the Search Engine
> Optimisation.
>
> It will be faster with the existing backlinks.
--~--~-~--~~~---~--~~
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 displaying the css,images in layout..

2007-11-26 Thread shri

Hi friends...

 i have some problem in Cakephp configuration ..

My Cakephp folder is c:/wamp/www/cake_1.0.2

While execute my coding it display the input box and so on. But
when I click the submit button. It display File not found Error..

Help me to solve this problem..

--~--~-~--~~~---~--~~
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: Problems modeling User - Friend HABTM associations

2007-11-26 Thread Nasko

Could anyone help me out with this one? I'm really stuck :-(
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---