Re: AuthComponent doesn't work with scaffolding!

2009-01-30 Thread JuniorCMS

I know scaffolding is not for production use but I'd like to have my
authentication and profilation system working booth in dev and
production scope!

I'm here to tell you thath code i've posted before generates errors...
it was only to suggest a way, not a solution!

I don't think this is a CakePHP's bug so i didn't track it.

Thanks for interesting!


On Jan 29, 8:14 pm, Gwoo gwoo.cake...@gmail.com wrote:
 the best way to solve it definitely to add more !
 something likeSCAFFOLD IS NOT FOR PRODUCTION USE
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



AuthComponent doesn't work with scaffolding!

2009-01-29 Thread JuniorCMS

Hi,

I'm in truble with AuthComponent 'cause i want to use scaffolding for
simple tasks but I need to restrict access to the application.

Diving into the source I found the point o problem in the
AuthComponent source file (/cake/libs/controllers/components/auth.php
#265).

Inizialization check actual action request against controller's
methods list: if you're using scaffolding like me your methods list is
blank!

My solution is to introduce this code to AppController:

---
function __construct() { parent::__construct();
if ( empty($this-methods) ) $this-methods = array();
$this-methods = array_merge( $this-methods, array('index', 'list',
'view', 'add', 'create', 'edit', 'update', 'delete') );
}
---

This code add some default methods to the controller's methods list so
Auth can work propelly!

I'm looking for a pretty way to solve this problem!

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Filter on a field with two conditions.

2008-07-06 Thread JuniorCMS

Hi to all,

I have to translate this logic code to a CakePHP condition:

SELECT (all) WHERE field isNull or field LIKE %val;%

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Friendly-url for multi-language site

2008-03-26 Thread JuniorCMS

This is my solution.
http://www.consulenza-web.com/gestine-multilingua-su-cakephp.dc-52.html

I wrote in my italian blog but code is universal.
My solution provide a simple way to implemente a root lang path for
every controller in app.
This solution il extremely simple but it comes without strong rules
for managing languages.

On Mar 25, 6:44 pm, jonknee [EMAIL PROTECTED] wrote:
  I need a multi language site with cakephp. Ok, this topic is discuss
  commonly. But I need a friendly-url solution, something's like:
     http://mywebsite.com/lang/controller/view

 Couldn't you just make a space for the language in your routes and
 then deal with that variable in AppController::beforeFilter()? No need
 to manually parse anything out.

 Something like:

 Router::connect('/:lang/:controller/:action');

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



How to use a model in views?

2007-04-05 Thread JuniorCMS

Hi to all,

i need to have a view that use a model or a controller method to load
some data like news or other.

I'm implementing a simple template system for my cake blog and my be
one template want to load some data like news and other template want
to load last read article

What to do?
Thanks!


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