Re: Need: CakePHP Contact Form Need Please
Got everything working now. ThanX for the help. I guess I just couldn't get it working with PhpMailer and Cake 1.1. Upgraded to 1.2 and used the included email component and I'm good. ThanX again. -- Baz L Day In The Life of Baz http://www.LifeOfBaz.com --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
Ok, Ok, Ok, I got you. But I'm just sayingI'm pretty good at reading a manual and pasting stuff together, but when you don't know something, it's kinda hard. And as I saidThought this was for 1.1 On that note, how do I know what version certain code is for? -- Baz L Day In The Life of Baz http://www.LifeOfBaz.com On 7/27/07, cakeFreak <[EMAIL PROTECTED]> wrote: > > > Baz, come on, you getting a bit EXTRA-lazy here. > > On 27 Lug, 21:23, Baz <[EMAIL PROTECTED]> wrote: > > I saw this before, but since I'm on 1.1. It didn't work for me. Also > there's > > the language barrier. > > Language barrier??! > > Now I give you a couple of lessons of Italian. > > A) try to concentrate all your neurons for few secs > B) you have 0.5 secs for each answer > > GO! > > 1) what does "messaggio" means? > 2) what does "e-mail" means > 3) what does "nome" means? > 4) Now the most difficult: what does "cognome" means? > > ;o) > > > > > --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
If someone else can learn a language not native to them, (of course I am assuming here), I think the decent thing would be to say "Thank you" and head on over to http://www.google.com/language_tools?hl=en lol. I don't know what nome, cognome and oggetto mean but, since I am curious, I will look them up: 1.)nome - name 2.)oggetto - object 3.)cognome - since i know nome is name I would think this has to do something with a name, let's find out... sweet! It's Last Name I be learned real gud On Jul 27, 3:35 pm, cakeFreak <[EMAIL PROTECTED]> wrote: > Baz, come on, you getting a bit EXTRA-lazy here. > > On 27 Lug, 21:23, Baz <[EMAIL PROTECTED]> wrote: > > > I saw this before, but since I'm on 1.1. It didn't work for me. Also there's > > the language barrier. > > Language barrier??! > > Now I give you a couple of lessons of Italian. > > A) try to concentrate all your neurons for few secs > B) you have 0.5 secs for each answer > > GO! > > 1) what does "messaggio" means? > 2) what does "e-mail" means > 3) what does "nome" means? > 4) Now the most difficult: what does "cognome" means? > > ;o) --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
Baz, come on, you getting a bit EXTRA-lazy here. On 27 Lug, 21:23, Baz <[EMAIL PROTECTED]> wrote: > I saw this before, but since I'm on 1.1. It didn't work for me. Also there's > the language barrier. Language barrier??! Now I give you a couple of lessons of Italian. A) try to concentrate all your neurons for few secs B) you have 0.5 secs for each answer GO! 1) what does "messaggio" means? 2) what does "e-mail" means 3) what does "nome" means? 4) Now the most difficult: what does "cognome" means? ;o) --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
> > Now I give you a couple of lessons of Italian. Haha, I didn't know I was fluent in Italian - good to know : P. -- Felix -- My Blog: http://www.thinkingphp.org My Business: http://www.fg-webdesign.de cakeFreak wrote: > Baz, come on, you getting a bit EXTRA-lazy here. > > On 27 Lug, 21:23, Baz <[EMAIL PROTECTED]> wrote: > >> I saw this before, but since I'm on 1.1. It didn't work for me. Also there's >> the language barrier. >> > > Language barrier??! > > Now I give you a couple of lessons of Italian. > > A) try to concentrate all your neurons for few secs > B) you have 0.5 secs for each answer > > GO! > > 1) what does "messaggio" means? > 2) what does "e-mail" means > 3) what does "nome" means? > 4) Now the most difficult: what does "cognome" means? > > ;o) > > > > > > --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
I usually just use the nifty isset() php function, as in: if(isset($this->data['Contact']['email']) { //do some stuff relevant to your ultimate goal } On Jul 27, 2:23 pm, Baz <[EMAIL PROTECTED]> wrote: > I'm a bit unclear here. Since there's not ->read() or ->findAll(), how do we > know that there is a $this->data['Contact']['email']? --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
On 7/27/07, Baz <[EMAIL PROTECTED]> wrote: > > For a Model that has no table: does populating the $validate array > automatically populate $this->data in the controller? Or is that only done > when the form returns? $this->data is populated when the form is returned. - Chris Hartjes Senior Developer Cake Development Corporation My motto for 2007: "Just build it, damnit!" @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
I saw this before, but since I'm on 1.1. It didn't work for me. Also there's the language barrier. I have a general question though: For a Model that has no table: does populating the $validate array automatically populate $this->data in the controller? Or is that only done when the form returns? I'm a bit unclear here. Since there's not ->read() or ->findAll(), how do we know that there is a $this->data['Contact']['email']? ThanX in advance. -- Baz L Day In The Life of Baz http://www.LifeOfBaz.com/ On 7/27/07, cakeFreak <[EMAIL PROTECTED]> wrote: > > > This is the view; > > > > VIEW: views/contacts/index.ctp > > > > Contacts: > > create('Contact', array('url'=>'/contacts'));?> > > echo $form->input('nome', array('error' => array( > 'required' => 'specifica il > tuo nome') > ) > ); > > echo $form->input('cognome', array('error' => array( > 'required' => 'specifica il > tuo cognome') > ) > ); > > echo $form->input('e-mail', array('error' => array( > 'required' => 'specifica la > tua e-mail', > 'validEmail' => 'inserisci un > e-mail valida' > ) > ) > ); > echo $form->input('oggetto', array('error' => array( > 'required' => 'specifica l > \'oggetto') > ) > ); > > echo $form->input('messaggio', array('error' => > array('required' => > 'inserisci il messaggio'), > 'type'=>'textarea', > 'cols'=>30)); > ?> > > > > > > > --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
This is the view; VIEW: views/contacts/index.ctp Contacts: create('Contact', array('url'=>'/contacts'));?> input('nome', array('error' => array( 'required' => 'specifica il tuo nome') ) ); echo $form->input('cognome', array('error' => array( 'required' => 'specifica il tuo cognome') ) ); echo $form->input('e-mail', array('error' => array( 'required' => 'specifica la tua e-mail', 'validEmail' => 'inserisci un e-mail valida' ) ) ); echo $form->input('oggetto', array('error' => array( 'required' => 'specifica l \'oggetto') ) ); echo $form->input('messaggio', array('error' => array('required' => 'inserisci il messaggio'), 'type'=>'textarea', 'cols'=>30)); ?> --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
Here we go with a contact form for last 1.2.0.5427alpha: CONTROLLER: contacts_controller.php set('title_for_layout', 'Contatti'); if(isset($this->data)) { if($this->Contact->create($this->data) && $this->Contact- >validates()){ //send e-mail $this->_sendMail(); } else{ $this->Session->setFlash('correggi gli errori sottostanti'); //$this->redirect('/contacts'); } } } function _sendMail() { $senderEmail = $this->data['Contact']['e-mail']; $this->Email->layout = 'email'; $this->Email->to = '[EMAIL PROTECTED]'; $this->Email->subject = $this->data['Contact']['oggetto']; $this->Email->from = $senderEmail; $this->Email->template = 'text'; //Send as 'html', 'text' or 'both' (default is 'text') $this->Email->sendAs = 'text'; //Set view variables as normal $this->set('nome', ucfirst($this->data['Contact']['nome'])); $this->set('cognome', ucfirst($this->data['Contact'] ['cognome'])); $this->set('email', $senderEmail); $this->set('oggetto', $this->data['Contact']['oggetto']); $this->set('messaggio', $this->data['Contact']['messaggio']); //Do not pass any args to send() if ( $this->Email->send() ) { $this->Session->setFlash('La tua e-mail è stata spedita con successo'); $this->redirect('/'); exit; } else { $this->Session->setFlash("Ci sono stati dei problemi nell'inviare l'e-mail. Ti invitiamo a riprovare"); $this->redirect('/contacts/index/'); exit; } } } ?> MODEL: contact.php array('required' => VALID_NOT_EMPTY), 'cognome' => array('required' => VALID_NOT_EMPTY), 'e-mail' => array('required' => VALID_NOT_EMPTY, 'validEmail'=>VALID_EMAIL), 'oggetto' => array('required' => VALID_NOT_EMPTY), 'messaggio' => array('required' => VALID_NOT_EMPTY), ); } ?> --- E_MAIL TEMPLATE: views/layouts/email/text/email.ctp --- --- EMAIL FROM IntellighenziaProject.it --- FROM : E-MAIL : SUBJECT: --- MESSAGE: --- --- Hope this helps. Dan --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
On 7/27/07, Baz <[EMAIL PROTECTED]> wrote: > Now was that really necessary? When you don't explain WHY you need something, that's a very typical result around here. > > Should I just scrap 1.1? Is 1.2 suitable for a production site? In my opinion, 1.2 is suitable for a production site but like all non-stable software you take your chances that when an update is done that it doesn't break something you've already written. -- Chris Hartjes Senior Developer Cake Development Corporation My motto for 2007: "Just build it, damnit!" @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
Now was that really necessary? Don't get me wrong here, I'm not trying to be lazy as you seem to be implying. But isn't the Bakery supposed to be a code repository? All I meant was that a contact form seems like something that someone would have already done. Isn't that the point of Cake? To stop reinventing the wheel? Again, I'm sorry, I'm new here. I'll elaborate. I'm trying to build a Contact Form: Simple page where a user enters Name, Subject, Body and it emails it to an address of my choosing. I'm having a number of problems doing this: - I need a Model without a Table to handle the data passing. I can't figure out how I would populate the $this->data without having a table. - When I get databack, how do I actually send the email using the phpMailer component? I got lost when they created this views in app/views/your_controller/email/. default_html.thtml and default_text.thtml What's supposed to be in them? Also I don't understand what goes in this: app/views/layouts/email.thtml Note that I'm using the Stable release with the PHPMailer component from the link below. Should I just scrap 1.1? Is 1.2 suitable for a production site? Any help would be appreciated. -- Baz L Day In The Life of Baz http://www.LifeOfBaz.com/ On 7/27/07, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > > On 7/27/07, codecowboy <[EMAIL PROTECTED]> wrote: > > > > Can you please elaborate. You did not ask a question. > > Oh no, I think he was quite clear. He wants someone else to do his > work for him and give him all the code needed for a contact form > within a CakePHP application. > > -- > Chris Hartjes > Senior Developer > Cake Development Corporation > > My motto for 2007: "Just build it, damnit!" > > @TheBallpark - http://www.littlehart.net/attheballpark > @TheKeyboard - http://www.littlehart.net/atthekeyboard > > > > --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
I'm really having a solution for your problems here. You can contact me for conditions ($$$) Smiles... -- Pablo Viojo [EMAIL PROTECTED] http://pviojo.net On 7/27/07, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > > On 7/27/07, codecowboy <[EMAIL PROTECTED]> wrote: > > > > Can you please elaborate. You did not ask a question. > > Oh no, I think he was quite clear. He wants someone else to do his > work for him and give him all the code needed for a contact form > within a CakePHP application. > > -- > Chris Hartjes > Senior Developer > Cake Development Corporation > > My motto for 2007: "Just build it, damnit!" > > @TheBallpark - http://www.littlehart.net/attheballpark > @TheKeyboard - http://www.littlehart.net/atthekeyboard > > > > --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
On 7/27/07, codecowboy <[EMAIL PROTECTED]> wrote: > > Can you please elaborate. You did not ask a question. Oh no, I think he was quite clear. He wants someone else to do his work for him and give him all the code needed for a contact form within a CakePHP application. -- Chris Hartjes Senior Developer Cake Development Corporation My motto for 2007: "Just build it, damnit!" @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need: CakePHP Contact Form Need Please
Can you please elaborate. You did not ask a question. On Jul 27, 8:39 am, Baz L <[EMAIL PROTECTED]> wrote: > I'm really having problems here. > > I'm guessing someone has already developed something like this. > > I looked at this in the > bakery:http://bakery.cakephp.org/articles/view/sending-email-with-phpmailer > > But it seems a bit incomplete. > > I started with Cake about a month ago. Anyway, anyone who can offer > some help, I'd greatly appreciate it: > > -- > Baz L > Day In The Life of Bazhttp://www.LifeOfBaz.com --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---