Re: routes.php: Where do the errors go?

2009-07-24 Thread MrMeikel
In production mode (Debug = 0), Cake just displays the generic 404 error view I believe. From there you could work which part of the url is wrong if you wanted, or just display the same view for either type (or other) of error. On Jul 24, 6:11 pm, mark_story wrote: > Well if the request doesn't

Re: unsigned column types

2009-07-24 Thread Mark
nope i always use unsigned ints - auto incr int(10) - tinyint(1) toggles - tinyint(2) enumeration fields etc only the cake bake "schema" seems not to like it but its buggy anyway (comments and other special attributes get lost) hopefully, this won't be a problem in the future On 24 Jul., 22:19

Re: Problem with hasMany/belongsTo relationships - not returning related records.

2009-07-24 Thread mariusz.lewandowski
I'm also looking for some convinient way to avoid invoking "bindModel" method .. On Jul 23, 1:52 pm, Alastair wrote: > Hi and many thanks for your help! > > This did work, however it doesn't make sense that I've had to do this > in the first place! It seems like accessing the parent model of a >

unsigned column types

2009-07-24 Thread Miles J
Does cake do anything weird if I apply an unsigned attribute to any of my int columns? --~--~-~--~~~---~--~~ 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

Netbeans mod_rewrite support

2009-07-24 Thread matt
Netbeans is a free, open source, high quality, and feature rich IDE. It is cross-platform compatible and actively being developed. Netbean's mod_rewrite support is a dependency of Netbean's support for CakePHP. The CakePHP issue has 120 votes and has been made top priority (P1) while the mod_rewri

Re: routes.php: Where do the errors go?

2009-07-24 Thread mark_story
Well if the request doesn't match any user land routes, cake tries to use its default routes. If those generate errors, that's what happens. -Mark On Jul 24, 10:23 am, DragonFlyEye wrote: > OK, I'm trying to figure this out and getting wacky results as I test: > I'm playing with custom-built r

Re: Custom layout when using cakeError

2009-07-24 Thread toby1kenobi
I figured out how to do this, by creating app_error and overriding _outputMessage. toby1kenobi wrote: > Hi there, > > Is it possible to specify an alternative layout for use when calling > cakeError? > > Thanks, > > Toby --~--~-~--~~~---~--~~ You received this

Re: Downloading and dealing with zip files

2009-07-24 Thread thatsgreat2345
fsock, or curl, and gzip On Jul 24, 7:54 am, rhorn wrote: > I've done a little bit of searching, but was unable to find anything. > I have a situation where I need my application to download a zip file > (it's an archive of feeds), extract and access its contents. Would > like to keep it as cake

Re: Using CakePHP-bake , some of the database table names get changed in model files...why is it so?

2009-07-24 Thread Carlos Suarez Fontalvo
I'm not understanding you. But, it seems you are not using the bake shell properly. In linux you must type: cakbe bake or cake bake model, and when it asks for params lets say name of the table (is the name cake expect the table might have). but if your table doesnt follow cakephp conventions, you

validation is not working

2009-07-24 Thread anurag
This is freelesson module code for validation.but its not working == freelesson.php=== class FreeLesson extends AppModel { var $name = 'FreeLesson'; var $validate = array( 'free_lesson_title' => array( array('allowEmpty' => false, '

Re: $this->data donot retreive any value

2009-07-24 Thread eromero_81
Try to make a debug or a var_dump for $this->data and see if it realy contains the data... Also like everyone else said before check the documentation... Remember that this data only containsn data from post so check if the form is sending the data via post method if not add 'method' => 'POST' To

Downloading and dealing with zip files

2009-07-24 Thread rhorn
I've done a little bit of searching, but was unable to find anything. I have a situation where I need my application to download a zip file (it's an archive of feeds), extract and access its contents. Would like to keep it as cake friendly as possible, can anyone point me in the right direction?

newbie - Installation Inquiry for a multi-language web2.0 application

2009-07-24 Thread Mahmoud M. Abdel-Fattah
I'm working on Web 2.0 Application and will be hosted on cPanel server. and here're some notes about my needs : 1. Multi-Lingual website. 2. each user will have it's own sub-domain to log-in, ex : http://company.website.com/ 3. want to install the cake in folder not root, so as I can install some

routes.php: Where do the errors go?

2009-07-24 Thread DragonFlyEye
OK, I'm trying to figure this out and getting wacky results as I test: I'm playing with custom-built routes in the following format: /:town-name/:action/:id The route works fine for correct URLs, but I'm confused as to what CakePHP does with URLs which don't conform to the regex included in the

Admin routing with language prefix in URL - problem.

2009-07-24 Thread mariusz.lewandowski
Hi, I have set in my Routes.php following routes: Router::reload(); Router::connect( '/:language/admin/:controller', array('action' => 'index', 'language' => null, 'admin' => true, 'prefix' => 'admin'), array('language' => '[a-z]{2}') );

Re: Redirect after AJAX request

2009-07-24 Thread NOSLOW
hey DatacenterHellas, Your best bet is to not login via an AJAX call. Just set "standardSubmit: true" in your ExtJS login FormPanel config and call "MyFormPanel.getForm().submit({method: 'POST'});". Now you can let CakePHP handler your redirects server-side. On failure, you login page will just r

Changing field type in scaffold form

2009-07-24 Thread Antônio Marco
Hi, folks! FACTS: [1] I'm using scaffolding; [2] I have a table wich contains a INT2 column named LEVEL. This column accepts only values IN (0, 1, 2, 3, 4, 5, 6); [3] When the scaffold form is shown, the LEVEL field is a simple * TEXT type * field. My question is: Would be possible to change a

Re: $this->data donot retreive any value

2009-07-24 Thread aswamr
thanks for the support. But still that problem remains thanks for that link Vijay. Once i tried with cake bake. but got stuck in the first configuration steps itself. I will go through those links and come back to u later. -- View this message in context: http://www.nabble.com/%24this-%3Edata-

HABTM

2009-07-24 Thread Farjad
i m defining a habtm relation between students table and courses table now i want that when i call students to fetch the data particular fields of course table are fetched. currently all the fields of course table are fetched. can someone help or guide --~--~-~--~~~-

cakephp and facebook

2009-07-24 Thread Dhileepen Chakravarthy
Hi everybody, I googling to do facebook in cakephp i got the following link but it supports older version. what is the sample url for newer version. http://facebook-developer.net/2007/10/18/building-your-first-facebook-application-with-cakephp/ Regards, Dhileep --~--~-~--~~-

saveField updates more than the field

2009-07-24 Thread Dave Maharaj :: WidePixels.com
I have $this->Calculations->saveField('percent', $percent); which saves a math formula to the field But "modified" field is also getting updated which I do not want. Can we specify that we only want the one field saved? Or just use save() and include the fields we want to save instead of s

blackHole and Callback Question

2009-07-24 Thread Luke
Hi, I am finally moving on with my first Cake Project. (Recipe Page) User can add Recipes and of course they must be able to delete them aswell. So if they are logged in, they see their own recipes. To secure other recipes of being deleted, I wanted to use the Security Component. So I added below

Re: Define several paginators for one model

2009-07-24 Thread Bs
Right now I do the following to paginate my model after several orders in one view: - I created a function sort() in my controller which does the following: function sort() { $order = array(); if (($this->data['sort']['column1']) == 1) {

Re: Define several paginators for one model

2009-07-24 Thread Bs
Right now I do the following to paginate my model after several orders in one view: - I created a function sort() in my controller which does the following: function sort() { $order = array(); if (($this->data['sort']['column1']) == 1) {

Re: Multiples lists of different tables :S

2009-07-24 Thread Abraham Boray
Thx Piotr ,I'm goign to check out that ! On Jul 21, 6:18 pm, Piotr Kilczuk wrote: > Hello, > > > Wot makes things harder in CakePHp is how to select records from a > > table depending on another one !! ill explain further. > > > I got4 example 2 tables :: > >   1-Categories > >   2-Posts > > >  

Define several paginators for one model

2009-07-24 Thread Bs
Hi, I would like to define several paginators for one model. For example users_controller.php: var $paginate = array (.); var $paginate2 = array (.); var $paginate3 = array (); so that I can use those in my views like this <$php echo $paginator->sort($paginate, "Country'); ?> <

Re: Download code for downloading a file

2009-07-24 Thread Vijay Kumbhar
Hey Crazy, thanks a lot ... i will try this out. On Fri, Jul 24, 2009 at 1:56 PM, Crazy wrote: > > Will there be allot of file downloads? > > If there will be a big load on the site from file downloads, > especially big files. Then it's not smart to handle it in cakephp. > Especially if yo

Re: Download code for downloading a file

2009-07-24 Thread Crazy
Will there be allot of file downloads? If there will be a big load on the site from file downloads, especially big files. Then it's not smart to handle it in cakephp. Especially if you want to support download accellerators/resume support On every request(someone that uses a download accelerator

Re: $this->data donot retreive any value

2009-07-24 Thread Vijay Kumbhar
Hey aswamr, can you follow the cake bake commands.It is a awesome feature of cakephp which creates the controllers , models , view on the fly with the common functions like index ,add, edit, delete , admin_index ,admin_add , .and so on. Only craete your table with the appropriate fields & see

Re: Download code for downloading a file

2009-07-24 Thread Vijay Kumbhar
Also i have created a code & it also worked :) // your file to upload $result = $this->Application->findById($id); // your file to upload $file = APP."webroot/uploads".DS.$result['Application']['resume']; header("Pragma: public");

Re: Download code for downloading a file

2009-07-24 Thread Vijay Kumbhar
Yeah... Thanks rufus it works . only i changed this line, header('Content-Type: application/octet-stream'); to header("Content-Type: ".$result['Application']['resume']).""); that is the content type of the uploaded file coming from my database. Thanks again... On Fri, Ju

Re: Download code for downloading a file

2009-07-24 Thread Rufus
I would imagine if you are getting an empty file you a referencing the file incorrectly. Try echo out your path and make sure its correct. make sure On Jul 24, 5:39 pm, Vijay Kumbhar wrote: > i have removed that array too. but it is not still giving the file to > download. > > > > On Fri, Jul 2

Re: Download code for downloading a file

2009-07-24 Thread Vijay Kumbhar
i have removed that array too. but it is not still giving the file to download. On Fri, Jul 24, 2009 at 8:06 AM, brian wrote: > > mimeType should be a string, not an array. Why do you assign it as > array($result['Application']['type'])? > > On Thu, Jul 23, 2009 at 2:23 PM, Vijay Kumbhar wrote:

Re: Download code for downloading a file

2009-07-24 Thread Rufus
Here is my code: pdfDir is defined constant fyi function download($id = null) { if (!$id && empty($this->data)) { $this->Session->setFlash(__('Invalid Invoice', true)); $this->redirect(array('action'=>'index'));

Re: $this->data donot retreive any value

2009-07-24 Thread thatsgreat2345
Have you even read the documentation at all? I would really recommend doing the blog before you take anything else on. but $form->create('Note',array('action'=>'add')); $form->input('Note.title'); //or just $form->input('title'); $form->input('Note.body',array('rows'=>5,'cols'=>5)); $form->end('S