[symfony-users] Re: Sending mails with maillayout in sf1.1
On Fri, Oct 3, 2008 at 5:06 PM, freakx0 <[EMAIL PROTECTED]> wrote: > How is the best way to send mails (text/plain, html) in actions with > an layout (layouts/mail.php)? You can set the content of an action as a mime part of your email using the getPresentationFor method of sfController. Then just configure your action to use a dedicated email layout. ++ -- Nicolas Perriault http://prendreuncafe.com - http://symfonians.net - http://sensiolabs.com Phone: +33 660 92 08 67 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Symfony 1.1, i18n y sfGuard
Hi every: I'm developing a fresh application and I take Symfony 1.1.4 as Symfony release. I'm using also the sfGuard plugin to take advantage in user and group managment. Because I speak Spanish I want to internationalize the app and for that I do this: 1) Activate the right options in settings.yml file i18n: on default_culture: es 2) Create the i18n/sfguard.es_ES.xml and put this content inside: signin[username] Usuario Then I want to internationalize first the sfGuard plugin interface. This plugin generate the form using the new form Framework so the code is as follow: public function configure() { $this->setWidgets(array( 'username' => new sfWidgetFormInput(), 'password' => new sfWidgetFormInput(array('type' => 'password')), 'remember' => new sfWidgetFormInputCheckbox(), )); $this->setValidators(array( 'username' => new sfValidatorString(), 'password' => new sfValidatorString(), 'remember' => new sfValidatorBoolean(), )); $this->validatorSchema->setPostValidator(new sfGuardValidatorUser()); $this->widgetSchema->setNameFormat('signin[%s]'); } And then in the template only echo $form appear. So I not know how to get the label value for put as internationalize string. I mean this: Username ¿Any idea or solution? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: where is the sfForm book chapter 5 ?
On Oct 2, 9:50 am, Fabien Potencier <[EMAIL PROTECTED] project.com> wrote: > Not yet written. I understand that there isn't time right now to complete the manual. But having at minimum an index in place showing what would go into those four missing chapters would be hugely helpful. That way we can at least know at the high level what functionality exists, and what's possible. Is creating/publishing that a possibility? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Sending partial form data
So I have worked around the problem I discovered. In the BaseFormPropel class I overrode the bind method so that, in essence, $taintedValues start with the default values instead of starting with all null values. This way if I do not pass in a value, the current value is not changed. I can still set a value to null if I pass in the key with a null value, but I can also now leave a value unchanged. public function bind(array $taintedValues = null, array $taintedFiles = null) { $taintedValues = array_merge($this->getDefaults(), $taintedValues); parent::bind($taintedValues, $taintedFiles); } I think it would be nice to have this type of functionality available as a option in forms generally, especially in a REST context. Anyone else think this would be nice, or see any blatant problems with this? Thanks, paul On Fri, Oct 3, 2008 at 10:13 AM, Paul Jones <[EMAIL PROTECTED]> wrote: > Hello, > > I have a question about how forms are supposed to behave. I generated > a basic crud interface and interact with it via ajax. When I call the > update method a sfFormPropel form is created, the post data is bound > to the form and then the form is saved if it is valid. All the basic > stuff. The only interesting thing is that if I only submit the id and > name of the object, then all the other fields are saved as null. I > expected fields that I did not submit to be left untouched. Did I have > the wrong expectations or did I uncover a bug? > > I am using symfony 1.2 HEAD. > > Thanks in advance, > paul > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Problem with strange number showing after
The weird thing is that it is only a problem when viewed from one network. So I'm a bit reluctant to think it is caused by the server. On Sat, Oct 4, 2008 at 2:37 AM, Kiril Angov <[EMAIL PROTECTED]> wrote: > > The thing to check would be to turn off any opcode optimizer you might > have installed. I also remember getting this weirdness when using > Lighttpd with php-fcgi. But it definitely smells like an opcode > optimizer problem. > > Kiril > > On Fri, Oct 3, 2008 at 1:17 PM, Benjamin <[EMAIL PROTECTED]> wrote: >> >> we had the same problem here on certain machine, not solved either >> >> On Oct 3, 9:26 am, "Dmitry Nesteruk" <[EMAIL PROTECTED]> wrote: >>> yes, I have same problem, But I did not solved this. I changed hosting and >>> the problem was disappeared. >>> >>> 2008/10/3 Sid Bachtiar <[EMAIL PROTECTED]> >>> >>> >>> >>> >>> >>> > Hi, >>> >>> > I have this weird problem with a symfony website that I developed. >>> >>> > It is symfony1.1. What's weird is that this problem only comes from >>> > certain networks. >>> >>> > When the website is accessed from certain networks, there is weird >>> > number added right after tag. E.g.: >>> >>> > 3247 >>> >>> > Anyone has the same/similar problem? Does anyone have any clue as to >>> > what might caused this? Proxy may be? >>> >>> > Cheers >>> >>> > -- >>> > Visit my website:http://onlinesid.com- Hide quoted text - >>> >>> - Show quoted text - >> >> > >> > > > > -- Visit my website: http://onlinesid.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] symfony 1.1.4 released: Security fix
In accordance with our security policy, we are releasing today symfony 1.1.4 to fix a security issue that has been reported by a symfony user earlier today. This post contains the description of the vulnerability and the description of the changes we have made to fix it. The affected symfony versions are all symfony 1.1 releases and the 1.2 branch. Description of the vulnerability The validation sub-framework allows the developer to embed the user submitted value in the error messages. If you use the submitted value in some of your error messages or if you use the default error messages provided by some built-in validators (see the list below), you are vulnerable because symfony will not escape the value for you. The following built-in validators are affected because they embed the submitted values in some of their default error messages: * sfValidatorDate * sfValidatorFile * sfValidatorInteger * sfValidatorNumber * sfValidatorString * sfValidatorTime Resolution -- As of symfony 1.1.4, we have changed the getArguments() method of the sfValidatorError class to escape the error messages. Here is the modified version of this method: [php] public function getArguments($raw = false) { if ($raw) { return $this->arguments; } $arguments = array(); foreach ($this->arguments as $key => $value) { if (is_array($value)) { continue; } $arguments["%$key%"] = htmlspecialchars($value, ENT_QUOTES, sfValidatorBase::getCharset()); } return $arguments; } The fix has been applied to the symfony 1.1 (changeset 11932) and 1.2 (changeset 11933) branches. You can download the patch for symfony 1.1 or symfony 1.2 in the symfony trac. Every symfony user is encouraged to upgrade as soon as possible. -- Fabien Potencier Sensio CEO - symfony lead developer sensiolabs.com | symfony-project.com | aide-de-camp.org Tél: +33 1 40 99 80 80 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: form framework style
2008/10/2 Jonathan Franks <[EMAIL PROTECTED]>: > > the form framework book has a nice simple style applied to all the > forms it shows. > > Is the css for this available anywhere?? Jon! I've no idea what they are using, but.. this is pretty close: form table label { font-weight: bold; width: 120px; display: block; text-align: right; margin-right: 1em; } form table td { border-collapse: collapse; border: 1px solid #000; padding: 0.5em; } form table th:first-child { background-color: #cacaca; border-collapse: collapse; border: 1px solid #000; } See you tomorrow :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: symfony tinymce spellchecker_rpc_url
Anyone? help..please :) On Oct 1, 2:22 pm, kevinkevin <[EMAIL PROTECTED]> wrote: > I am trying to implement the spellchecker on tinymce. > > I have been successful adding the basic settings in app.yml to get it > working, except that I get an error: > > 'please specify spellchecker_rpc_url' > > I am not sure WHERE to put this or WHAT to put. > > can someone who has done this before give me the last pieces I need. > Google spell sounds good enough I think. > > Is it possible I am missing anything in the files. > In the plugin dir I have a CSS dir, an IMG dir, and 2 JS files. > > thanks in advance. > > Kevin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfForms - group validator
For example I have such forms: class ArticleForm extends sfFormDoctrine { public function setUp() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'title' => new sfWidgetFormInput(array(), array('size'=>80)), 'teaser' => new sfWidgetFormTextarea(), 'body' => new sfWidgetFormTextarea(), 'is_review' => new sfWidgetFormInputCheckbox(), )); $this->setValidators(array( 'id' => new sfValidatorDoctrineChoice(array('model' => 'Article', 'column' => 'id', 'required' => false)), 'title' => new sfValidatorString(array('required'=>true, 'max_length'=> 255)), 'teaser' => new sfValidatorString(array('required'=>true)), 'body' => new sfValidatorString(array('required'=>true)), 'is_review' => new sfValidatorString(), )); $this->embedForm('review', new ArticleReviewForm($this- >getObject()->getReview()); } public function getModelName() { return 'Article'; } } class ArticleReviewFrom extends sfFormDoctrine { public function setUp() { $this->setWidgets(array( 'rating' => new sfWidgetFormInput(array(), array('size'=>2)), 'opposite_comment' => new sfWidgetFormTextarea(), 'opposite_author' => new sfWidgetFormInput(array(), array('rel'=>'stUserAdmin/autocomplete')), 'opposite_rating' => new sfWidgetFormInput(array(), array('size'=>2)), )); $this->setValidators(array( 'rating' => new sfValidatorNumber(array('min'=>0, 'max'=>10, 'required'=>false)), 'opposite_comment' => new sfValidatorString(array('max_length'=> 5000, 'required'=>false)), 'opposite_author' => new sfValidatorDoctrineChoice(array('query'=> $author, 'column'=>'nickname', 'model'=>'stUser', 'required'=>false)), 'opposite_rating' => new sfValidatorNumber(array('min'=>0, 'max'=>10, 'required'=>false)), )); } public function getModelName() { return 'ArticleReview'; } } What is the best way to implement on two forms like this such conditional validators: If is_review in ArticleForm is set, rating from ArticleReviewForm is required. If one of opposite_ fields is set, the other ones are required. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Sending mails with maillayout in sf1.1
How is the best way to send mails (text/plain, html) in actions with an layout (layouts/mail.php)? With partials and components there are no global informations possible (like same header + footer and design in every outgoing email). I didn't find a nice looking solution for that. How can that realized? Greetings Dominik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Sending partial form data
Hello, I have a question about how forms are supposed to behave. I generated a basic crud interface and interact with it via ajax. When I call the update method a sfFormPropel form is created, the post data is bound to the form and then the form is saved if it is valid. All the basic stuff. The only interesting thing is that if I only submit the id and name of the object, then all the other fields are saved as null. I expected fields that I did not submit to be left untouched. Did I have the wrong expectations or did I uncover a bug? I am using symfony 1.2 HEAD. Thanks in advance, paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] sfForms - group validator
Hello. I am wondering, if there is any kind of group validator. I have fields which are not required unless one of them is filled. What is the best way to implement this? Can anybody give me some example of how to validate a group in symfony 1.1? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfForms - group validator
Hello, I have the same problem for my project, a general form with another embed form 5 times. In this embed form, fields is not required unless one is filled. I don't find any solution for the moment. So, anyone can help us ? On 3 oct, 10:58, adrive <[EMAIL PROTECTED]> wrote: > Hello. I am wondering, if there is any kind of group validator. > > I have fields which are not required unless one of them is filled. > > What is the best way to implement this? Can anybody give me some > example of how to validate a group in symfony 1.1? > > Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony + smarty
I would say it is not efficient, since as you say, Symfony already does it. Now, if you have developers that are used to Smarty, then this is another story. But I would recommend against it. Pablo On Fri, Oct 3, 2008 at 7:59 AM, Prashanth <[EMAIL PROTECTED]> wrote: > > Hi lan, > > On Fri, Oct 3, 2008 at 5:21 PM, Ian Christian <[EMAIL PROTECTED]> wrote: >> >> There's 2 plugins for this.. not tried them myself. >> > > Is it good or efficient way to do this? Symfony does the template > engine job, does smarty over load or is it double parsing ? > > -- > regards, > > Prashanth > http://munichlinux.blogspot.com > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Problem with strange number showing after
The thing to check would be to turn off any opcode optimizer you might have installed. I also remember getting this weirdness when using Lighttpd with php-fcgi. But it definitely smells like an opcode optimizer problem. Kiril On Fri, Oct 3, 2008 at 1:17 PM, Benjamin <[EMAIL PROTECTED]> wrote: > > we had the same problem here on certain machine, not solved either > > On Oct 3, 9:26 am, "Dmitry Nesteruk" <[EMAIL PROTECTED]> wrote: >> yes, I have same problem, But I did not solved this. I changed hosting and >> the problem was disappeared. >> >> 2008/10/3 Sid Bachtiar <[EMAIL PROTECTED]> >> >> >> >> >> >> > Hi, >> >> > I have this weird problem with a symfony website that I developed. >> >> > It is symfony1.1. What's weird is that this problem only comes from >> > certain networks. >> >> > When the website is accessed from certain networks, there is weird >> > number added right after tag. E.g.: >> >> > 3247 >> >> > Anyone has the same/similar problem? Does anyone have any clue as to >> > what might caused this? Proxy may be? >> >> > Cheers >> >> > -- >> > Visit my website:http://onlinesid.com- Hide quoted text - >> >> - Show quoted text - > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Problem with strange number showing after
we had the same problem here on certain machine, not solved either On Oct 3, 9:26 am, "Dmitry Nesteruk" <[EMAIL PROTECTED]> wrote: > yes, I have same problem, But I did not solved this. I changed hosting and > the problem was disappeared. > > 2008/10/3 Sid Bachtiar <[EMAIL PROTECTED]> > > > > > > > Hi, > > > I have this weird problem with a symfony website that I developed. > > > It is symfony1.1. What's weird is that this problem only comes from > > certain networks. > > > When the website is accessed from certain networks, there is weird > > number added right after tag. E.g.: > > > 3247 > > > Anyone has the same/similar problem? Does anyone have any clue as to > > what might caused this? Proxy may be? > > > Cheers > > > -- > > Visit my website:http://onlinesid.com- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] how can ajax be used in joomla 1.1
i have used a code for ajax it is working but with simple php the values on form are getting by using get method i can not get selected values in joomla --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony + smarty
Hi lan, On Fri, Oct 3, 2008 at 5:21 PM, Ian Christian <[EMAIL PROTECTED]> wrote: > > There's 2 plugins for this.. not tried them myself. > Is it good or efficient way to do this? Symfony does the template engine job, does smarty over load or is it double parsing ? -- regards, Prashanth http://munichlinux.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony + smarty
2008/10/3 Prashanth <[EMAIL PROTECTED]>: > Do any of guys tried using smarty and symfony, Is this efficient > way? There's 2 plugins for this.. not tried them myself. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Symfony + smarty
Hi, Do any of guys tried using smarty and symfony, Is this efficient way? -- regards, Prashanth --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Problem with strange number showing after
yes, I have same problem, But I did not solved this. I changed hosting and the problem was disappeared. 2008/10/3 Sid Bachtiar <[EMAIL PROTECTED]> > > Hi, > > I have this weird problem with a symfony website that I developed. > > It is symfony1.1. What's weird is that this problem only comes from > certain networks. > > When the website is accessed from certain networks, there is weird > number added right after tag. E.g.: > > 3247 > > Anyone has the same/similar problem? Does anyone have any clue as to > what might caused this? Proxy may be? > > Cheers > > -- > Visit my website: http://onlinesid.com > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---