Re: get output controller from another controller

2012-05-02 Thread Christophe Vandeplas
tsController(); $this->RequestHandler->renderAs($eventsController, 'xml'); debug($eventsController); $eventsController->set('event', $event); $eventsController->set('isAdmin', $this->_isAdmin()); $view = new View($eventsController); $viewdata = $view->rende

Re: get output controller from another controller

2012-05-02 Thread Christophe Vandeplas
Hello, Unfortunately the output format (in my variable) is still not the REST XML. Any other idea? Thanks Christophe On Sat, Apr 28, 2012 at 6:31 AM, lowpass wrote: > I don't know if this is all you need but these might help: > > $this->response->type('xml'

get output controller from another controller

2012-04-26 Thread Christophe Vandeplas
gt;view(5) ) inside another controller ? Thanks for your expertise. Christophe -- 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 un

Since I can't register on ask.cakephp.org (An internal error occurred: 4B427927FFC21.AB44A44.22F1)....

2011-12-15 Thread Christophe
So here is the situation: I'm trying to add a autocomplete textbox (using the Ajax helper downloaded here: http://www.cakephp.bee.pl/ajax) The autocomplete is on a textbox filtering movie names. function movie_autoComplete() { $movieLocal = $this->Movie->find('all'); // some logic but now

Re: custom validation rules - custom message

2011-09-13 Thread Christophe Vandeplas
lla:en-GB:official&client=firefox-a > > To me to: > http://stackoverflow.com/questions/6972061/using-htmlhelper-on-model-to-insert-links-in-returned-errors > > HTH, Paul > > On Sep 8, 6:50 pm, Christophe Vandeplas > wrote: >> On Mon, Sep 5, 2011 at 12:27 PM, WebbedIT w

Re: custom validation rules - custom message

2011-09-08 Thread Christophe Vandeplas
in an error/validation message? > > HTH, Paul > @phpMagpie > > On Sep 2, 8:40 pm, Christophe Vandeplas > wrote: >> Hello, >> >> I have a model where a field needs a valudation rule to verify if the >> value already exists. >> The easy way to implement th

custom validation rules - custom message

2011-09-02 Thread Christophe Vandeplas
return $this->isUnique($check); } Is there a (supported or unsupported) way to change the validation rule? Of course I'd like to keep it in my model and not in my view for cleanness of code. Thanks a lot for your expertise. Have a great day Christophe -- Our ne

Re: What is the proper way of testing controllers in CakePHP 2.0

2011-08-24 Thread Christophe Roblin
hough there are tests that show it works. > > On Aug 21, 1:48 am, Christophe Roblin wrote: > > > > > > > > > Hi, > > > I've tried searching the new docs about testing with the new PHPUnit > > for CakePHP 2.0 Beta, without any success > >

What is the proper way of testing controllers in CakePHP 2.0

2011-08-21 Thread Christophe Roblin
Hi, I've tried searching the new docs about testing with the new PHPUnit for CakePHP 2.0 Beta, without any success Below is my code for testing the admin action of controller posts with method add. My issue is that I expected from the docs I received that headers were set when using testAction, i

Re: GPG/PGP Signed with Email Component

2011-07-22 Thread Christophe Vandeplas
bujanga wrote: > I do something very similar. Though I send plain text email only. I > create my data as fully formatted, sign/encrypt it and then send it to > a template that just outputs the field. > > On Mon, Jul 18, 2011 at 12:16 PM, Christophe Vandeplas > wrote: >>

GPG/PGP Signed with Email Component

2011-07-18 Thread Christophe Vandeplas
bably need to make a new component class to handle this. However I have absolutely no idea where or how to start. Considering the few lines required to do the gpg signing it shouldn't be to difficult though... Could you give me some advice to get this going? Thanks Christophe -- Our newest s

AuthComponent action manipulation.

2011-02-17 Thread Christophe
7;=>'school','action' => 'login'));?> School inlog input('email'); echo $form->input('pass'); ?> end('Submit');?> But when I look at my SC I see Cake created a form with an action action="/code/index.php/school/

Re: ORDER BY id DESC

2008-05-10 Thread Christophe Cholot
In 1.2 : $this->Post->find('first', array('conditions' => array('post.category_id' => intval($catId)), 'order' => 'post.id DESC')); On 10 mai, 13:39, "Olexandr Melnyk" <[EMAIL PROTECTED]> wrote: > If you're using CakePHP 1.1, something like this should do the job: > > $this->Post->findAll('catid

Re: Protected File Download

2008-01-02 Thread Christophe Cholot
Hello, I would suggest you to store your uploaded files on your filesystem, ex : /home/yourappname/uploads/ - Use app/config/core.php or bootstrap.php to write your file storage path : Configure::write('Music.uploadPath', '/home/yourappname/uploads/ music/'); or define('MUSIC_UPLOAD_PA

Re: element: model or controller?

2007-12-23 Thread Christophe Cholot
Hello, Assuming you have a newsletter Controller and a newsletter Model : in NewsletterController (newsletter_controller.php) : class NewsletterController extends AppController { var name = 'Newsletter'; function archive_list(){ $this->set('archives', $this->Newsletter->find('all'

Re: Need Suggestion on Accented Character

2007-12-12 Thread Christophe Cholot
Set your (x)HTML page charset to UTF8. Like AD7Six said, you should set everything to UTF8 On Dec 12, 5:23 pm, bingo <[EMAIL PROTECTED]> wrote: > hi > > so you mean to say Database..but how do I convert everything in UTF-8 > format..I mean when someone paste something in textarea of my webform, >

Re: Preventing Duplicate Record Insertion on Page Refresh

2007-12-11 Thread Christophe Cholot
You should use the redirect after post pattern, using a HTTP 302 or 303 status code after saving your fields. if($this->Model->save()) $this->redirect($url, $code, $exit); On Dec 11, 12:58 pm, chowdary <[EMAIL PROTECTED]> wrote: > i am validating the data b4 inserting. but the data type is

Re: Inline javascript in a view not executed

2007-12-04 Thread Christophe Cholot
On Dec 4, 5:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi I have a question > I have a index.thml where there are many divs. > Then with ajax I substitute one of divs with another view > ( view.thtml). > In this view I use a javascript function attached to a link. > So If I define

Re: PDF Creation in Cake 1.2

2007-10-30 Thread Christophe Cholot
Hi, To generate PDFs, i used the fpdf library. In your vendor directory, create a directory named fpdf and simply drop fpdf classes into it, then, lets say you want to render / download a pdf from your controller : - in views/layouts : create a file 'pdf_layout.php' : - in controllers/orders_c

Re: How to make a good use of Elements and DRY principe ?

2007-08-18 Thread Christophe C.
Ok thanks to both of you i'll try to setup something and post the results here. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To uns

Re: How to make a good use of Elements and DRY principe ?

2007-08-16 Thread Christophe C.
up :( Any suggestions ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED

How to make a good use of Elements and DRY principe ?

2007-08-16 Thread Christophe C.
Hello, After reading the manual and other search results, i still didnt find the way to make a good use of Elements when using Ajax. Let's say i have a model "User" and in my controller, a method called "index" that list my registered users. Since I'll re-use this user list in my application, i

Re: how to check the form field change ---Cake-Php

2007-08-13 Thread Christophe C.
Hello, One solution is to use javascript. You'll have to use a listener on the field you want to check, like this (using prototype) : $('yourTextField').observe('blur', function(e) or $('yourform').observe('submit', function(e) { var textfield = Event.element(e) // perform an ajax request to

Re: how to check the form field change ---Cake-Php

2007-08-13 Thread Christophe C.
Hello, One solution is to use javascript. You'll have to use a listener on the field you want to check, like this (using prototype) : $('yourTextField').observe('blur', function(e) or $('yourform').observe('submit', function(e) { var textfield = Event.element(e) // perform an ajax request to

Re: CakePHP installed, but i only get text - no colors or fonts

2007-08-03 Thread Christophe C.
Hi, Make sure you have the directive AllowOverride set to All for your current directory, for your htaccess to override apache's default configuration. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" gro