[symfony-users] What's the bestRichTextEditor plugin for symfony
Hi All. What's the best plugin that contains RichTextEditor to use in symfony? --~--~-~--~~~---~--~~ 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: Symfony + Java Applets + Sockets
On Tue, Aug 25, 2009 at 8:44 PM, rosbrbaraza...@gmail.com wrote: where package name is (applet) and my class name is Mysocket.class You should have told us before that applet is your package. because the package makes up the folder structure and your codebase needs to point at the path where the package structure begings. This is required for separating Classpath from WebStructure. so use the fully qualified name in code and the path to root package in codebase Fabian --~--~-~--~~~---~--~~ 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] [sf 1.2 Propel Admin Generator] Sorting not working?
Hi, I've just generated my first symfony 1.2 admin module using the propel:generate-admin command. That aspect worked fine, no problems. However, I am unable to sort the data in the list view. The column titles can be clicked, but no sorting query string is in the URL. The URL is simply the URL for the list, e.g. '/administrators.html'. Looking at the auto-generated files, the sorting parameters are definitely being passed into the link_to() function on the end of the routing rule, e.g. link_to(__('ID', array(), 'messages'), '@admin_user? sort=idsort_type=asc') And looking at the actual routing rule, I can't see anything that would stop the sorting working, e.g. admin_user: class: sfPropelRouteCollection options: model:AdminUser module: administrators prefix_path: administrators column: id with_wildcard_routes: true Because the query string parameters are definitely being passed in the link_to() function, I figured it has to be something to do with the routing rule ignoring them. Any ideas? Fyi, I took the sorting query string and placed it on the end of the URL manually and the sorting actually works, just the title links in the list table aren't generating properly. --~--~-~--~~~---~--~~ 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] illegal offset type
I get the following error message in the form! Warning: Illegal offset type in /var/www/civil/lib/vendor/symfony/lib/ plugins/sfPropelPlugin/lib/widget/sfWidgetFormPropelChoice.class.php on line 105 --~--~-~--~~~---~--~~ 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: ysfDimensions with sfSQLiteCache
If I ever fail to reply to a ticket in under a week, please feel free to assign it to dwhittle. Thanks. I will resolve your issue tomorrow. I am not sure of the impact of sqlite cache will have, please do follow up with metrics once you find out. Cheers, Dustin On Aug 25, 4:43 am, ju1ius jules.berna...@gmail.com wrote: Yes I know, but my host says it won't install APC because it conflicts with Zend Optimizer which they use to obfuscate code ... And for now I've never seen a shared host with APC installed :-( Anyway, if I use sfNoCache, would the config and various paths have to be parsed on every request ? Then I presume some SQLite queries are faster than multiple disk access ? Or am I wrong on that point ? On 25 août, 00:42, Dustin Whittle dustin.whit...@symfony-project.com wrote: Jules, Create a ticket with patch in trac and assign to me and I will resolve. I will refactor the plugin for 1.3. Also, the whole point of using apc/eaccelerator is not to have to read from disk - sqlite requires disk, which defeats the point of the cache. You should just use sfNoCache or request your host installs apc. You really shouldn't be running a symfony app with out apc. - Dustin --~--~-~--~~~---~--~~ 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: illegal offset type
Problem might be somewhere in \lib\form\ and model's form base class file. check if $this-setWidgets() function is provided with appropriate choice widget. May be this can help.. On Wed, Aug 26, 2009 at 2:15 PM, sunny asim...@gmail.com wrote: I get the following error message in the form! Warning: Illegal offset type in /var/www/civil/lib/vendor/symfony/lib/ plugins/sfPropelPlugin/lib/widget/sfWidgetFormPropelChoice.class.php on line 105 --~--~-~--~~~---~--~~ 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: illegal offset type
What's your form code like? On Wed, Aug 26, 2009 at 8:59 PM, Krishan .Gmilepe...@gmail.com wrote: Problem might be somewhere in \lib\form\ and model's form base class file. check if $this-setWidgets() function is provided with appropriate choice widget. May be this can help.. On Wed, Aug 26, 2009 at 2:15 PM, sunny asim...@gmail.com wrote: I get the following error message in the form! Warning: Illegal offset type in /var/www/civil/lib/vendor/symfony/lib/ plugins/sfPropelPlugin/lib/widget/sfWidgetFormPropelChoice.class.php on line 105 -- Blue Horn Ltd - System Development http://bluehorn.co.nz --~--~-~--~~~---~--~~ 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: illegal offset type
here is my form code class HrTblJobApplicationForm extends BaseHrTblJobApplicationForm { public function configure() { $this-setWidgets(array( 'application_id'= new sfWidgetFormInputHidden(), 'vacancy_id'= new sfWidgetFormPropelChoice(array('model' = 'HrTblJobVacancy', 'add_empty' = false)), 'lastname' = new sfWidgetFormInput(), 'firstname' = new sfWidgetFormInput(), 'middlename'= new sfWidgetFormInput(), 'street1' = new sfWidgetFormInput(), 'street2' = new sfWidgetFormInput(), 'city_id' = new sfWidgetFormPropelChoice(array('model' = 'Cities', 'add_empty' = true)), 'country_code' = new sfWidgetFormPropelChoice(array('model' = 'Countries', 'add_empty' = true)), 'province' = new sfWidgetFormInput(), 'zip' = new sfWidgetFormInput(), 'phone' = new sfWidgetFormInput(), 'mobile'= new sfWidgetFormInput(), 'email' = new sfWidgetFormInput(), 'qualifications'= new sfWidgetFormInput(), 'status'= new sfWidgetFormInput(), 'applied_timestamp' = new sfWidgetFormDateTime(), 'emp_number'= new sfWidgetFormInput(), 'inter_panel_code' = new sfWidgetFormPropelChoice(array('model' = 'HrTblPanels', 'add_empty' = true)), 'created_by'= new sfWidgetFormPropelChoice(array('model' = 'Users', 'add_empty' = true)), 'created_when' = new sfWidgetFormInputHidden(array('default' = date('Y/m/d H:i', time(, 'modified_by' = new sfWidgetFormPropelChoice(array('model' = 'Users', 'add_empty' = true)), 'modified_when' = new sfWidgetFormInputHidden(array('default' = date('Y/m/d H:i', time(, 'hr_tbl_app_education_list' = new sfWidgetFormPropelChoiceMany(array('model' = 'HrTblEducation')), )); $this-widgetSchema-setLabels(array( 'vacancy_id' = 'vacancy_id', 'lastname' = 'Last Name', 'firstname' = 'First Name', 'middlename' = 'Middle Name', 'street1'= 'Street1', 'street2'= 'Street2', 'city_id' = 'City', 'country_code' = 'Country', 'province' = 'Province', 'zip'= 'Zip Code', 'phone' = 'Phone', 'mobile' = 'Mobile', 'email' = 'Email', 'qualifications' = 'Qualifications', 'status' = 'Status', 'applied_timestamp' = 'Applied_timestamp', 'emp_number' = 'Employee Number', 'inter_panel_code' = 'inter_panel_code', )); $this-setValidators(array( 'application_id'= new sfValidatorPropelChoice(array('model' = 'HrTblJobApplication', 'column' = 'application_id', 'required' = false)), 'vacancy_id'= new sfValidatorPropelChoice(array('model' = 'HrTblJobVacancy', 'column' = 'vacancy_id')), 'lastname' = new sfValidatorString(array('max_length' = 100)), 'firstname' = new sfValidatorString(array('max_length' = 100)), 'middlename'= new sfValidatorString(array('max_length' = 100)), 'street1' = new sfValidatorString(array('max_length' = 100, 'required' = false)), 'street2' = new sfValidatorString(array('max_length' = 100, 'required' = false)), 'city_id' = new sfValidatorPropelChoice(array('model' = 'Cities', 'column' = 'id', 'required' = false)), 'country_code' = new sfValidatorPropelChoice(array('model' = 'Countries', 'column' = 'id', 'required' = false)), 'province' = new sfValidatorString(array('max_length' = 100, 'required' = false)), 'zip' = new sfValidatorString(array('max_length' = 20, 'required' = false)), 'phone' = new sfValidatorString(array('max_length' = 20, 'required' = false)), 'mobile'= new sfValidatorString(array('max_length' = 20, 'required' = false)), 'email' = new sfValidatorString(array('max_length' = 50, 'required' = false)), 'qualifications'= new sfValidatorString(array('max_length' = 200, 'required' = false)), 'status'= new sfValidatorInteger(array('required' = false)), 'applied_timestamp' = new sfValidatorDateTime(array('required' = false)), 'emp_number'= new sfValidatorInteger(array('required' = false)), 'inter_panel_code' = new sfValidatorPropelChoice(array('model' = 'HrTblPanels', 'column' =
[symfony-users] Unit tests - accessing propel items by label
I'm doing my first unit tests, with a database fixture loaded from a yml file by sfPropelData::loadData. Is there a way of referring in the test to objects in the fixture by their labels in the yml? eg suppose in the yml I have MyClass: myclass_1: name: ... etc. Then if I want this record in my unit test file, of course I can load it by MyClassPeer::doSelect with suitable criteria; but supposing this class isn't what I'm testing in the particular test, is there a function I can call to get the id of myclass_1, so that I can go $id = some_function('myclass_1'); $myobject = MyClassPeer::retrieveByPk($id); ? --~--~-~--~~~---~--~~ 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: illegal offset type
Just guessing: are you dealing with complex primary keys on any propel- choice-related table? I think you might be getting an array as an index, when a simple string or number is actually expected. -- José Nahuel Cuesta Luengo El 26/08/2009, a las 06:15, asim nizam asim...@gmail.com escribió: here is my form code class HrTblJobApplicationForm extends BaseHrTblJobApplicationForm { public function configure() { $this-setWidgets(array( 'application_id'= new sfWidgetFormInputHidden(), 'vacancy_id'= new sfWidgetFormPropelChoice (array('model' = 'HrTblJobVacancy', 'add_empty' = false)), 'lastname' = new sfWidgetFormInput(), 'firstname' = new sfWidgetFormInput(), 'middlename'= new sfWidgetFormInput(), 'street1' = new sfWidgetFormInput(), 'street2' = new sfWidgetFormInput(), 'city_id' = new sfWidgetFormPropelChoice (array('model' = 'Cities', 'add_empty' = true)), 'country_code' = new sfWidgetFormPropelChoice (array('model' = 'Countries', 'add_empty' = true)), 'province' = new sfWidgetFormInput(), 'zip' = new sfWidgetFormInput(), 'phone' = new sfWidgetFormInput(), 'mobile'= new sfWidgetFormInput(), 'email' = new sfWidgetFormInput(), 'qualifications'= new sfWidgetFormInput(), 'status'= new sfWidgetFormInput(), 'applied_timestamp' = new sfWidgetFormDateTime(), 'emp_number'= new sfWidgetFormInput(), 'inter_panel_code' = new sfWidgetFormPropelChoice (array('model' = 'HrTblPanels', 'add_empty' = true)), 'created_by'= new sfWidgetFormPropelChoice (array('model' = 'Users', 'add_empty' = true)), 'created_when' = new sfWidgetFormInputHidden (array('default' = date('Y/m/d H:i', time(, 'modified_by' = new sfWidgetFormPropelChoice (array('model' = 'Users', 'add_empty' = true)), 'modified_when' = new sfWidgetFormInputHidden (array('default' = date('Y/m/d H:i', time(, 'hr_tbl_app_education_list' = new sfWidgetFormPropelChoiceMany (array('model' = 'HrTblEducation')), )); $this-widgetSchema-setLabels(array( 'vacancy_id' = 'vacancy_id', 'lastname' = 'Last Name', 'firstname' = 'First Name', 'middlename' = 'Middle Name', 'street1'= 'Street1', 'street2'= 'Street2', 'city_id' = 'City', 'country_code' = 'Country', 'province' = 'Province', 'zip'= 'Zip Code', 'phone' = 'Phone', 'mobile' = 'Mobile', 'email' = 'Email', 'qualifications' = 'Qualifications', 'status' = 'Status', 'applied_timestamp' = 'Applied_timestamp', 'emp_number' = 'Employee Number', 'inter_panel_code' = 'inter_panel_code', )); $this-setValidators(array( 'application_id'= new sfValidatorPropelChoice (array('model' = 'HrTblJobApplication', 'column' = 'application_id', 'required' = false)), 'vacancy_id'= new sfValidatorPropelChoice (array('model' = 'HrTblJobVacancy', 'column' = 'vacancy_id')), 'lastname' = new sfValidatorString(array ('max_length' = 100)), 'firstname' = new sfValidatorString(array ('max_length' = 100)), 'middlename'= new sfValidatorString(array ('max_length' = 100)), 'street1' = new sfValidatorString(array ('max_length' = 100, 'required' = false)), 'street2' = new sfValidatorString(array ('max_length' = 100, 'required' = false)), 'city_id' = new sfValidatorPropelChoice (array('model' = 'Cities', 'column' = 'id', 'required' = false)), 'country_code' = new sfValidatorPropelChoice (array('model' = 'Countries', 'column' = 'id', 'required' = false)), 'province' = new sfValidatorString(array ('max_length' = 100, 'required' = false)), 'zip' = new sfValidatorString(array ('max_length' = 20, 'required' = false)), 'phone' = new sfValidatorString(array ('max_length' = 20, 'required' = false)), 'mobile'= new sfValidatorString(array ('max_length' = 20, 'required' = false)), 'email' = new sfValidatorString(array ('max_length' = 50, 'required' = false)), 'qualifications'
[symfony-users] Tweaking generated routes with the admin generator
Hi all, I'm trying to figure how I could benefit from the great features provided by the admin generator (I'm using symfony 1.3 right now) while using specific urls ; let me explain a bit. I have two models: Project and Story. A project can have many stories, and a story has one project. I would like to generate a an admin-generated module to handle the stories related to a given project by using a sexy url like this one: /project/:project/backlog, where the :project parameter would be a slug or a pk, no matter. I tried to use the prefix_path setting of the route collection in the routing.yml file, by setting this: story: class: sfDoctrineRouteCollection options: model:story module: story prefix_path: project/:project/backlog column: id with_wildcard_routes: true requirements: project: \d But when the route matches, an InvalidArgumentException is thrown when the admin generated templates try to generate the links to the other module actions, because it lacks the :project parameter: The /project/:project/backlog/:action/action.:sf_format route has some missing mandatory parameters (:project). I also tried to play with the route_prefix setting from the generator.yml file but with no luck so far. Usually I dive into code to find a path to solve this kind of problems, but today I'm unfortunately into such a hurry that I just can't loose time on this; so I'd be glad to got some help from the community if you've been ever exposed to an approaching situation or have an idea to solve it ;) Cheers, -- Nicolas Perriault http://prendreuncafe.com - http://symfonians.net Mobile: +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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Tweaking generated routes with the admin generator
I already gave a small answer on twitter but I repost here... If I correctly understand the problem you have: You can add custom parameters (ex: myParameter) to routes as long as there is a method in your model named (in this case) getMyParameter(). Please tell me if it does fix your problem :-) Le 26 août 09 à 13:02, Nicolas Perriault a écrit : Hi all, I'm trying to figure how I could benefit from the great features provided by the admin generator (I'm using symfony 1.3 right now) while using specific urls ; let me explain a bit. I have two models: Project and Story. A project can have many stories, and a story has one project. I would like to generate a an admin-generated module to handle the stories related to a given project by using a sexy url like this one: /project/:project/backlog, where the :project parameter would be a slug or a pk, no matter. I tried to use the prefix_path setting of the route collection in the routing.yml file, by setting this: story: class: sfDoctrineRouteCollection options: model:story module: story prefix_path: project/:project/backlog column: id with_wildcard_routes: true requirements: project: \d But when the route matches, an InvalidArgumentException is thrown when the admin generated templates try to generate the links to the other module actions, because it lacks the :project parameter: The /project/:project/backlog/:action/action.:sf_format route has some missing mandatory parameters (:project). I also tried to play with the route_prefix setting from the generator.yml file but with no luck so far. Usually I dive into code to find a path to solve this kind of problems, but today I'm unfortunately into such a hurry that I just can't loose time on this; so I'd be glad to got some help from the community if you've been ever exposed to an approaching situation or have an idea to solve it ;) Cheers, -- Nicolas Perriault http://prendreuncafe.com - http://symfonians.net Mobile: +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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Tweaking generated routes with the admin generator
I just checked in other projects and I figured that I override the generated route with a custom one... It's a bit messy but it works. I got it to work in frontend using normal modules. Hope it works with generated admin modules. -- board: class: sfDoctrineRouteCollection options: model:BoardThread module: board object_actions: { reply: post } prefix_path: /forum board_show: url:/forum/:year/:month/:day/:slug.:sf_format class: sfDoctrineRoute options: model:BoardThread module: board type: object prefix_path: /forum param: { module: board, action: show, sf_format: html } requirements: year: \d+ month:\d+ day: \d+ sf_method:[GET] sf_format:(?:html|atom) Le 26 août 09 à 13:02, Nicolas Perriault a écrit : Hi all, I'm trying to figure how I could benefit from the great features provided by the admin generator (I'm using symfony 1.3 right now) while using specific urls ; let me explain a bit. I have two models: Project and Story. A project can have many stories, and a story has one project. I would like to generate a an admin-generated module to handle the stories related to a given project by using a sexy url like this one: /project/:project/backlog, where the :project parameter would be a slug or a pk, no matter. I tried to use the prefix_path setting of the route collection in the routing.yml file, by setting this: story: class: sfDoctrineRouteCollection options: model:story module: story prefix_path: project/:project/backlog column: id with_wildcard_routes: true requirements: project: \d But when the route matches, an InvalidArgumentException is thrown when the admin generated templates try to generate the links to the other module actions, because it lacks the :project parameter: The /project/:project/backlog/:action/action.:sf_format route has some missing mandatory parameters (:project). I also tried to play with the route_prefix setting from the generator.yml file but with no luck so far. Usually I dive into code to find a path to solve this kind of problems, but today I'm unfortunately into such a hurry that I just can't loose time on this; so I'd be glad to got some help from the community if you've been ever exposed to an approaching situation or have an idea to solve it ;) Cheers, -- Nicolas Perriault http://prendreuncafe.com - http://symfonians.net Mobile: +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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Routing Question: Optional url parameter in the middle?
Hey Dennis, thanks for confirming. I thought about uncategorized as well, but I don't know what the ratio of categorized vs. categorized items will be (system is for a client), so I don't want users to have to type uncategorized into every url... I ended up using 2 routes for now. Thanks again, Daniel On Aug 25, 10:51 pm, Dennis Benkert spinecras...@googlemail.com wrote: Hi Daniel, afaik you can't do this using one route. But without knowing more about your project, how about using a category called 'uncategorized' which will be the default one if non is chosen? This way you can use one route and urls would be like /library/legal/document2.pdf and if no category was chosen /library/uncategorized/document.pdf - Dennis Richtermeister wrote: Hi all, quick question. I'm trying to accommodate a url with an optional category. Say you have documents that can be categorized, like: /library/legal/ document1.pdf, where legal is a category. Now, for uncategorized documents, I would like those to omit the category parameter, like so: /library/document2.pdf is this possible with one routing class definition? Looking to do with with a propel route. Thanks, and have a great day. Daniel --~--~-~--~~~---~--~~ 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] Set default value of a field in a generated backend (CRUD)
Hi, In a form I use a simple choice widget: $this-widgetSchema['type'] = new sfWidgetFormChoice(array( 'choices' = sfAdvertisePeer::getTypesChoices(), 'expanded' = true, )); and then I want to check a default value: $this-setDefault('type', 0); The code above is the configure() function. In the frontend application, it does work, the first radio button is selected. In the backend application which is a CRUD one, the default value is not selected. So I guess, the code to determine default value is not the same with the admin generator. How can I overwrite it? TIA, François CONSTANT --~--~-~--~~~---~--~~ 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: How can I custom the default css path
On Tue, 25 Aug 2009, Benoit wrote: Thank you for this idea, but if I write a new helper - with a new function to use instead stylesheet_path() -, I'll have to replace all uses of stylesheet_path() in the framework. Actually I think if you override one of the standard set of helpers, you have to override all of the functions of that helper set. -- --~--~-~--~~~---~--~~ 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: Tweaking generated routes with the admin generator
Just add a custom method into the model as Marc suggest ! (well I hope the admin gen use sfDoctrineRoute behind the scene) On Wed, Aug 26, 2009 at 3:10 PM, Marc mweistr...@uneviemoinschere.comwrote: I just checked in other projects and I figured that I override the generated route with a custom one... It's a bit messy but it works. I got it to work in frontend using normal modules. Hope it works with generated admin modules. -- board: class: sfDoctrineRouteCollection options: model:BoardThread module: board object_actions: { reply: post } prefix_path: /forum board_show: url:/forum/:year/:month/:day/:slug.:sf_format class: sfDoctrineRoute options: model:BoardThread module: board type: object prefix_path: /forum param: { module: board, action: show, sf_format: html } requirements: year: \d+ month:\d+ day: \d+ sf_method:[GET] sf_format:(?:html|atom) Le 26 août 09 à 13:02, Nicolas Perriault a écrit : Hi all, I'm trying to figure how I could benefit from the great features provided by the admin generator (I'm using symfony 1.3 right now) while using specific urls ; let me explain a bit. I have two models: Project and Story. A project can have many stories, and a story has one project. I would like to generate a an admin-generated module to handle the stories related to a given project by using a sexy url like this one: /project/:project/backlog, where the :project parameter would be a slug or a pk, no matter. I tried to use the prefix_path setting of the route collection in the routing.yml file, by setting this: story: class: sfDoctrineRouteCollection options: model:story module: story prefix_path: project/:project/backlog column: id with_wildcard_routes: true requirements: project: \d But when the route matches, an InvalidArgumentException is thrown when the admin generated templates try to generate the links to the other module actions, because it lacks the :project parameter: The /project/:project/backlog/:action/action.:sf_format route has some missing mandatory parameters (:project). I also tried to play with the route_prefix setting from the generator.yml file but with no luck so far. Usually I dive into code to find a path to solve this kind of problems, but today I'm unfortunately into such a hurry that I just can't loose time on this; so I'd be glad to got some help from the community if you've been ever exposed to an approaching situation or have an idea to solve it ;) Cheers, -- Nicolas Perriault http://prendreuncafe.com - http://symfonians.net Mobile: +33 660 92 08 67 -- Thomas Rabaix http://rabaix.net --~--~-~--~~~---~--~~ 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: Flash attribute of sfUser not working in test and production environment
yeah thanks, can u also provide me with some links? also - any one face a similar issue with session and test/production environment? On Aug 26, 6:08 am, Eno symb...@gmail.com wrote: On Tue, 25 Aug 2009, dagger wrote: I would also like to know if there are any systems developed in symfony in production at this time - live system examples? (is that a good idea - or is symfony only for prototyping?) Are you asking if symfony is used in real production sites? (The answer is yes of course). -- --~--~-~--~~~---~--~~ 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] Form input manipulation before validation
I have an input field for an URL. When the form is submittet I'm using sfValidatorDoctrineUnique for this field. But BEFORE the validation I'd like to manipulate the url (host name to lower case, cut off any query strings). Imagine the url http://www.test.com/mysite; is already in the database. When a user tries to submit the following url http://www.Test.com/ mysite/?q=foo I'd like sfValitatorDoctrineUnique to recognize it as a unique violation. What can I do? --~--~-~--~~~---~--~~ 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] Calling an action from other action
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I need to call another action from the current action is running symfony (formally, I need to instantiate other action, execute, and get its result). The idea is to do something like this: class apirouterAction extends sfAction { public function execute($request) { // DEBUG: $this-logMessage('JRPP: apirouterAction-execute()', sfLogger::getPriorityName(sfLogger::DEBUG)); $myAction = new name_of_the_other_actionAction($request); // we instantiate another action that is in the current module, or in another module $myAction-execute(); $output = $myAction-render(); $this-renderText($output); return sfView::NONE; } } That is, execute, render and capture the output of another action (that is in the current module, or in another), and render this output and display it in the current action (the sfView:NONE is because the response is a JSON) The option of a component isn't a solution for my problem, because these actions may be executed in normal mode (the same action may has different views, depending on how or from where you call it). The option of doing a forward(), is a partial solution; the router that I want to construct, is defined by the specs in this way: Once a transaction has been accepted it must be dispatched by the router. The router must construct the relevant class and call the method with the appropriate arguments which it reads from data. Currently, the Ext.Direct specification expects this to be an array. In the future, we plan to add support to be key/value pairs in an object. The option of use the current plugin of Ext.Direct, isn't a good solution for me, because the current plugin uses other enviroment to change the controller class of symfony in the Ext.Direct request. Have you got any ideas? Thanks a lot. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQEcBAEBAgAGBQJKlcEEAAoJEFlRSentq+j0K/YIAKKt2EoCx7qbnmVja+bSl52y 0wNDLZUaHNl+A8VxktmTvkONIocizmZhx4QhjzeKFLHEFiW2OfiSm43yPx+LDP45 q3AwLsji8T8+u1g77TcWBxFC/b7y5g40TCWYtmZPynl51Q4R56OpgnqkFEe2W+nC FUBC/bpQUcTyF55kB5HHPf3nzJAwqXGA2FV8c4JvcBjbTj45Xqq9WDjH5pd2BuFn WTud1LQxIhzCSjv3/SMiEfQnB0lHVSmsshnCZFWazK5VVv8994jkrueJq6qPVnO9 C/NGdXsUNWdLufnOtZJ8/BO8lExIlWIAT0mVh3OR8Ud14m0Ff0t7+MLBylp7KFY= =NkgW -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] is_active - login possible
hi, can somebody tell me, how to get the is_active parameter of sfguard working? currently a sfguard-user can still login even if the is_active parameter is set to 0 (false). thanks for replies kerberos --~--~-~--~~~---~--~~ 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] What symfony gives us regarding objects/collections
I am learning Symfony. The automatic class(es) that Symfony generates that are named after tables in the Dbase . . . Are they: The collection (i.e.) the table, The class for the individual object with setters/getters/field sanitizing-qualifying, or Both? --~--~-~--~~~---~--~~ 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: Form input manipulation before validation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 mintao escribió: I have an input field for an URL. When the form is submittet I'm using sfValidatorDoctrineUnique for this field. But BEFORE the validation I'd like to manipulate the url (host name to lower case, cut off any query strings). Imagine the url http://www.test.com/mysite; is already in the database. When a user tries to submit the following url http://www.Test.com/ mysite/?q=foo I'd like sfValitatorDoctrineUnique to recognize it as a unique violation. What can I do? You might: a) use sfValidatorCallback instead of sfValidatorDoctrineUnique and in the callback function you could clean $value and then return whatsoever sfValidatorDoctrineUnique returns for that clean input. Could be something like this: [php] // In your form's configure() method // ... $this-setValidator('url', new sfValidatorCallback(array( 'callback' = array($this, 'validateUrl'), 'required' = true ))); //... // Outside configure(), declare the callback method public function validateUrl($validator, $value, $arguments) { // Clean $value $clean_value = clean($value); $v = new sfValidatorDoctrineUnique(array( 'model' = 'MyModel', 'column' = 'url' )); return $v-clean($clean_value); } [/php] b) Implement your own sfValidatorBase subclass for doing pretty much the same, but with the benefit of code reuse and modularization. Hope this helps. - -- José Nahuel Cuesta Luengo Desarrollo | CeSPI - UNLP ncue...@cespi.unlp.edu.ar -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkqV1QkACgkQ2jTpOyePgAFtMwCfdbql1LtUoHPOU6W20xOtlJWl mz4AoIquBTvQF3bve3uvstWLk8W+T+Na =DcGt -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] save all values in lower case
I'm wondering how i can save all the values in the data base in lower case ??? can symfony do that for me?? 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: What symfony gives us regarding objects/collections
On Wed, 26 Aug 2009, Dennis wrote: The automatic class(es) that Symfony generates that are named after tables in the Dbase . . . Are they: The collection (i.e.) the table, The class for the individual object with setters/getters/field sanitizing-qualifying, or Both? Both. If you are using Propel, you will get peer classes which generate objects from database queries and classes for the object itself. Similarly, when using Doctrine you will get a class representing the table that generates objects from queries and a class representing a single object. -- --~--~-~--~~~---~--~~ 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] sfGuard/AJAX
Hi, I am still pretty green as far as symfony goes. I have managed to get my frontend working as I need, installed sfDoctrineGuardPlugin and enabled others. What I am trying to do is submit a form via AJAX to login the user and refresh the div within the page initially sent from using form_remote_tag(). The form is submitting and logs a user in provided that the username and password are correct, but in the case of incorrect user or password it redirects to /login instead of replacing the div content. Is this something I should be able to achieve? I seem to be getting nowhere on this.. Aaron --~--~-~--~~~---~--~~ 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: Many-to-Many fields not working in admin generator (doctrine)
My issue was related to this bug: http://trac.symfony-project.org/ticket/6569 and was fixed by applying the supplied patch. On Aug 20, 7:48 pm, dancablam danhstev...@gmail.com wrote: Hi Guys, I have a few many-to-many relationships in my schema that I'm accessing through the admin generator. All of the m2m fields show correctly when editing as a multi-select list. But when I select one or more items in the list and click save, it says update was completed but the multi-select fields come back blank and no data was added to my association tables. Even if I manually add data to my association table the proper selections do not show in the multi-select field - it's always just empty. I'm sure I'm overlooking something stupid and I'm hoping one of you have come across this issue before. Here's a snipped of my schema: Article: columns: active: type: boolean default: 0 title: string(255) body: clob indexes: article: fields: [title, body] type: fulltext relations: Credentials: class: Credential local: article_id foreign: credential_id refClass: ArticleCredentialAssoc Credential: columns: credential: string(100) ArticleCredentialAssoc: columns: article_id: type: integer primary: true credential_id: type: integer primary: true relations: Article: local: article_id foreign: id Credential: local: credential_id foreign: id See anything I'm doing wrong? I've tried countless schema variations and always get the same result. I'm on Symfony 1.2 / Doctrine 1.2 [manually upgraded to Doctrine 1.2 using instructions in the symfony blog]. Thanks for the help guys! Cheers, Dan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---