Re: Getting related data

2007-10-07 Thread Adwin Wijaya

you can add product_id so that the image only belongs to the one
product.

Btw, how about to combine the product and image into one table ?
I used to make as one table instead of doing one on one relationship.
(less query .. i think)
cmiiw

adwin
www.wysmedia.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
-~--~~~~--~~--~--~---



View this page "Cake Apps/Sites In The Wild"

2007-10-07 Thread [EMAIL PROTECTED]

www.klubbekal-blueband.com
www.pbdjarum.com

Click on 
http://groups.google.com/group/cake-php/web/cake-apps-sites-in-the-wild?hl=en
- or copy & paste it into your browser's address bar if that doesn't
work.


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



i18n in cake 1.1.x

2007-10-07 Thread Adwin Wijaya

How to do i18n in cakephp 1.1.x ?

the url could be like this:
www.mywebsite.com/en/mycontroller/methods/
www.mywebsite.com/id/mycontroller/methods/
www.mywebsite.com/fr/mycontroller/methods/


any idea ? i want to have the same controller for all languages. but i
want to detect which language first.

how th cakephp 1.2 i18n looks like ?


--~--~-~--~~~---~--~~
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: Using php usort or uksort functions in Cake

2007-10-07 Thread Grant Cox

Cake does not change the usage of these kind of inbuilt functions at
all.  Please give more details of what you are trying to achieve, and
what the problem is.


On Oct 8, 10:30 am, MikeK <[EMAIL PROTECTED]> wrote:
> I am attempting to do some sorting on some elements without using
> mysql using the php usort or uksort functions, but I cant get the
> syntax happy to get these working within a function in a controller.
> Has anyone done this successfully that can share some sample 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
-~--~~~~--~~--~--~---



Getting related data

2007-10-07 Thread andyreimer

OK, I'm new so bear with me.

I've got a Product model and an Image model.  As they are set up right
now, Product hasOne Image and Image belongsTo Product.

On my Product add /edit views, I have a select dropdown that shows all
the available images in the Image model.  By selecting one of these,
the image_id field on the Product model is populated with the id of
the selected image.  Once this is set, is there a way to access data
in other fields of the Image model?  For instance, when I pull up a
Product and it has a image_id of 5, how do I get the information from
the path field for the Image record with the id of 5?

I'm reluctant to add a product_id to the image table because while a
Product will only have one image, several products could use the same
image.

Hope this makes some sense.


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



Need help with ajax->sortable

2007-10-07 Thread LW

Hi,

I cant't get this sortable working it seems, maybe someone can give me
a hint:



 image('images'.
DS .'thumb'.'.'.$img['filename'], array('style'=> 'float:left; margin:
5px; border:1px solid #666;padding:3px', 'title' => $img['title'])); ?
>


sortable('myList', array('tag'=>'div',
'constraint'=>'false')); ?>

I can drag the images, but I can't drop them, they just slide back to
the original position. Any ideas what I'm doing wrong?

Thanks, Lutz


--~--~-~--~~~---~--~~
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: AuthComponent or othAuth?

2007-10-07 Thread michaaaa

Alright, I got the whole ACL thing set up. I think. Auth component
works like a charm.

I read the tutorials on lemoncake and added the Acl behaviour to my
User and Group model. So AROs are managed automatically, no problems
here.

ACOs are still giving me a hard time. I want to be able to set
permissions on whole controllers and single actions (or methods). The
ACO pattern on lemoncake suggested this structure:

ROOT
|-Controller1
  |-index
  |-action1
  |-action2
|-Controller2
  |-index
  |-action1

Since it made perfect sense for me, I adapted this structure for my
Users controller (first number is the id, first word is the alias):

1 ROOT (parent_id: NULL)
2 |- User (parent_id: 1)
3 |-- index (parent_id: 2)
4 |-- add (parent_id: 2)
5 |-- edit (parent_id: 2)

Now I can still access for example /users/add although I didn't grant
any ARO access to any ACO. I thought setting "$this->Auth->authorize =
'actions';" in the app_controller.php (as described in the tutorial)
would be enough. Do I have to connect controllers/actions and ACOs
manually. I'm so close, I can feel it...

On 7 Okt., 18:58, mich <[EMAIL PROTECTED]> wrote:
> Thanks, I already solved the problem earlier. The mysql.sock was
> located in: /Applications/MAMP/tmp/mysql/mysql.sock
> Now it finally works.
>
> On 7 Okt., 18:06, DrZippie <[EMAIL PROTECTED]> wrote:
>
> > You must have mysql installed and running.
>
> > When I Installed MySQL 5 in my iMac I got the same problem, with the
> > symbolic link I solved the problem.
>
> > Try to start mysql server, and search the mysql.sock with
>
> > locate mysql.sock
>
> > 2007/10/7, mich <[EMAIL PROTECTED]>:
>
> > > On 7 Okt., 01:42, DrZippie <[EMAIL PROTECTED]> wrote:
> > > > In the terminal execute:
>
> > > > sudo mkdir /var/mysql
> > > > sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock
>
> > > I tried that, but the errors are still there, although the symbolic
> > > link was created (checked it with the terminal). However there seems
> > > to be no mysq.sock in /private/tmp/:
>
> > > Michas-Mac:~ micha$ ls /private/tmp
> > > 501 amt.log cs_cache_lock_501
>
> > --
>
> > Antonio Cortés (Dr Zippie)
>
> > "El ordenador es la evolucion logica del hombre: Inteligencia sin
> > moral": John Osborne.
> > "A nullo videbatur, ipse autem omnia videbat


--~--~-~--~~~---~--~~
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 php usort or uksort functions in Cake

2007-10-07 Thread MikeK

I am attempting to do some sorting on some elements without using
mysql using the php usort or uksort functions, but I cant get the
syntax happy to get these working within a function in a controller.
Has anyone done this successfully that can share some sample 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: Construction of models and associations -- how does it work under the hood?

2007-10-07 Thread Tim Molendijk

The code snippet from my post above in a more readible format:

class PlacesController extends AppController
{
var $uses = array('Place', 'Photoset');

function view($id)
{

// Get all data of this place, with recursive depth 2. So we
// will get all events that belong to this place, and all
// photosets that belong to these events. Assume that
// we don't want any Place-data in our data array, so we
// unbind the association from Event to Place.

$this->Place->Event->unbindModel(array('belongsTo' =>
array('Place')));
$place = $this->Place->find("Place.id = $id", null, null, 2);

// After the find we did above we do a second find, resulting
// in basically the same information, but please ignore this
// for the sake of the example. Here we fetch all photosets
// that belong to this place (indirectly associated via
Event).
// Assume we do want Place-data in our data array, so
// recursive depth 2 again and no unbind this time.

$photosets = $this->Photoset->findAll("Photoset.event_id =
Event.id AND Event.place_id = $id",
null, null, null, null, 2);
}

}

On 8 okt, 02:09, Tim Molendijk <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've got problems really understanding how models are instantiated.
>
> Consider the following models:
> - Place hasMany Event (and Event belongsTo Place)
> - Event hasMany Photoset (and Photoset belongsTo Event)
>
> Then consider PlacesController:
>
> class PlacesController extends AppController
> {
> var $uses = array('Place', 'Photoset');
>
> function view($id)
> {
> // Get all data of this place, with recursive depth 2. So we
> will get all events that belong to this place,
> // and all photosets that belong to these events. Assume that
> we don't want any Place-data in our data
> // array, so we unbind the association from Event to Place.
> $this->Place->Event->unbindModel(array('belongsTo' =>
> array('Place')));
> $place = $this->Place->find("Place.id = $id", null, null, 2);
>
> // After the find we did above we do a second find, resulting
> in basically the same information, but please
> // ignore this for the sake of the example.
> // Here we fetch all photosets that belong to this place
> (indirectly associated via Event). Assume we do
> // want Place-data in our data array, so recursive depth 2
> again and no unbind this time.
> $photosets = $this->Photoset->findAll("Photoset.event_id =
> Event.id AND Event.place_id = $id", null, null, null, null, 2);
> }
>
> }
>
> THE PROBLEM:
>
> Eventually the second find (findAll) tries to access the Place field
> on an instance of the Event model (this happens in
> dboSource::queryAssociation()). This field does not exist as a result
> of the first find operation, in which the association from Event to
> Place was unbinded.
>
> If the two find operations are switched (first the photosets query,
> then the place query), everything is fine. This behavior does not look
> very logical. I've studied the source code to comprehend how CakePHP
> constructs models and deals with associations internally, but I cannot
> really get a grasp on it.
>
> Can anyone shed some light on what is happening here?
>
> Tim


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



Construction of models and associations -- how does it work under the hood?

2007-10-07 Thread Tim Molendijk

Hello,

I've got problems really understanding how models are instantiated.

Consider the following models:
- Place hasMany Event (and Event belongsTo Place)
- Event hasMany Photoset (and Photoset belongsTo Event)

Then consider PlacesController:

class PlacesController extends AppController
{
var $uses = array('Place', 'Photoset');

function view($id)
{
// Get all data of this place, with recursive depth 2. So we
will get all events that belong to this place,
// and all photosets that belong to these events. Assume that
we don't want any Place-data in our data
// array, so we unbind the association from Event to Place.
$this->Place->Event->unbindModel(array('belongsTo' =>
array('Place')));
$place = $this->Place->find("Place.id = $id", null, null, 2);

// After the find we did above we do a second find, resulting
in basically the same information, but please
// ignore this for the sake of the example.
// Here we fetch all photosets that belong to this place
(indirectly associated via Event). Assume we do
// want Place-data in our data array, so recursive depth 2
again and no unbind this time.
$photosets = $this->Photoset->findAll("Photoset.event_id =
Event.id AND Event.place_id = $id", null, null, null, null, 2);
}
}

THE PROBLEM:

Eventually the second find (findAll) tries to access the Place field
on an instance of the Event model (this happens in
dboSource::queryAssociation()). This field does not exist as a result
of the first find operation, in which the association from Event to
Place was unbinded.

If the two find operations are switched (first the photosets query,
then the place query), everything is fine. This behavior does not look
very logical. I've studied the source code to comprehend how CakePHP
constructs models and deals with associations internally, but I cannot
really get a grasp on it.

Can anyone shed some light on what is happening here?

Tim


--~--~-~--~~~---~--~~
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: New cake website

2007-10-07 Thread Baz
Since GMail, I've kinda been partial to tags/labels myself.

Nothing fits just one place anymore.
--
Baz L
Web Development 2.0: Web Design, CakePHP, Javascript
http://www.WebDevelopment2.com/

On 10/6/07, Tijs Teulings <[EMAIL PROTECTED]> wrote:
>
> Cake is great isn't it. :) I think we could fit everything in Sites in
> these sub categories:
>
> productivity, directory, marketplace, tools, community, marketing, shop,
> entertainment, communication, media, education, non-profit
>
> endless opportunity for discussion of course but even near and almost fits
> in these sub categories will make the list a bit more readable i think...
>
> does anybody object if i just go for it?
>
> Tijs
> On 6-okt-2007, at 16:04, [EMAIL PROTECTED] wrote:
>
>
> Thanks Tijs , I have added it to the list.
>
> I completely agree with you regarding sub categories, I can see a lot
> more sites being added in the future, CAKE is great!
>
> On Oct 6, 11:41 am, Tijs <[EMAIL PROTECTED]> wrote:
>
> excellent work! maybe you should add it to the list here:
>
> http://groups.google.com/group/cake-php/web/cake-apps-sites-in-the-wi...
>
> concerning that list... it might be a good idea to start ordering the
> sites category into sub-categories. It's getting kind of unwieldy.
> Something retail, news, media, etc. I wouldn't mind doing that if the
> group admins agree?
>
> 2007/10/6, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
>
>
> Hi
>
>
> I have just done my first CAKE website for Dr Martens. If you get
> chance take a look:
>
>
> http://www.dmbootdesign.com/
>
>
> --
> Tijs Teulings
>
> Automatique
> m: +31 (0)645004824www.automatique.nl
>
>
>
>
>
> --
> Tijs Teulings
> tel: +31645004824
> http://blog.tijs.org
>
> more:
> http://www.automatique.nl
> http://roomwareproject.org
> http://geekdinner.nl
>
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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: Checkboxes instead of multiple select

2007-10-07 Thread dardosordi

Also there are two great articles in the bakery that will help you:

http://bakery.cakephp.org/articles/view/create-multiple-checkboxes-instead-of-a-multiple-select-in-your-views

http://bakery.cakephp.org/articles/view/alternative-methods-for-working-with-hasandbelongstomany-associations

On Oct 7, 7:00 am, "Jon Bennett" <[EMAIL PROTECTED]> wrote:
> hi Stefan,
>
> > Is it possible to use checkboxes instead of a multiple select to
> > represent data in a many-to-many relation?
>
> I wrote a helper ages ago that does just that, check 
> outhttp://cakeforge.org/snippet/detail.php?type=snippet&id=190
>
> hth
>
> jon
>
> --
>
> jon bennett
> w:http://www.jben.net/
> iChat (AIM): jbendotnet Skype: jon-bennett


--~--~-~--~~~---~--~~
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: Validation rules and error messages

2007-10-07 Thread R. Rajesh Jeba Anbiah

On Oct 6, 11:24 pm, stefanb <[EMAIL PROTECTED]> wrote:
> How can I fetch the validation parameters from my models?
  

  You may check related links in 
http://groups.google.com/group/cake-php/web/frequent-discussions

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.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: AuthComponent or othAuth?

2007-10-07 Thread michaaaa

Thanks, I already solved the problem earlier. The mysql.sock was
located in: /Applications/MAMP/tmp/mysql/mysql.sock
Now it finally works.

On 7 Okt., 18:06, DrZippie <[EMAIL PROTECTED]> wrote:
> You must have mysql installed and running.
>
> When I Installed MySQL 5 in my iMac I got the same problem, with the
> symbolic link I solved the problem.
>
> Try to start mysql server, and search the mysql.sock with
>
> locate mysql.sock
>
> 2007/10/7, mich <[EMAIL PROTECTED]>:
>
>
>
>
>
> > On 7 Okt., 01:42, DrZippie <[EMAIL PROTECTED]> wrote:
> > > In the terminal execute:
>
> > > sudo mkdir /var/mysql
> > > sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock
>
> > I tried that, but the errors are still there, although the symbolic
> > link was created (checked it with the terminal). However there seems
> > to be no mysq.sock in /private/tmp/:
>
> > Michas-Mac:~ micha$ ls /private/tmp
> > 501 amt.log cs_cache_lock_501
>
> --
>
> Antonio Cortés (Dr Zippie)
>
> "El ordenador es la evolucion logica del hombre: Inteligencia sin
> moral": John Osborne.
> "A nullo videbatur, ipse autem omnia videbat"


--~--~-~--~~~---~--~~
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-10-07 Thread schneimi

Hi,

You have to do two steps:

- Add *.thtml to Preferences->General->Content Types->PHP Content
Type
- Add *.thtml and assign the PHP-Editor in Preferences->General-
>Editors->File Associations

regards,

Michael

Stu schrieb:
> Hi Bakers,
>
> Does anyone know if it is possible to get code completion working for
> Views in eclipse? I've got it working for Models in a controller, but
> can't seem to get any code completion when in a View, and do something
> like  I'm just wondering if there is some
> configuration option I'm missing or something like that.
>
> Any help would be appreciated,
>
> thanks
>
> Stu


--~--~-~--~~~---~--~~
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: AuthComponent or othAuth?

2007-10-07 Thread DrZippie

You must have mysql installed and running.

When I Installed MySQL 5 in my iMac I got the same problem, with the
symbolic link I solved the problem.

Try to start mysql server, and search the mysql.sock with

locate mysql.sock



2007/10/7, mich <[EMAIL PROTECTED]>:
>
> On 7 Okt., 01:42, DrZippie <[EMAIL PROTECTED]> wrote:
> > In the terminal execute:
> >
> > sudo mkdir /var/mysql
> > sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock
>
> I tried that, but the errors are still there, although the symbolic
> link was created (checked it with the terminal). However there seems
> to be no mysq.sock in /private/tmp/:
>
> Michas-Mac:~ micha$ ls /private/tmp
> 501 amt.log cs_cache_lock_501
>
>
> >
>


-- 

Antonio Cortés (Dr Zippie)

"El ordenador es la evolucion logica del hombre: Inteligencia sin
moral": John Osborne.
"A nullo videbatur, ipse autem omnia videbat"

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



Blog Tutorial (Section A.9.)

2007-10-07 Thread 2b3

Hi all, I'm just starting out and learning here... and I'm stumped...
is this a bug...?

I've just completed this section "A.9 Adding Posts" to create an "add
post" page for the tutorial blog. Although everything is coming up
thru the web browser correctly, on both Safari and Firefox (on Mac,
both latest), I get the following:

Title
(input box, ok)
Body
(textarea box ok)
Array
(save button)

It's the word "array" that seems to appear out of no where even tho
the add.thtml code is verbatim as in the tutorial. Why is this word
"Array" showing up in the browser view when /posts/add view is
requested?

In the HTML for this page... it shows...
Array   

Where does this come from? Is this something in the $html helper?

Thoughts?
Ian


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



Best/proper way to save HABTM?

2007-10-07 Thread stefanb

What is the proper/best way to save HABTM?

This is what I have:
Resources HABTM Categories

I save the Resource like this: $this->Resource->save($this-
>data['Resource']);

But how do I save the categories?


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



Eclipse code completion in Views

2007-10-07 Thread Stu

Hi Bakers,

Does anyone know if it is possible to get code completion working for
Views in eclipse? I've got it working for Models in a controller, but
can't seem to get any code completion when in a View, and do something
like  I'm just wondering if there is some
configuration option I'm missing or something like that.

Any help would be appreciated,

thanks

Stu


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



Blog Tutorial (Section A.9.)

2007-10-07 Thread 2b3

Hi all, I'm just starting out and learning here... and I'm stumped...
is this a bug...?

I've just completed this section "A.9 Adding Posts" to create an "add
post" page for the tutorial blog. Although everything is coming up
thru the web browser correctly, on both Safari and Firefox (on Mac,
both latest), I get the following:

Title
(input box, ok)
Body
(textarea box ok)
Array
(save button)

It's the word "array" that seems to appear out of no where even tho
the add.thtml code is verbatim as in the tutorial. Why is this word
"Array" showing up in the browser view when /posts/add view is
requested?

In the HTML for this page... it shows...
Array   

Where does this come from? Is this something in the $html helper?

Thoughts?
Ian


--~--~-~--~~~---~--~~
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: AuthComponent or othAuth?

2007-10-07 Thread michaaaa

On 7 Okt., 01:42, DrZippie <[EMAIL PROTECTED]> wrote:
> In the terminal execute:
>
> sudo mkdir /var/mysql
> sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock

I tried that, but the errors are still there, although the symbolic
link was created (checked it with the terminal). However there seems
to be no mysq.sock in /private/tmp/:

Michas-Mac:~ micha$ ls /private/tmp
501 amt.log cs_cache_lock_501


--~--~-~--~~~---~--~~
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: Mysql to model

2007-10-07 Thread Chris Hartjes

On 10/7/07, Comida411 <[EMAIL PROTECTED]> wrote:
>
> L
> Thank you... I guess that is what I was looking for...
> Any chance you might have some time to help me get my project started?
> Sincerely
> Terrence

1) set things up so you can run bake from the command line.  There are
two screencasts over at http://www.cakephp.org/screencasts that show
you how to do that for Windows or any sort of UNIX-based OS (like
Linux or OS-X)
2) bake will guide you through creating the models from your mysql table.

Hope that helps.

-- 
Chris Hartjes
Cake Development Corporation
http://www.cakedevelopment.com

My motto for 2007:  "Just build it, damnit!"

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

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



Use a helper function inside a controller

2007-10-07 Thread [EMAIL PROTECTED]

Hi
I have this question.
I have the calendar helper and I want use a function of this inside a
controller?
How can I do this?
Many Thanks
Marco


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



Re: Why does this ACL->check not pass?

2007-10-07 Thread nobrow

Actually, sorry that's not quite right.

aro_id 1 ('Users') has read access on aco_id 3 ('3-carebear'). User
'123456' is a member of 'Users':

$ php ../cake/cake/scripts/acl.php -app /var/www/webroot/cake-tor/app
view aro
Aro tree:



[1]Users

  [6]123456

 


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



Why does this ACL->check not pass?

2007-10-07 Thread nobrow

I'm working through this tutorial: 
http://www.scribd.com/doc/5545/CakePHP-tutorial-no-2-from-IBM

I am stuck on some ACL stuff. As far as I can see, this ACL check
should pass, but it doesn't.

echo $this->Session->read('user');
echo '';
echo $id . '-' . $product['Product']['title'];

if($this->Acl->check($this->Session->read('user'), $id . '-' .
$product['Product']['title'], 'read')) {
  ...
}
else {
  ...
}

$this->Session->read('user') is '123456'
$id . '-' . $product['Product']['title'] is '3-carebear'

The tables in the database seem to suggest the check should pass:
aro_id 1 (user '123456') has read access on aco_id 3 (product '3-
Carebear').

Any ideas?

mysql> select * from aros_acos \G
*** 1. row ***
 id: 1
 aro_id: 1
 aco_id: 3
_create: 0
  _read: 1
_update: 0
_delete: 0
*** 2. row ***
 id: 2
 aro_id: 5
 aco_id: 3
_create: 1
  _read: 1
_update: 1
_delete: 1
2 rows in set (0.00 sec)

mysql> select * from aros \G
*** 1. row ***
 id: 1
foreign_key: 0
  alias: Users
lft: 1
   rght: 10
*** 2. row ***

*** 5. row ***
 id: 5
foreign_key: 3
  alias: abcdef
lft: 4
   rght: 5

5 rows in set (0.00 sec)

mysql> select * from acos \G
*** 1. row ***

*** 3. row ***
   id: 3
object_id: 3
alias: 3-Carebear
  lft: 2
 rght: 3
3 rows in set (0.00 sec)


--~--~-~--~~~---~--~~
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: Checkboxes instead of multiple select

2007-10-07 Thread Jon Bennett

hi Stefan,

> Is it possible to use checkboxes instead of a multiple select to
> represent data in a many-to-many relation?

I wrote a helper ages ago that does just that, check out
http://cakeforge.org/snippet/detail.php?type=snippet&id=190

hth

jon


-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
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: Mysql to model

2007-10-07 Thread Lamiunto

It's a pleasure.
Unfortunately I can't help you get the project started, I have quite a
few of my own which I need to work on. There are a lot of tutorials
that you can find at the bakery (http://bakery.cakephp.org/) which
will help you learn to use CakePHP. Also, google for help with the
CakePHP Bake script, there is a lot of help available out there. Try
searching this group too, again, a lot of help available.

I wish you luck on your project, and I am glad to have helped you.

On Oct 7, 4:53 pm, Comida411 <[EMAIL PROTECTED]> wrote:
> L
> Thank you... I guess that is what I was looking for...
> Any chance you might have some time to help me get my project started?
> Sincerely
> Terrence


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