Re: Cake admin routing in 1.2.x.x DEV

2007-09-09 Thread Seb

All right... fixed!
The configuration was changed from defining CAKE_ADMIN to calling
Configure::write('Routing.admin', 'admin'); and our coufig was not
updated for some reason.

Works like a charm now! Hope this helps anyone!

Thanks ladies! ;)

Seb.

On Sep 10, 12:04 pm, Seb <[EMAIL PROTECTED]> wrote:
> Hi guys...
>
> We're developing an app using 1.2, updating it as often as we can
> keeping in sync with the new changes and tweaking the code as we go.
> So far everything has been fairly straight forward, and no major
> problem happened.
>
> However, we updated the cake core last week, now running version
> 1.2.0.5427 and it seems like the admin routing has changed a fair bit,
> so much that the admin routes are not even recognised anymore!
>
> Looking at the various changes through trac, it seems this bit was
> removed - which one would believe its the definition of the admin
> routes... ;
> 174 /**
> 175  * Initialize the Router object
> 176  *
> 177  */
> 178 function __construct() {
> 179 if (defined('CAKE_ADMIN')) {
> 180 $admin = CAKE_ADMIN;
> 181 if (!empty($admin)) {
> 182 $this->__admin = array(
> 183 '/:' . $admin .
> '/:controller/:action/*',
> 184 '/^(?:\/(?:(' . 
> $admin .
> ')(?:\\/([a-zA-Z0-9_\\-\\.\\;\\:]+)(?:\\/([a-zA-Z0-9_\\-\\.\\;\\:]+)(?:
> [\\/\\?](.*))?)?)?))[\/]*$/',
> 185 array($admin,
> 'controller', 'action'), array()
> 186 );
> 187 }
> 188 }
> 189 }
>
> Now when trying to connect to an admin action, we get a
> AdminController not found... but we never had one either!
>
> So anyway, I understand this is the latest dev ... we're using it at
> our own risks, but I'd appreciate some pointers as to what should be
> updated, in our code, to work with what I believe to be a new routing
> model.
>
> Also... line 208 is the following;
>
> if ($admin && $default == null && $route == $admin) {}
>
> $default = am(array('plugin' => null, 'controller' => null, 'action'
> => null), $default);
>
> I have a sneaky feeling the curly bracket might not be quite where we
> want it...! ;)
>
> Anyway... any input?
>
> Cheers,
>
> Seb.


--~--~-~--~~~---~--~~
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 admin routing in 1.2.x.x DEV

2007-09-09 Thread Seb

Hi guys...

We're developing an app using 1.2, updating it as often as we can
keeping in sync with the new changes and tweaking the code as we go.
So far everything has been fairly straight forward, and no major
problem happened.

However, we updated the cake core last week, now running version
1.2.0.5427 and it seems like the admin routing has changed a fair bit,
so much that the admin routes are not even recognised anymore!

Looking at the various changes through trac, it seems this bit was
removed - which one would believe its the definition of the admin
routes... ;
174 /**
175  * Initialize the Router object
176  *
177  */
178 function __construct() {
179 if (defined('CAKE_ADMIN')) {
180 $admin = CAKE_ADMIN;
181 if (!empty($admin)) {
182 $this->__admin = array(
183 '/:' . $admin .
'/:controller/:action/*',
184 '/^(?:\/(?:(' . $admin .
')(?:\\/([a-zA-Z0-9_\\-\\.\\;\\:]+)(?:\\/([a-zA-Z0-9_\\-\\.\\;\\:]+)(?:
[\\/\\?](.*))?)?)?))[\/]*$/',
185 array($admin,
'controller', 'action'), array()
186 );
187 }
188 }
189 }

Now when trying to connect to an admin action, we get a
AdminController not found... but we never had one either!

So anyway, I understand this is the latest dev ... we're using it at
our own risks, but I'd appreciate some pointers as to what should be
updated, in our code, to work with what I believe to be a new routing
model.

Also... line 208 is the following;

if ($admin && $default == null && $route == $admin) {
}
$default = am(array('plugin' => null, 'controller' => null, 'action'
=> null), $default);

I have a sneaky feeling the curly bracket might not be quite where we
want it...! ;)

Anyway... any input?

Cheers,

Seb.


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

2006-06-05 Thread John Zimmerman [gmail]
In your admin_*() functions you will need to change the $this->layout class variable to the name of the new layout.i.e$this->layout = 'adminlayout';(not the lack of .thtml at the end).

In one of the apps I am working on the user authentication is role
based.  I use the same layout for all users.  The menu is different
(and access control) for each type of role.  I have each roles menu
setup as an element and I render the correct element in the layout
according to the users role.
Depends on your preference and your app as to which method will work best for you.On 6/5/06, John Zimmerman <
[EMAIL PROTECTED]> wrote:In your admin_*() functions you will need to change the $this->layout class variable to the name of the new layout.
i.e$this->layout = 'adminlayout';(not the lack of .thtml at the end).
In one of the apps I am working on the user authentication is role based.  I use the same layout for all users.  The menu is different (and access control) for each type of role.  I have each roles menu setup as an element and I render the correct element in the layout according to the users role.
Depends on your preference and your app as to which method will work best for you.On 6/5/06, Ect0pLaSm <

[EMAIL PROTECTED]> wrote:
> but the simpler way is to uncomment the admin route in the
> app/config/routes.php>>  then, you can functions like  admin_edit{} , admin_delete{}>  their views are the same: admin_edit.thtml and admin_delete.thtml>  the url should be: /admin/yourcontroller/edit and /admin/yourcontroller/delete
>>  is this what you need ?That right.But How use different design in admin part? How separate images and cssfrom admin part and images and css from main part. How use differentlayouts?




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


Re: Cake admin

2006-06-05 Thread Ect0pLaSm

> but the simpler way is to uncomment the admin route in the
> app/config/routes.php
>
>  then, you can functions like  admin_edit{} , admin_delete{}
>  their views are the same: admin_edit.thtml and admin_delete.thtml
>  the url should be: /admin/yourcontroller/edit and 
> /admin/yourcontroller/delete
>
>  is this what you need ?
That right.
But How use different design in admin part? How separate images and css
from admin part and images and css from main part. How use different
layouts?


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



Re: Cake admin

2006-06-05 Thread DJ Spark

 but the simpler way is to uncomment the admin route in the
app/config/routes.php

 then, you can functions like  admin_edit{} , admin_delete{}
 their views are the same: admin_edit.thtml and admin_delete.thtml
 the url should be: /admin/yourcontroller/edit and /admin/yourcontroller/delete

 is this what you need ?

 spark!

On 6/5/06, Ect0pLaSm <[EMAIL PROTECTED]> wrote:
>
> Pleace help me. I need create admin part of cake site. How to right do
> this?
> Pleace note step by step.
>
>
> >
>


-- 
[web] http://synapsisdi.com.br
[livesets] http://djspark.com.br

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



Re: Cake admin

2006-06-05 Thread Olivier Percebois-Garve

There is othAuth too.

De La Groove wrote:
> you can use rdAuth component from gwoo, www.rd11.com, and change access
> to admin functions, check the rdBloggery application from that website
>
> happy baking
>
>
> >
>
>   


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



Re: Cake admin

2006-06-05 Thread De La Groove

you can use rdAuth component from gwoo, www.rd11.com, and change access
to admin functions, check the rdBloggery application from that website

happy baking


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



Cake admin

2006-06-05 Thread Ect0pLaSm

Pleace help me. I need create admin part of cake site. How to right do
this?
Pleace note step by step.


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