multiple $to addresses email component

2009-08-30 Thread Brendon Gleeson
How do I specify multiple $to addresses in the email component? when I specify a comma separated string the mail debug indicates "Array" instead of a string? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" g

Re: Dependent=true, too much data is deleted

2009-08-30 Thread Martin Westin
This might be the same problem I had when migrating to 1.2 last year. The conditions in all associations MUST be arrays or you will get these kinds of strange problems. so try: array('Comment.parent_type'=>'event') /Martin On Aug 30, 8:06 am, Jeroen wrote: > Hi all, > > Nasty problem: I have

Re: File Uploads: What security-issues I have to take care of?

2009-08-30 Thread Miles J
Haha awesome, glad someone found it useful :] --~--~-~--~~~---~--~~ 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

Re: Using belongsTo and hasMany relationships: Is it possible to access tables through a chain of relationships?

2009-08-30 Thread delocalizer
now I understand, you want associated user & animal info for all specified Userpages... so as I suggested before, do the find on Userpage model... but use contain to provide the associated stuff: $pages = $this->Userpage->find('all',array( 'conditions'=>array( 'or'=>array(

cake 1.3 var $scaffold redirect

2009-08-30 Thread Andras Kende
Hello, is it possible that in cake 1.3 using var $scaffold wont redirect on save or edit ? I just get a blank page. core.php set to: Configure::write('debug', 0); Thanks, Andras --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Using belongsTo and hasMany relationships: Is it possible to access tables through a chain of relationships?

2009-08-30 Thread Sarah
I would like the results from the query to include all userpages that either have an approved value of 1 or belong to the current user (whose id is stored in the $id var) and have an approved value of -1. Basically I want a list of all userpages that are approved for public viewing or that are not

Re: Using belongsTo and hasMany relationships: Is it possible to access tables through a chain of relationships?

2009-08-30 Thread delocalizer
ok... but I'm still not sure exactly what your intent is. When you say you need information on THE user's animal - do you mean there is a particular user that you are trying to get information on, like the current requesting user? $id is a unique value in your method (ie. not a loop iterator or so

Re: File Uploads: What security-issues I have to take care of?

2009-08-30 Thread DigitalDude
Hey, this looks nice, and I like the fact that it can handle mutliple files at one time! I will try to implement this into my project, and then start to customize it to fit my requirements. I want to create some records in the database for each uploaded file, but I'm sure this is gonna work with

Re: File Uploads: What security-issues I have to take care of?

2009-08-30 Thread DigitalDude
Hey, I couldn't wait and tried out your Plugin. And, well, it works like a charme! It does everything I want to do right from the start, the data I need is stored, I can even set the path where the files are uploaded to within the action (so I can save the files in a separate directory for each u

Re: $hasOne/'dependent' => 'true' vs. $belongsTo

2009-08-30 Thread centr0
nevermind, figured it out. i was putting it in the wrong model. goals rather than users On Aug 30, 3:17 pm, centr0 wrote: > this is my app's relationships as far as i have set them up. > > users have many goals > goals belongsTo users > users habtm departments > departments habtm users > depart

Re: How may I 'trick' $ajax->observeField into firing with linked combo boxes?

2009-08-30 Thread FrederickD
I think I solved my problem referenced on this thread. The solution proposed with the array_unshift scrambled the data inside the dropdown. The names were still sorted properly, but the id number with that name got resequenced. Apparently that is what array_unshift does for you, according to the d

Re: Just baked: Guerra Creativa | Web Design and Logo Contest

2009-08-30 Thread Enrique
Thanks a lot! The design was not made by me ;-) I'm just responsible for all the bugs you may find On 30 Aug., 17:14, Aivaras wrote: > I just love the layout, the site looks great, good job! > > Faifas > > On Sun, Aug 30, 2009 at 22:45, Enrique wrote: > > > Dear Cake Fans: > > We can proudl

Re: Save HABTM, Undefined index: id

2009-08-30 Thread Wilson
Thanks Martin! That works. Not quite sure why, but I've added an 'id' field to my join table. For the multi-saves, there's no error, but nothing is written to the field? Anyhow, I appreciate your help. Wilson On Aug 17, 4:02 am, Martin Westin wrote: > Which model doesn't have anidfield? > >

$hasOne/'dependent' => 'true' vs. $belongsTo

2009-08-30 Thread centr0
this is my app's relationships as far as i have set them up. users have many goals goals belongsTo users users habtm departments departments habtm users departments have many categories categories have many goals goals belongsTo users, departments, and categories when i scaffold this setup ever

Re: Joining two arrays to use in a Select box with the formhelper

2009-08-30 Thread FrederickD
Not one to give up easily, if at all... I gave it another try. I remember reading a post somewhere that an easy way to add an entry to the beginning of a dropdown list was like this: echo $form->input( 'county_id', array( 'options' => array('Please pick a country') + $counties ) );

Re: Joining two arrays to use in a Select box with the formhelper

2009-08-30 Thread FrederickD
Thanks Brian! I received both your message on this thread and on the other one. Adding the statements below in the controller function had no effect. function getCounties() { $this->set('options', $this->Example->County->find('list', array( 'conditions' => array(

Re: Using belongsTo and hasMany relationships: Is it possible to access tables through a chain of relationships?

2009-08-30 Thread Sarah
I'm performing this in the Userpages controller. I was calling find on Users because I need information on the user's animal. User hasMany Userpages User belongsTo Animal The foreign keys are set up appropriately. I need to get a list of all userpages in which: (Userpages.approved = 1) OR (User

Re: Just baked: Guerra Creativa | Web Design and Logo Contest

2009-08-30 Thread Aivaras
I just love the layout, the site looks great, good job! Faifas On Sun, Aug 30, 2009 at 22:45, Enrique wrote: > > Dear Cake Fans: > We can proudly announce our freshly baked site: > http://www.guerra-creativa.com > (Still Alpha, but already 948 users!) > > """ > Guerra Creativa is a community p

Just baked: Guerra Creativa | Web Design and Logo Contest

2009-08-30 Thread Enrique
Dear Cake Fans: We can proudly announce our freshly baked site: http://www.guerra-creativa.com (Still Alpha, but already 948 users!) """ Guerra Creativa is a community platform for the creative. We provide you the battlefield and weaponry to conquer the creative world. Through web design and logo

Re: Extra newline character in every page??

2009-08-30 Thread persianshadow
i'm agree with euromark (munich) i have same problem because i save my file with windows notepad and result of this work is generate white space in output html. finally i save my document with Notepad++ and select this format : " UTF8 without BOM " (( BOM = Byte Order Mark )) BOM use for UTF1

Re: CakePHP + PHP5.3 = ?

2009-08-30 Thread Miles J
Yeah im pretty positive it wont be interchangeable. It uses a whole new model setup and also uses namespaces. The most you can do is interchange between 1.3/2.0. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakeP

Re: File Uploads: What security-issues I have to take care of?

2009-08-30 Thread Miles J
A few here: - Check the extension as well as the mimetype - Only allow certain types - Check the filesize if needed - Make sure the file is a valid file resource - Make sure there are no errors upon uploading I however have create a file upload plugin. You can use the plugin itself or you can ta

Re: Memcached Settings

2009-08-30 Thread brian
This is what I'm using. It's not yet in production and may change somewhat, but this is the general idea. Cache::config( 'default', array( 'engine' => 'Memcache', 'duration'=> 3600, 'probability'=> 100, 'prefix' => In

Memcached Settings

2009-08-30 Thread Neelesh
In CakePHP doc, I read about Memcached support included in CacheEngines. AFAIK, memcached is a daemon. To be able to use it, we will need to use its IP Address and Port number. Can you help me figure out how I am going to set this is CakePHP? Thanks Neelesh --~--~-~--~~~

Re: javascript helper link of js and php file

2009-08-30 Thread Alessio
the only problem is that you have to put the code javascript into a variable... but not so big problem... For now I am rendering small ctp file with the code js, in the middle of page... not so big elegant but functional ;) On 29 Ago, 02:26, brian wrote: > echo $javascript->codeBlock('...', arr

Re: Extra newline character in every page??

2009-08-30 Thread euromark (munich)
i once had this problem with some trash editor from the internet they save your utf8 encoded pages with BOM without even asking etc. those might be interpreted as newline (at the beginning of the document) you should save your documents with proper editors - not using BOM just normal "utf8" wel

Re: Using Cake models from non-cake project

2009-08-30 Thread tbirand
Hi Thiago, thanks for the answer. Unfortunately I don't think that works either, as the shells aren't really external scripts and I don't see a way of including them in order to make use of the models. Any other suggestions? On Aug 29, 9:06 pm, Thiago Nuic Vidigal wrote: > I dont know if it will

Re: Call to undefined method AuthComponent::authorize()

2009-08-30 Thread brian
Transpose the order of the components. I can't remember why precisely, but Acl must be loaded first. var $components = array('Acl', 'Auth'); On Sat, Aug 29, 2009 at 5:19 PM, Laran Evans wrote: > > I'm following this guide to setup an ACL: > http://book.cakephp.org/view/648/Setting-up-permissions

Re: How may I 'trick' $ajax->observeField into firing with linked combo boxes?

2009-08-30 Thread brian
In case you miss the other thread: you need to call set() before rendering the view because the view's copy of the variable is not changed otherwise. On Sun, Aug 30, 2009 at 9:33 AM, FrederickD wrote: > > I understand. That is what I would like to do; have the first row be > 'Please select...' so

File Uploads: What security-issues I have to take care of?

2009-08-30 Thread DigitalDude
Hey, in my first "real" and own project, I want to implement the ability to upload files to a user's account. The filetypes I need to be able to upload are: - PDF - JPG - GIF - PNG - XLS - DOC - OpenOffice Documents - ZIP - RAR Before I start to implement a file-uploading action, I need to cons

Re: Joining two arrays to use in a Select box with the formhelper

2009-08-30 Thread brian
You have to set() the variable afterwards. You're adding a value to a purely local variable. array_unshift($counties, array("none"=>"Pick me!")); $this->set(compact('counties')); $this->render('/examples/ajax_dropdown'); On Sat, Aug 29, 2009 at 11:28 PM, FrederickD wrote: > > Hey there... this t

Re: Problems with updateAll

2009-08-30 Thread LPaulino
the info was perfect, by as I said, the table doesnt have a primary key, only a column that works like one. I cant touch it, because it was made to work that way. Im just building 1 website for this system I didnt make it, I know this is a terrible system ^^. I will try to find another way. Anyway

Re: Extra newline character in every page??

2009-08-30 Thread Dr. Loboto
Check your php files (models, controllers, etc) for whitespace before/ after php tags. On Aug 29, 4:50 pm, Weber Chu wrote: > I found there is newline character "\r\n" in the start of every page > no matter which layout I am using. > > i.e. before " > I have also checked that all layour .ctp do

$ajax->observeField not working

2009-08-30 Thread Justin Time
Hi, i have a Problem with cake and his ajax Follow Code is working very well (Target: $ajax->div('test')): echo $ajax->link('Details','/regions/update_select', array( 'url'=> array( 'controller' => 'regions', 'action' =>'update_select' ), 'update'=>'test', )); But the same code with a select f

Re: CounterCache supports multiple counters?

2009-08-30 Thread schneimi
Thx for the answers! Yes, what I would like is two counters for one relation without circumstances. Sorry if I didn't point this out very good. I imagine something like this for a Model: var $belongsTo = array('User' => array('className' => 'User',

Re: How may I 'trick' $ajax->observeField into firing with linked combo boxes?

2009-08-30 Thread FrederickD
I understand. That is what I would like to do; have the first row be 'Please select...' so that the observeField 'sees' a change in the field. I am just not sure how to push an entry into element 0 of an array that has already been loaded by a find('List'), and thereby pushing all the other eleme

Emulate $hasAndBelongsToMany

2009-08-30 Thread jmmg77
Hi, I've built a contact management system using $hasAndBelongsToMany and I'm almost finished. I just found out that habtm associations don't work across multiple databases. I've gone through all the models and used $hasMany and $belongsTo instead. I liked the arrays I got using habtm and unfo

Re: Request help with a model definition.

2009-08-30 Thread gedm
delocalizer Brian, I changed the structure of my comments table by changing comment_id to parent_id and used the find('threaded') function to retrieve the data. I also removed the ParentComment and ChildComment associations from the model. It is now working. Thanks for your help. On Aug 25,

Re: CakePHP + PHP5.3 = ?

2009-08-30 Thread Martin Westin
After a few more minutes with Cake3 I only have one thing to say: Wow! Nate, Gwoo, David, Tim and anyone else working on version 3 (those were the names I saw on the commits). You all rock! That looks like Cake-nirvana. I found so many amazing changes I don't know where to start. Seriously, I ca

Re: CakePHP + PHP5.3 = ?

2009-08-30 Thread Martin Westin
OK, thanks for the link. But that code can't be used interchangeably with the stable 1.2, right? That is the same app dir for both Cake cores. After a quick glance I'd say no to that myself. On Aug 30, 11:30 am, Miles J wrote: > Its called Cake3 and is only PHP 5.3 specific. It has a whole

Re: CakePHP + PHP5.3 = ?

2009-08-30 Thread Miles J
Its called Cake3 and is only PHP 5.3 specific. It has a whole new core and setup so it probably wont be backwards compatible. http://code.cakephp.org/cake3 On Aug 30, 1:56 am, Martin Westin wrote: > Can anyone say a few words about the plans for Cake in relation to PHP > 5.3? Will compatibility

Re: CounterCache supports multiple counters?

2009-08-30 Thread WebbedIT
Apart from the fact there is no counterField parameter so it would require some modification/overriding of the core. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email t

Re: Array of input text

2009-08-30 Thread WebbedIT
You may want to check the naming of your fields ... if you plan to use the saveAll() method they need to be as follows: echo $form->input('Blogurl.0.url', array('label' => 'Other URL')); echo $form->input('Blogurl.1.url', array('label' => 'Other URL')); echo $form->input('Blogurl.2.url', array('l

Re: Array of input text

2009-08-30 Thread WebbedIT
You may want to check the naming of your fields ... if you plan to use the saveAll() method they need to be as follows: echo $form->input('Blogurl.0.url', array('label' => 'Other URL')); echo $form->input('Blogurl.1.url', array('label' => 'Other URL')); echo $form->input('Blogurl.2.url', array('l

CakePHP + PHP5.3 = ?

2009-08-30 Thread Martin Westin
Can anyone say a few words about the plans for Cake in relation to PHP 5.3? Will compatibility be added in a point-update (1.2.5 maybe) or is the policy to not support 5.3 for a while? I found a previous thread that ended in suggesting we use Cake 1.3 dev (= not "stable"). This was not afaik an o

Re: Array of input text

2009-08-30 Thread WebbedIT
You may want to check the naming of your fields ... if you plan to use the saveAll() method they need to be as follows: echo $form->input('Blogurl.0.url', array('label' => 'Other URL')); echo $form->input('Blogurl.1.url', array('label' => 'Other URL')); echo $form->input('Blogurl.2.url', array('l

Re: CounterCache supports multiple counters?

2009-08-30 Thread Aivaras
Well, model.php line 1388 in function updateCounterCache says foreach ($this->belongsTo as $parent => $assoc) { therefore in theory you could use this belongsTo method. Somebody, please confirm this. Faifas On Sun, Aug 30, 2009 at 11:14, WebbedIT wrote: > > I *think* the OP is actually afte

Re: CounterCache supports multiple counters?

2009-08-30 Thread Aivaras
Oh, Miles, thanks for a hint! It will surely be useful in the future. Faifas On Sun, Aug 30, 2009 at 04:57, Miles J wrote: > > Well ok then: > > User hasMany Post > User hasMany Comment > > Within the users table you would have a column called post_count and > comment_count. > > Within the Po

Re: How may I 'trick' $ajax->observeField into firing with linked combo boxes?

2009-08-30 Thread WebbedIT
As brian states you add the blank entry to the arrays that you pass from the controller to the view. So the $states, $counties and $cities arrays need to include the blank 'Please select ...' options as their first row. --~--~-~--~~~---~--~~ You received this messa

Re: After Save data no redirect to another page.

2009-08-30 Thread Aivaras
Not exactly persianshadow, it is ok to leave action only, or fill nothing into redirect if you want user to be redirected to current controller and action. As for your issue arif, why don't you try some debugging to see if redirect(); is actually called? if(!empty($this->data)) { if($this-

Re: Problems with updateAll

2009-08-30 Thread WebbedIT
Your memb__id field must be your primary key as that is what CakePHP finds after running the select query and then uses to run the update. If you have an ID to use (which you must have as CakePHP requires all models to have a primary key) why are you hell bent on not using it? After all it would s

Call to undefined method AuthComponent::authorize()

2009-08-30 Thread Laran Evans
I'm following this guide to setup an ACL: http://book.cakephp.org/view/648/Setting-up-permissions When I run my code though I get this error: Fatal error: Call to undefined method AuthComponent::authorize() in C: \Development\Projects\LinkBuilder\cake\trunk\app\app_controller.php on line 8 The

Re: Using belongsTo and hasMany relationships: Is it possible to access tables through a chain of relationships?

2009-08-30 Thread delocalizer
Ah I hadn't realised you just wanted Userpages - in which case why not call find on Userpage? If you're in Users controller: $pages = $this->User->Userpage->find('all',array( 'conditions'=>array( 'or'=>array( 'approved'=>1, 'and'=>array( 'Use

Re: CounterCache supports multiple counters?

2009-08-30 Thread WebbedIT
I *think* the OP is actually after two counterCaches for just one relation ... one having a condition that only counts the users private records and another which includes all records. If this is the case I am not sure if it is possible without modifying counterCache's behaviour as I don't think

Re: After Save data no redirect to another page.

2009-08-30 Thread persianshadow
hi what's your controller ? you must correct this : $this->redirect(array('controller'=>'product','action'=>'index')); redirect function need to controller and action but i think you didn't provide this. (you must put your own controller name instead product) On Aug 30, 8:33 am, arif hossen