Re: v2.0.4 Console error message on mkdir?

2011-12-09 Thread heohni
oh my god!! How blind i am?! Thanks!!! On 8 Dez., 17:32, AD7six andydawso...@gmail.com wrote: On Dec 8, 5:05 pm, heohni heidi.anselstet...@consultingteam.de wrote: Hi, Welcome to CakePHP v2.0.4 Console --- App : MyName

Re: How to add a read button to a view.ctp?

2011-12-09 Thread euromark
@daniel using cake2 you should distance yourself from GET requests changing the DB it always was a bad idea to do so in the first place use Form-postLink() instead On 9 Dez., 00:28, Daniel danwgr...@gmail.com wrote: I used an action: li?php echo $this-Html-link(__('Mark as read', true),

Re: meioupload sql error

2011-12-09 Thread Paulo H3nrique Alves
I have the same error in CakePHP 2.0.3 -- 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

Flash in cakephp

2011-12-09 Thread Praveen Pandey
how can i use flash in cakephp without using any external source code. please help me. -- 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

Model: Query distinct values from a table then save those values to another table

2011-12-09 Thread Typezero
Hi guys, CakePHP noob here. Just wanted to ask how can you query distinct values from a table then save it on another? Say I have a table for books, certainly some of them are classified into a common category like fiction or history. Now I created another table just to reference their distinct

Re: Can a plugin component auto-load a helper

2011-12-09 Thread euromark
you should always mention the current cakephp version I am assuming however that you use 1.3 (due to App::import) yes, you can. quite easily as a matter of fact. inside your component, all you have to do: $this-controller-helpers[] = 'MyPluginName.MyHelperName'; or $controller-helpers[] =

Re: Flash in cakephp

2011-12-09 Thread AD7six
On Dec 9, 6:43 am, Praveen Pandey praveenpandey.c...@gmail.com wrote: how can i use flash in cakephp without using any external source code. please help me. The same way you'd use flash in php. AD -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check

Re: Can a plugin component auto-load a helper

2011-12-09 Thread Toby G
Thanks for the reply, yes, sorry, it is v1.3. This is what I'd done... $this-controller-helpers['Facebook.Facebook'] = array( #'config' = $this-config, ); ... but I am getting an error in my layout where I include... $this-Facebook-init(); The error is Undefined property:

Re: meioupload sql error

2011-12-09 Thread Elizabeth Pardede
is it in configuration??? On Fri, Dec 9, 2011 at 7:16 AM, Paulo H3nrique Alves paulohenriquea...@gmail.com wrote: I have the same error in CakePHP 2.0.3 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site

Update field in associated model???

2011-12-09 Thread flosky
Hi everyone. I'm having trouble with what should be an easy task. First up I'm using Cake 2.0.2. I have a User and Setting table with User hasOne Setting association. Now I want to update fields of the Setting table, 'prefered_language' for example. This does either not work at all, or creates a

Re: Model Test Case SQL Error

2011-12-09 Thread flosky
Thanks, I changed that in my setup. On 8 Dez., 21:33, José Lorenzo jose@gmail.com wrote: Well, the 'bit' column is not officially supported, so it interpreted it as binary. The best of doing booleans is with tinyint(1) -- Our newest site for the community: CakePHP Video Tutorials

Store only month and date

2011-12-09 Thread Arnold Roa
Hi, im building a small test application to test cake2.0, on it im needing to save only month and year, i dont need the year. After read a while on internet i figure that is better to create a DATE field on DB and just ignore the year, but there is a problem with the helper, i create the input

Re: How to use AuthComponent to authorize using a password only rather than username/password?

2011-12-09 Thread Wendall
Thanks, I was able to get Auth working as you'd described. How can I implement an expiration date? I have a db field called start_date, and want to 'expire' the passcodes 30 days after they're created. I have a feeling that this logic should go in the Model, but with the Auth component working

Multi-level Authorization?

2011-12-09 Thread Wendall
I want to use cakePHP to set up an site that handles logging in users, etc, but I want 2 'roles': regular users that can access protected content as well as an 'admin' role that can create and administer other users. How can I use the Auth compoent to do this? -- Our newest site for the

ACL RBAC

2011-12-09 Thread RhythmicDevil
Hi all, I am working on implementing RBAC using ACL. I am really close but I am getting an error and I am hoping you can shed some light on it. I have pasted my entire ACO and ARO trees below for reference. When I run the following using the Cake console it works as expected:

Re: Multi-level Authorization?

2011-12-09 Thread Jeremy Burns | Class Outfit
By following the very clear tutorials in the online guide (they exists for both 1.3 and 2.n). Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Dec 2011, at 15:04:14, Wendall wrote: I want to use cakePHP to set up an site that handles logging in users, etc, but I want 2 'roles':

Strange updateCounterCache behavior

2011-12-09 Thread avairet
Hi, I'm using Cake 1.3.13. I have an strange issue with counterCache, that I've never seen before. So, I have Personality belongsTo User and Personality belongsTo Category associations: public $belongsTo = array( 'Category' = array( 'className' =

Re: ACL RBAC

2011-12-09 Thread RhythmicDevil
A coworker just clued me in and this is the final statement in AppController::beforeFilter() function beforeFilter() { /* * check(ARO, ACO, [action]) * */ if ($this-Acl-check(array('model' = 'Group', 'foreign_key' =

Re: Strange updateCounterCache behavior

2011-12-09 Thread Jeremy Burns | Class Outfit
What's the data type and size of the counter fields? Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Dec 2011, at 16:07:53, avairet wrote: Hi, I'm using Cake 1.3.13. I have an strange issue with counterCache, that I've never seen before. So, I have Personality belongsTo

Re: Strange updateCounterCache behavior

2011-12-09 Thread avairet
Like I said : TINYINT(1) On 9 déc, 17:11, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: What's the data type and size of the counter fields? Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Dec 2011, at 16:07:53, avairet wrote: Hi, I'm using Cake 1.3.13.

Re: Strange updateCounterCache behavior

2011-12-09 Thread avairet
Oh non sorry :) personality_count fields are INT(11) On 9 déc, 17:15, avairet avai...@cakephp-fr.org wrote: Like I said : TINYINT(1) On 9 déc, 17:11, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: What's the data type and size of the counter fields? Jeremy Burns Class

Re: Strange updateCounterCache behavior

2011-12-09 Thread Jeremy Burns | Class Outfit
Your mail said: In my personalities and categories tables, I have a personality_count field (TINYINT). Are you sure? Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Dec 2011, at 16:17:33, avairet wrote: Oh non sorry :) personality_count fields are INT(11) On 9 déc, 17:15,

Re: Strange updateCounterCache behavior

2011-12-09 Thread avairet
No, it's an error. My fields are really INT(11). I'm using Cake since 4 years and using counterCache well. On 9 déc, 17:28, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Your mail said: In my personalities and categories tables, I have a personality_count field (TINYINT).

Testing consecutive redirects in CakePP 2.0

2011-12-09 Thread elitalon
I am testing a controller action in CakePHP that redirects to different URL depending on certain conditions: if ( !$userIsAdmin ) { $this-Session-setFlash(__('Not allowed.')); $this-redirect('/users'); } if ( $this-MyModel-delete($id) ) { $this-Session-setFlash(__('Success.'));

Re: Update field in associated model???

2011-12-09 Thread Andras Kende
Its creates a new record since the primary key Setting.id is not specified.. you could : $this-User-Setting-updateAll( array('Setting.prefered_language' = $lang), array('Setting.user_id = $user_id) ); Andras Kende http://www.kende.com On Dec 9,

Re: Multi-level Authorization?

2011-12-09 Thread Ucha19871
On Dec 9, 7:04 pm, Wendall wendall...@gmail.com wrote: I want to use cakePHP to set up an site that handles logging in users, etc, but I want 2 'roles': regular users that can access protected content as well as an 'admin' role that can create and administer other users.  How can I use the

FileUploader component

2011-12-09 Thread j_pablo_gn
Hello, I have seen a few upload components: 1. http://www.meiocodigo.com/projects/meioupload/ 2. http://bakery.cakephp.org/articles/webtechnick/2009/02/10/file-upload-component-w-automagic-model-optional 3. http://milesj.me/code/cakephp/uploader But, as far as I am using cake 1.3 and I am a

Re: How to use AuthComponent to authorize using a password only rather than username/password?

2011-12-09 Thread Geoff Douglas
On Friday, December 9, 2011 6:58:26 AM UTC-8, Wendall wrote: Thanks, I was able to get Auth working as you'd described. How can I implement an expiration date? I have a db field called start_date, and want to 'expire' the passcodes 30 days after they're created. This is done when you

Re: How to use AuthComponent to authorize using a password only rather than username/password?

2011-12-09 Thread Geoff Douglas
Forgive a few mis-spellings, or bad grammar, I didn't proofread appropriately. :) -- 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

Re: Update field in associated model???

2011-12-09 Thread Geoff Douglas
In Cake, or I guess in SQL rather, you need to tell the system which record you want to update. You are passing in data, with no primary key value specified. So, one way to do this, would be: $setting = $this-User-Setting-findByUserId($user_id); if(!empty($setting)){

Adding a field to the User in Session

2011-12-09 Thread RhythmicDevil
Hi, I have Users and Groups. When a user logs in I want the group name to be part of the record that is stored in Session. Currently I get this: array ( 'id' = '4', 'username' = 'swright', 'group_id' = '4', 'created' = '2011-12-05 11:36:30', 'modified' = '2011-12-05 11:36:30',

Re: Can a plugin component auto-load a helper

2011-12-09 Thread gremlin
Yeah, pay attention to what was shown above your reply - you are setting the facebook helper's name to be the key of the array but the code above your reply is very clearly not setting the key to the helpers name but using a normal numeric index. On Dec 9, 2:52 am, Toby G

Re: meioupload sql error

2011-12-09 Thread gremlin
Is your form created with the form helper and did you remember to do type='file' in the options? This error happens when the form isn't set to multipart/form-data as the file field returns an array of keys with info about the uploaded file. On Dec 9, 2:45 am, Elizabeth Pardede

Re: Javascript Helper modification. Opinions, please.

2011-12-09 Thread gremlin
Or - load your jquery with the normal html tag and not the helper and reserve your use of the helper to include scripts that are strictly on a controller/action/view basis. Then your jquery can be the very first thing loaded always - also you could modify the helper by passing in a configurable

Re: Digest for cake-php@googlegroups.com - 25 Messages in 14 Topics

2011-12-09 Thread Abba Bryant
Elements included in the layout have known limitations in what they can add to the scripts_for_layout variable. On Fri, Dec 9, 2011 at 8:56 AM, cake-php@googlegroups.com wrote: Today's Topic Summary Group: http://groups.google.com/group/cake-php/topics - Strange updateCounterCache

Re: FileUploader component

2011-12-09 Thread Jeremy Burns | Class Outfit
I use David Persson's Media plugin; it took a little while for me to work out what to do but it contains a good tutorial and is working really well. What have you tried and what isn't working? Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Dec 2011, at 17:01:05, j_pablo_gn wrote:

Re: Adding a field to the User in Session

2011-12-09 Thread Jeremy Burns | Class Outfit
Look at the autoRedirect property of the Auth component. It allows you to perform logic after login but before redirect - perfect for what you need. http://book.cakephp.org/view/1265/AuthComponent-Variables#autoRedirect-1274 Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Dec 2011,

Re: Adding a field to the User in Session

2011-12-09 Thread RhythmicDevil
Ok thats fair enough. I can do a redirect, get the Group and then redirect to the final destination. Actually that allows me to also get a default path per group too. thanks On Dec 9, 1:39 pm, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Look at the autoRedirect property of

Re: Adding a field to the User in Session

2011-12-09 Thread Jeremy Burns | Class Outfit
Don't do a redirect; place this in your app_controller beforeFilter: $this-Auth-autoRedirect = false; Then add the code in your users-login method to populate the Auth.User session key and then redirect accordingly. Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Dec 2011, at

Re: Cake 2.0 documentation

2011-12-09 Thread mark_story
Tada! http://book.cakephp.org/2.0/en/contributing/documentation.html -Mark On Dec 8, 4:14 pm, aries br...@allemana.com wrote: Got it. What I'm hungering for is an easier way to submit changes and/ or supplementation. A sticky guide as you suggest would help. I hasten to add that I think

Re: Adding a field to the User in Session

2011-12-09 Thread RhythmicDevil
Aha, thats much smarter. While I have your attention, if you dont mind. What is the proper way to handle when a group is not allowed to access a particular controller? I have setup my ACL and it appears to be working properly. But, and I thought this would happen automatically, how do I stop

Re: FileUploader component

2011-12-09 Thread Miles J
David Perssons Media plugin is good for more advanced uploading/ validating. My uploader is great for very simply uploading and image transformations. Use whatever fits best! On Dec 9, 10:36 am, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: I use David Persson's Media plugin;

ACL

2011-12-09 Thread RhythmicDevil
What do you do with a user or group that does not have access to a node? I thought that an ARO would get denied access to an ACO automatically if the permissions had been set. When my AppController::beforeFilter() executes I see that the ACL component is aware that my user is allowed to see the

Re: ACL

2011-12-09 Thread Geoff Douglas
Are you trying to set up your application for the first time? Or are you trying to create some other functionality. If it's the first setup, it looks like you are over thinking this a bit. $this-Auth-actionPath = 'controllers/'; $this-Auth-authorize = 'actions'; $this-Auth-loginAction =

Re: Store only month and date

2011-12-09 Thread Geoff Douglas
You have two options: Option One: change the data type in the database to VARCHAR, or cake's String, and save whatever you want. Option Two: when saving the date pass in a valid SQL date value (Y-m-d), then ignore the year when you pull, and use the data. Happy Coding! -- Our newest site for

Re: Model: Query distinct values from a table then save those values to another table

2011-12-09 Thread Geoff Douglas
$distinctBookCategories = $this-Book-find('list',array( 'fields'=array('category_id'), 'conditions'=array( 'NOT'=array('category_id'=null), '{Other book conditions go here}' ), 'group'='category_id' )); I am not sure what you are looking to do here. But this is the code I use to pull unique

QuickApps - CakePHP 2.0 CMS - Awesomeness.

2011-12-09 Thread Geoff Douglas
I have been playing around with QuickApps for the last month or so. ( http://cms.quickapps.es/) (https://github.com/QuickAppsCMS/QuickApps-CMS) It is an awesome CMS built with Drupal in mind, with some other yumminess from other CMS platforms thrown in. My favorite part, is how they have

How to Redirect from a Behavior?

2011-12-09 Thread zuha
Ha, I know you'll all say... ah, you're breaking MVC so let me explain the situation in case anyone cares to have it. But if you don't, I'm just looking for the best way to force a redirect from a behavior. Preferably without having to edit any other file. ie. maybe something like ...

Re: How to Redirect from a Behavior?

2011-12-09 Thread Miles J
Why do you need to go to this page? You could always just use regular PHP: header('Location: /url/'); exit(); On Dec 9, 6:22 pm, zuha rich...@razorit.com wrote: Ha, I know you'll all say... ah, you're breaking MVC so let me explain the situation in case anyone cares to have it.  But if

Re: How to Redirect from a Behavior?

2011-12-09 Thread zuha
wow i feel stupid now :) ah it was a long day i'm redirecting so that the user gets feedback that there was no info found and/or they were restricted from seeing it. thanks for helping me remember cake was written in php :) -- Our newest site for the community: CakePHP Video Tutorials