Re: CakePHP does not save multilanguage attachment

2011-11-24 Thread Constantin FF
Where should I set the $this-data['Attachment']['title'] = $this-data['Attachment']['attachment']['title']; With the testing till now these are the results: Set title inside: Behavior beforeSave - does not save inside i18n table Model bofereSave - does not save inside i18n table Controller before

LdapAuthorize

2011-11-24 Thread gloop
Hello again, i try to program a LdapAuthentication and i need some help. First i need to configure the $components in /app/Controller/ Component/AppController.php ?php class AppController extends Controller { var $components = array('Auth' = array(

Re: ACL group based permission + Auth Component

2011-11-24 Thread José Lorenzo
It is possible via creating a custom Authorization object, those objects act as plugins for the AuthComponent so you would not need any changes in the usual way you work with Auth. The main question is, do you really need ACL? I've seen lots of people wondering about ACL and after a short talk

Re: Creating a mocked model uses default database instead of test in PHPUnit

2011-11-24 Thread José Lorenzo
When mocking a model it is recommended that you pass the correct parameters to the contstructor: $this-User = $this-getMock('User', array('_saveUploadedFile', '_removeUploadedFile'), array(false, 'users', 'test')); The third parameter indicates that you want to use the 'users' table and the

Re: plugin uses (wrong) app controller

2011-11-24 Thread José Lorenzo
Sorry, duplicate classnames are not allowed by PHP. Cake is not failing hard with a fatal error in your case because it caches the classname location for future uses, so the first one accessed wins. If you had multiple classes with the same name PHP would throw a fatal error if both classes

Re: Observer Pattern in CakePHP 2.0

2011-11-24 Thread José Lorenzo
You might want to take a look at this plugin to get an idea of how to implement it http://cakealot.com/2009/04/eventful-a-cakephp-event-system/ -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org

FireCake for normal html requests

2011-11-24 Thread wirtsi
Hello, I'm using 2.0.3 and got Debugkit with FireCake working so far that I get the FirePHP output on any ajax request, which is neat to start with. Now I would like to have the same for normal html requests. According to the docs at http://cakephp.lighthouseapp.com/projects/42880/docs-firecake,

CakePHP 2.0.2 Auth

2011-11-24 Thread Lucas Amiune
Hi, everyone. I'm new on cake and i decided to start from de 2.0.2. And I'm kind of stuck in how users can login in my app. This are my Auth files: AppController class AppController extends Controller { public $components = array( 'Session', 'Auth'=array(

MVC + js

2011-11-24 Thread merci
I am new to programming in php and js and need help. I wish to write a program which will read mouse coordinates(js function), add them to database and show them in ui (kind of dynamically updated field with current coordinates). User can also choose how frequently coordinates are shown

Testing Mock Controller redirects Cake 2.0

2011-11-24 Thread phpnote...@gmail.com
Hello, As of now when you test the redirect location of an action on a mock controller you do this. {{{ $this-assertEquals($this-headers['Location'], 'http://localhost/blog/ posts/index'); }}} Logged a pull request the other day on this for the 2.0 Cookbook.

Auth component not returning user data on manual login (CakePHP 2.0.3)

2011-11-24 Thread Pratz_
Hi, I have been trying to manually login a user in version 2.0.3 using: $this-Auth-login($data). Though it successfully logins the user, and can read user data through $this-Session-read('Auth.User.id'), the Auth Component does not return the user data. $this-Auth-user('id') returns NULL. Thus

AJAX Pagination not working on sharedhost

2011-11-24 Thread Petrisor Buga
Hy, i've developed a project locally using MAMP on a mac, after i moved it online the links generated automatically by cakephp are not working anymore, more precisely i get 500 internal server error on the ajax-get request and on the response i get: Error: The view for MoviesController::index()

Error when grouping aggregate function inner Containable behavior

2011-11-24 Thread habibillah
Dear All, I have problem when try to grouping aggregate function inner Containable behavior and have search on google but have not found any solution. I paste my code http://pastebin.com/TwZALqUC and the code show error code at http://pastebin.com/G7AFBVNW also sql error: Error: SQLSTATE[42S22]:

Re: How to get client mac address in PHP ..?

2011-11-24 Thread Leandro Rodrigues
Java Applet 2011/11/21 Sathia S sathia2...@gmail.com I need to know the MAC address of the connect clients, how can I do this in PHP? Please see this link. http://nazmulb.wordpress.com/2008/07/04/getting-mac-address-using-php/ But using this we can get mac address of some distros.

$options['inputDefaults']

2011-11-24 Thread Tiago Cardoso
Dear, I'm having trouble making the change of error and its tag class. Does anyone know how to do this change? echo ?php echo \$this-Form-create('{$modelClass}', array( 'inputDefaults' = array( 'div' = array('tag' = 'p'), 'error' = array(

Re: How to get client mac address in PHP ..?

2011-11-24 Thread Matthew Kaufman
chown www-data /usr/bin/arp Then $parse = exec(arp -an) On Thursday, November 24, 2011, Leandro Rodrigues leandrorodriguescas...@gmail.com wrote: Java Applet 2011/11/21 Sathia S sathia2...@gmail.com I need to know the MAC address of the connect clients, how can I do this in PHP?

Re: plugin uses (wrong) app controller

2011-11-24 Thread euromark
unfortunate if you use plugins with similar/same classes ;) but it makes sense. will do! On 24 Nov., 16:24, José Lorenzo jose@gmail.com wrote: Sorry, duplicate classnames are not allowed by PHP. Cake is not failing hard with a fatal error in your case because it caches the classname

Re: $options['inputDefaults']

2011-11-24 Thread ADmad
Your usage is incorrect, it should be 'error' = array('attributes' = array('wrap' = 'span', 'class' = 'validate_error')) -- 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

Re: CakePHP 2.0.2 Auth

2011-11-24 Thread gloop
Looks good. Are the fields are the same in your database? (usrname/password) Any exceptions? On 23 Nov., 19:27, Lucas Amiune lucastin...@gmail.com wrote: Hi, everyone. I'm new on cake and i decided to start from de 2.0.2. And I'm kind of stuck in how users can login in my app. This are my

Re: Cakebook crashes Flash on Chrome

2011-11-24 Thread Simon Males
As to why? The SWF allows for copying code samples to the clipboard. It might be worth sharing which OS (it looks like Windows XP from the screenshot) you have. Having 20-30 tabs open doesn't really point the finger at the Cookbook. Maybe check your plugin versions:

Re: FireCake for normal html requests

2011-11-24 Thread Sam Sherlock
Try making a __contruct and calling parent::__construct with the correct vars - S On 24 Nov 2011 15:24, wirtsi florian.kra...@googlemail.com wrote: Hello, I'm using 2.0.3 and got Debugkit with FireCake working so far that I get the FirePHP output on any ajax request, which is neat to start

Re: Cakebook crashes Flash on Chrome

2011-11-24 Thread Graham Weldon
Just on this point.. I get flash crashing on chrome a lot when browsing Github. Its not an issue with the cakebook. Its an issue with flash and chrome, as far as I can tell. Cheers, Graham Weldon http://grahamweldon.com e. gra...@grahamweldon.com p. (+61) 0407 017 293 Skype: grahamweldon On

Where to publish new plugin?

2011-11-24 Thread Roland
Hi! Is there any central place to announce a plugin I just write? cheers Roland --- banchaproject.org Combining ExtJS and CakePHP -- 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

Re: Cakebook crashes Flash on Chrome

2011-11-24 Thread Sam Sherlock
Chrome seems to be prone to crashing due to flash (seems to be various problems) many result in crashing. for me I get this alot in chrome - I can't recall it happening in firefox (if it does not on the same scale) http://www.google.com/support/forum/p/Chrome/thread?tid=13137185df92e1ebhl=en As

Re: Where to publish new plugin?

2011-11-24 Thread Sam Sherlock
http://cakepackages.com/ you could also consider submitting a article for bakery too - S On 24 November 2011 21:02, Roland kreativestal...@gmail.com wrote: Hi! Is there any central place to announce a plugin I just write? cheers Roland --- banchaproject.org Combining ExtJS and

Re: Observer Pattern in CakePHP 2.0

2011-11-24 Thread Perry
I thing the example in article 2 is great but i don't think is necessary to create a component to register observers. Observer pattern need two part, Subject and Observer, so i think you need another observer behavior ( not only observable behavior ). Observer pattern is usually implemented by

Re: Auth component not returning user data on manual login (CakePHP 2.0.3)

2011-11-24 Thread elitalon
If `$data` is an array built like as if it was the result of a `find('first')`, i.e. indexed by your user model name, try using `$this-Auth-login($data['User'])` instead of `$this-Auth-login($data)` On Nov 24, 7:42 am, Pratz_ pratyushmit...@gmail.com wrote: Hi, I have been trying to

Re: AJAX Pagination not working on sharedhost

2011-11-24 Thread leigh
Hello Petrisor, Check $this-viewPath and $this-view in your controller on the ajax request to see if they're pointing to a view file that exists. Also are you using cake 2.0? Kind regards, Leigh On Nov 24, 7:08 pm, Petrisor Buga petri...@theworkshop.ro wrote: Hy, i've developed a project