Re: Auth component WITHOUT ACL blocks every controller action

2012-04-17 Thread luca capra
Probably a more correct way could be function isAuthorized(){ return $this->Auth->user(); } Il 18/04/2012 00:24, jeremyharris ha scritto: Setting $this->Auth->authorize = array('Controller'); tells the AuthComponent where to run the `isAuthorized()` method, in this case, the Controller. You

bug in CakeRequest?

2012-04-17 Thread lowpass
Using 2.1.1, but 2.0.6 is the same. The names of my cached views look pretty strange: en_archive_2_url_en_2farchive_2f2.php en_archive_3_url_en_2farchive_2f3.php en_archive_url_en_2farchive.php en_contributors_2_url_en_2fcontributors_2f2.php en_contributors_url_en_2fcontributors.php en_masthead_u

Re: Where am I supposed to save additional PHP source files while I'm writing a new behavior

2012-04-17 Thread Daniel Baird
Thanks euromark and jeremy! My behaviour is about handling clustering of map points, and my separate files are for trialling different techniques. So I think I'll go with the lib technique initially, and once my users pick their preferred clustering technique and I'm ready to clean it up and fini

Re: Auth component WITHOUT ACL blocks every controller action

2012-04-17 Thread jeremyharris
Setting $this->Auth->authorize = array('Controller'); tells the AuthComponent where to run the `isAuthorized()` method, in this case, the Controller. You can find more info here: http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#using-controllerauthorize On Tuesda

Re: Auth component WITHOUT ACL blocks every controller action

2012-04-17 Thread DigitalDude
Hey, h as I changed the code to the snippet of stork, it gave me a "... function isAuthorized() on a non-object (auth-component line 52). When I added the code of luca capra, everything is working as expected. All actions that are not allowed by $this->Auth->allow() within beforeFilter-functi

Re: Authentication like the one implemented in Yii Framework

2012-04-17 Thread Graham Weldon
Lets keep this civil. For those without access to google. I've entered "yii authentication" in, and came up with the following helpful guide from the Yii docs: http://www.yiiframework.com/doc/guide/1.1/en/topics.auth I won't be pasting gobs of code or docs here. Cheers, Graham Weldon http://

Re: Authentication like the one implemented in Yii Framework

2012-04-17 Thread stork
> I think Cake's continues to be hard to understand. Good joke, if you want to amaze some teenage girl in candy store. -- 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 th

Re: Best IDE for CakePHP 2.1

2012-04-17 Thread Fábio
I currently use netbeans. You can add the lib path to the netbeans configuration, so it will give suggestions of the entire project. It does not support cake console, but i saw some plugins that might help you. Unfortunately i do not remember the urls or names, but you can search for that in goo

Translations Behaviour and Associated Models bug

2012-04-17 Thread Fábio
Its hard to understand why this conflit is still present in cake 2.1, as it has been noticed by many people since version 1.2. I made tons of searches in google and coudnt find any useful awnser. I was testing it in cake 2.0, but when i figured out that it was a cake problem i tryed to update to

Re: How to show message from default.po into javascript

2012-04-17 Thread lowpass
This would create a global variable. A really basic example. $code = 'var messages = {' . 'msg1: '. __('some text here') .',' . 'msg2: '. __('some text here') .',' . 'msg3: '. __('some text here') . '};'; $this->Html->scriptBlock($code, array('inline' => false));

Re: Copy Paste from Excel to Textarea

2012-04-17 Thread lowpass
This doesn't appear to be a Cake issue. I suspect what you're seeing is the dreaded "paste from Word" conundrum. Yes, you're talking about Excel here but it's all the same problem: bizarre and convoluted formatting and other metadata coming along for the ride. Also, you should first ensure that yo

Re: Authentication like the one implemented in Yii Framework

2012-04-17 Thread Thiago Belem
I do not want to be rude but... You want us to search and study about "YiI's auth implementation" or you could just provide us with some code and show us how it does? "I don't like the way you do something... i think i know a better way" means nothing to me. Cya, -- ***Thiago Belem* Desenvolvedo

Authentication like the one implemented in Yii Framework

2012-04-17 Thread Jose Molina
Is it dificult to implement such Auth like the one Yii uses???. I think Cake's continues to be hard to understand. -- 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 Cake

Plantilla Artisteer para CakePhp

2012-04-17 Thread Jose Molina
Sería bueno que alguien con experiencia en CakePhp pudiera explicar cómo convertir una plantilla generada con Artisteer, utilizando Elements de Cake, etc., de esa manería se contaría con una interfaz de más calidad. Sería ideal desarrollar un convertidor. -- Our newest site for the community: Cak

Open file with character special cakephp

2012-04-17 Thread Adrian Ac
I have a problem in the moment to open an file than it have character special in the name.. example : Francais_V_defle_exo_04_04_(découpage_ok).srt . the error: file(Francais_V_defle_exo_04_04_(découpage_ok).srt) [ function.file ]: failed to open stream: No such

Re: Best IDE for CakePHP 2.1

2012-04-17 Thread Alejandro Gómez Fernández
Did you try phpdesigner 8? You can "import" libraries and then the editor use this definitions for autocomplete (i don't use this feature) but sometimes i use the parameters list for some functions... It has a privative licence but I think it's good enought. Regards, Ale. Enviado desde mi i

Copy Paste from Excel to Textarea

2012-04-17 Thread jcrens8392
I have a form that allows people to copy & paste from Excel into a textarea. The textarea is then parsed and the data is saved one line at a time. I've noticed a weird issue that I can't seem to resolve to the point I'm confident in it's reliability. When pasting data from excel, where there i

Re: Best IDE for CakePHP 2.1

2012-04-17 Thread Dunhamzzz
Slower than Eclipse?! Mother of god... -- 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-

Re: ACL very slow

2012-04-17 Thread Farah
Yes, all fields has index On Tuesday, April 17, 2012 12:21:36 PM UTC-3, jeremyharris wrote: > > I realized after posting that the post I referenced assumes MySQL, but the > idea of indexing is relative nonetheless. > > On Tuesday, April 17, 2012 8:20:05 AM UTC-7, jeremyharris wrote: >> >> It's qu

Re: ACL very slow

2012-04-17 Thread Farah
Thanks for the reply! On Tuesday, April 17, 2012 11:16:49 AM UTC-3, stork wrote: > > Also, check out these projects > http://plugins.cakephp.org/packages?query=acl > if you do not need wheel with some special shape. > On Tuesday, April 17, 2012 11:16:49 AM UTC-3, stork wrote: > > Also, check out

Re: ACL very slow

2012-04-17 Thread jeremyharris
I realized after posting that the post I referenced assumes MySQL, but the idea of indexing is relative nonetheless. On Tuesday, April 17, 2012 8:20:05 AM UTC-7, jeremyharris wrote: > > It's quite possible you're just missing indexes[1], which would be a huge > performance problem. Also, make su

Re: ACL very slow

2012-04-17 Thread jeremyharris
It's quite possible you're just missing indexes[1], which would be a huge performance problem. Also, make sure the engine is innodb. 1: http://blog.loadsys.com/2008/03/19/cakephp-12-tuning-the-acl-via-mysql/ On Tuesday, April 17, 2012 6:00:05 AM UTC-7, Farah wrote: > > I'm not expert in CakePH

Re: Some Issues: multiple views on one page and help with javascript

2012-04-17 Thread bs28723
I will try to help with the view issue. First look at the 2.x View Template section http://book.cakephp.org/2.0/en/views.html And look into Extending Views. This will allow you to break up the view. You create a frame work for a controller, then the view can have different content in the main

Re: ACL very slow

2012-04-17 Thread stork
Also, check out these projects http://plugins.cakephp.org/packages?query=acl if you do not need wheel with some special shape. -- 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 wit

Re: ACL very slow

2012-04-17 Thread stork
> 1. http://www.visuallizard.com/blog/2009/10/19/241 > 2. > http://www.mainelydesign.com/blog/view/speeding-up-cakephp-acl-component > 3. > http://phpknight.com/cakephp-acl-controlled-application-slow-performance-problem/ > 1. 2009/10 2. 2010/05 3. 2010/06 Better use current stable CakePHP r

Re: Where am I supposed to save additional PHP source files while I'm writing a new behavior

2012-04-17 Thread jeremyharris
If it's more than two files (behavior + test case) it's worthwhile to point out that plugins are not only good for redistributing your code, but it's also good for packaging your tests and everything in a different repo that has its own history and that you can submodule via git. This assumes th

Re: Issue with multiple select form input.

2012-04-17 Thread jeremyharris
If your app is in Cake 2, it should handle array named parameters (what you're trying to do with /brand[0]:Dell/brand[1]:Apple) by itself. Just pass them as an actual array rather than building the url yourself, like $this->Html->link('search', array( 'controller' => 'products', 'action' => 'se

Re: Auth component WITHOUT ACL blocks every controller action

2012-04-17 Thread stork
> $this->Auth->authorize = 'controllers'; > $this->Auth->authorize = array('Controller'); -- 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 questio

Re: Auth component WITHOUT ACL blocks every controller action

2012-04-17 Thread luca capra
Il 17/04/2012 15:13, DigitalDude ha scritto: Hey, I have a little problem with the Auth component. Normally I use it together with ACL, everything works finde. Now I have a really small Project and I just want to have some authentication without ACL tables or different roles. ... What am I mis

Auth component WITHOUT ACL blocks every controller action

2012-04-17 Thread DigitalDude
Hey, I have a little problem with the Auth component. Normally I use it together with ACL, everything works finde. Now I have a really small Project and I just want to have some authentication without ACL tables or different roles. The basic setup is like the following: AppController $componen

Re: ACL very slow

2012-04-17 Thread Farah
I'm not expert in CakePHP, but its very clear that the ACL is slow if my tables database acos, aros and aros_acos over thousand rows. Just a simple $this->Acl->check() runs over 500 queries and its clear that its not the acl generate that, it uses the Tree behavior to find the specific permissi

Re: How to show message from default.po into javascript

2012-04-17 Thread Fábio
Its just a basic example, you could add alert(''); to your layout. I think there are many better options, but i dont know the best one. Em terça-feira, 17 de abril de 2012 08h52min13s UTC-3, marco metal escreveu: > > Hi, > > Can any one tell me how to read m

Re: ACL very slow

2012-04-17 Thread stork
1. Do you store sessions in database? If yes, is it the same database as the one with application data? If yes, why? And why not use other (memcache) storage for sessions? 2. Stop blaming core code for slowness, until you'll be able to write short example NOT using your own classes like Session

How to show message from default.po into javascript

2012-04-17 Thread Marcus James
Hi, Can any one tell me how to read messages from default.po inside JavaScript. Thanks, Marcus -- 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 relate

Re: ACL very slow

2012-04-17 Thread Farah
Ok, I'm sorry stork, but I if I just try put in the session all permissions of the controller: $acoes = $this->Acao->find("all", array("conditions" => array("Controller.alias" => $controller))); foreach ($acoes as $key => $acao) { if (!$this->Session->check("Auth.Perm

Some Issues: multiple views on one page and help with javascript

2012-04-17 Thread Timo
Hello everybody, since I am fairly new to CakePhp and since my research has not yielded any definitive results concerning my specific problem so far, I figured the best thing to do would be to ask here. :) Bear with me, this is going to be rather elaborate, I fear... I'm creating an applicati

Re: ACL very slow

2012-04-17 Thread stork
> Any one can help me with this ? Not me, sorry. This is example, how should NOT look code of CakePHP application, controller should be as slim as possible. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://as

Re: Issue with multiple select form input.

2012-04-17 Thread Owlio
>That is the proper name, because PHP sees that and creates an array with the values within that array. How else would you get multiple values for the same group? Ahh! This makes perfect sense, to be honest, I'm not sure why I didn't realise this was the case. >It sounds like the problem is th

Images in RSS Feed

2012-04-17 Thread Reza Talamkhani
Hi, how can I insert images in my rss feed? I want one image to go with each post. index.ctp set('documentData', array( 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/')); $this->set('channelData', array( 'title' => __("پست های اخیر رضا تلم خانی"), 'link' => $this->Html->url('/', tru

Re: JSON response!

2012-04-17 Thread Serkan Sipahi
Thanks :) Von meinem iPhone gesendet Am 16.04.2012 um 20:51 schrieb Rob : > It is not possible to send both a HTML and a JSON response for the same > request. However, you can detect the type of request and respond with HTML > or JSON accordingly. For example: > > public function index() >