[symfony-users] Re: XSS escaping_strategy escaping_method not work
in the file settings.yml, I had two .settings: in my all configuration On 27 jan, 11:02, smellycat37 wrote: > hello, > > I use symfony 1.2.9 with doctrine... > I would like to escape all the special html character that user can > put in form html... > So I add in the section ".all .settings" of my settings.yml file the > followings lines: > escaping_strategy: both > escaping_method: ESC_ENTITIES > > With a form, I save an object annonce contained a description field > alert('hello') > I display $announce->getDescription() but the javascript is > executed... > When i check the source code I've got alert('bonjour') and not ><script>alert > ('hello')</script> > > thanks for your help -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] XSS escaping_strategy escaping_method not work
hello, I use symfony 1.2.9 with doctrine... I would like to escape all the special html character that user can put in form html... So I add in the section ".all .settings" of my settings.yml file the followings lines: escaping_strategy: both escaping_method: ESC_ENTITIES With a form, I save an object annonce contained a description field alert('hello') I display $announce->getDescription() but the javascript is executed... When i check the source code I've got alert('bonjour') and not > thanks for your help -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] load routingCms.yml
hello, I generate from my backend a file routingCms.yml in my frontend application I did it because url of pages can be modified... so a routing like : user_authentication: url: /authentification/user-authentication.html param: { module: user, action: authentication } could be user_authentication: url: /user/authentication.html param: { module: user, action: authentication } So I find a bad solution to include my routingCms.yml... in my routing.yml, I put at the begining the following line : Did you know how to load the routingCms.yml in my ProjectConfiguration.class.php ? 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-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: doctrine many to one one the same table
if a folder has a parent with the reference on folder_id, he has children with the same reference... so it's a relation 1:n... so it could be possible to have in a form : 1- the parent (the folder who have as id the folder_id of the current item) in a select box 2- the children (all folders who have as folder_id , the id of the current folder) in a mutli select box On 12 jan, 19:22, Tom Ptacnik wrote: > I think that if you want a multiselect box for the children you will > need a many to many relationship... think about how to store the > informations from this multiselect box... > > Or if you don't want a M:N relationship then you have to not show (in > this multiselect box) a folders which already has a parent ... because > you can't store it's folder_id if it already has a parent... > > I hope you will understand my ideas :) > > On 12 led, 01:16, smellycat37 wrote: > > > Hello, > > > I have this schema structure > > Folder: > > columns: > > id: { type: integer, primary: true } > > name: { type: string(50), notnull: true } > > folder_id: { type: integer, notnull: true } > > relations: > > Parent: {onDelete: CASCADE, local: folder_id, foreign: id, > > foreignAlias: children} > > > the "symfony doctrine:build-form" commande build the > > BaseFolderForm.class.php with two widgets : > > 1 - the id widget > > 2 - folder_id a sfWidgetFormDoctrineChoice (select box) containing the > > parent > > > But i need a third one: > > 3 - folders_list a sfWidgetFormDoctrineChoice (multi select box) > > containing all the children > > > is it possible? > > > If you have any idea, thanks for your response, -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] doctrine many to one one the same table
Hello, I have this schema structure Folder: columns: id: { type: integer, primary: true } name: { type: string(50), notnull: true } folder_id: { type: integer, notnull: true } relations: Parent: {onDelete: CASCADE, local: folder_id, foreign: id, foreignAlias: children} the "symfony doctrine:build-form" commande build the BaseFolderForm.class.php with two widgets : 1 - the id widget 2 - folder_id a sfWidgetFormDoctrineChoice (select box) containing the parent But i need a third one: 3 - folders_list a sfWidgetFormDoctrineChoice (multi select box) containing all the children is it possible? If you have any idea, thanks for your response, -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] ModuleS extend one module
Hello, I would like to create modules who extend of another. I followed the code find here http://www.symfony-project.org/book/1_0/17-Extending-Symfony // In myPlugin/modules/mymodule/lib/myPluginmymoduleActions.class.php class myPluginmymoduleActions extends sfActions { public function executeIndex() { // Some code there } } // In myPlugin/modules/mymodule/actions/actions.class.php require_once dirname(__FILE__).'/../lib/ myPluginmymoduleActions.class.php'; class mymoduleActions extends myPluginmymoduleActions { // Nothing } // In myapp/modules/mymodule/actions/actions.class.php class mymoduleActions extends myPluginmymoduleActions { public function executeIndex() { // Override the plug-in code there } } My problem is the following : The name of my modules have to be diferent of the parent... For example, I have 3 modules A, B, C who extend D... but in the example that I found, A, B, C must have the same name of the parent "D". The way is to avoid to redefine for each module (A, B, C) actions and views... So, if the module A : 1 - don't have action "index" it's the one of Module D who gonna be execute. 2 - don't have view "indexSuccess.php" it's the one of D who gonna be display. Somebody has any idea? 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-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] sfWidgetFormDoctrineChoice render with value
Bonjour, j'ai un form $this->setWidgets(array( 'product_id' => new sfWidgetFormDoctrineChoice(array('model' => 'Product')), )); $this->getWidget('product_id')->setOption('order_by', array ('name', 'ASC')); $this->setValidators(array( 'product_id' => new sfValidatorDoctrineChoice(array('model' => 'Product')), )); dans ma vue j'aimerai afficher le sfWidgetFormDoctrineChoice product_id dans ma vue en forçant la valeur... j'ai donc essayé de la même manière que pour un sfWidgetFormInput render(array('value' => $value)); ?> Cela ne fonction pas... -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: plugin with form build-form
It's because the class in my plugins/myPlugin/lib/model/doctrine/ #MyModelClass#.class.php was not abstract On 25 sep, 17:49, smellycat37 wrote: > Hello, > > I want to create a plugin with forms classes > When I execute the task ./symfony doctrine:build-form, symfony creates > forms class files with names as '#MyModelClass#Form.class.php' in > /lib/ > form/ > doctrine/ > myPlugin/ > & base forms class files with names as > 'Base#MyModelClass#Form.class.php' in > /lib/ > form/ > doctrine/ > myPlugin/ > base/ > > The problem is that ./symfony doctrine:build-form generates also forms > class files with names as 'Plugin#MyModelClass#Form.class.php' in > /lib/ > form/ > doctrine/ > And I wouldn't... That's weird, no? > do you know why these classes are created? do you know how to do for > not generate them? --~--~-~--~~~---~--~~ 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] plugin with form build-form
Hello, I want to create a plugin with forms classes When I execute the task ./symfony doctrine:build-form, symfony creates forms class files with names as '#MyModelClass#Form.class.php' in /lib/ form/ doctrine/ myPlugin/ & base forms class files with names as 'Base#MyModelClass#Form.class.php' in /lib/ form/ doctrine/ myPlugin/ base/ The problem is that ./symfony doctrine:build-form generates also forms class files with names as 'Plugin#MyModelClass#Form.class.php' in /lib/ form/ doctrine/ And I wouldn't... That's weird, no? do you know why these classes are created? do you know how to do for not generate them? --~--~-~--~~~---~--~~ 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: plugin js & css
Is it possible to define a view.yml file in the folder /plugins/ myPlugin/config/ to load js and css from myPlugin in the head of the html page or do I add them in /apps/backend/config/view.yml ? On 15 sep, 17:53, david wrote: > Aye. I was thinking more that it's better to use the task than to do it > by hand. It helps ensure it's repeatable when moving to prod. > > On Tue, 15 Sep 2009 17:47:54 +0200, Richtermeister > wrote: > > > > > > > On linux systems the plugin:publish-assets task will actually do a > > symlink by default. > > On windows the files just get copied. > > > Daniel > > > On Sep 15, 3:30 am, david wrote: > >> Putting the files into the plugin web/js & web/css directories and then > >> using the publish-assets task should put the files into the > >> appropriate directories for you - symlinking shouldn't be needed. > > >> On Tue, 15 Sep 2009 12:14:41 +0200, Alexandru-Emil Lupu > > >> wrote: > >> > when you have some css or js for a pluging you usually can create a > > >> symlink > >> > called NamePlugin from your pluginName/web dir into the web dir > > >> > ex: > > >> > plugins/ NamePlugin/web/ > >> > plugins/ NamePlugin/web/js > >> > plugins/ NamePlugin/web/css > > >> > ln -s plugins/NamePlugin/web web/NamePlugin > > >> > and your web interface will contain /NamePlugin/ folder that contains > >> > your > >> > stuff > >> > in the view.yml call > >> > default: > >> > stylesheets: [NamePlugin/css/jquery/theme.css] > >> > javascripts: [NamePlugin/js/jquery/jquery-1.3.2.min.js] > > >> > On Tue, Sep 15, 2009 at 11:29 AM,smellycat37> > >> wrote: > > >> >> Hi, > > >> >> I'm trying to make my first own plugin... I've got some js and css > >> >> required in this plugin... so, I put them in the directory /plugings/ > >> >> myPluging/web/js/ & /plugings/myPluging/web/css/... In the /plugings/ > >> >> myPluging/config/view.yml I call them... > >> >> That's a part of the view.yml : > >> >> default: > >> >> stylesheets: [jquery/theme.css] > >> >> javascripts: [jquery/jquery-1.3.2.min.js] > > >> >> My application load without success the > >> >>http://my_url/js/jquery/jquery-1.3.2.min.js > >> >> &http://my_url/css/jquery/theme.cssbecausethey are not in my main > >> >> web directory... > > >> >> What have I to do? Copy paste the content of my plugin directory web > >> >> into my main web directory ? Do I need to make a task for that? > > >> >> Thanks for your answered > > >> -- > >> Using Opera's revolutionary e-mail client:http://www.opera.com/mail/ > > -- > Using Opera's revolutionary e-mail client:http://www.opera.com/mail/ --~--~-~--~~~---~--~~ 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: make get in doctrine model class
Hi, If you have the same problem, that's my solution... Maybe there is a better way : public function getWidth() { $width = $this->rawGet('width'); return $width != '0' ? $width : ''; } public function getHeight() { $height = $this->rawGet('height'); return $height != '0' ? $height : ''; } ciao, On 16 sep, 15:06, smellycat37 wrote: > Hi, > > I try to make a get function in a doctrine model class of an existed > field table... > > That's my schema.yml : > Media: > columns: > id: {type: integer(4), primary: true, autoincrement: true, > sequence: media_id} > name: {type: string(50)} > title: {type: string(50)} > alt: {type: string(50)} > source: {type: string(255)} > width: {type: integer(4)} # this is my field than I try to get > height: {type: integer(4)} > > That's my model class : > class Media extends BaseMedia > { > public function getWidth() { > $width = $this->get('width'); //make a loop error > #$width = $this->width; //$this->width doesn't exist > return $width != '0' ? $width : ''; > } > > } --~--~-~--~~~---~--~~ 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] make get in doctrine model class
Hi, I try to make a get function in a doctrine model class of an existed field table... That's my schema.yml : Media: columns: id: {type: integer(4), primary: true, autoincrement: true, sequence: media_id} name: {type: string(50)} title: {type: string(50)} alt: {type: string(50)} source: {type: string(255)} width: {type: integer(4)}# this is my field than I try to get height: {type: integer(4)} That's my model class : class Media extends BaseMedia { public function getWidth() { $width = $this->get('width'); //make a loop error #$width = $this->width; //$this->width doesn't exist return $width != '0' ? $width : ''; } } --~--~-~--~~~---~--~~ 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] plugin js & css
Hi, I'm trying to make my first own plugin... I've got some js and css required in this plugin... so, I put them in the directory /plugings/ myPluging/web/js/ & /plugings/myPluging/web/css/... In the /plugings/ myPluging/config/view.yml I call them... That's a part of the view.yml : default: stylesheets:[jquery/theme.css] javascripts:[jquery/jquery-1.3.2.min.js] My application load without success the http://my_url/js/jquery/jquery-1.3.2.min.js & http://my_url/css/jquery/theme.css because they are not in my main web directory... What have I to do? Copy paste the content of my plugin directory web into my main web directory ? Do I need to make a task for that? Thanks for your answered --~--~-~--~~~---~--~~ 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: generator.yml disable field
thanks, I know it's possible to do it in the form object... but is there a way to do it in the generator.yml? for information, I use doctrine... On 9 sep, 15:39, José Nahuel Cuesta Luengo wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > smellycat37 escribió: > > > charki ezziani : I want to see the field value in my html form... I > > just want to render it not modiabled... > > Mr_chon : I try on a field type varchar(30) and it doesn't work too... > > config: > > actions: ~ > > fields: > > name: {params: disabled=true} > > list: > > display: [id, name, weighting, created_at, updated_at, > > published] > > filter: > > class: false > > #display: [name] > > form: ~ > > edit: > > display: > > main: [published, updated_at, created_at] > > display: [name, weighting, imported] > > new: ~ > > > On 9 sep, 15:17, Mr_chon wrote: > >> Hi, > > >> I'm not sure you can use the disabled param for dates. > >> If all you want is to display those dates, you could set their type as > >> "plain". > > >> your fields part would be like this : > > >> fields: > >> created_at: { type: plain } > > >> On Sep 9, 12:59 pm, smellycat37 wrote: > > >>> hi, > >>> I try to use the symfony admin generator, do you know how disable a > >>> field in a the form? > >>> I tried this in the generator.yml file but it doesn't work : > >>> config: > >>> actions: ~ > >>> fields: > >>> created_at: {params: disabled=true} > >>> updated_at: {params: disabled=true} > >>> list: > >>> display: [id, name, weighting, created_at, updated_at, > >>> published] > >>> filter: > >>> class: false > >>> #display: [name] > >>> form: ~ > >>> edit: > >>> display: > >>> main: [published, updated_at, created_at] > >>> display: [name, weighting, imported] > >>> new: ~ > >>> Good bye, > > Actually, those settings now ought to be defined in the Form class > you're using in the module.. > > For example: > > [php] > // In your form's configure() method > $this->getWidget('created_at')->setAttribute('disabled', 'disabled'); > $this->getWidget('updated_at')->setAttribute('disabled', 'disabled'); > > // ... > [/php] > > - -- > José Nahuel Cuesta Luengo > Desarrollo | CeSPI - UNLP > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org > > iEYEARECAAYFAkqnsBkACgkQ2jTpOyePgAHNOgCfY24IyMx5bQ75c6MO58Gbb4JH > PMkAnA1mHDqhF95kAthNZVueqUwbzkL4 > =3Xc8 > -END PGP SIGNATURE- --~--~-~--~~~---~--~~ 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: generator.yml disable field
charki ezziani : I want to see the field value in my html form... I just want to render it not modiabled... Mr_chon : I try on a field type varchar(30) and it doesn't work too... config: actions: ~ fields: name: {params: disabled=true} list: display: [id, name, weighting, created_at, updated_at, published] filter: class: false #display: [name] form:~ edit: display: main: [published, updated_at, created_at] display: [name, weighting, imported] new: ~ On 9 sep, 15:17, Mr_chon wrote: > Hi, > > I'm not sure you can use the disabled param for dates. > If all you want is to display those dates, you could set their type as > "plain". > > your fields part would be like this : > > fields: > created_at: { type: plain } > > On Sep 9, 12:59 pm, smellycat37 wrote: > > > hi, > > > I try to use the symfony admin generator, do you know how disable a > > field in a the form? > > > I tried this in the generator.yml file but it doesn't work : > > config: > > actions: ~ > > fields: > > created_at: {params: disabled=true} > > updated_at: {params: disabled=true} > > list: > > display: [id, name, weighting, created_at, updated_at, > > published] > > filter: > > class: false > > #display: [name] > > form: ~ > > edit: > > display: > > main: [published, updated_at, created_at] > > display: [name, weighting, imported] > > new: ~ > > > Good bye, --~--~-~--~~~---~--~~ 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: generator.yml disable field
Thanks for your answer but I don't have any identation character... I can see all the character (space, tab, \r, \n) in my IDE... Is it the good syntax for adding to a field the html param disabled="disabled" ? On 9 sep, 14:12, chakir ezziani wrote: > Pay attention to the indentation bug, you must not have a (tabulation) in > your file > > 2009/9/9 smellycat37 > > > > > hi, > > > I try to use the symfony admin generator, do you know how disable a > > field in a the form? > > > I tried this in the generator.yml file but it doesn't work : > > config: > > actions: ~ > > fields: > > created_at: {params: disabled=true} > > updated_at: {params: disabled=true} > > list: > > display: [id, name, weighting, created_at, updated_at, > > published] > > filter: > > class: false > > #display: [name] > > form: ~ > > edit: > > display: > > main: [published, updated_at, created_at] > > display: [name, weighting, imported] > > new: ~ > > > Good bye, --~--~-~--~~~---~--~~ 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] generator.yml disable field
hi, I try to use the symfony admin generator, do you know how disable a field in a the form? I tried this in the generator.yml file but it doesn't work : config: actions: ~ fields: created_at: {params: disabled=true} updated_at: {params: disabled=true} list: display: [id, name, weighting, created_at, updated_at, published] filter: class: false #display: [name] form:~ edit: display: main: [published, updated_at, created_at] display: [name, weighting, imported] new: ~ Good bye, --~--~-~--~~~---~--~~ 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---