[symfony-users] Re: checking for duplicate entry while validating
Use postvalidator in form class like this: $this-validatorSchema-setPostValidator( new sfValidatorAnd( array( new sfValidatorPropelUnique(array('model' = 'sfGuardUser', 'column' = array('username')), array(invalid = Such %column% is already exists)), new sfValidatorPropelUnique(array('model' = 'sfGuardUserProfile', 'column' = array('email')), array(invalid = Such %column% is already exists)) ) ) ); On Feb 18, 11:03 pm, Iltar kja...@gmail.com wrote: How can I add a validation for fields that have a unique index? --~--~-~--~~~---~--~~ 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 to validate at least one checkbox is checked?
I'll give it a shot. Thanks. On Feb 18, 4:49 pm, Martino Piccinato m...@yoolab.com wrote: I think the easisiest way would be making yourhttp://www.symfony-project.org/api/1_2/sfValidatorSchema accepting as a first argument the array of the checkbox fields names and, in doClean method validating that at least one is checked (and use this as a post validator). I've never implemented something similar so take my words just as this is the way I'd go and not as I'm sure this is the best way :-) On Wed, Feb 18, 2009 at 2:49 PM, Mark Smith marksmith5...@jungle-monkey.com wrote: That is what I tried first, but because my array of checkboxes is dynamic construction of the global validator is quite complicated. I'm not even sure if it's possible, the code below was my first attempt, but it doesn't work as I expected. Can you let me know if I am on the right path? Thanks $validationArray=array(); foreach($this-services as $serviceId = $serviceName) { $this-widgetSchema['requiredServices'][$serviceName] = new sfWidgetFormSchema(); $this-validatorSchema['requiredServices'][$serviceName] = new sfValidatorSchema(); foreach($this-regions as $regionCode = $regionName) { $this-widgetSchema['requiredServices'][$serviceName] [$regionCode] = new sfWidgetFormInputCheckbox(array(),array ('value'='true','class'='styled')); $this-validatorSchema['requiredServices'] [$serviceName][$regionCode] = new sfValidatorPass(); array_push($validationArray,$this-validatorSchema ['requiredServices'][$serviceName][$regionCode]); } } $this-validatorSchema-setPostValidator(new sfValidatorOr ($validationArray),array('required' = true)); On Feb 18, 12:52 pm, Martino Piccinato m...@yoolab.com wrote: See the paragraph Global validators inhttp://www.symfony-project.org/book/forms/1_2/en/02-Form-Validation. I think your problem will be better handled by a global validator as it regards more than one input field. Martino On Wed, Feb 18, 2009 at 1:16 PM, Mark Smith marksmith5...@jungle-monkey.com wrote: I have a dynamic 2d array of checkboxes, and I want to require that at least one is selected. Trying to write validation rules for this is proving to be excruciatingly difficult. The only way I could accomplish this is to override the isValid function and put in some logic to manually check each box. It causes the form not to validate, but obviously does nothing to the error schema: public function isValid() { $result=false; foreach($this['requiredServices'] as $service) { foreach($service as $region) { if($region-getValue()) { $result=true; break; } } } return $result parent::isValid(); } Is there a better way than this? 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] How to display new-line feeds in Symfony??
Hello all, I walked into a strange problem. In my database I have stored data which contains new-line feeds and I am unable to display them in view. I did something like this in my view... pre?php echo preg_replace( '/\n/', 'br', $list-getBody() ) ?/ pre What this did was to just display br as it is... I tried putting the function inside some helper or a static class as well. That didn't work either. However when I do like pre?php echo 'abcbr123' ?/pre It displays the strings on separate lines. How do we workaround this? Thanks and Regards Vikram --~--~-~--~~~---~--~~ 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 a multiple items form to create or to update multiple objects
Is possible to make a multiple items form to create or to update multiple instances of a model at a time? It is possible to start by the class of form or is necessary to create a completely new class? What is the right way forward? 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: How to display new-line feeds in Symfony??
Hi. Well, if you'll var_dump $list variable, you'll see that it's not an instance of List (or whatever) - it's instance of sfOutputEscaperObjectDecorator. So because of that, your $list-getBody()won't return 'br/' - it'll return '*gt;*br/*lt;*'. To get unescaped value, you should call $list-getBody(ESC_RAW). On Thu, Feb 19, 2009 at 11:24, SeeVik vikramvmalhotra1...@gmail.com wrote: Hello all, I walked into a strange problem. In my database I have stored data which contains new-line feeds and I am unable to display them in view. I did something like this in my view... pre?php echo preg_replace( '/\n/', 'br', $list-getBody() ) ?/ pre What this did was to just display br as it is... I tried putting the function inside some helper or a static class as well. That didn't work either. However when I do like pre?php echo 'abcbr123' ?/pre It displays the strings on separate lines. How do we workaround this? Thanks and Regards Vikram -- With the best regards, Andy. --~--~-~--~~~---~--~~ 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] Disable routing rules when in specific module
I was wondering if it was possible to disable the routing rules in routing.yml for an application when you are calling are trying to load a URL that is not of the current site, i.e. like loading an external site into a div etc. --~--~-~--~~~---~--~~ 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 to display new-line feeds in Symfony??
Hello Andy, Thanks for the solution. Neat trick that is. :) Thanks and Regards Vikram On Feb 19, 6:37 pm, Andy Dziahel' trickster...@gmail.com wrote: Hi. Well, if you'll var_dump $list variable, you'll see that it's not an instance of List (or whatever) - it's instance of sfOutputEscaperObjectDecorator. So because of that, your $list-getBody()won't return 'br/' - it'll return '*gt;*br/*lt;*'. To get unescaped value, you should call $list-getBody(ESC_RAW). On Thu, Feb 19, 2009 at 11:24, SeeVik vikramvmalhotra1...@gmail.com wrote: Hello all, I walked into a strange problem. In my database I have stored data which contains new-line feeds and I am unable to display them in view. I did something like this in my view... pre?php echo preg_replace( '/\n/', 'br', $list-getBody() ) ?/ pre What this did was to just display br as it is... I tried putting the function inside some helper or a static class as well. That didn't work either. However when I do like pre?php echo 'abcbr123' ?/pre It displays the strings on separate lines. How do we workaround this? Thanks and Regards Vikram -- With the best regards, Andy. --~--~-~--~~~---~--~~ 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 to display new-line feeds in Symfony??
Oh nobut wait a moment.. What about whitespaces. How can I display the white-spaces as it is?? ESC_RAW doesn't work for them. Thanks and Regards Vikram On Feb 19, 7:24 pm, SeeVik vikramvmalhotra1...@gmail.com wrote: Hello Andy, Thanks for the solution. Neat trick that is. :) Thanks and Regards Vikram On Feb 19, 6:37 pm, Andy Dziahel' trickster...@gmail.com wrote: Hi. Well, if you'll var_dump $list variable, you'll see that it's not an instance of List (or whatever) - it's instance of sfOutputEscaperObjectDecorator. So because of that, your $list-getBody()won't return 'br/' - it'll return '*gt;*br/*lt;*'. To get unescaped value, you should call $list-getBody(ESC_RAW). On Thu, Feb 19, 2009 at 11:24, SeeVik vikramvmalhotra1...@gmail.com wrote: Hello all, I walked into a strange problem. In my database I have stored data which contains new-line feeds and I am unable to display them in view. I did something like this in my view... pre?php echo preg_replace( '/\n/', 'br', $list-getBody() ) ?/ pre What this did was to just display br as it is... I tried putting the function inside some helper or a static class as well. That didn't work either. However when I do like pre?php echo 'abcbr123' ?/pre It displays the strings on separate lines. How do we workaround this? Thanks and Regards Vikram -- With the best regards, Andy. --~--~-~--~~~---~--~~ 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: Forms over multiple pages, save at the end?
Hi Justin, Take a look at this plugin. It's for symfony 1.0 http://raw.trac.symfony-project.org/wiki/sfPageFlowPlugin It doesn't seem to be maintained anymore. If you can't use it, at least it can inspire you to solve your problem. regards, Rimenes Ribeiro. 2009/2/18 Justin Davis jdavis1...@gmail.com Hey all - First post on the list, really loving the community that is supporting symfony. I'm somewhat of a newb, but definitely making some progress. I've run into a problem I can't figure out. I've got a series of forms (3 of them), that need to be filled out in series, one per page. I'd like the information from the forms saved to the database when the 3rd form is submitted, not after each one individually, so I'll need to somehow carry the data from the earlier forms through to the last submit, then save everything to the database there (into three different tables). I've looked thru the documentation and symfony forums and haven't found much help. Do you bind the form, then put it into the session, or is there another way? The more specific you can be about particular actions, etc... would be really helpful. Thanks for all your help! Justin Davis -- Rimenes Ribeiro --~--~-~--~~~---~--~~ 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] symfony blog post not in the community last blog post ?
Is it normal ? ++ COil --~--~-~--~~~---~--~~ 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 blog post not in the community last blog post ?
I don't understand the problem. The symfony blog RSS feed is not part of the community RSS feed. It has always been the case. Or do you mean something else? Fabien -- Fabien Potencier Sensio CEO - symfony lead developer sensiolabs.com | symfony-project.org | fabien.potencier.org Tél: +33 1 40 99 80 80 Loïc Vernet wrote: Is it normal ? ++ COil --~--~-~--~~~---~--~~ 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: Using CacheManager-has() in batch script...
Maybe you can use the sfBrowser for your batch script, I think there is an example on the symfony book, in the chapter regarding performance. Cheers, Alvaro On Feb 19, 2009, at 3:39 PM, Sumedh wrote: No one? :| On Feb 18, 11:30 am, Sumedh sumedh.inam...@gmail.com wrote: Anyone? Does anyone here use this practice of warming up cache by crawling the pages after a build? On Feb 17, 2:21 pm, Sumedh sumedh.inam...@gmail.com wrote: Hi Friends, I am using Symfony 1.0. I am trying to write a batch script that tries to populate the symfony cache by crawling (wget in spider mode) some pages of the site. Now, I want to crawl only the pages that are not in cache, for better efficiency. So, I want to use $cacheManager-has($internalUri) condition... But, this condition always returns false, even if action for the passed internalUri is cached. When I echoed the url_for($internalUri) in the batch script, I got the URL correctly, apart from base of the URL. It returns something like http://BATCH_SCRIPT_FILE_NAME.php/CORRECT RELATIVE URL. Is this the problem because of which cache manager can't find the passed internalUri in cache? This particular internalUri works fine for internal links within the site... --~--~-~--~~~---~--~~ 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: Environments not available in [PROJECT_DIR]/config/app.yml (gloabl app.yml)
Thanks for the answer Bernhard ! But unfortunateley, no matter of the order, still doesn't work... On Feb 19, 7:25 am, Bernhard Schussek bschus...@gmail.com wrote: Could you try adding another layer in between? all: test: value: It works dev: test: value: It works You could also try switching the order around. Bernhard --~--~-~--~~~---~--~~ 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] Cache problem
I've tried template fragment caching and i am facing the strange problem: I just can't clear template fragment cache! I've tried a lot, but had no luck :( It's something like this: ?php if (!cache('post_list_' . $post-getId())): ? // doing somethig with this post ?php cache_save() ? ?php endif; ? And in actions I have the following code: $postId = $request-getParameter('id'); $cacheManager = $this-getContext()-getViewCacheManager(); $cacheManager-remove('@sf_cache_partial? module=blogaction=listsf_cache_key=post_list_' . $postId); $cacheManager-remove('@sf_cache_partial? module=blogaction=readsf_cache_key=post_read_' . $postId); And it just doesn't work, it doesn't clear the cache at all! :( Maybe somebody encountered the same problem or can point me where i am wrong? --~--~-~--~~~---~--~~ 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: checking for duplicate entry while validating
Ahh yes, that should do it! Thnx. On Feb 19, 9:28 am, Bob cyberbo...@gmail.com wrote: Use postvalidator in form class like this: $this-validatorSchema-setPostValidator( new sfValidatorAnd( array( new sfValidatorPropelUnique(array('model' = 'sfGuardUser', 'column' = array('username')), array(invalid = Such %column% is already exists)), new sfValidatorPropelUnique(array('model' = 'sfGuardUserProfile', 'column' = array('email')), array(invalid = Such %column% is already exists)) ) ) ); On Feb 18, 11:03 pm, Iltar kja...@gmail.com wrote: How can I add a validation for fields that have a unique index? --~--~-~--~~~---~--~~ 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: Using CacheManager-has() in batch script...
Yeah, here it is - http://www.symfony-project.org/book/1_0/18-Performance#chapter_18_sub_generating_cached_pages But, I would still need to use this cache manager object to get me the list of pages that are not yet cached... :( I want to crawl like 300,000 pages...some of which will get invalidated...I don't want to crawl everything unnecessarily... :| On Feb 19, 3:54 pm, alvaro harryjek...@gmail.com wrote: Maybe you can use the sfBrowser for your batch script, I think there is an example on the symfony book, in the chapter regarding performance. Cheers, Alvaro On Feb 19, 2009, at 3:39 PM, Sumedh wrote: No one? :| On Feb 18, 11:30 am, Sumedh sumedh.inam...@gmail.com wrote: Anyone? Does anyone here use this practice of warming up cache by crawling the pages after a build? On Feb 17, 2:21 pm, Sumedh sumedh.inam...@gmail.com wrote: Hi Friends, I am using Symfony 1.0. I am trying to write a batch script that tries to populate the symfony cache by crawling (wget in spider mode) some pages of the site. Now, I want to crawl only the pages that are not in cache, for better efficiency. So, I want to use $cacheManager-has($internalUri) condition... But, this condition always returns false, even if action for the passed internalUri is cached. When I echoed the url_for($internalUri) in the batch script, I got the URL correctly, apart from base of the URL. It returns something like http://BATCH_SCRIPT_FILE_NAME.php/CORRECT RELATIVE URL. Is this the problem because of which cache manager can't find the passed internalUri in cache? This particular internalUri works fine for internal links within the site... --~--~-~--~~~---~--~~ 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] Need help with Apache Rewrite rule...
Hi Friends, I am trying to implement versioning to my resource files as give here - http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/ So, I am generating css and js file references as abcd.datetime.js and want to rewrite them to abcd.js via .htaccess... I added the rule he has given as - IfModule mod_rewrite.c RewriteEngine On # uncomment the following line, if you are having trouble # getting no_script_name to work #RewriteBase / ### THIS IS WHAT I HAVE ADDED RewriteRule ^(scripts|css|images)/(.+)\.(.+)\.(js|css|jpg|gif|png)$ $1/$2.$4 # we skip all files with .something RewriteCond %{REQUEST_URI} \..+$ #condition that says - DONT SKIP A URL WITH . AND THEN / - THIS IS FOR AREAS WITH DOTS RewriteCond %{REQUEST_URI} !\..*/.*$ RewriteCond %{REQUEST_URI} !\.html$ RewriteRule .* - [L] # we check if the .html version is here (caching) RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f # no, so we redirect to our front web controller RewriteRule ^(.*)$ frontend_dev.php [QSA,L] /IfModule but this doesn't seem to be working... Can someone please help me? Where can I find a simple to understand reference to apache rewrite rules? Apache documentation is too hard to understand...and has no examples... --~--~-~--~~~---~--~~ 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: Need help with Apache Rewrite rule...
Hello, I think you missed the [L] flag at the end of your rule: RewriteRule ^(scripts|css|images)/(.+)\.(.+)\.(js|css|jpg|gif|png)$ [L] On Thu, Feb 19, 2009 at 1:47 PM, Sumedh sumedh.inam...@gmail.com wrote: Hi Friends, I am trying to implement versioning to my resource files as give here - http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/ So, I am generating css and js file references as abcd.datetime.js and want to rewrite them to abcd.js via .htaccess... I added the rule he has given as - IfModule mod_rewrite.c RewriteEngine On # uncomment the following line, if you are having trouble # getting no_script_name to work #RewriteBase / ### THIS IS WHAT I HAVE ADDED RewriteRule ^(scripts|css|images)/(.+)\.(.+)\.(js|css|jpg|gif|png)$ $1/$2.$4 # we skip all files with .something RewriteCond %{REQUEST_URI} \..+$ #condition that says - DONT SKIP A URL WITH . AND THEN / - THIS IS FOR AREAS WITH DOTS RewriteCond %{REQUEST_URI} !\..*/.*$ RewriteCond %{REQUEST_URI} !\.html$ RewriteRule .* - [L] # we check if the .html version is here (caching) RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f # no, so we redirect to our front web controller RewriteRule ^(.*)$ frontend_dev.php [QSA,L] /IfModule but this doesn't seem to be working... Can someone please help me? Where can I find a simple to understand reference to apache rewrite rules? Apache documentation is too hard to understand...and has no examples... -- Noël GUILBERT http://www.noelguilbert.com/ http://www.sensiolabs.com http://www.symfony-project.com Sensio Labs Tél: +33 1 40 99 80 80 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to 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 in shared servers
Got shared hosting with servergrove.com, it looks really good. need to start the actual work though! On Mon, Feb 16, 2009 at 2:15 PM, Lupu Alexandru-Emil gang.al...@gmail.comwrote: or you should ask the guys to provide you a PDO version ... Also .. why don't you get a personalized machine ? On Sun, Feb 15, 2009 at 5:40 PM, Harinath Mallepally harinathre...@gmail.com wrote: :-(. again I need to look for another hosting service. On Sat, 2009-02-14 at 11:33 -0500, Pablo Godel wrote: There is no PDO extension loaded in your server. There should be a whole section about PDO. Pablo On Sat, Feb 14, 2009 at 11:31 AM, Harinath harinathre...@gmail.com wrote: Thanks, That is correct, i was talking about shared hosting. I understand the security issue. But I am not able to resolve class PDO not found error, while phpinfo http://sosoft.org/ocms/web/phpinfo.php shows pdo support. Thanks Harinath On Feb 14, 6:40 pm, Tom Boutell t...@punkave.com wrote: Define shared server. If you're taling about shared hosting, please read this first: http://trac.symfony-project.org/wiki/SharedHostingNotSecure Then this: http://trac.symfony-project.org/wiki/InstallingSymfonyOnSharedHostNoSsh Note that for Symfony 1.2 your host must offer PHP 5.2.4 or newer. -- Tom Boutell www.punkave.comwww.boutell.com -- Regards... Harinath http://harinath.in --~--~-~--~~~---~--~~ 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] Download file created with one view and display other view
Hi everybody: i would like to ask your help with this problem i have. I think it's more http than symfony: I have an action which does some queries into the database and at the end displays them in a nice page. Now i need to export the results in a csv format. By click a button in the results page, hopefully that will be done. The problems i have are: 1) The output report does not exists. It's generated on the fly in the action. I want the user to be able to download this 'file'. I started creating another simple view which just displays the two columns separated by a comma plus '\n'. I use setTemplate ('CVSreport') and the code to 'create' the file is there: it's just three lines of code and diplays data separated by a comma. But the problem is that it's being displayed on the screen. If i see the source code, i verify that it's ok but i need to have the browser to download this file. I wonder myself: is it compulsory that the file be previously saved (in a temp file i suppose) and then sent through headers ('Content-Disposition=attachment, filename=mytempfile') ?? If so, here comes my second question: 2) how do i do for, that after sending the 'headers' code, the application displays another view like for example AfterDownloadSuccess ? or can't i ? by now i'm creating the file in the view not in the controller. Also, after using header and sending the type as attachment and doing the readfile () and so on, it works. But it stops there. If i add a header like Location: xxx it will jump to that one without processing the download. I appreciate your help. I found some information about how to download files through symfony but here it's not about downloading (the file is generated on the fly) and none said how to display a view after the the download (something like a Redirect_after_download). Julian Llanten --~--~-~--~~~---~--~~ 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: Download file created with one view and display other view
Sorry about my double post. I had lost track of my post and thought that it hadn't been posted. :) Yes what you say works but it stays on the same original page all the time. What i want is something like what you get when you download something at say, download.com or sourceforge.net: It says, Thanks you, your download will begin shortly. It has one page for the user at the same time that downloads the file. I need this because the final page should say something like total of records found, statistics, etc, at the same time that it's downloading the file for the user. --~--~-~--~~~---~--~~ 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: Easy way to POST data
I need to POST form values as well, the point isn't to just change the page, I need to push the POSTed values to another login page because my site uses two authentication systems. On Feb 18, 12:40 am, shahin zabeti.sha...@gmail.com wrote: you can do it very easy: $this-redirect(http://www.example.com;); just use Absolute URL. On Feb 17, 12:56 am, bpfar...@gmail.com bpfar...@gmail.com wrote: I'm probably just missing something, but is there an easy way to formulate aPOSTrequest to a non-symfony script through Symfony? I'm POSTing login data to a symfony action, and I need to redirect it to another page that isn't a symfony action. Thanks, -Brendan --~--~-~--~~~---~--~~ 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: Download file created with one view and display other view
Well after spending one day looking for this, i found that i was doing it, trying to first download the file and then load another page is too difficult if not impossible. It could be done in the opposite way: first calling the page with the results, statistical info, Thank you for downloading, etc. and then calling the download: There are two ways of doing it: either with an iframe or by tricking the browser into a fake refresh with meta http-equiv='Refresh'. The first one works no problem, it's just an iframe with visibility off. But you get use the whole http protocol options like mime type, file name, etc. which means you have no problem for downloading either text or binary files. The second one NORMALLY only works for non web-readable files like exe, zip, etc. because actually what is here is a direct link to download a file. If you put the refresh url as a txt or csv file it will simply do the redirect and display the file on the screen. But if as Gareth says, it was zipped, we could put the link there. But the nice part is that the redirect could also be a symfony action so we have also all the options for a good download (filename, either text or binary files, etc.) Also i should add that by calling an action we can do many thing inside the action like checking against leechers (with the referrer), controlling bandwidth (like megaupload and many sites do). I think it could be also done with ajax. But i don't know if the ajax response would trigger the browser into downloading a file or if we would need, a placeholder for the response, in this case the downloaded file. If somebody knows another way to do it, thanks it would be good to know it. Hope this post may help some people get some answers about it. Julian. On Feb 19, 9:39 am, Julian Montreal mrx...@gmail.com wrote: Sorry about my double post. I had lost track of my post and thought that it hadn't been posted. :) Yes what you say works but it stays on the same original page all the time. What i want is something like what you get when you download something at say, download.com or sourceforge.net: It says, Thanks you, your download will begin shortly. It has one page for the user at the same time that downloads the file. I need this because the final page should say something like total of records found, statistics, etc, at the same time that it's downloading the file for the user. --~--~-~--~~~---~--~~ 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: Cache question
It was a mistake in docs. The correct way to remove template fragment is like that: remove('vacancy/myVacancies?_sf_cache_key=myvacancy'). On 18 фев, 19:28, samokhinva...@gmail.com samokhinva...@gmail.com wrote: A good use of caching this way would be to cache several versions of the same page and explicitly setting a cache key (e.g. user authenticated, user not authenticated, etc) and using it in your actions/templates. That's a brilliant idea, really. I've tried template fragment caching as you advised me and i am facing the strange problem: I just can't clear template fragment cache! I've tried a lot, but had no luck :( It's something like this: ?php if (!cache('post_list_' . $post-getId())): ? // doing somethig with this post ?php cache_save() ? ?php endif; ? And in actions I have the following code: $postId = $request-getParameter('id'); $cacheManager = $this-getContext()-getViewCacheManager(); $cacheManager-remove('@sf_cache_partial? module=blogaction=listsf_cache_key=post_list_' . $postId); $cacheManager-remove('@sf_cache_partial? module=blogaction=readsf_cache_key=post_read_' . $postId); And it just doesn't work, it doesn't clear the cache at all! It's so sad when something is supposed to work but it doesn't :( Maybe you can help me? On 18 фев, 18:47, Eno symb...@gmail.com wrote: On Wed, 18 Feb 2009, samokhinva...@gmail.com wrote: Yeah, Eno, I've thought about it, but, say, I have about 100.000 posts cached, so I have 100.000 folders with html. Wouldn't that even be slower than plain database query?.. No, I dont think so - you are still avoiding a few queries in those parts of the page that are cached. You can create as many fragments as you need for each page. A good use of caching this way would be to cache several versions of the same page and explicitly setting a cache key (e.g. user authenticated, user not authenticated, etc) and using it in your actions/templates. If you create and use a staging controller, you'll be able to look at how many queries are done and how long the page takes with the cache and then compare it with the same page rendered through your dev controller. If you get a lot of traffic, even saving a few queries per page, adds up to huge savings. Of course, every case is different, and you will have analyse each page/action and test, test, test. -- --~--~-~--~~~---~--~~ 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: Cache problem
It was a mistake in docs. The correct way to remove template fragment is like that: remove('vacancy/myVacancies?_sf_cache_key=myvacancy'). On 19 фев, 14:05, samokhinva...@gmail.com samokhinva...@gmail.com wrote: I've tried template fragment caching and i am facing the strange problem: I just can't clear template fragment cache! I've tried a lot, but had no luck :( It's something like this: ?php if (!cache('post_list_' . $post-getId())): ? // doing somethig with this post ?php cache_save() ? ?php endif; ? And in actions I have the following code: $postId = $request-getParameter('id'); $cacheManager = $this-getContext()-getViewCacheManager(); $cacheManager-remove('@sf_cache_partial? module=blogaction=listsf_cache_key=post_list_' . $postId); $cacheManager-remove('@sf_cache_partial? module=blogaction=readsf_cache_key=post_read_' . $postId); And it just doesn't work, it doesn't clear the cache at all! :( Maybe somebody encountered the same problem or can point me where i am wrong? --~--~-~--~~~---~--~~ 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: Passing embedded form from one partial to another
it's because escaping is enabled in your project (settings.yml). You can do something like $form = $form-getRawValue(); to retrieve the original object. Julien On Feb 19, 12:14 pm, Michal G g21.mic...@gmail.com wrote: Hello, I have a release form, which embeds game form. Release form is rendered by release/_form.php partial. In this partial i have something like that: include_partial(game/formBody, array(form=$form['id_game']); [...] include_partial(formBody, array(form=$form); Unfortunately tags rendered by $form[widget]-render() in game/ _formBody.php are escaped. In release/_formBody.php everything is ok. So, something happens when i pass $form['id_game'] instead of $form. But what? Is it because of double escaping - first $form is escaped and then again $form['id_game'], which is already escaped? Or something else? Type of $form variable in game/_formBody.php is sfOutputEscaperIteratorDecorator. How can i fix that? --~--~-~--~~~---~--~~ 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: Forms over multiple pages, save at the end?
Hi Justin, alternatively you really treat each form individually, and save the valid data in the session each time, only forwarding to the next form when the required data has been entered. At the last form you save all to the database. I find that these kind of process flows often need so much custom love, that using a plugin doesn't always solve things. Hope this helps, Daniel On Feb 18, 5:55 pm, Justin Davis jdavis1...@gmail.com wrote: Hey all - First post on the list, really loving the community that is supporting symfony. I'm somewhat of a newb, but definitely making some progress. I've run into a problem I can't figure out. I've got a series of forms (3 of them), that need to be filled out in series, one per page. I'd like the information from the forms saved to the database when the 3rd form is submitted, not after each one individually, so I'll need to somehow carry the data from the earlier forms through to the last submit, then save everything to the database there (into three different tables). I've looked thru the documentation and symfony forums and haven't found much help. Do you bind the form, then put it into the session, or is there another way? The more specific you can be about particular actions, etc... would be really helpful. Thanks for all your help! Justin Davis --~--~-~--~~~---~--~~ 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 to display new-line feeds in Symfony??
Hi Vikram and Andy Can't we use something like this - At the beginning: ?php use_helper('Text') ? [] ?php echo simple_format_text($list-getBody()) ? The simple_format_text() helper formats $list-getBody() as HTML, by replacing carriage returns with br /. As this helper belongs to the Text helper group, which is not loaded by default, we have loaded it manually by using the use_helper() helper. From documentation found on symfony site http://www.symfony-project.org/jobeet/1_2/Propel/en/04 Let me know if I mis-understood the problem. Thanks Zain On Feb 19, 3:28 pm, SeeVik vikramvmalhotra1...@gmail.com wrote: Oh nobut wait a moment.. What about whitespaces. How can I display the white-spaces as it is?? ESC_RAW doesn't work for them. Thanks and Regards Vikram On Feb 19, 7:24 pm, SeeVik vikramvmalhotra1...@gmail.com wrote: Hello Andy, Thanks for the solution. Neat trick that is. :) Thanks and Regards Vikram On Feb 19, 6:37 pm, Andy Dziahel' trickster...@gmail.com wrote: Hi. Well, if you'll var_dump $list variable, you'll see that it's not an instance of List (or whatever) - it's instance of sfOutputEscaperObjectDecorator. So because of that, your $list-getBody()won't return 'br/' - it'll return '*gt;*br/*lt;*'. To get unescaped value, you should call $list-getBody(ESC_RAW). On Thu, Feb 19, 2009 at 11:24, SeeVik vikramvmalhotra1...@gmail.com wrote: Hello all, I walked into a strange problem. In my database I have stored data which contains new-line feeds and I am unable to display them in view. I did something like this in my view... pre?php echo preg_replace( '/\n/', 'br', $list-getBody() ) ?/ pre What this did was to just display br as it is... I tried putting the function inside some helper or a static class as well. That didn't work either. However when I do like pre?php echo 'abcbr123' ?/pre It displays the strings on separate lines. How do we workaround this? Thanks and Regards Vikram -- With the best regards, Andy.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Would be nice to have a sfPhpBBGuard plugin.
I know, but I don't have time at the moment. This was a more of me hoping someone had one that just wasn't public. ;-) Why reinvent the wheel if you don't have too. ;-) (big fan of not writing unnecessary code. ;-) James On Feb 19, 2009, at 2:19 PM, Lee Bolding wrote: Make the plugin then :) Necessity is the mother of invention, after all. Personally, I think you'd be better off using LDAP or OpenID and using PHPBB with either of those, and creating an external authentication class for sfGuard that would authenticate against these for your sfGuard enabled applications. Realistically, these are the only 2 options for cross platform and/or cross application shared authentication. On 19 Feb 2009, at 19:01, James wrote: Like sfGuard but used the phpbb3 tables instead. Which I understood the phpbb3 structure better james --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re : [symfony-users] Re: symfony blog post not in the community last blog post ?
My mistake... I was confused with your personal blog. But i think it would be a good idea to also include the official blog in the community blog posts... (not to have to do an extra click.. ok i am a bit lazy :) ) ++ COil De : Fabien Potencier fabien.potenc...@symfony-project.com À : symfony-users@googlegroups.com Envoyé le : Jeudi, 19 Février 2009, 11h43mn 21s Objet : [symfony-users] Re: symfony blog post not in the community last blog post ? I don't understand the problem. The symfony blog RSS feed is not part of the community RSS feed. It has always been the case. Or do you mean something else? Fabien -- Fabien Potencier Sensio CEO - symfony lead developer sensiolabs.com | symfony-project.org | fabien.potencier.org Tél: +33 1 40 99 80 80 Loïc Vernet wrote: Is it normal ? ++ COil --~--~-~--~~~---~--~~ 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: Forms over multiple pages, save at the end?
Hi Gareth, How do you go about doing validation on such a form? I've tried in the past (admittedly only in 1.0) to do AJAX based forms mainly relying on the observe_field tag acting on various drop downs or checkboxes to populate hidden divs with new form fields based on what the user is selecting. The problem with this is that it always comes unstuck when the user submits the form with validation errors - While the initial form will be redisplayed with all of the Because of this I've always stuck with a multi page approach (like Richmeister) where I do a submit/validate/save to session for each separate form until the final one where I pull everything back out of session and write it to the DB along with the values from that final form. Would love to hear how you've dealt with it using AJAX! JM On Feb 20, 6:15 am, Gareth McCumskey gmccums...@gmail.com wrote: Or you could do what we did and make all three forms into one large form and just use the prototype/scriptaculous effects to move from the 1st form to the 2nd form by hiding and displaying the form widgets at specific times or hiding and displaying the divs the form widgets are in. On 2/19/09, Richtermeister nex...@gmail.com wrote: Hi Justin, alternatively you really treat each form individually, and save the valid data in the session each time, only forwarding to the next form when the required data has been entered. At the last form you save all to the database. I find that these kind of process flows often need so much custom love, that using a plugin doesn't always solve things. Hope this helps, Daniel On Feb 18, 5:55 pm, Justin Davis jdavis1...@gmail.com wrote: Hey all - First post on the list, really loving the community that is supporting symfony. I'm somewhat of a newb, but definitely making some progress. I've run into a problem I can't figure out. I've got a series of forms (3 of them), that need to be filled out in series, one per page. I'd like the information from the forms saved to the database when the 3rd form is submitted, not after each one individually, so I'll need to somehow carry the data from the earlier forms through to the last submit, then save everything to the database there (into three different tables). I've looked thru the documentation and symfony forums and haven't found much help. Do you bind the form, then put it into the session, or is there another way? The more specific you can be about particular actions, etc... would be really helpful. Thanks for all your help! Justin Davis --~--~-~--~~~---~--~~ 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: Forms over multiple pages, save at the end?
Well he is only talking about hiding/showing elements, not actually adding elements via AJAX requests. So in theory you could for example collect all the element id's with errors and then show those elements as opposed to the inital state of the form. Note i havent actually done this, it was jsut the first thing that popped into my head. John Masson wrote: Hi Gareth, How do you go about doing validation on such a form? I've tried in the past (admittedly only in 1.0) to do AJAX based forms mainly relying on the observe_field tag acting on various drop downs or checkboxes to populate hidden divs with new form fields based on what the user is selecting. The problem with this is that it always comes unstuck when the user submits the form with validation errors - While the initial form will be redisplayed with all of the Because of this I've always stuck with a multi page approach (like Richmeister) where I do a submit/validate/save to session for each separate form until the final one where I pull everything back out of session and write it to the DB along with the values from that final form. Would love to hear how you've dealt with it using AJAX! JM On Feb 20, 6:15 am, Gareth McCumskey gmccums...@gmail.com wrote: Or you could do what we did and make all three forms into one large form and just use the prototype/scriptaculous effects to move from the 1st form to the 2nd form by hiding and displaying the form widgets at specific times or hiding and displaying the divs the form widgets are in. On 2/19/09, Richtermeister nex...@gmail.com wrote: Hi Justin, alternatively you really treat each form individually, and save the valid data in the session each time, only forwarding to the next form when the required data has been entered. At the last form you save all to the database. I find that these kind of process flows often need so much custom love, that using a plugin doesn't always solve things. Hope this helps, Daniel On Feb 18, 5:55 pm, Justin Davis jdavis1...@gmail.com wrote: Hey all - First post on the list, really loving the community that is supporting symfony. I'm somewhat of a newb, but definitely making some progress. I've run into a problem I can't figure out. I've got a series of forms (3 of them), that need to be filled out in series, one per page. I'd like the information from the forms saved to the database when the 3rd form is submitted, not after each one individually, so I'll need to somehow carry the data from the earlier forms through to the last submit, then save everything to the database there (into three different tables). I've looked thru the documentation and symfony forums and haven't found much help. Do you bind the form, then put it into the session, or is there another way? The more specific you can be about particular actions, etc... would be really helpful. Thanks for all your help! Justin Davis --~--~-~--~~~---~--~~ 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: Changing an embedded form's decorator after embedding it
They should be protected. It's not like it's erroring, I should've mentioned that. It's just not working. It's using the default decorator instead which is table. So it's wrapping my embedded form with a table / while using a definition list as the inside. -- Stephen Ostrow sost...@sowebdesigns.com On Feb 19, 6:22 pm, Gandalf ganda...@gmail.com wrote: the widgets are protected or private? On 2/19/09, isleshocky77 sost...@sowebdesigns.com wrote: The following code works: [php] ?php $sf_user_user = new sfUserUserForm($this-getObject()-getUser()); $sf_user_user-widgetSchema-setFormFormatterName ('definitionListNoDecorator'); unset($sf_user_user['sf_guard_user_id']); $this-embedForm('sf_user_user', $sf_user_user); However the following code does not work: [php] ?php $sf_user_user = new sfUserUserForm($this-getObject()-getUser()); unset($sf_user_user['sf_guard_user_id']); $this-embedForm('sf_user_user', $sf_user_user); # The following two lines should be the same as the first examples's line 2 $this-getWidget('sf_user_user')-setFormFormatterName ('definitionListNoDecorator'); $this-widgetSchema['sf_user_user']-setFormFormatterName ('definitionListNoDecorator'); The reason I need the second set of code to work is so that a class extending this form class can change the decorator of an embedded form. Unless I'm doing something wrong, it looks like there is no way to do this. Thanks for any help. -- Stephen Ostrow sost...@sowebdesigns.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to 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 to display new-line feeds in Symfony??
Hello zabassi, Thanks for that tip. But that still doesn't display the white-spaces like tabs, spaces (if any) in the text. Thanks and Regards Vikram On Feb 20, 2:51 am, zabbasi zainul.abe...@gmail.com wrote: Hi Vikram and Andy Can't we use something like this - At the beginning: ?php use_helper('Text') ? [] ?php echo simple_format_text($list-getBody()) ? The simple_format_text() helper formats $list-getBody() as HTML, by replacing carriage returns with br /. As this helper belongs to the Text helper group, which is not loaded by default, we have loaded it manually by using the use_helper() helper. From documentation found on symfony sitehttp://www.symfony-project.org/jobeet/1_2/Propel/en/04 Let me know if I mis-understood the problem. Thanks Zain On Feb 19, 3:28 pm, SeeVik vikramvmalhotra1...@gmail.com wrote: Oh nobut wait a moment.. What about whitespaces. How can I display the white-spaces as it is?? ESC_RAW doesn't work for them. Thanks and Regards Vikram On Feb 19, 7:24 pm, SeeVik vikramvmalhotra1...@gmail.com wrote: Hello Andy, Thanks for the solution. Neat trick that is. :) Thanks and Regards Vikram On Feb 19, 6:37 pm, Andy Dziahel' trickster...@gmail.com wrote: Hi. Well, if you'll var_dump $list variable, you'll see that it's not an instance of List (or whatever) - it's instance of sfOutputEscaperObjectDecorator. So because of that, your $list-getBody()won't return 'br/' - it'll return '*gt;*br/*lt;*'. To get unescaped value, you should call $list-getBody(ESC_RAW). On Thu, Feb 19, 2009 at 11:24, SeeVik vikramvmalhotra1...@gmail.com wrote: Hello all, I walked into a strange problem. In my database I have stored data which contains new-line feeds and I am unable to display them in view. I did something like this in my view... pre?php echo preg_replace( '/\n/', 'br', $list-getBody() ) ?/ pre What this did was to just display br as it is... I tried putting the function inside some helper or a static class as well. That didn't work either. However when I do like pre?php echo 'abcbr123' ?/pre It displays the strings on separate lines. How do we workaround this? Thanks and Regards Vikram -- With the best regards, Andy.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How to customize sfGuard List
Hi, Anyone knows how to that off the filters panel that appears in the user list of the sfGuard plugin? Henrique Boaventura hboavent...@gmail.com http://www.hboaventura.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Need help with Apache Rewrite rule...
Actually I tried with and without [L] ...it doesn't work either way... On Feb 19, 5:53 pm, noel guilbert noelguilb...@gmail.com wrote: Hello, I think you missed the [L] flag at the end of your rule: RewriteRule ^(scripts|css|images)/(.+)\.(.+)\.(js|css|jpg|gif|png)$ [L] On Thu, Feb 19, 2009 at 1:47 PM, Sumedh sumedh.inam...@gmail.com wrote: Hi Friends, I am trying to implement versioning to my resource files as give here - http://particletree.com/notebook/automatically-version-your-css-and-j... So, I am generating css and js file references as abcd.datetime.js and want to rewrite them to abcd.js via .htaccess... I added the rule he has given as - IfModule mod_rewrite.c RewriteEngine On # uncomment the following line, if you are having trouble # getting no_script_name to work #RewriteBase / ### THIS IS WHAT I HAVE ADDED RewriteRule ^(scripts|css|images)/(.+)\.(.+)\.(js|css|jpg|gif|png)$ $1/$2.$4 # we skip all files with .something RewriteCond %{REQUEST_URI} \..+$ #condition that says - DONT SKIP A URL WITH . AND THEN / - THIS IS FOR AREAS WITH DOTS RewriteCond %{REQUEST_URI} !\..*/.*$ RewriteCond %{REQUEST_URI} !\.html$ RewriteRule .* - [L] # we check if the .html version is here (caching) RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f # no, so we redirect to our front web controller RewriteRule ^(.*)$ frontend_dev.php [QSA,L] /IfModule but this doesn't seem to be working... Can someone please help me? Where can I find a simple to understand reference to apache rewrite rules? Apache documentation is too hard to understand...and has no examples... -- Noël GUILBERThttp://www.noelguilbert.com/http://www.sensiolabs.comhttp://www.symfony-project.com Sensio Labs Tél: +33 1 40 99 80 80 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to 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 anyone help to tell me how to change session time?
thanks for your remindar Nexor --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---