Thursday, October 1, 2009

10.2 Simple Acl controlled Application tutorial problem

Hi everyone, I'm doing the cakephp.org acl tutorial and I'm stuck in
the section

10.2.6 An Automated tool for creating ACOs link:http://
book.cakephp.org/view/647/An-Automated-tool-for-creating-ACOs

there is a function that suppose to add acos based on the controllers
or something like that, when i run that function on the browser i get
the following error:

Fatal error: Call to undefined method App::objects() in C:\wamp\www
\cakeacl\controllers\groups_controller.php on line 78

I really appreciate if anyone can help me with this. thank you all in
advance

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

Re: paginator

thanks for your help :).

On Oct 1, 11:19 am, Alexandru Ciobanu <ics.cake...@gmail.com> wrote:
> On 10/1/2009 11:08 AM, persianshadow wrote:
>
> > hi
>
> > i use paginator in my view but  $paginator->numbers() method only show
> > 9 number in view
>
> > i want increase number in view.i change numbers options but don't get
> > anything.
>
> http://api.cakephp.org/class/paginator-helper#method-PaginatorHelpern...
>
> $pagination->numbers(array('modulus' => 12));
>
> This will display 12 pages on each side of the current page instead of
> the default 8.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: How use ACL in a particular situation

Have anybody some idea about this?

On 29 Set, 09:32, "marco.rizze...@gmail.com"
<marco.rizze...@gmail.com> wrote:
> Hi
> I have a design question on ACL that I would use in my system.
> The problem is my system is a bit different from standard.
> I have users that can be belong to many teams.
> So a user can belong to two,three,four etc... teams.
> Moreover I have to manage the access of users to a document's list.
> To do this i would do this with ACL because I have to manage
> permissions for access to documents.
> M question is how define the ARO tree since I have user that belong to
> many teams (sometimes the permissions for access to documents are
> defined by teams, exactly If a user belongs to a team that can't read
> a document and belongs to a team that can read a document the user can
> read the document)?
> How is parentNode()  function in user model?
> Many Thanks
> Marco
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Strange FormHelper behavior

or alternatively:

<?php echo $form->create("Model", array("action"=>$this->action)) ?>

On Sep 29, 8:11 pm, "euromark (munich)" <dereurom...@googlemail.com>
wrote:
> this is the correct way to go:
>
> echo $form->create('Model',array('url'=>'/'.$this->params['url']
> ['url']));
>
> On 29 Sep., 15:00, Django Janny <keltr...@gmail.com> wrote:
>
>
>
> > I think you just have to specify the relative url to your action
> > $this->here is the absolute url...
>
> > On Tue, Sep 29, 2009 at 14:49, Ernesto <e.fanz...@gmail.com> wrote:
>
> > > Hello.
>
> > > here's some code from my view
>
> > > <?php
>
> > > echo $this->here;
>
> > > echo $form->create(null, array("url" => $this->here));
>
> > > ?>
>
> > > the first echo outputs this:
>
> > > /cakephp/development/apps/myapp/package/add
>
> > > and here's the output from form::create
>
> > > <form method='post' action='/cakephp/development/apps/myapp/cakephp/
> > > development/apps/myapp/package/add'>
>
> > > look @ "action" html property!
>
> > > what's going on here?
>
> > --
> > Djangohttp://www.flickr.com/photos/keltroth/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: paginator

On 10/1/2009 11:08 AM, persianshadow wrote:
> hi
>
> i use paginator in my view but $paginator->numbers() method only show
> 9 number in view
>
> i want increase number in view.i change numbers options but don't get
> anything.
>
>

http://api.cakephp.org/class/paginator-helper#method-PaginatorHelpernumbers


$pagination->numbers(array('modulus' => 12));

This will display 12 pages on each side of the current page instead of
the default 8.


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

paginator

hi

i use paginator in my view but $paginator->numbers() method only show
9 number in view

i want increase number in view.i change numbers options but don't get
anything.

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

Re: Sort returns 1?

On 10/1/2009 5:28 AM, Dave Maharaj :: WidePixels.com wrote:
> My bad....
>
> The array is more complex than I originally posted.
>
> So I need Program and Skill sorted alphabetically
>
> Array
> (
>
> [Program] => Array
> (
> [0] => After School Studies
> [1] => Gym
> [2] => Creative Writing
> )
>
> [Skill] => Array
> (
> [0] => Cohghol
> [1] => Shit
> [2] => Thfghfdgh
> [3] => Zoo
> [4] => Alfred
> [5] => Michelle
> )
>
>
>
> )
>
> How can I do this?
>
> Program and Skill are merged arrays. I tried sorting them after the merge
> but same thing... Still produced 1
>
> $sorted = array_merge ($new_data, $selected);
> //$area is the array value Program or Skill in this case so it inserts the
> data into Program or Skill
> $new_selections = Set::insert($all_selections, $area, $sorted);
>
>
>
$program = array('After School Studies', 'Gym', 'Creative Writing');
$skill = array('Cohghol', 'Shit', 'Thfghfdgh', 'Zoo', 'Alfred', 'Michelle');

$merged = array_merge($program, $skill);

natsort($merged);

var_dump($merged);

Sort functions return boolean. In your case:
$sorted = sort($merged);

After this line $sorted will be boolean and $merged will be sorted.

php.net/sort
php.net/natsort

HTH


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