RE: Admin / Prefix When Baking

2012-07-15 Thread Advantage+
Thanks Greg,

 

I will keep that in mind and see how it goes.

 

Will ask you if I have any questions on possibly setting this up.

 

Good looking out J

 

Dave

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Greg Skerman
Sent: Sunday, July 15, 2012 10:11 PM
To: cake-php@googlegroups.com
Subject: Re: Admin / Prefix When Baking

 

Well, my setup is pretty crude, but works well.

I basically have the following structure:

User hasAndBelongsToMany Group
Group hasMany Permission

a permission is essentially a wildcard string...

id, group_id, permission, allow

1, 1, '/*', true

a component does a beforeFilter check on the requested URL and checks that
the user is in a group which 'allows' them to see that URL...(this isn't my
idea, I saw an implementation of it a couple of years back and rolled my own
flavour of it)

I then have a permissions helper which allows the view to detect whether or
not a given user is a member of a given group (implementation is an exercise
for the author).

so the permissions work 2 fold, firstly whether or not they can actually get
to the resource to begin with, and secondly check whether or not the user is
a member of a specific group.

You can then do things in your view like...

if($this->Permission->is('admin')) {
echo $this->element('admin.widget');
} else {
echo $this->element('user.widget');
}

ACL can be used to achieve a simillar result, however the one weakness I
found in ACL is you can't have a user belonging to multiple groups. So you
can't have a user who is a member of the Authors group, and also a member of
the Moderators group - unless all Authors are also Moderators in the ACL
tree.

The result is that an Author, or an Admin both go to the same resource
(/posts/view) but the content of the view is different depending on their
role(s).




On Mon, Jul 16, 2012 at 10:17 AM, Advantage+  wrote:

Thanks Greg,

 

Could you tell me a bit more about your idea? I never have heard about that
idea / approach so any details as to how exactly it would work. 

 

Dave

 

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Greg Skerman
Sent: Sunday, July 15, 2012 9:38 PM


To: cake-php@googlegroups.com
Subject: Re: Admin / Prefix When Baking

 

with 60 controllers I wouldn't use admin routing.

I'd probably skip ACL (because it doesn't support users belonging to
multiple groups), but a simple structure of User HasAndBelongsToMany Group,
then a component which allows you do to something like
$this->Permission->is('admin') etc to restrict access/conditionally load
elements and so forth will be far easier to work with.

On Mon, Jul 16, 2012 at 9:52 AM, romel javier gomez herrera
 wrote:

hi.

 

imagine that your system grows exponentially and has a complex
organizational structure

 

is more simple to define the role model and decorate the url with routes

 

bye

 

 

2012/7/15 Advantage+ 

Yes they will be modified / removed for each where needed. 

But with 60 controllers that a lot of copy and paste. Just curious if there
was a do all at once to save time. 

Easier to remove them where not needed rather than copy and paste for each J

 

Thanks all the same.

 

Dave

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Greg Skerman
Sent: Sunday, July 15, 2012 9:13 PM
To: cake-php@googlegroups.com
Subject: Re: Admin / Prefix When Baking

 

not sure, however you should be able to (basically) copy/paste the actions
for admin_ and rename manager_ and editor_  - its not exactly 'dry'
though...and I'd assume you are intending on modifying the logic for each
anyway.

On Sun, Jul 15, 2012 at 3:45 PM, Advantage+  wrote:

I have 3 different Admin routing defined in core.php

Configure::write('Routing.prefixes', array('admin', 'manager' , 'editor'));

 

so when baking it asks would you like to add the routing in controller 1/2/3
but it only bake's  one set and doing it again will overwrite the original
controller, is there a way to bake all views and controller actions for all
admin routings at 1 time?

 

Thanks 

A+

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com
  For more options, visit
this group at http://groups.google.com/group/cake-php

 

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.c

Re: Nested Menu in Cake 2.x

2012-07-15 Thread Ain Devonshire
yeah but i dont have letf and right fields on my database..can you put on 
some links as my references?


On Friday, July 13, 2012 7:54:26 PM UTC+8, MaJerle.Eu wrote:
>
> you can use Tree Behavior to properly nested menu items, then use 
> Model::find('threaded'); and you will get nested array, then just 
> recursively go through all array and make html output with ul and li.
>
> Then use css or jQuery for nice user display (Mootools, etc..)
> --
> Lep pozdrav, Tilen Majerle
> http://majerle.eu
>
>
>
> 2012/7/13 Ain Devonshire 
>
>> Hi guys currently my site is only displaying  menu and it submenu. How 
>> will i display the children of the submenu? 
>>
>> -- 
>> Our newest site for the community: CakePHP Video Tutorials 
>> http://tv.cakephp.org 
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
>> others with their CakePHP related questions.
>>  
>>  
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
>> at http://groups.google.com/group/cake-php
>>
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin / Prefix When Baking

2012-07-15 Thread Greg Skerman
Well, my setup is pretty crude, but works well.

I basically have the following structure:

User hasAndBelongsToMany Group
Group hasMany Permission

a permission is essentially a wildcard string...

id, group_id, permission, allow

1, 1, '/*', true

a component does a beforeFilter check on the requested URL and checks that
the user is in a group which 'allows' them to see that URL...(this isn't my
idea, I saw an implementation of it a couple of years back and rolled my
own flavour of it)

I then have a permissions helper which allows the view to detect whether or
not a given user is a member of a given group (implementation is an
exercise for the author).

so the permissions work 2 fold, firstly whether or not they can actually
get to the resource to begin with, and secondly check whether or not the
user is a member of a specific group.

You can then do things in your view like...

if($this->Permission->is('admin')) {
echo $this->element('admin.widget');
} else {
echo $this->element('user.widget');
}

ACL can be used to achieve a simillar result, however the one weakness I
found in ACL is you can't have a user belonging to multiple groups. So you
can't have a user who is a member of the Authors group, and also a member
of the Moderators group - unless all Authors are also Moderators in the ACL
tree.

The result is that an Author, or an Admin both go to the same resource
(/posts/view) but the content of the view is different depending on their
role(s).



On Mon, Jul 16, 2012 at 10:17 AM, Advantage+  wrote:

> Thanks Greg,
>
> ** **
>
> Could you tell me a bit more about your idea? I never have heard about
> that idea / approach so any details as to how exactly it would work. 
>
> ** **
>
> Dave
>
> ** **
>
> ** **
>
> *From:* cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] *On
> Behalf Of *Greg Skerman
> *Sent:* Sunday, July 15, 2012 9:38 PM
>
> *To:* cake-php@googlegroups.com
> *Subject:* Re: Admin / Prefix When Baking
>
> ** **
>
> with 60 controllers I wouldn't use admin routing.
>
> I'd probably skip ACL (because it doesn't support users belonging to
> multiple groups), but a simple structure of User HasAndBelongsToMany Group,
> then a component which allows you do to something like
> $this->Permission->is('admin') etc to restrict access/conditionally load
> elements and so forth will be far easier to work with.
>
> 
>
> On Mon, Jul 16, 2012 at 9:52 AM, romel javier gomez herrera <
> bmxquiksilver7...@gmail.com> wrote:
>
> hi.
>
> ** **
>
> imagine that your system grows exponentially and has a complex
> organizational structure
>
> ** **
>
> is more simple to define the role model and decorate the url with routes**
> **
>
> ** **
>
> bye
>
> ** **
>
> ** **
>
> 2012/7/15 Advantage+ 
>
> Yes they will be modified / removed for each where needed. 
>
> But with 60 controllers that a lot of copy and paste. Just curious if
> there was a do all at once to save time. 
>
> Easier to remove them where not needed rather than copy and paste for each
> J
>
>  
>
> Thanks all the same.
>
>  
>
> Dave
>
>  
>
> *From:* cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] *On
> Behalf Of *Greg Skerman
> *Sent:* Sunday, July 15, 2012 9:13 PM
> *To:* cake-php@googlegroups.com
> *Subject:* Re: Admin / Prefix When Baking
>
>  
>
> not sure, however you should be able to (basically) copy/paste the actions
> for admin_ and rename manager_ and editor_  - its not exactly 'dry'
> though...and I'd assume you are intending on modifying the logic for each
> anyway.
>
> 
>
> On Sun, Jul 15, 2012 at 3:45 PM, Advantage+  wrote:*
> ***
>
> I have 3 different Admin routing defined in core.php
>
> Configure::write('Routing.prefixes', array('admin', 'manager' , 'editor'));
> 
>
>  
>
> so when baking it asks would you like to add the routing in controller
> 1/2/3 but it only bake's  one set and doing it again will overwrite the
> original controller, is there a way to bake all views and controller
> actions for all admin routings at 1 time?
>
>  
>
> Thanks 
>
> A+
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>
>  
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video

RE: Admin / Prefix When Baking

2012-07-15 Thread Advantage+
Thanks Greg,

 

Could you tell me a bit more about your idea? I never have heard about that
idea / approach so any details as to how exactly it would work. 

 

Dave

 

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Greg Skerman
Sent: Sunday, July 15, 2012 9:38 PM
To: cake-php@googlegroups.com
Subject: Re: Admin / Prefix When Baking

 

with 60 controllers I wouldn't use admin routing.

I'd probably skip ACL (because it doesn't support users belonging to
multiple groups), but a simple structure of User HasAndBelongsToMany Group,
then a component which allows you do to something like
$this->Permission->is('admin') etc to restrict access/conditionally load
elements and so forth will be far easier to work with.



On Mon, Jul 16, 2012 at 9:52 AM, romel javier gomez herrera
 wrote:

hi.

 

imagine that your system grows exponentially and has a complex
organizational structure

 

is more simple to define the role model and decorate the url with routes

 

bye

 

 

2012/7/15 Advantage+ 

Yes they will be modified / removed for each where needed. 

But with 60 controllers that a lot of copy and paste. Just curious if there
was a do all at once to save time. 

Easier to remove them where not needed rather than copy and paste for each J

 

Thanks all the same.

 

Dave

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Greg Skerman
Sent: Sunday, July 15, 2012 9:13 PM
To: cake-php@googlegroups.com
Subject: Re: Admin / Prefix When Baking

 

not sure, however you should be able to (basically) copy/paste the actions
for admin_ and rename manager_ and editor_  - its not exactly 'dry'
though...and I'd assume you are intending on modifying the logic for each
anyway.



On Sun, Jul 15, 2012 at 3:45 PM, Advantage+  wrote:

I have 3 different Admin routing defined in core.php

Configure::write('Routing.prefixes', array('admin', 'manager' , 'editor'));

 

so when baking it asks would you like to add the routing in controller 1/2/3
but it only bake's  one set and doing it again will overwrite the original
controller, is there a way to bake all views and controller actions for all
admin routings at 1 time?

 

Thanks 

A+

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com
  For more options, visit
this group at http://groups.google.com/group/cake-php

 

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com
  For more options, visit
this group at http://groups.google.com/group/cake-php

 

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com
  For more options, visit
this group at http://groups.google.com/group/cake-php

 

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin / Prefix When Baking

2012-07-15 Thread Greg Skerman
with 60 controllers I wouldn't use admin routing.

I'd probably skip ACL (because it doesn't support users belonging to
multiple groups), but a simple structure of User HasAndBelongsToMany Group,
then a component which allows you do to something like
$this->Permission->is('admin') etc to restrict access/conditionally load
elements and so forth will be far easier to work with.


On Mon, Jul 16, 2012 at 9:52 AM, romel javier gomez herrera <
bmxquiksilver7...@gmail.com> wrote:

> hi.
>
> imagine that your system grows exponentially and has a complex
> organizational structure
>
> is more simple to define the role model and decorate the url with routes
>
> bye
>
>
>
> 2012/7/15 Advantage+ 
>
>> Yes they will be modified / removed for each where needed. 
>>
>> But with 60 controllers that a lot of copy and paste. Just curious if
>> there was a do all at once to save time. 
>>
>> Easier to remove them where not needed rather than copy and paste for
>> each J
>>
>> ** **
>>
>> Thanks all the same.
>>
>> ** **
>>
>> Dave
>>
>> ** **
>>
>> *From:* cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] *On
>> Behalf Of *Greg Skerman
>> *Sent:* Sunday, July 15, 2012 9:13 PM
>> *To:* cake-php@googlegroups.com
>> *Subject:* Re: Admin / Prefix When Baking
>>
>> ** **
>>
>> not sure, however you should be able to (basically) copy/paste the
>> actions for admin_ and rename manager_ and editor_  - its not exactly 'dry'
>> though...and I'd assume you are intending on modifying the logic for each
>> anyway.
>>
>>
>> 
>>
>> On Sun, Jul 15, 2012 at 3:45 PM, Advantage+  wrote:
>> 
>>
>> I have 3 different Admin routing defined in core.php
>>
>> Configure::write('Routing.prefixes', array('admin', 'manager' ,
>> 'editor'));
>>
>>  
>>
>> so when baking it asks would you like to add the routing in controller
>> 1/2/3 but it only bake's  one set and doing it again will overwrite the
>> original controller, is there a way to bake all views and controller
>> actions for all admin routings at 1 time?
>>
>>  
>>
>> Thanks 
>>
>> A+
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>> ** **
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin / Prefix When Baking

2012-07-15 Thread romel javier gomez herrera
hi.

imagine that your system grows exponentially and has a complex
organizational structure

is more simple to define the role model and decorate the url with routes

bye



2012/7/15 Advantage+ 

> Yes they will be modified / removed for each where needed. 
>
> But with 60 controllers that a lot of copy and paste. Just curious if
> there was a do all at once to save time. 
>
> Easier to remove them where not needed rather than copy and paste for each
> J
>
> ** **
>
> Thanks all the same.
>
> ** **
>
> Dave
>
> ** **
>
> *From:* cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] *On
> Behalf Of *Greg Skerman
> *Sent:* Sunday, July 15, 2012 9:13 PM
> *To:* cake-php@googlegroups.com
> *Subject:* Re: Admin / Prefix When Baking
>
> ** **
>
> not sure, however you should be able to (basically) copy/paste the actions
> for admin_ and rename manager_ and editor_  - its not exactly 'dry'
> though...and I'd assume you are intending on modifying the logic for each
> anyway.
>
>
> 
>
> On Sun, Jul 15, 2012 at 3:45 PM, Advantage+  wrote:*
> ***
>
> I have 3 different Admin routing defined in core.php
>
> Configure::write('Routing.prefixes', array('admin', 'manager' , 'editor'));
> 
>
>  
>
> so when baking it asks would you like to add the routing in controller
> 1/2/3 but it only bake's  one set and doing it again will overwrite the
> original controller, is there a way to bake all views and controller
> actions for all admin routings at 1 time?
>
>  
>
> Thanks 
>
> A+
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>
> ** **
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: Admin / Prefix When Baking

2012-07-15 Thread Advantage+
Yes they will be modified / removed for each where needed. 

But with 60 controllers that a lot of copy and paste. Just curious if there
was a do all at once to save time. 

Easier to remove them where not needed rather than copy and paste for each J

 

Thanks all the same.

 

Dave

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Greg Skerman
Sent: Sunday, July 15, 2012 9:13 PM
To: cake-php@googlegroups.com
Subject: Re: Admin / Prefix When Baking

 

not sure, however you should be able to (basically) copy/paste the actions
for admin_ and rename manager_ and editor_  - its not exactly 'dry'
though...and I'd assume you are intending on modifying the logic for each
anyway.




On Sun, Jul 15, 2012 at 3:45 PM, Advantage+  wrote:

I have 3 different Admin routing defined in core.php

Configure::write('Routing.prefixes', array('admin', 'manager' , 'editor'));

 

so when baking it asks would you like to add the routing in controller 1/2/3
but it only bake's  one set and doing it again will overwrite the original
controller, is there a way to bake all views and controller actions for all
admin routings at 1 time?

 

Thanks 

A+

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com
  For more options, visit
this group at http://groups.google.com/group/cake-php

 

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin / Prefix When Baking

2012-07-15 Thread Greg Skerman
not sure, however you should be able to (basically) copy/paste the actions
for admin_ and rename manager_ and editor_  - its not exactly 'dry'
though...and I'd assume you are intending on modifying the logic for each
anyway.



On Sun, Jul 15, 2012 at 3:45 PM, Advantage+  wrote:

> I have 3 different Admin routing defined in core.php
>
> Configure::write('Routing.prefixes', array('admin', 'manager' , 'editor'));
> 
>
> ** **
>
> so when baking it asks would you like to add the routing in controller
> 1/2/3 but it only bake's  one set and doing it again will overwrite the
> original controller, is there a way to bake all views and controller
> actions for all admin routings at 1 time?
>
> ** **
>
> Thanks 
>
> A+
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: [OT] How to use Sphinx docs?

2012-07-15 Thread Walter Raponi
Ty tougth cookbook used only plain text

:-))

=
Walter Raponi
Din S.r.l.
Via Donato Menichella 304
00156 Roma - Italy

Tel  0641227662
Fax 0641227664
w.rap...@ritoll.it

Il giorno 15/lug/2012, alle ore 22:47, Tilen Majerle  
ha scritto:

> If you just a liitle bit look at google, you will find this:  
> http://scienceoss.com/use-sphinx-for-documentation/ 
> --
> Lep pozdrav, Tilen Majerle
> http://majerle.eu
> 
> 
> 
> 2012/7/15 Walter Raponi 
> 
> This is really interesting!!! I woukd like to generate documentation like 
> cookbook too
> 
> 
> =
> Walter Raponi
> Din S.r.l.
> Via Donato Menichella 304
> 00156 Roma - Italy
> 
> Tel  0641227662
> Fax 0641227664
> w.rap...@ritoll.it
> 
> Il giorno 07/lug/2012, alle ore 02:17, Lucas Simon Rodrigues Magalhaes 
>  ha scritto:
> 
>> hello,
>> 
>> Somebody already used the Sphinx for generating documentation of their 
>> systems in cakePHP?
>> 
>> like a book.cakephp.org?
>> -- 
>> Our newest site for the community: CakePHP Video Tutorials 
>> http://tv.cakephp.org 
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
>> others with their CakePHP related questions.
>>  
>>  
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
>> http://groups.google.com/group/cake-php
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: [OT] How to use Sphinx docs?

2012-07-15 Thread Walter Raponi

This is really interesting!!! I woukd like to generate documentation like 
cookbook too


=
Walter Raponi
Din S.r.l.
Via Donato Menichella 304
00156 Roma - Italy

Tel  0641227662
Fax 0641227664
w.rap...@ritoll.it

Il giorno 07/lug/2012, alle ore 02:17, Lucas Simon Rodrigues Magalhaes 
 ha scritto:

> hello,
> 
> Somebody already used the Sphinx for generating documentation of their 
> systems in cakePHP?
> 
> like a book.cakephp.org?
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: CSS / JS Compression

2012-07-15 Thread AD7six
> I will take another look. Just first off the first thing I thought was ok 
> this age needs these 5 js scripts, other page needs 2, 15 pages need a 
> different 6, all and all my site has close to 1000 views and 50% have a 
> combination of different required scripts so just though ok which confing 
> name do I use for this page? Just seemed it might be a bit hard to remember.

If you have a lot of views and a lot of different combinations of js files - 
thats a great example of why trying to automate things gets tricky. Because 
serving one js bundle becomes counter productive, so the problem becomes 
_which_ js bundles (plural) to include. If your js-bundles are not 
preconfigured that can easily turn into a build/on-demand logic mess.

AD

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: CSS / JS Compression

2012-07-15 Thread Advantage+
I will take another look. Just first off the first thing I thought was ok
this age needs these 5 js scripts, other page needs 2, 15 pages need a
different 6, all and all my site has close to 1000 views and 50% have a
combination of different required scripts so just though ok which confing
name do I use for this page? Just seemed it might be a bit hard to remember.

 

But I will dig into the link you sent and give it another go.

 

Thanks

 

Dave

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of mark_story
Sent: Sunday, July 15, 2012 10:30 AM
To: cake-php@googlegroups.com
Subject: Re: CSS / JS Compression

 

I've found overtime that having explicit build files makes life much easier
in the long run.  AssetCompress does have support for anonymous builds as
well

 

https://github.com/markstory/asset_compress/wiki/Helper-usage

 

-Mark

On Saturday, 14 July 2012 21:30:59 UTC-4, advantage+ wrote:

Hello Mark, 

 

I did see the one you wrote but having to define the specific sets of
different css / js files did not seem like the option I was looking for in a
separate ini file. I want to be able to say ok let me try using colorbox.js
or lightbox.js and add that directly in the view rather than define
different sets of js / css in a remote file.

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of mark_story
Sent: Saturday, July 14, 2012 10:58 PM
To: cake-php@googlegroups.com
Subject: Re: CSS / JS Compression

 

I wrote one, its on github.

 

http://github.com/markstory/asset_compress.

 

It affords the ability to concatenate and minify files. It also allows you
to integrate preprocessors like less, sass and coffee-script into your
projects.

 

-Mark

On Saturday, 14 July 2012 17:27:34 UTC-4, advantage+ wrote:

I know in older versions of cake there were many compression / combine
plugins that would take the defined css /js for the view and compress /
combine / minimize so you ended up with 1 js and 1 css file. Is there
anything like that for 2.x?

 

I liked the way I defined what I needed in each view specifically..

 

I had used Compressor plugin. And in the view simply dropped in

 

Compressor->add_libs( 'js', array('jquery.form',
'jquery.blockUI', 'jquery-ui-1.8.6.custom.min') );?>

 

Anyone fine anything similar?

 

Thanks all.

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Cake PHP User Management Plugin Eagle

2012-07-15 Thread Steve

hi guys, we have launched an amazing Plugin "Eagle" for Cake PHP. It is 
user management Plugin which has 56 features. It also gives you Login with 
FB, Twitter, LinkedIn, Foursquare, Google and Yahoo. You can read all its 
features here: http://developers.getyourplugin.com/features.html and you 
can check the Plugin here: http://www.eagle.getyourplugin.com , you can 
test the Plugin on this link: http://www.eagle.getyourplugin.com/login , 
default username and password is 123456, check it and tell us the feedback.

Regards,
Steve

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CSS / JS Compression

2012-07-15 Thread WyriHaximus
I've to agree with this. At first I wasn't to shabby about it (mainly 
having all asset configuration in 1 place, that's why I hacked in support 
for plugin ini files) but once I started working with it, it made a whole 
lot of things (combining assets and compressing them with YUI on deployment 
via Jenkins) easier and less time consuming. So more time to develop 
awesome features :).

On Sunday, July 15, 2012 3:00:11 PM UTC+2, mark_story wrote:
>
> I've found overtime that having explicit build files makes life much 
> easier in the long run.  AssetCompress does have support for anonymous 
> builds as well
>
> https://github.com/markstory/asset_compress/wiki/Helper-usage
>
> -Mark
>
> On Saturday, 14 July 2012 21:30:59 UTC-4, advantage+ wrote:
>>
>> Hello Mark, 
>>
>>  
>>
>> I did see the one you wrote but having to define the specific sets of 
>> different css / js files did not seem like the option I was looking for in 
>> a separate ini file. I want to be able to say ok let me try using 
>> colorbox.js or lightbox.js and add that directly in the view rather than 
>> define different sets of js / css in a remote file.
>>
>>  
>>
>> *From:* cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] *On 
>> Behalf Of *mark_story
>> *Sent:* Saturday, July 14, 2012 10:58 PM
>> *To:* cake-php@googlegroups.com
>> *Subject:* Re: CSS / JS Compression
>>
>>  
>>
>> I wrote one, its on github.
>>
>>  
>>
>> http://github.com/markstory/asset_compress.
>>
>>  
>>
>> It affords the ability to concatenate and minify files. It also allows 
>> you to integrate preprocessors like less, sass and coffee-script into your 
>> projects.
>>
>>  
>>
>> -Mark
>>
>> On Saturday, 14 July 2012 17:27:34 UTC-4, advantage+ wrote:
>>
>> I know in older versions of cake there were many compression / combine 
>> plugins that would take the defined css /js for the view and compress / 
>> combine / minimize so you ended up with 1 js and 1 css file. Is there 
>> anything like that for 2.x?
>>
>>  
>>
>> I liked the way I defined what I needed in each view specifically….
>>
>>  
>>
>> I had used Compressor plugin. And in the view simply dropped in
>>
>>  
>>
>> Compressor->add_libs( 'js', array('jquery.form', 
>> 'jquery.blockUI', 'jquery-ui-1.8.6.custom.min') );?>
>>
>>  
>>
>> Anyone fine anything similar?
>>
>>  
>>
>> Thanks all.
>>
>> -- 
>> Our newest site for the community: CakePHP Video Tutorials 
>> http://tv.cakephp.org 
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
>> others with their CakePHP related questions.
>>  
>>  
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
>> at http://groups.google.com/group/cake-php
>>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CSS / JS Compression

2012-07-15 Thread mark_story
I've found overtime that having explicit build files makes life much easier 
in the long run.  AssetCompress does have support for anonymous builds as 
well

https://github.com/markstory/asset_compress/wiki/Helper-usage

-Mark

On Saturday, 14 July 2012 21:30:59 UTC-4, advantage+ wrote:
>
> Hello Mark, 
>
>  
>
> I did see the one you wrote but having to define the specific sets of 
> different css / js files did not seem like the option I was looking for in 
> a separate ini file. I want to be able to say ok let me try using 
> colorbox.js or lightbox.js and add that directly in the view rather than 
> define different sets of js / css in a remote file.
>
>  
>
> *From:* cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] *On 
> Behalf Of *mark_story
> *Sent:* Saturday, July 14, 2012 10:58 PM
> *To:* cake-php@googlegroups.com
> *Subject:* Re: CSS / JS Compression
>
>  
>
> I wrote one, its on github.
>
>  
>
> http://github.com/markstory/asset_compress.
>
>  
>
> It affords the ability to concatenate and minify files. It also allows you 
> to integrate preprocessors like less, sass and coffee-script into your 
> projects.
>
>  
>
> -Mark
>
> On Saturday, 14 July 2012 17:27:34 UTC-4, advantage+ wrote:
>
> I know in older versions of cake there were many compression / combine 
> plugins that would take the defined css /js for the view and compress / 
> combine / minimize so you ended up with 1 js and 1 css file. Is there 
> anything like that for 2.x?
>
>  
>
> I liked the way I defined what I needed in each view specifically….
>
>  
>
> I had used Compressor plugin. And in the view simply dropped in
>
>  
>
> Compressor->add_libs( 'js', array('jquery.form', 
> 'jquery.blockUI', 'jquery-ui-1.8.6.custom.min') );?>
>
>  
>
> Anyone fine anything similar?
>
>  
>
> Thanks all.
>
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Security Release - CakePHP 2.1.5 & 2.2.1

2012-07-15 Thread mark_story
Its done now, sorry about that :)

-Mark

On Sunday, 15 July 2012 02:09:25 UTC-4, Albert 'Tigr' wrote:
>
> Thank you. Could you update the links on the website? They all point to 
> 2.2.0.
>
> On Saturday, July 14, 2012 11:37:33 PM UTC+2, mark_story wrote:
>>
>> CakePHP 2.1.5 and 2.2.1 have just been released. If you are using 
>> CakePHP's `Xml` class, you should upgrade as soon as possible.
>>
>> The security issue was recently reported by Paweł Wyleciał. When 
>> accepting user provided XML it is possible to read arbitrary files using 
>> external entities.  This is particularily dangerous for applications 
>> accepting XML data as part of a webservice.  A possible exploit example 
>> would be:
>>
>>curl -X POST -H 'Content-Type: application/xml' http://locahost/posts-d 
>> '>]>
>>
>>&payload;
>>]'
>>
>> Once the XML has been processed `$this->request->data['Post']['body']` 
>> will contain the contents of `/etc/passwd`. This issue was [fixed](
>> http://github.com/cakephp/cakephp/commit/6c905411bac66caad5e220a70e3d561b8a648507)
>>  
>> and packaged releases for 2.1 and 2.2 have been created.  This issue does 
>> not affect the 1.3 or 1.2 release series.  If you are unable to upgrade, 
>> you should apply the [patch](
>> http://github.com/cakephp/cakephp/commit/6c905411bac66caad5e220a70e3d561b8a648507)
>>  
>> as soon as possible.
>>
>> ### Other fixes in 2.2.1
>>
>> In addition to the security fix 2.2.1 contains fixes for the following 
>> issues:
>>
>> * Fixed missing urlencode on nested named parameters.
>> * Fixed ANSI codes being output on windows terminals.
>> * Fixed HtmlHelper::image() including the base directory twice when the 
>> fullBase option is used.
>> * Console logging now respects the quiet flag for shells.
>> * TranslateBehavior now saves records with only some translated fields 
>> correctly.
>> * afterValidate() was made available on behaviors. This was an omission 
>> in 2.2.0.
>>
>> View the complete changelog for 2.2.1 and 2.1.5. Download a packaged 
>> release.
>>
>> CakeFest 2012 is around the corner and we already expect awesome talks 
>> and workshops during the best PHP conference out there. If you haven't 
>> booked [your tickets](http://cakefest.org/ticket-info) yet, it's about 
>> time you do.
>>
>> As always, thanks to the friendly CakePHP community for the patches, 
>> documentation changes and new tickets. Without you there would be no 
>> CakePHP!
>>
>> **Links**
>>
>> [1] http://cakephp.org/changelogs/2.2.1
>> [2] http://cakephp.org/changelogs/2.1.5
>> [3] http://github.com/cakephp/cakephp/tags
>> [4] http://cakefest.org
>>
>>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeFest 2012 - Schedule posted! Get your tickets now!

2012-07-15 Thread Graham Weldon
CakeFest Website: http://cakefest.org

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


CakeFest 2012 - Schedule posted! Get your tickets now!

2012-07-15 Thread Graham Weldon
CakeFest 2012 is getting closer every day. With only 45 days to go, now is 
the best time to jump in and grab your Conference and/or Workshop tickets 
before the end of the early-bird period.

The schedule has been posted online on the CakeFest Website. Check it out 
for the latest information about the schedule and talks being given!

The line up this year is spectacular! We have talent from around the world, 
and some big names from the CakePHP community giving talks on a huge range 
of topics. CakeFest is simply the best way to learn about CakePHP, to meet 
new people in the community and to extend your existing skill set.

We'd like to extend a special thankyou to SANIsoft and Microsoft, both of 
whom are sponsoring CakeFest, and have a long history of supporting CakePHP 
and the PHP community.

Also, a huge thanks to EngineYard, who have also sponsored the event this 
year. Its great to see some industry players such as EngineYard showing 
support for events like CakeFest, and other PHP events around the world.

Again, please checkout the latest information on tickets, and be sure to 
grab yours before the 21st July, when the Early-Bird period ends!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


$title_for_layout and what changes I need to do

2012-07-15 Thread Nvp
Hi!
It's my first Cake project I have about 5-6 static pages they are served by 
the default PagesController.

I havein my layout file 
and set('title_for_layout', 'Page Title'); ?> in my views 
files.
So as I read on API page $title_for_layout is deprecated and will be 
removed in CakePHP 3.0, and I should use title_for_layout instead.

But I don't understand how and what changes I should do in my layout/view 
files.
Can anyone provide me an example please?


Thanks.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Newbie: Problem with Blog tutorial

2012-07-15 Thread AD7six
Borislav,

Explaining why it is unexpected would clarify the misunderstanding - there is 
no mocking in asking someone to explain themselves.

AD

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php