[symfony-users] Re: comma instead of dot
Thx Fasi - I write: $this-setWidget('price', new sfWidgetFormI18nNumber( array('culture' = 'pl') )); $this-setValidator('price', new sfValidatorI18nNumber( array('culture' = 'pl') )); Unfortunately during edition record with price in field 'price' I see price with dot instead of comma so i must by myself change dot on comma :/ On 27 Lis, 07:48, Gábor Fási maerl...@gmail.com wrote: This might be what you are looking for:http://www.symfony-project.org/plugins/sfFormI18nNumberPlugin On Fri, Nov 27, 2009 at 07:21, dziobacz aaabbbcccda...@gmail.com wrote: In form I have: $this-setValidators(array( 'price' = new sfValidatorNumber(), )); I think in many countries people uses comma instead of dot and real nobody know ? On 26 Lis, 20:39, dziobacz aaabbbcccda...@gmail.com wrote: I have form with price field - but I can write only price with dot, price with comma is incorrect - what can I do ? In my country price has got always comma. -- 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 athttp://groups.google.com/group/symfony-users?hl=en. -- 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] redirect
I have a page with a contact form at '/contact'. The form gets submitted to '/contactsubmit'. This function does what it has to do, and then redirects to '/contactthankyou?' . http_build_query($request-getParameter('contact')); This works. But I would like to know if there is a way that I can pass the info via post instead of get. My contact form is not exactly short. It has 10 fields, and one of them is a Comments field. 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: redirect
On Nov 27, 3:32 am, Paul Witschger tigerseyet...@gmail.com wrote: I have a page with a contact form at '/contact'. The form gets submitted to '/contactsubmit'. This function does what it has to do, and then redirects to '/contactthankyou?' . http_build_query($request-getParameter('contact')); This works. But I would like to know if there is a way that I can pass the info via post instead of get. My contact form is not exactly short. It has 10 fields, and one of them is a Comments field. Have you thought about simply handling it all with one action? That way you do not have to redirect. I do that often. Just test to see if the user has submitted info. If not, there is usually a block of code that you can skip past. If the user has submitted info, then you handle it, but you stay in the action, and stay in the template. Or, as an alternative, stay with just one action but use setTemplate() to set a different template. -- 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.
Re: [symfony-users] Re: redirect
I could do it all in one action, and I have done it that way before. I'm just looking for ways to avoid the resubmit on page refresh, as well as resubmit on back button stuff. I'm not sure if passing by post will work, but I'm just hoping. Basically, if they refresh the thank you page, I want to be able to redirect them back to the form. If they hit their back button, it will take them to the form. There won't be any To display this page, you must resubmit your data. It's not a requirement. I can always deal with it. I'm just trying to see if there is a good way around it. larry wrote: On Nov 27, 3:32 am, Paul Witschger tigerseyet...@gmail.com wrote: I have a page with a contact form at '/contact'. The form gets submitted to '/contactsubmit'. This function does what it has to do, and then redirects to '/contactthankyou?' . http_build_query($request-getParameter('contact')); This works. But I would like to know if there is a way that I can pass the info via post instead of get. My contact form is not exactly short. It has 10 fields, and one of them is a Comments field. Have you thought about simply handling it all with one action? That way you do not have to redirect. I do that often. Just test to see if the user has submitted info. If not, there is usually a block of code that you can skip past. If the user has submitted info, then you handle it, but you stay in the action, and stay in the template. Or, as an alternative, stay with just one action but use setTemplate() to set a different template. -- 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. -- 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] Cannot redeclare sfExcetion on a brand new sf1.0 project in DEV applications
Hi all. Am having a few issues with a new sf1.0 project I created - the application is totally vanilla, here's the steps I took using the PEAR package of symfony 1.0.21: 1. mkdir ~/public_html/myproject 2. cd ~/public_html/myproject 3. symfony init-app myproject 4. symfony init-app frontend 5. symfony init-app backend All commands behaved as expected, and site shows the default symfony pages without a problem, but as soon as I go to the _dev versions of the apps (having cleared cache), I get the following xdebug output: ( ! ) Fatal error: Cannot redeclare class sfException in /home/xxx/ public_html/myproject/lib/vendor/symfony-1.0/test/bootstrap/unit.php on line 39 Call Stack # TimeMemory FunctionLocation 1 0.0004 72936 {main}( ) ../backend_dev.php:0 2 1.2598 3570160 sfCore::splAutoload( ) ../sfCore.class.php:0 3 1.2605 3619528 require( '/home/xxx/public_html/myproject/lib/vendor/ symfony-1.0/test/unit/filter/sfFlashFilterTest.php' ) ../ sfCore.class.php:168 Note: I switched from using the PEAR install of Symfony for svn:externals in lib/vendor/, I get the same output with the 1.0.21 as an svn external as I do with the PEAR install. Any ideas? Have done some Googling but couldn't find anyone with the same symptoms. I'm running PHP 5.1.6 (hence sf1.0) on CentOS 5.3 x86_64, here's my php.ini: http://pastebin.com/fc246b24 Weirdly, I have other Symfony 1.0 projects running on the same server which all seem to be working fine. Thoughts? Thanks in advance, Ben -- 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: sfWidgetFormJQueryDate as default in auto generated code
Hello axel, have you found a solution to that problem? I'm also trying to those 2 things sorted for both filter and add/edit forms. Thanks! On 9 oct, 17:04, axel at axel.zu...@gmail.com wrote: hello list, 1) is there a way to make sfWidgetFormJQueryDate the default widgets for datetime fields in autogenerated code (Base*Form.classes) eg: class BaseTutorialForm extends BaseFormDoctrine { public function setup() { $this-setWidgets(array( 'id' = new sfWidgetFormInputHidden(), 'created_at' = new sfWidgetFormJQueryDate (sfConfig::get('sf_date_widget_settings')), 2) how can I change thedateformatinadminautogeneratorfor input fields eg. fordatefilters I've tried something like form: class: BackendTutorialForm display: Content: [category_id, type, is_public, email] Admin: [_generated_token, is_activated, expires_at, created_at] fields: expires_at: { label: works, date_format:dd/MM/ } created_at: { label: for me, date_format:dd/MM/ } where the lables for expires_at and created_at are displayed correctly but the date_format settings don't have any effect in the edit/create form (using symfony 1.2.8 with doctrine) thx a lot -- 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: sfWidgetFormJQueryDate as default in auto generated code
Hey Axel, not sure whether you found you answer, but i did! :) It apparently cannot be done from the generator.yml conf file. So in your lib/form/doctrine/BackendTutorialForm.class.php file you need to add : ... public function configure() { ... $this-widgetSchema['expires_at'] = new sfWidgetFormJQueryDate (array('format'='%day%/%month%/%year%')); $this-widgetSchema['created_at'] = new sfWidgetFormJQueryDate (array('format'='%day%/%month%/%year%')); } ... If you leave the sfWidgetFormJQueryDate() method call without any params it will take the default date format mm/dd/. Because i'm in Europe, i changed that format, just as an extra tip! ;) Hope it helped! On 27 nov, 12:30, kev kbs...@gmail.com wrote: Hello axel, have you found a solution to that problem? I'm also trying to those 2 things sorted for both filter and add/edit forms. Thanks! On 9 oct, 17:04, axel at axel.zu...@gmail.com wrote: hello list, 1) is there a way to make sfWidgetFormJQueryDate the default widgets for datetime fields in autogenerated code (Base*Form.classes) eg: class BaseTutorialForm extends BaseFormDoctrine { public function setup() { $this-setWidgets(array( 'id' = new sfWidgetFormInputHidden(), 'created_at' = new sfWidgetFormJQueryDate (sfConfig::get('sf_date_widget_settings')), 2) how can I change thedateformatinadminautogeneratorfor input fields eg. fordatefilters I've tried something like form: class: BackendTutorialForm display: Content: [category_id, type, is_public, email] Admin: [_generated_token, is_activated, expires_at, created_at] fields: expires_at: { label: works, date_format:dd/MM/ } created_at: { label: for me, date_format:dd/MM/ } where the lables for expires_at and created_at are displayed correctly but the date_format settings don't have any effect in the edit/create form (using symfony 1.2.8 with doctrine) thx a lot -- 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: sfWidgetFormJQueryDate as default in auto generated code
On 9 Ott, 17:04, axel at axel.zu...@gmail.com wrote: hello list, 1) is there a way to make sfWidgetFormJQueryDate the default widgets for datetime fields in autogenerated code (Base*Form.classes) eg: class BaseTutorialForm extends BaseFormDoctrine { public function setup() { $this-setWidgets(array( 'id' = new sfWidgetFormInputHidden(), 'created_at' = new sfWidgetFormJQueryDate (sfConfig::get('sf_date_widget_settings')), You should avoid to use such plugin, since it's a bad idea to mix php/ html and javascript. Javascript should be provided only by other Javascript code. You can give a try to my pure Javascript solution: http://garakkio.altervista.org/datepicker/ -- 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: Can't get sfguard user on action.
Jee :) Thanks you so much it was a typo problem Now is working ok. I think I will need to start using an IDE :) On 26 nov, 18:40, Antoine S. antoine.spodobal...@gmail.com wrote: Hi, in sfGuardSecurityUser the function to get the sfGuardUser object is getGuardUser() so : if($this-getUser()-isAuthenticated()){ $this-getUser()-getGuardUser()-getId() } On Nov 27, 4:01 am, Rodrigo rsantel...@gmail.com wrote: Hi, I'm using the sfguard plugin in my application. My problem is that after I login when I do this on the action $id = null; if($this-getUser()-isAuthenticated()){ $this-getUser()-getsfGuardUser()-getId() } the following error appears Call to undefined method myUser::getsfGuardUser. I start checking what could be my mistake so I check myUser.class.php: it looks like class myUser extends sfGuardSecurityUser { } I put the followin code on the template: ?php if($sf_user-isAuthenticated()): ? ?php print_r($sf_user-getGuardUser());? ?php endif; ? And it prints the user that I'm log on. But when I do: if ($this-getUser ()-isAuthenticated ()) { print_r($this-getUser ()); } It doesn't print the sfGuardUser. What I'm doing wrong? Should I put something extra? -- 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: sfWidgetFormJQueryDate as default in auto generated code
Hey Massimiliano, i'd be more than happy to try your solution, but to be honest you page is not that clear and definitely not symfony oriented. Maybe you could describe what exactly is needed, where to put it and what file to update for your solution to work in a symfony project! Thanks anyway. On 27 nov, 13:57, Massimiliano Arione garak...@gmail.com wrote: On 9 Ott, 17:04, axel at axel.zu...@gmail.com wrote: hello list, 1) is there a way to make sfWidgetFormJQueryDate the default widgets for datetime fields in autogenerated code (Base*Form.classes) eg: class BaseTutorialForm extends BaseFormDoctrine { public function setup() { $this-setWidgets(array( 'id' = new sfWidgetFormInputHidden(), 'created_at' = new sfWidgetFormJQueryDate (sfConfig::get('sf_date_widget_settings')), You should avoid to use such plugin, since it's a bad idea to mix php/ html and javascript. Javascript should be provided only by other Javascript code. You can give a try to my pure Javascript solution:http://garakkio.altervista.org/datepicker/ -- 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] swiftmailer problems
HI! i am using symfony 1.4 RC2 and i have met following problems on swift mailer: by reading the doc here : http://www.symfony-project.org/tutorial/1_4/en/whats-new I have saw that swiftmailer is available, but no details about instalation: So, i have landed on this page: http://www.symfony-project.org/cookbook/1_2/en/email Again, here, after reading the page, i have found that i have to manually install swift mailer. And i have done this. After install, i have wrote this piece of code ... $mail = $this-getMailer()-compose(); $mail-setSubject(sfClientToolsHelper::__('reset password service')); $mail-setTo(array( $user-getProfile()-getEmail() = $user-getProfile()-getFullName() )); $mail-setFrom(epCustomConfig::getResetPasswordFromEmailAddress()); $images = array(); $imagesRef = array(); $images['ep'] = new Swift_Message_Image(new Swift_File(sfConfig::get('sf_web_dir') . '/images/mylogo.png')); foreach ($images as $name = $image) { $imagesRef[$name] = $mail-attach($image); } $parameters = array( 'images' = $imagesRef , 'user' = $user , 'new_password' = $new_password ); $html = $this-getPartial('mail/mailForgotPasswordHtml', $parameters); $text = $this-getPartial('mail/mailForgotPasswordText', $parameters); $mail-setBody($html, 'text/html'); $mail-addPart($text, 'text/plain'); $this-getMailer()-send($mail); When i have test it, i got this error: Fatal error: Class 'Swift_Message_Image' not found in /project_path/apps/frontend/modules/sfGuardAuth/actions/actions.class.php on line 83 So, i have started to Google it, and i have found out that i have to insert this in my autoload.yml file autoload: swiftmailer: name: swiftmailer path: %SF_SYMFONY_LIB_DIR%/vendor/swift recursive: true but, again i got same error. I have found that this class comes in the swift installation according to the book, so i have updated my autoload.yml file to: autoload: swift: name: swift path: %SF_LIB_DIR%/vendor/swift recursive: true The good news are the fact that i don't get this error, but i get another one. Catchable fatal error: Argument 1 passed to Swift_Transport_AbstractSmtpTransport::registerPlugin() must be an instance of Swift_Events_EventListener, instance of sfMailerMessageLoggerPlugin given, called in /project_path/lib/vendor/symfony/lib/mailer/sfMailer.class.php on line 140 and defined in /project_path/lib/vendor/symfony/lib/vendor/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php on line 247 Catchable fatal error: Argument 1 passed to Swift_Events_SimpleEventDispatcher::bindEventListener() must be an instance of Swift_Events_EventListener, instance of sfMailerMessageLoggerPlugin given, called in /project_path/lib/vendor/symfony/lib/vendor/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php on line 249 and defined in /project_path/lib/vendor/symfony/lib/vendor/swiftmailer/classes/Swift/Events/SimpleEventDispatcher.php on line 123 and finally: Fatal error: Call to undefined method Swift_Message::newinstance() in/project_path/lib/vendor/symfony/lib/mailer/sfMailer.class.php on line 237 So, i have get back to my factories.yml, where i had this config: mailer: class: sfMailer param: logging: %SF_LOGGING_ENABLED% charset: %SF_CHARSET% delivery_strategy: spool spool_class: Swift_DoctrineSpool spool_arguments: [ MailMessage, message ] transport: class: Swift_SmtpTransport param: host: localhost port: 25 encryption: ~ username: username password: a simple pass and i have commented out the logging section but i still did not elude the problem with the first catchable fatal error. I have get back to my autoload, and i have added a new entry autoload: swift: name: swift path: %SF_LIB_DIR%/vendor/swift recursive: true swiftmailer: name: swiftmailer path: %SF_SYMFONY_LIB_DIR%/vendor/swiftmailer recursive: true Now, all went fine until a moment ... after that i got : Catchable fatal error: Argument 1 passed to Swift_Mime_SimpleMessage::attach() must implement interface Swift_Mime_MimeEntity, instance of Swift_Message_Image given, called in/project_path/apps/frontend/modules/sfGuardAuth/actions/actions.class.php on line 87 and defined in/project_path/lib/vendor/symfony/lib/vendor/swiftmailer/classes/Swift/Mime/SimpleMessage.php on line 485 Fatal error: Call to undefined method Swift_Message_Image::getNestingLevel() in /project_path/lib/vendor/symfony/lib/vendor/swiftmailer/classes/Swift/Mime/SimpleMimeEntity.php on line 693 And now, I got stuck... Any ideeas how to solve this ? By removing the image would solve this problem, however, i will not be able to send embeded images in my email ... at least following the tutorial. Finally i have sent
[symfony-users] Logout with sfUser
Hi all, i'm managing my users using the sfBasicSecurityUser class and now i'm trying to create a action to the user do logout. I create this method in my myUser class public function logout($user, $con = null) { //$this-getAttributeHolder('usuario_id', null, 'myUser')-remove('usuario_id'); //I'm trying to remove an atttributte holder but it not worked. Ideas? $this-setTimedOut(); $this-setAuthenticated(false); } Thanks Augusto Morais -- 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: Logout with sfUser
Hi all, i'm managing my users using the sfBasicSecurityUser class and now i'm trying to create a action to the user do logout. This is how sfGuardPlugin does it: public function executeSignout() { $this-getUser()-signOut(); $signout_url = sfConfig::get ('app_sf_guard_plugin_success_signout_url', $this-getRequest()- getReferer()); $this-redirect('' != $signout_url ? $signout_url : '@homepage'); } The user class has this: public function signOut() { $this-getAttributeHolder()-removeNamespace ('sfGuardSecurityUser'); $this-user = null; $this-clearCredentials(); $this-setAuthenticated(false); $expiration_age = sfConfig::get ('app_sf_guard_plugin_remember_key_expiration_age', 15 * 24 * 3600); $remember_cookie = sfConfig::get ('app_sf_guard_plugin_remember_cookie_name', 'sfRemember'); sfContext::getInstance()-getResponse()-setCookie ($remember_cookie, '', time() - $expiration_age); } Perhaps you can use some of that? I wonder if it is the user clearCredentials() method you need to call? Incidentally are you not using sf(Doctrine)GuardPlugin? -- 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] config/error/erro.html.php cannot be shown
Hello everyone, Why can not I customize the error page? Symfony1.2 config/error/error.html.php ?php echo 'test ok' ? apps/frontend/config/settings.yml all: .actions: error_404_module: default error_404_action: error404 $ ./symfony cc access prod-env http://eample.com/invalid.html = Displayed Oops! Page Not Found (symfony's default) I want to show test ok. Where of me is foolish? regards. -- 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] CSRF form_tag questions
Hello, can i enable CSRF protection using form_tag ?? If it is not possible...Is there a way to create a sfForm using CSRF protection??? btw, link_to with method = post CSRF protection works perfectly. I am using symfony 1.3. 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] sfValidatorDate in sf1.3/14 ?
Hi, after migration 1.2 to 1.3, ny sfvalidatordate dont work anymore and i cant find solution : I just want to type dd/mm/yy and get it in mysql format : new sfValidatorDate(array( 'date_format' = '/^(\d{2})\/(\d{2})\/(\d{2})/', 'date_output'='Y-m-d', 'with_time' = false, 'required' = true)), -- 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: Easy gmap plugin icon
Thanks, Fabrice. I believe I'm at an older version of the plugin (tag 1.0.4) so the sample code won't work for me. But I was able to get it working in my version without too much trouble after digging through the code. I'll look at updating the plugin to the newest version when I can. Cheers, Steve On Nov 26, 9:13 am, Fabrice Bernhard fabri...@theodo.fr wrote: Hi Steve, I had not seen that you had posted here before writing me an email. It is actually easy to customise an icon, the sample 6 shows you how to do it:http://svn.symfony-project.com/plugins/sfEasyGMapPlugin/branches/v3/m... Alexandre, your comment is very general and could be interpreted negatively. Yes plugins sometimes do not correspond exactly to specific needs, but I think everybody here are busy people and those who contribute already make a big time investment for the community. And I personally do not ask for more when I use a plugin : if the contribution is not perfect but open-source, I have the freedom to enhance it, which is great. However some plugins even make the effort to be neutral enough so that you don't need to break them to modify their behaviours. That is what we try to do in the development of the sfEasyGMapPlugin, refusing good contributions which are unfortunately too specific. And there is even a cool and broad range of samples thanks to Vincent Guillon, who added new ones just a few weeks ago! So my conclusion is: when somebody is struggling with a plugin, don't assume the plugin is old and unmaintained, maybe the person just did not read the documentation. Did you Steve ? :-) Cheers, Fabrice --http://www.theodo.fr On Nov 25, 10:03 pm, Alexandre SALOME alexandre.sal...@gmail.com wrote: It depends of the plugin creator. Plugins are not always maintained, or does not offer the desired morph you require. Sure you have choice, but people creates lot of plugins and don't enhance old plugins. If you want more than the plugin, 2 solutions : Contact the contributor to become a developer Create your own plugin (personal/public) Enjoy ;) Alexandre 2009/11/25 Steve Sanyal steve.san...@gmail.com Hi, I love the easygmapplugin. I've just been trying to figure out how to get a different icon than the default red marker. I don't need anything fancy, just another colour. Basically what I have is a map with a bunch of markers with locations relative to a set of coordinates. I'd just like to have the reference coordinate marker be a different colour. Is that possible? Thanks, Steve -- 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.comsymfony-users%2bunsubscr...@goog legroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- Alexandre Salomé -- alexandre.sal...@gmail.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-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.
Re: [symfony-users] config/error/erro.html.php cannot be shown
http://symfony-check.org/ On Fri, Nov 27, 2009 at 8:08 AM, isyairazu isyair...@gmail.com wrote: Hello everyone, Why can not I customize the error page? Symfony1.2 config/error/error.html.php ?php echo 'test ok' ? apps/frontend/config/settings.yml all: .actions: error_404_module: default error_404_action: error404 $ ./symfony cc access prod-env http://eample.com/invalid.html = Displayed Oops! Page Not Found (symfony's default) I want to show test ok. Where of me is foolish? regards. -- 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. -- Have a nice day! Alecs As programmers create bigger better idiot proof programs, so the universe creates bigger better idiots! I am on web: http://www.alecslupu.ro/ I am on twitter: http://twitter.com/alecslupu I am on linkedIn: http://www.linkedin.com/in/alecslupu Tel: (+4)0748.543.798 -- 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: execute vs fetchArray
Hi all, I'm a Propel user, but I'm switching to Doctrine... I don't know if I should use execute() or fetchArray() to retrieve my data. execute() : I get an array of Object, and I like dealing with Objects ! fetchArray() : I read that it's better (less memory consuming ?) but I don't really enjoy managing arrays (and arrays of arrays when I get relationship). Moreover, when they're given to my view, it's considered as sfOutputEscaperArrayDecorator so I have to perform - getRawValue(). Is it really awful to call execute() method in Doctrine ? -- Adrien -- 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] PreLoad in FormInputText and DoctrineChoice with 1:n and m2m relations
Hi everyone. I would like to know about how could i set default values in Forms with more than simple InputText fields. I have this on my BooksForm.class: $this-setDefaults(array( 'proveedor_list' = $per, /* Belogns to m2m relation*/ 'procedencia' = $proc, /*Blegons to simple InputText 'estante_list' = $st, /* Belongs to 1:n relation*/ ... ... ... )); So, InputText is set without any problem, but estante_list and proveedor_list aren't. For this i used the follow: if ($st != ''){ $this-widgetSchema['estante_list'] = new sfWidgetFormInputText(); $this-validatorSchema['estante_list'] = new sfValidatorString(array('max_length' = 255)); }else{ $this-widgetSchema[estante_list'] = new sfWidgetFormDoctrineChoice(array( 'expanded' = false, 'model' = 'Proveedor', 'add_empty' = true )); $this-validatorSchema['estante_list'] = new sfValidatorDoctrineChoice(array( 'multiple' = true, 'model' = 'Proveedor', 'required' = false )); } Well, if $st has any data i change the widget from DoctrineChoice to InputText, and this works, if $st hasn't any data i just set the default widget. For this. estante_list that belongs to 1:n relation works right, in my form i got an InputText field with $st value. BUT, for proveedor_list doesn't work. I got an InputText Field with no data in It, just ARRAY word. So i'm not enough sure if this is the best way. I feel that must exist another way to set values to DoctrineChoice type fields. If you are asking yoursalef why i want to set these default values to those DoctrineChoice collections, it's because the defualt values were chose by users before to the present Form I hope someone can help me. Thank's a lot for your time. -- 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: execute vs fetchArray
The source of fetchArray() is: public function fetchArray($params = array()) { return $this-execute($params, Doctrine_Core::HYDRATE_ARRAY); } So they are exactly the same :) On Nov 27, 8:34 pm, Adrien Mogenet adrien.moge...@gmail.com wrote: Hi all, I'm a Propel user, but I'm switching to Doctrine... I don't know if I should use execute() or fetchArray() to retrieve my data. execute() : I get an array of Object, and I like dealing with Objects ! fetchArray() : I read that it's better (less memory consuming ?) but I don't really enjoy managing arrays (and arrays of arrays when I get relationship). Moreover, when they're given to my view, it's considered as sfOutputEscaperArrayDecorator so I have to perform - getRawValue(). Is it really awful to call execute() method in Doctrine ? -- Adrien -- 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: execute vs fetchArray
Yes I knew that, but HYDRATE_ARRAY parameters is faster and acts differently than when we HYDRATE_OBJECT ! That was my real question... ;-) On 27 nov, 23:40, Michael Boyd mikeboyd...@googlemail.com wrote: The source of fetchArray() is: public function fetchArray($params = array()) { return $this-execute($params, Doctrine_Core::HYDRATE_ARRAY); } So they are exactly the same :) On Nov 27, 8:34 pm, Adrien Mogenet adrien.moge...@gmail.com wrote: Hi all, I'm a Propel user, but I'm switching to Doctrine... I don't know if I should use execute() or fetchArray() to retrieve my data. execute() : I get an array of Object, and I like dealing with Objects ! fetchArray() : I read that it's better (less memory consuming ?) but I don't really enjoy managing arrays (and arrays of arrays when I get relationship). Moreover, when they're given to my view, it's considered as sfOutputEscaperArrayDecorator so I have to perform - getRawValue(). Is it really awful to call execute() method in Doctrine ? -- Adrien -- 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.
Re: [symfony-users] Re: Doctrine: execute vs fetchArray
Yes, it's faster with a simple array hydrating... You don't instanciate your objects, just map their configuration. Objects are useful for executing some business logic (sometimes, very complex). Array can be useful for templates, for example. Depends of your case, but don't be afraid of objects ;) make some time/memory measures in your use case, and select the best solution. Alexandre 2009/11/28 Adrien Mogenet adrien.moge...@gmail.com Yes I knew that, but HYDRATE_ARRAY parameters is faster and acts differently than when we HYDRATE_OBJECT ! That was my real question... ;-) On 27 nov, 23:40, Michael Boyd mikeboyd...@googlemail.com wrote: The source of fetchArray() is: public function fetchArray($params = array()) { return $this-execute($params, Doctrine_Core::HYDRATE_ARRAY); } So they are exactly the same :) On Nov 27, 8:34 pm, Adrien Mogenet adrien.moge...@gmail.com wrote: Hi all, I'm a Propel user, but I'm switching to Doctrine... I don't know if I should use execute() or fetchArray() to retrieve my data. execute() : I get an array of Object, and I like dealing with Objects ! fetchArray() : I read that it's better (less memory consuming ?) but I don't really enjoy managing arrays (and arrays of arrays when I get relationship). Moreover, when they're given to my view, it's considered as sfOutputEscaperArrayDecorator so I have to perform - getRawValue(). Is it really awful to call execute() method in Doctrine ? -- Adrien -- 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.comsymfony-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- Alexandre Salomé -- alexandre.sal...@gmail.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-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.
Re: [symfony-users] sfValidatorDate in sf1.3/14 ?
What's the outputed error ? 2009/11/27 goofy goofy.m...@gmail.com Hi, after migration 1.2 to 1.3, ny sfvalidatordate dont work anymore and i cant find solution : I just want to type dd/mm/yy and get it in mysql format : new sfValidatorDate(array( 'date_format' = '/^(\d{2})\/(\d{2})\/(\d{2})/', 'date_output'='Y-m-d', 'with_time' = false, 'required' = true)), -- 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.comsymfony-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- Alexandre Salomé -- alexandre.sal...@gmail.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-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.
Re: [symfony-users] CSRF form_tag questions
Enable it in your settings.yml (see documentationhttp://www.symfony-project.org/reference/1_4/fr/04-Settings#chapter_04_sub_csrf_secret ) 2009/11/27 Tommy csck...@gmail.com Hello, can i enable CSRF protection using form_tag ?? If it is not possible...Is there a way to create a sfForm using CSRF protection??? btw, link_to with method = post CSRF protection works perfectly. I am using symfony 1.3. 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.comsymfony-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- Alexandre Salomé -- alexandre.sal...@gmail.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-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] Dynamic Drop Down Box Solution.
hi all: I'm trying to convert a 1.0 application that i've built to a 1.2 version. So far i love it but i'm stuck on the new way that the forms work. I have a simple dynamic drop down function that uses ajax and the observe_field function to populate a div based of the id that is passed to it for the second dropdown list. basically i'm trying to do the same thing that is explained in the following link. http://rabaix.net/en/articles/2009/02/23/let-s-be-more-dynamic-with-sf-form - select box one is results from original query - when select box one has a value it does a query based on the id passed and updates the second select box in the form. The demo in the link looks pretty good but i'm wondering if there is a better way to do it without using extra plugins. Thank in Advance 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] Re: config/error/erro.html.php cannot be shown
Hi Alecs, Thankyou for a gracefull response. I cleared the problem with you and that greate site. Thankyou very much! -- isyairazu -- 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.
Re: [symfony-users] config/error/erro.html.php cannot be shown
apps/frontend/config/settings.yml all: .actions: error_404_module: default error_404_action: error404 Don't you want to change the error module? I usually create a module called error: error_404_module: error I put all of my error templates in there. On Fri, Nov 27, 2009 at 1:08 AM, isyairazu isyair...@gmail.com wrote: Hello everyone, Why can not I customize the error page? Symfony1.2 config/error/error.html.php ?php echo 'test ok' ? apps/frontend/config/settings.yml all: .actions: error_404_module: default error_404_action: error404 $ ./symfony cc access prod-env http://eample.com/invalid.html = Displayed Oops! Page Not Found (symfony's default) I want to show test ok. Where of me is foolish? regards. -- 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. -- 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.