Re: slightly OT: need an unusual find condition (or possible custom query)

2009-01-28 Thread Martin Westin
Thanks AD, I did have an nagging suspicion that this would require something like that with temporary tables and things. What I did for now (until I do some performance testing on it and in case anyone find it useful) was: 1. A deleteAll using a "NOT" condition. Deletes anything that does not mat

Re: how to display validation error messages

2009-01-28 Thread Miles J
Or: http://www.milesj.me/blog/read/10/displaying-form-errors-as-a-list-in-cakephp --~--~-~--~~~---~--~~ 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 uns

Re: Set::combine (or maybe merge and a couple extracts)

2009-01-28 Thread brian
That does look nice. While I was trying to avoid looping over the resultset, this little nugget might be very handy in AppModel, as you suggest. Thanks! On Thu, Jan 29, 2009 at 2:03 AM, teknoid wrote: > > Not a one-liner, but perhaps it'll be helpful... > > http://teknoid.wordpress.com/2008/09/2

Re: isUnique case-sensitivity off ??

2009-01-28 Thread teknoid
override isUnique in your model and use something strtolower() when searching for a given field or comparing the value. On Jan 29, 1:52 am, forrestgump wrote: > Hey guys, >   Need help with this... > i have validation rules defined as thus: > var $validate = array( >                         'city

Re: how to display validation error messages

2009-01-28 Thread brian
FormHelper will display the error. But it seems to depend upon how you define your input. Sometimes, you need to explicitly set the error element. I still haven't figured it out. Whenever I run into this, I just add the following wherever I need it: $form->error(FIELD_NAME); Where FIELD_NAME, in

Re: Set::combine (or maybe merge and a couple extracts)

2009-01-28 Thread teknoid
Not a one-liner, but perhaps it'll be helpful... http://teknoid.wordpress.com/2008/09/29/dealing-with-calculated-fields-in-cakephps-find/ On Jan 29, 1:50 am, brian wrote: > Paging grigri ... ;-) > > I have some data that is the result of a stored procedure call that > I'm struggling to re-shape

isUnique case-sensitivity off ??

2009-01-28 Thread forrestgump
Hey guys, Need help with this... i have validation rules defined as thus: var $validate = array( 'city' => array( 'notempty'=>array( 'rule' => 'alphaNumeric',

Set::combine (or maybe merge and a couple extracts)

2009-01-28 Thread brian
Paging grigri ... ;-) I have some data that is the result of a stored procedure call that I'm struggling to re-shape into a more desirable array. One of the selected columns is the result of a CASE block which checks values from a couple of tables, returning the appropriate field. As such, Cake c

how to display validation error messages

2009-01-28 Thread forrestgump
Hey guys, Needed help with this one...seems as though it was never answered anywhere in the group so i think it will help a lot of people- I have a validation criteria in my Model defined as below: class District extends AppModel { var $validate = array( 'district' =>

Re: Click to edit.

2009-01-28 Thread Miles J
You usually have 2 elements... One the form, the other the text and just toggle between them. When the ajax is fired through the form, update the 2 elements. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP"

Click to edit.

2009-01-28 Thread WidePixels
How do you set up a "click to edit" on a page? Idea is that a USER can see his information, but when he clicks "click to edit" button the page changes into a form where he can save his data with ajax and then "saving." page now shows his newly updated data? I tried the echo $ajax->link('Click

HABTM on a HABTM

2009-01-28 Thread Miles J
Everytime I try to do this, the page just goes white. Is this even possible? What other alternatives are there. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cak

Re: script.aculo.us

2009-01-28 Thread Dr. Loboto
If you want ajax actions with effects, you should not use ajax helper and write own JavaScript code for handling such action. Simpliest way is to run pre-load effect, on its finish (afterEffect callback) run AJAX call and on its finish (onComplete callback) run after-load effect. On Jan 29, 4:15 

Re: Adding custom css class to $html->link and a , HELP!

2009-01-28 Thread brian
echo $html->link( 'Activate', '/order/activate/'.$order['List']['id'], array( 'class' => 'button2' ), sprintf(__('Are you sure you want to activate this order ?', true), $order['List']['id']), false ); The last param tells Cake n

Re: How do I share session data with my cake application?

2009-01-28 Thread Sergei
In your script write: if(isset($_COOKIE["PHPSESSID"])){ session_id($_COOKIE["PHPSESSID"]); } then write and read to this session as usual. On 29 янв, 08:30, EVIL09 wrote: > Hello Cake Gurus , > > I'm requesting your help after reading many sites, I haven't been able > to find the answ

Re: database.php file change to postgresql stops graphics

2009-01-28 Thread reidster
Thank YOU! It is working now. It was that the pgsql extension was not used during the php installation. I reran the configure/make/make install. It is working now with the graphics and it's able to connect to the postgresql db. Thanks again to everyone who replied. On Jan 28, 3:49 pm, Choc

Adding custom css class to $html->link and a , HELP!

2009-01-28 Thread Louie Miranda
Hello, I have this code: *echo 'Activate';* That displays a css class on and after that a with another class. When I am using CakePHP, I can only use this. *echo $html->link("activate", '/order/activate/'.$order['List']['id'], null, sprintf(__('Are you sure you want to activate this order ?',

Re: Call Ajax from Javascript Function

2009-01-28 Thread Sidney
I'm not sure if it's 'recommended', but I found quite quickly that the scope of the $ajax helper becomes too limited (you just can't get enough code into the array param). The solution is then to start coding javascript using prototype functions directly and take full control. Prototype makes aja

How do I share session data with my cake application?

2009-01-28 Thread EVIL09
Hello Cake Gurus , I'm requesting your help after reading many sites, I haven't been able to find the answer to this question: How do I share session data with my cake application? Here's the deal: I have 2 applications in my server, the first one without Cake (the web portal), the secon

Re: Latest Cake Release breaks HABTM pagination

2009-01-28 Thread aron
correction, we were using rc3. On Jan 28, 5:31 pm, aron wrote: > Following this tutorial > > http://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-... > > we had this working great in rc4 but when we upgraded the final > release cake seems to ignore the relationships and throws t

Re: Find with two levels of recursion in where clause

2009-01-28 Thread WebbedIT
You need to force a join from A to C using B so that you can specify conditions on C fields within your find ... sounds easy when I write it like that, and in fact it is quite easy once you get your head around it. You need to unbind the relationship between B and C then bind A to C setting 'fore

Re: Find with two levels of recursion in where clause

2009-01-28 Thread WebbedIT
> You can use Containable for what you're trying to do, I think. Containable does extra queries to find the extra data rather than joining all the tables and running one query hence you cannot use conditions on 2nd level associations. --~--~-~--~~~---~--~~ You rece

Latest Cake Release breaks HABTM pagination

2009-01-28 Thread aron
Following this tutorial http://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-relationship/ we had this working great in rc4 but when we upgraded the final release cake seems to ignore the relationships and throws the following error: Unknown column ‘Listing.city_id’ in ‘where cl

Re: Separating user and profile tables

2009-01-28 Thread WebbedIT
I split my tables/models into logical objects ... User: An account to login to a site (id, user_group_id, username, email, password etc.) User Group: Groups of users which can be applied access rights (id, name) Person: An actual person (id, user_id, first_name, last_name, full_name, dob, gende

Re: Get count of related model

2009-01-28 Thread Andrea Cardinale
On Wed, Jan 28, 2009 at 7:38 PM, brian wrote: > > I think you mean, add a field to Foo model to store the count of associated > Bar. > Yes man, don't know what the hell I was thinking about when I write it. Thanks fro the correction ;) Andrea --~--~-~--~~~---~--~--

RE: Separating user and profile tables

2009-01-28 Thread Dave Maharaj :: WidePixels.com
It does make sense depending on the application. For example my project has USERS which then are divided up into 2 unique profile depending on the role of the user. Example EmployerProfile and EmployeeProfile. The Employer profile has different fields in the profile than say the Employee would. S

Re: Separating user and profile tables

2009-01-28 Thread Braindead
LunarDraco, thanks for the explanation! Now it's clear why Janne wants to separate the information. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@google

script.aculo.us

2009-01-28 Thread WidePixels
How do you add the effects to be used in the $ajax link? I have the 'scriptaculous.js?load=effects' inmy view file. It loads fine. link('Test Link', '/artists/update_genres/', array('update'=>'test',

Re: CakePHP Model Advice

2009-01-28 Thread matth
Thanks for that tidbit about the Ingredient model. I gave recursive a shot earlier in the day but that didn't help. At the moment, this is exactly what I'm working with: class Recipe extends AppModel { var $name = 'Recipe'; var $primaryKey = 'id'; var $recursive = 2;

New api template =(

2009-01-28 Thread max
Hello guys. Sorry for the terrible English. Today, I sуе that changed api.cakephp theme design. Theme very nice, but properties and methods sorted randomly =( This is very inconvenient for me. But in previous version of alphabet (Perhaps I am wrong, but the old version was more convenient for me

Re: database.php file change to postgresql stops graphics

2009-01-28 Thread Choc
I had this problem as well. PHP was not configured to work with MySQL so when it tried to connect it was calling an unrecognized function. I'm not sure why that stopped it from displaying everything correctly though. There is an easy tutorial here. http://www.techmalaya.com/2007/09/10/beginners-g

Re: database.php file change to postgresql stops graphics

2009-01-28 Thread stefano
check the rewrite module and the .htaccess :D On Wed, Jan 28, 2009 at 4:42 PM, AD7six wrote: > > > > On Jan 28, 2:41 am, reidster wrote: >> I have taken off the trailing comma as you suggested and I get the >> same result; > > The line on which your page ends is the "Cake can (not) connect to t

Re: CakePHP Model Advice

2009-01-28 Thread yusuf widi
no, it is ok if your ingredient model is empty... try to give recursive parameter with '2' when you use find method. by default recursive parameter is null. read more about recursive is on the api.cakephp.org http://api.cakephp.org/class/model#method-Modelfind On Thu, Jan 29, 2009 at 4:46 AM, ma

Cache not configured properly on Mac OS X

2009-01-28 Thread Rick
Version 1.2.1.8004 I downloaded and installed Cake in my Apache document directory in new "Test" Directory. I can run cake and get the "Release" screen successfully. However I'm getting a warning "Cache not configured properly". I have not touched anything other than to chmod the tmp directori

CakePHP Model Advice

2009-01-28 Thread matth
Howdy, I'm having trouble fully wrapping my head around Cake's models. They seem great and I'm really working to figure out how to take advantage of all the benefits. However, I can't quite figure out how to set up my models appropriately. For example, I have two models (Recipe and Ingredient) an

Re: database.php file change to postgresql stops graphics

2009-01-28 Thread AD7six
On Jan 28, 2:41 am, reidster wrote: > I have taken off the trailing comma as you suggested and I get the > same result; The line on which your page ends is the "Cake can (not) connect to the database". This almost certainly indicates that php doesn't have the postgres extension loaded. AD --~

Re: Get count of related model

2009-01-28 Thread brian
I think you mean, add a field to Foo model to store the count of associated Bar. On Wed, Jan 28, 2009 at 2:18 PM, Andrea Cardinale wrote: > > Another thing you can do is to add a new field in the Bar model to > store the count of associated Foo and let Cake handle its value as > explained in thi

Re: Separating user and profile tables

2009-01-28 Thread LunarDraco
> Why do you want to separate login information from other information > about the user? > I cant't think of a good reason to do this. One good reason is you want to support multiple login protocols like OpenID or your own internal. You need to be able to store your sites profile Info and associat

Re: Get count of related model

2009-01-28 Thread Andrea Cardinale
Another thing you can do is to add a new field in the Bar model to store the count of associated Foo and let Cake handle its value as explained in this page: http://book.cakephp.org/view/75/Saving-Your-Data#counterCache-Cache-your-count-490 Andrea On Wed, Jan 28, 2009 at 5:25 PM, brian wrote:

Re: behaving the CakePHP 1.2 way

2009-01-28 Thread Delirium tremens
there is no afterValidate there is no beforeLogin What now??? On 28 jan, 16:47, Delirium tremens wrote: > I added: > > function beforeSave() { >         $this->data['Account']['password'] = md5($this->data['Account'] > ['password']); >         return true; > > } > > to Account model, but now lo

Re: access helper from behavior

2009-01-28 Thread brian
I already have too much stuff in bootstrap ;-) This thing, though, is much more than a single function. I did consider moving it to vendors but, as the only sticking point is this behavior, I'll leave it as it is for now. With the refactoring I have planned, it'll all work out if I leave this as

Run a custum shellscript as rootuser

2009-01-28 Thread seraph
i´ve implemented a custom shellscript and now i want to execute it via the cake/console/cake The problems i encounter is that when i run cake as the apache user, my custom shell is listed under app/vendors/shells/ , so no problem. but when i run it as root with: /usr/bin/sudo ./cake there is no e

Re: svn or git?

2009-01-28 Thread Gwoo
> Why does CakePHP use SVN. Because when we started CakePHP 3 years ago, Git did not exist. > while The Chaw appears to use GIT? Because now Git exists and we like it. But as was said Chaw supports both, so if you have a new project you can choose based on your preference. > Will CakePHP event

Re: behaving the CakePHP 1.2 way

2009-01-28 Thread Delirium tremens
I added: function beforeSave() { $this->data['Account']['password'] = md5($this->data['Account'] ['password']); return true; } to Account model, but now login does not work. Why? On 28 jan, 16:04, Delirium tremens wrote: > Hold on... I need it encrypted after validated... What

production security: cake directory

2009-01-28 Thread rb
Let me be haste and say, I am new to CakePHP. Please pardon the silly question(s) I've completed the blog tutorial, and I've recently learned how to bake at the command line. I've successfully created new app(s) all referencing my cake directory. For example: \wamp\www\cake <-- my cake director

Re: svn or git?

2009-01-28 Thread mark_story
You should be able to install both SVN and Git with ease through MacPorts. That's how I installed them, was pretty easy. -Mark On Jan 28, 7:09 am, leo wrote: > > > Should I be using one rather than the other? > > > > Will CakePHP eventually migrate to GIT? > > Here I didn't mean which is best

Re: behaving the CakePHP 1.2 way

2009-01-28 Thread Delirium tremens
Hold on... I need it encrypted after validated... What now??? On 28 jan, 15:53, Delirium tremens wrote: > I understood! I added it to BeforeFilter. It works! > > On 28 jan, 15:37, Delirium tremens wrote: > > > I added: > > > $this->Auth->authenticate = $this->Account; > > > to login. > > > I ad

Re: nice new API layout

2009-01-28 Thread Gwoo
Api Generator is open source. Feel free to fork the project and add the features you want to see. http://thechaw.com/api_generator --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this grou

Re: access helper from behavior

2009-01-28 Thread Samuel DeVore
For me when I find that I have functions that cross boundaries (needed in views, models, controllers) then I either move them to bootstrap (and loaded needed files as needed from within the call) or if it is a bigger 'thing' I go to vendors and load as needed. -- (the old fart) the advice is fr

Usage of is_dir

2009-01-28 Thread mixvoip
Hello, I just updated to the recent cake1.2 and noticed that my pages load 5 times slower. Rendering time is over 2 seconds. So I installed xdebug to check a little what is happening and I noticed that the function is_dir() uses 1/3 of all process time and is called over 1400 times per request. A

Re: Vote for add Cakephp into Netbeans

2009-01-28 Thread matt
Great idea! Netbeans is an awesome IDE. I noticed some people went ahead and left comments without actually casting a vote. Make sure to click the "Vote for this issue" link at the bottom of the issue's summary. On Jan 27, 9:27 pm, "Diego Caro A." wrote: > Please, vote for cakephp in Netbeans's

Re: behaving the CakePHP 1.2 way

2009-01-28 Thread Delirium tremens
I understood! I added it to BeforeFilter. It works! On 28 jan, 15:37, Delirium tremens wrote: > I added: > > $this->Auth->authenticate = $this->Account; > > to login. > > I added: > >     function hashPasswords( $data ) { >         return $data; >     } > > to Account model. > > After updating m

Re: Find with two levels of recursion in where clause

2009-01-28 Thread brian
You can use Containable for what you're trying to do, I think. On Wed, Jan 28, 2009 at 6:44 AM, maxmil wrote: > > I have the following scenario in my model. > > A has a ManyToOne relationship with B > B has a ManyToOne relationship with C > > I would like to use "find" on A but be able to put co

Re: nice new API layout

2009-01-28 Thread Marcelo Andrade
On Wed, Jan 28, 2009 at 10:10 AM, mark_story wrote: > > On Jan 28, 1:30 am, Marcelo Andrade wrote: >> On Tue, Jan 27, 2009 at 6:02 PM, brian wrote: >> > >> >http://api.cakephp.org/ >> >> How! Great job! Congrats! >> But I miss the "members" link with the name of >> all classes' methods in alp

Re: access helper from behavior

2009-01-28 Thread brian
As I stated in the 2nd paragraph, I do have need for this functionality in views. It's just this one instance that I require it in the behavior. The TidyHelper is a wrapper for several different libTidy functions. It's also not meant to be something that is used solely for manipulating data before

Re: behaving the CakePHP 1.2 way

2009-01-28 Thread Delirium tremens
I added: $this->Auth->authenticate = $this->Account; to login. I added: function hashPasswords( $data ) { return $data; } to Account model. After updating my account, $cakeDebug (my debug config is 2, so flash is eternal) flashed my password hashed. Am I doing anything wron

Re: nice new API layout

2009-01-28 Thread brian
The view source links were working. They're being blocked by the route that was added to deal with the old-style links. I've filed a ticket to point it out. On Wed, Jan 28, 2009 at 10:44 AM, James S wrote: > > Looks like the view source links aren't done yet. Nice work otherwise! > > James > > >

Re: Get count of related model

2009-01-28 Thread brian
I think the quickest way would be to create a database view. CREATE VIEW foobar AS SELECT f.id, COUNT(b.id) FROM foo AS f INNER JOIN bar AS b ON b.foo_id = f.id GROUP BY f.id'; $this->Foo->query('SELECT * FROM foobar'); Oooh! Wouldn't Cake DBviews be tasty? Cake 2.0, maybe? On Wed, Jan 28, 200

Creating a tagging system for uploaded images

2009-01-28 Thread foldiman
Can anyone give general strategy advice on building a tagging system? I'm creating an app where users simply upload pics. I've successfully established an HABTM relationship bw my 'pic' model and my 'tag' model and have a table w two foreign keys called 'pics_tags'. Adding new 'tags' updates this

Re: access helper from behavior

2009-01-28 Thread Smelly_Eddie
Helpers are used for the presentation layer. And are ideally only accessed from the views. If you want to manipulate data in the behavior than the functionality should be in a behavior. Why is that not the case, since it sounds like you only use the tidy functionality before saving, and not befor

Re: set(compact('whatever'))

2009-01-28 Thread brian
Nate, read the first post in this thread. It wasn't as simple as that. Sometimes, the "just search the list" remark doesn't wash. I did do a search after your earlier comment (that is, once I realised that Inflector was involved and so could refine the search). I found 2 threads which discussed t

Re: paypal integration in cakephp

2009-01-28 Thread Arthur Pemberton
On Wed, Jan 28, 2009 at 6:47 AM, Arafat wrote: > > Dear i cant integrate the paypal in my site. The tutorial is too > critical. Can any one make it easier. > Thanks > It's not that hard -- Fedora 9 : sulphur is good for the skin ( www.pembo13.com ) --~--~-~--~~~---

Re: nice new API layout

2009-01-28 Thread James S
Looks like the view source links aren't done yet. Nice work otherwise! James --~--~-~--~~~---~--~~ 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 unsubsc

Get count of related model

2009-01-28 Thread Günther Theilen
Hi, I've got two models "Foo hasMany Bar". What would be the best way to get all entries of Foo and the number of according entries in Bar. I thought about a find->('all') and a count() in the view but that doesn't seem to be very elegant. Any hints? Regards Guenther --~--~-~--~~-

paypal integration in cakephp

2009-01-28 Thread Arafat
Dear i cant integrate the paypal in my site. The tutorial is too critical. Can any one make it easier. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake

Re: nice new API layout

2009-01-28 Thread majna
1.1 API is missing On Jan 28, 4:26 pm, rogwei wrote: > ummm, not exactly. In some (eg AuthComponent) you have to scroll down > past the property list to get to the method summary. In the old API > you got the alphabetized list of member links first, and you could > jump from there directly to t

Re: Multiple Uploads with MeioUpload

2009-01-28 Thread Flipflops
No worries. Glad to help. John On Jan 28, 3:06 pm, "Arak Tai'Roth" wrote: > Perfect, this is exactly what I was hoping for. Thank you very much > for your help with this. > > On Jan 28, 8:43 am, Flipflops wrote: > > > Hi > > > Well you can include a seperate field in your model for each upload

Re: set(compact('whatever'))

2009-01-28 Thread Nate
On Jan 26, 11:05 pm, brian wrote: > On Mon, Jan 26, 2009 at 10:23 PM, Nate wrote: > > > This has already been covered many times in the mailing list.  Please > > search before posting next time.  Thanks. > > Yeah, yeah. Meaning, you're fed up with people complaining about the > Cake devs' seemin

Re: nice new API layout

2009-01-28 Thread rogwei
ummm, not exactly. In some (eg AuthComponent) you have to scroll down past the property list to get to the method summary. In the old API you got the alphabetized list of member links first, and you could jump from there directly to the member in question. While this layout looks snazzy, it is not

Re: Multiple Uploads with MeioUpload

2009-01-28 Thread Arak Tai'Roth
Perfect, this is exactly what I was hoping for. Thank you very much for your help with this. On Jan 28, 8:43 am, Flipflops wrote: > Hi > > Well you can include a seperate field in your model for each upload, > something like filename1, filename2 etc. - and thinking about it this > does work with

Re: Multiple Uploads with MeioUpload

2009-01-28 Thread Flipflops
Hi Well you can include a seperate field in your model for each upload, something like filename1, filename2 etc. - and thinking about it this does work with saveAll - but I needed felxibility and the advantage of having a seperate model just for uploads is you get to store all the meta data too..

Re: saveAll() and Auth/Acl - redirecting to login page??

2009-01-28 Thread releod
bump On Jan 28, 1:10 am, releod wrote: > Hello, > > I have been trying to lock down this problem for the past little while > - here is my issue. > > - I have a form with News Model data, and Link Model data.. > - My controller runs $this->News->saveAll($this->data, array > ('validate' => 'first'

Re: What is the advised way to call a function from another controller?

2009-01-28 Thread WebbedIT
Spain, lucky beggar! We have dreams of France/Spain/Oz/New Zealand, but currently stuck in the mediocrity of the UK rat race where two full-time working parent's struggle to make enough to pay the monthly bills. The only saving grace is that I run my own business and work from home so at least I

Re: Multiple Uploads with MeioUpload

2009-01-28 Thread Arak Tai'Roth
That should help actually, as I am also using a seperate table to hold the images and then using associations to link them together. I am wondering though, how is your model coded to handle this, is it the same as it is for one image, or do you have to include a seperate entry of MeioUpload for ea

Re: Multiple Uploads with MeioUpload

2009-01-28 Thread Flipflops
Hi I'm using MeioUpload for a current project with multiple images. It is a bit more complicated as I'm saving all the images into a single table using a ploymorphic association (ie. Product hasMany Upload, Profile hasOne Upload etc.) - but this should be helpful anyway The upload fields generat

Re: What is the advised way to call a function from another controller?

2009-01-28 Thread leo
Glad you got it sorted. There seem to be various 'best practices' regarding OOP and MVC depending on who you are, what the language is and what the framework is. My personal best practice is 'get it done'. > Are you still in the North East or have plying your trade elsewhere? North East of Spain

Re: Multiple Uploads with MeioUpload

2009-01-28 Thread WebbedIT
Not that I've used this behaviour or even tried uploading yet but would have thought the solution lied in the naming of your fieldnames to create an array and using the saveAll() method as follows: For saving multiple records of single model $data needs to be a numerically indexed array of record

Re: nice new API layout

2009-01-28 Thread mark_story
On Jan 28, 1:30 am, Marcelo Andrade wrote: > On Tue, Jan 27, 2009 at 6:02 PM, brian wrote: > > > The API pages were just changed minutes ago (I know, because I was > > requesting something as it was changing) and it's a huge improvement, > > IMHO. > > > Mad props and kudos to whomever worked on

Re: CakePHP / MIT License - Cake free for bundling with my application?

2009-01-28 Thread mark_story
Yes. As long as the copyrights remain in the files you can do whatever you wish with the files. Bundling them in a commercial app is fine. Check out http://en.wikipedia.org/wiki/MIT_License and http://www.opensource.org/licenses/mit-license.php -Mark On Jan 27, 10:36 am, Arne-Kolja Bachstein w

Re: Multiple Uploads with MeioUpload

2009-01-28 Thread Chad Casselman
Was a solution for this ever found? I need the same thing. I really like using Meio but must get multiple files working. I am still unclear on all the magic in cakephp or I would try to modify the script myself, but no where to even start looking - right now. Chad On Mon, Jan 26, 2009 at 2:2

Re: twitter users?

2009-01-28 Thread RichardAtHome
Aye, I've noticed hashtags was missing a few posts too. On Jan 27, 8:55 am, "p...@otaqui.com" wrote: > I've found Hastags.org to be quite unreliable (going offline > regularly, missing tagged posts, that kind of thing). > > Another option is just to search twitter itself: > > http://search.twitt

Re: Calling $html->css() from inside an element

2009-01-28 Thread RichardAtHome
If the element is being rendered in the layout, why not add the $html- >css to the header as normal in the layout? Is the element optional in the layout? ie. is it only displayed on some pages and not others? If so, I think the minor overhead of including the CSS on every page (and therefore cac

Resolved: Where to create function that fetches list arrays for select lists, radio buttons etc. and how to call it?

2009-01-28 Thread WebbedIT
Change of subject --~--~-~--~~~---~--~~ 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..

Re: What is the advised way to call a function from another controller?

2009-01-28 Thread WebbedIT
leo, Sounds like you obviously know more about this than me and are probably more proficient in OOP and MVC than I am (not too hard as I'm self-taught so have a lot of undiscovered bad habits). >From the little understanding I have I agree that they should be individual functions in the Model an

Re: svn or git?

2009-01-28 Thread leo
> > Should I be using one rather than the other? > > > Will CakePHP eventually migrate to GIT? Here I didn't mean which is best for me, but which way is CakePHP going and would I be advised to follow? I already use SVN but it was a git to set up on OS X. --~--~-~--~~~-

Re: svn or git?

2009-01-28 Thread Graham Weldon
The Chaw supports both SVN and Git. You will find the core team move around between SVN ang Git for various projects. This question can probably be answered by looking at the key differences between Git and Svn. The most significant, and most obvious, being the distributed nature of Git. I sugg

Find with two levels of recursion in where clause

2009-01-28 Thread maxmil
I have the following scenario in my model. A has a ManyToOne relationship with B B has a ManyToOne relationship with C I would like to use "find" on A but be able to put conditions on field in object C. Something like: $this->A->find('all', array('conditions' => array('B.C.someField' => 'someV

Re: articles search - by name and by tags

2009-01-28 Thread Jon Bennett
> Thanks for the advices, but I really can't take the risk to loose > other time on this trying to upgrade and test pieces of code. > > I'd take the chance if I was the one who wrote the app, but it's not > the case. I wouldn't see it as 'taking a chance'. the differences between 1.2 beta and

Re: What is the advised way to call a function from another controller?

2009-01-28 Thread leo
> you can wrap them, again within the model class, with one function > that calls all. > Thinking about this, it might be more correct to code the wrapper method in the controller where the return result can be better tailored to the function of that controller. --~--~-~--~~---

Re: What is the advised way to call a function from another controller?

2009-01-28 Thread leo
Just checked your profile, Paul. We're from the same neck of the woods. I was born in Quarrington Hill. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@go

Re: $form->dateTime() field name breaks with 4 or more levels

2009-01-28 Thread RichardAtHome
Found the solution. Documenting it here in case anyone else stumbles into this issue: You need to use an alternative format to specify the model/field names: dateTime("[a][b][c][d]") ?> Thanks to the person on IRC who hinted at this solution :-) On Jan 24, 4:17 pm, RichardAtHome wrote: > Hate

Re: What is the advised way to call a function from another controller?

2009-01-28 Thread leo
Looks good, but I'd be inclined to further break it up into functions that return individual lists. There might be a time later on when you want to just get ethnicities or sexualities or whatever. If need be, you can wrap them, again within the model class, with one function that calls all. On Ja

Re: Interlinked tables

2009-01-28 Thread WebbedIT
Happy to help, although it's teknoid who deserves the reps! --~--~-~--~~~---~--~~ 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 grou

Re: What is the advised way to call a function from another controller?

2009-01-28 Thread WebbedIT
I have gone with the Model approach as it seems right. See the following and please give your thoughts: Model: ... function __formData($authUser = array()) { if ($authUser['User']['user_group_id'] < 3) { $organisations = $this->Organisation->find('list', array( 'conditions'=>array('O

svn or git?

2009-01-28 Thread leo
This has probably been discussed before, but I can't find anything specific. Why does CakePHP use SVN, while The Chaw appears to use GIT? Should I be using one rather than the other? Will CakePHP eventually migrate to GIT? --~--~-~--~~~---~--~~ You received this

Re: CakePHP / MIT License - Cake free for bundling with my application?

2009-01-28 Thread Arne-Kolja Bachstein
Hi Erik, yes, that would be mine too. But thanks for answering, at least I know that I do not explicitely misunderstand this now :-) --- Arne On 27 Jan., 18:20, Esoteric wrote: > My understand is that is fine as long as you leave all copyrights in > place for the cakephp library portion (the s

Re: Cake 1.1.x is gone to heaven?

2009-01-28 Thread Dardo Sordi Bogado
https://svn.cakephp.org/repo/trunk/cake/1.1.x.x/ On Wed, Jan 28, 2009 at 8:04 AM, majna wrote: > > Where can I download cake 1.1.20? > tnx > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To p

Re: articles search - by name and by tags

2009-01-28 Thread Paamayim
Thanks for the advices, but I really can't take the risk to loose other time on this trying to upgrade and test pieces of code. I'd take the chance if I was the one who wrote the app, but it's not the case. About the docs, you can only imagine how was frustrating for me to start learning and usi

Cake 1.1.x is gone to heaven?

2009-01-28 Thread majna
Where can I download cake 1.1.20? tnx --~--~-~--~~~---~--~~ 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

Save + HABTM != beforeDelete()

2009-01-28 Thread Brenton B
Scenario: Members <- HABTM -> Webpages. When a member edits their info there is also a big list of different webpages they can check/uncheck ... when they go to save it will delete the joins then re-add them. When it deletes them, it does so in a way that `beforeDelete()` nor `afterDelete()` are

  1   2   >