Re: [symfony-users] Open an Excel file
With just plain old PHP and even some Javascript built in this is actually very difficult if not impossible to do as PHP was never designed to interact with a users PC. Javascript was however designed to run client-side but does not have direct access to a users hard drive for obvious security reasons. The only way you may get past this is to use another plugin. I am not sure which plugin would be useful, perhaps Flash, but as far as I know even Java (not Javascript) cannot do this (but I stand to be corrected on that). You may also want to look into Google Gears (which I have not yet used). The problem with these scenarios is that you will need the user to download a plugin for their browser. Essentially, the easiest way is to let them upload, the changes are made by PHP, then PHP prompts the user to re-download the changed file. Regards Gareth McCumskey - Original Message - From: bibijosh dorothee.arno...@gmail.com To: symfony users symfony-users@googlegroups.com Sent: Thursday, January 14, 2010 7:02:43 PM GMT +02:00 Harare / Pretoria Subject: [symfony-users] Open an Excel file Hi, I'm quite new to Symfony, and not really good at php in the first place. So if someone could give me a hand here. Here is what my website does for now : - Open an explorer window so the user can upload an excel file - Modify that file - Save it on my server. Here is what I would like to do : - Open an explorer window so the user can upload an excel file - Modify that file AND THEN open it in an Excel Window. (I can only manage to display it in my webpage, whichdoesn't look good at all, I heard it could be because of the mime type actions...) AND/OR - Save it on the user's computer, where it was first uploaded from, without the user having to do anything. I'll welcome any advice. I'm using php5, Symfony 1.0 and IE 6 -- 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.
Re: [symfony-users] Open an Excel file
Hi I used the I used the sfPhpExcelPlugin-1.0.2.zip from the http://www.symfony-project.org/plugins/sfPhpExcelPlugin/1_0_2 In this I used this both for creating an excel file and downloading the same using PHP. Also I used the same for uploading an excel file and then reading the contents of the excel file. Regards Deepak Bhatia On Fri, Jan 15, 2010 at 1:45 PM, Gareth McCumskey gmccums...@gmail.comwrote: With just plain old PHP and even some Javascript built in this is actually very difficult if not impossible to do as PHP was never designed to interact with a users PC. Javascript was however designed to run client-side but does not have direct access to a users hard drive for obvious security reasons. The only way you may get past this is to use another plugin. I am not sure which plugin would be useful, perhaps Flash, but as far as I know even Java (not Javascript) cannot do this (but I stand to be corrected on that). You may also want to look into Google Gears (which I have not yet used). The problem with these scenarios is that you will need the user to download a plugin for their browser. Essentially, the easiest way is to let them upload, the changes are made by PHP, then PHP prompts the user to re-download the changed file. Regards Gareth McCumskey - Original Message - From: bibijosh dorothee.arno...@gmail.com To: symfony users symfony-users@googlegroups.com Sent: Thursday, January 14, 2010 7:02:43 PM GMT +02:00 Harare / Pretoria Subject: [symfony-users] Open an Excel file Hi, I'm quite new to Symfony, and not really good at php in the first place. So if someone could give me a hand here. Here is what my website does for now : - Open an explorer window so the user can upload an excel file - Modify that file - Save it on my server. Here is what I would like to do : - Open an explorer window so the user can upload an excel file - Modify that file AND THEN open it in an Excel Window. (I can only manage to display it in my webpage, whichdoesn't look good at all, I heard it could be because of the mime type actions...) AND/OR - Save it on the user's computer, where it was first uploaded from, without the user having to do anything. I'll welcome any advice. I'm using php5, Symfony 1.0 and IE 6 -- 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. -- 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. -- 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] Open an Excel file
Hi, I think there may be at least 2 solutions : 1st) - Make for form so user can upload one or more file - Modify that file in php, this point may be though, as php excel writers have generally limited support. You can try something like this http://pear.php.net/package/Spreadsheet_Excel_Writer , or if possible use xlsx which is XML data. - Redirect the browser and force downloading the file, the user will have to accept the download and choose place where to put it. 2nd) As your clients are IE6 you can use some kind of activeX to handle xls files directly on user's computer, if you're not fluent in php but are in C#, VB or C++ this can be a better solultion. Somme dll's already exists to modify/generate excel files But the main disadvantage is that it will never work on any other browser than IE. As far as I know with activeX autorised by browser you can have access to full computer ressources, as a regular windows program. Once I saw an app that can : interact with scanner device on local computer, process picture to pdf on local computer, then upload it back to the server. The server was PHP5 (without OSS framework) and client were winXP+IE6 I Know generally PHP developers avoid solution like this because of its compatibility problem, but it still exists and being used by many intranet apps. Last but not least, if you're starting a new app, don't use symfony 1.0, you'll find more reliable ressources for symfony 1.4 now. Regards 2010/1/14 bibijosh dorothee.arno...@gmail.com Hi, I'm quite new to Symfony, and not really good at php in the first place. So if someone could give me a hand here. Here is what my website does for now : - Open an explorer window so the user can upload an excel file - Modify that file - Save it on my server. Here is what I would like to do : - Open an explorer window so the user can upload an excel file - Modify that file AND THEN open it in an Excel Window. (I can only manage to display it in my webpage, whichdoesn't look good at all, I heard it could be because of the mime type actions...) AND/OR - Save it on the user's computer, where it was first uploaded from, without the user having to do anything. I'll welcome any advice. I'm using php5, Symfony 1.0 and IE 6 -- 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. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: doctrine many to one one the same table
Yes, you are right. In this multiselect box can be all his children, and also all folders without a parent. But there can't be a folders which have another parent folder. On 12 led, 19:33, smellycat37 charley.mail...@gmail.com wrote: if a folder has a parent with the reference on folder_id, he has children with the same reference... so it's a relation 1:n... so it could be possible to have in a form : 1- the parent (the folder who have as id the folder_id of the current item) in a select box 2- the children (all folders who have as folder_id , the id of the current folder) in a mutli select box On 12 jan, 19:22, Tom Ptacnik to...@tomor.cz wrote: I think that if you want a multiselect box for the children you will need a many to many relationship... think about how to store the informations from this multiselect box... Or if you don't want a M:N relationship then you have to not show (in this multiselect box) a folders which already has a parent ... because you can't store it's folder_id if it already has a parent... I hope you will understand my ideas :) On 12 led, 01:16, smellycat37 charley.mail...@gmail.com wrote: Hello, I have this schema structure Folder: columns: id: { type: integer, primary: true } name: { type: string(50), notnull: true } folder_id: { type: integer, notnull: true } relations: Parent: {onDelete: CASCADE, local: folder_id, foreign: id, foreignAlias: children} the symfony doctrine:build-form commande build the BaseFolderForm.class.php with two widgets : 1 - the id widget 2 - folder_id a sfWidgetFormDoctrineChoice (select box) containing the parent But i need a third one: 3 - folders_list a sfWidgetFormDoctrineChoice (multi select box) containing all the children is it possible? If you have any idea, thanks for your response, -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Using same database for two projects
Hi, If we want to use the same database for the two projects in Symfony 1.1, how can we achieve that. I guess we just need to execute step1 and step 2 below. = 1. php symfony propel:build-model 2. php symfony cc 3. php symfony configure:database mysql://root:@localhost/rtdb2 4. php symfony propel:build-sql 5. mysqladmin -u root -p create rtdb2 6. mysql -u root -p rtdb2 data/sql/lib.model.schema.sql 7. php symfony propel:insert-sql 8. php symfony propel:build-schema 9. php symfony propel:build-schema --xml -- 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] Base GeneratorConfiguration not found
When I go to my application, it says only this: Fatal error: Class 'BasePageGeneratorConfiguration' not found in /srv/ www/vhosts/startersspecialist.nl/httpdocs/apps/controlpanel/modules/ page/lib/pageGeneratorConfiguration.class.php on line 11 I think it has something to do with the admin generator, but what? I cannot recall the class and don't know where I should find it. -- 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: FormFilter - sfWidgetFormChoice 'multiple' = true ... error
Nobody filter a list by checkboxes or by a multiple selectbox? On 11 led, 20:51, Tom Ptacnik to...@tomor.cz wrote: Hello, I have classic admin generated backend (Symfony 1.4). Today I've tried to customize the filter for the list view. The problem is that I want to filter by multiple select. So I've changed default widgets in configure method in my TicketFormFilter class from: 'tkstate' = new sfWidgetFormChoice(array('choices' = array('' = '', 'new' = 'new', 'waitingforuser' = 'waitingforuser', 'waitingforadmin' = 'waitingforadmin', 'closed' = 'closed', 'deleted' = 'deleted'))), 'tkstate' = new sfValidatorChoice(array('required' = false, 'choices' = array('new' = 'new', 'waitingforuser' = 'waitingforuser', 'waitingforadmin' = 'waitingforadmin', 'closed' = 'closed', 'deleted' = 'deleted'))), to $this-widgetSchema['tkstate'] = new sfWidgetFormChoice(array ('choices' = array('' = '', 'new' = 'new', 'waitingforuser' = 'waitingforuser', 'waitingforadmin' = 'waitingforadmin', 'closed' = 'closed', 'deleted' = 'deleted'), 'multiple' = true)); $this-validatorSchema['tkstate'] = new sfValidatorChoice(array ('required' = false, 'choices' = array('new' = 'new', 'waitingforuser' = 'waitingforuser', 'waitingforadmin' = 'waitingforadmin', 'closed' = 'closed', 'deleted' = 'deleted'), 'multiple' = true)); ... only added the multiple parameter. But when i click on the filter submit (with two selected items: new, waitingforuser), I got this error: stack trace at () in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib \vendor\doctrine\Doctrine\Connection.php line 1082 ... $message .= sprintf('. Failing Query: %s', $query); } $exc = new $name($message, (int) $e-getCode()); if ( ! isset($e-errorInfo) || ! is_array($e-errorInfo)) { $e-errorInfo = array(null, null, null, null); } at Doctrine_Connection-rethrowException(object('PDOException'), object ('Doctrine_Connection_Statement')) in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib \vendor\doctrine\Doctrine\Connection\Statement.php line 269 ... at Doctrine_Connection_Statement-execute(array('new', 'waitingforuser')) in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib \vendor\doctrine\Doctrine\Connection.php line 1006 ... at Doctrine_Connection-execute('SELECT COUNT(*) AS num_results FROM ticket t WHERE t.tkstate = ?', array('new', 'waitingforuser')) in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib \vendor\doctrine\Doctrine\Connection.php line 800 ... at Doctrine_Connection-fetchAll('SELECT COUNT(*) AS num_results FROM ticket t WHERE t.tkstate = ?', array('new', 'waitingforuser')) in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib \vendor\doctrine\Doctrine\Query.php line 2108 ... The problem seems to be in the generated query ... the should be OR statement (for this multiple choice), but it looks that it's generated classic simple WHERE, and as parameter is send whole array... and doctrine is confused of course Maybe the problem is only in my application. Did anybody of you ever tried to filter by multiple select? -- 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: Having trouble modifying filters.
you can access to a user object via sfContext::getInstance()-getUser () if you user standard user object and credentials system... On 15 led, 00:41, Darren884 darren...@gmail.com wrote: Yes but how do I call the sfFormFilter object? I had tried $this- configuration-getFilterForm but it runs the class again. On Jan 14, 2:56 pm, Daniel Lohse annismcken...@googlemail.com wrote: sfFormFilter does have setOptions as it's only a subclass of BaseForm. Daniel On Jan 14, 2010, at 11:08 PM, Darren884 wrote: Actually that did not work. This is a flaw in Symfony itself, there is no way to pass values to the configre() method in the filters class. This needs to be fixed. On Jan 14, 12:11 pm, Darren884 darren...@gmail.com wrote: Hi guys, I had to actually add an argument to the original ConfigurationModelGenerator file and mimick the getForm() function to pass options. I have no idea why this wasn't implemented in the first place but who knows. On Jan 13, 3:04 pm, Darren884 darren...@gmail.com wrote: In my form I use the setOptions to pass my user object so I can check the credentials in the form class if I want to display or hide fields, however in the FilterForm class there is no setOptions and class variables do not seem to be shared among functions. How am I to get the user object into my FormFilter class from the action in order to check credentials against it and hide or display fields? Is there a different method in Symfony other than the __construct to get variables? Thanks, Darren -- 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] Re: Have it so if a user doesnt fill in a field it stays as it was?
Left it unfilled, and then when saving the profile don't change the password if the password field is blank.. Also you have to optimize a validation process for this behaviour. On 14 led, 18:08, Darren884 darren...@gmail.com wrote: HI basically I want to make it so as if a user is filling out their account options if they don't change their password it stays as it is. This is very common with profile sites and such. On Jan 14, 6:17 am, Alexandru-Emil Lupu gang.al...@gmail.com wrote: what do you mean? if a user does not complete a field, and validation stop the process to have the password field filled in with previous entry? i yes, then i am not sure you can. also ... is not a good practice AFAIK. Alecs On Thu, Jan 14, 2010 at 1:44 AM, Darren884 darren...@gmail.com wrote: I have a password field and I want it so if the user doesn't fill it in it stays the same value. How do I accomplish this? I also have a password confirmation 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.comsymfony-users%2bunsubscr...@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.
Re: [symfony-users] widget multiple option
On 01/14/2010 11:20 PM, Gabo wrote: Help!! I have this in schema: documents_users: columns: document_id: { type: integer } user_id: { type: integer } created_at: { type: timestamp } y en the form, i change the widget user_id for this: 'user_id' = new sfWidgetFormDoctrineChoice(array('model' = 'sfGuardUser', 'add_empty' = true, *'multiple'= true*)), In the form the widget is multiple option... but i want to save the form, print error: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens i net to save more inserts becouse i selected 2 users_id in the form...but symfony dont save?? -- 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. Hi, could you send the part that appears below the error message? Javi -- 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: how can I check the name of module and action in layout ?
I believe $sf_request-getParameter('action') and $sf_request- getParameter('module') should also work. On 14 Jan., 21:38, dziobacz aaabbbcccda...@gmail.com wrote: thx people !! :) On 14 Sty, 20:57, tirengarfio tirengar...@gmail.com wrote: Well put $ before both.. On Jan 14, 8:55 pm, Javier Garcia tirengar...@gmail.com wrote: On 01/14/2010 08:51 PM, dziobacz wrote: How can I check on the layout current module and action which use this layout ? Hi dziobac: sf_context-getModuleName() and sf_context- getActionName() Javi -- 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] sfForm clean bind
Hello, How to delete values after bind() ? I want to clean my form. Thank, -- 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: Deployed project does not load any javascript file
Do you call include_javascripts() in your layout? Did you clear your cache after the deployment? On Fri, Jan 15, 2010 at 08:47, domnuprofesor domnuprofe...@gmail.com wrote: yes, of course I cheked the html code... No script tag is generated. Firebug reports no JS files loaded nor any js request that could have failed. So, no requests for js files are performed whatsoever. Any ideas? On Jan 15, 9:29 am, Alvaro Videla harryjek...@gmail.com wrote: have you tried checking the HTML code of your page and see if there are some script tags including the Javascript? On Jan 15, 2010, at 3:24 PM, domnuprofesor wrote: Hi there! I just finished a project and I deployed on a server using symfony built in deploy tool. Everything is ok with the exception that NO JAVASCRIPT FILE IS LOADED. The js files are on the server in /web/js. I don't get a failed request to the files, it just does not request the files. On localhost both prod and dev environments are working as expected. On the server dev environment is working as well, only the prod environment has this issue with not loading js files. Can you help me with this one? Thank you! -- 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. -- 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] Why doesn't the mydomain.com - www.mydomain rewrite rule work in this .htaccess file?
Dear all, Hi, I would like to allow users getting redirected to www.mydomain.com if they enter mydomain.com in the browser. I added rewrite rule in the ..htaccess that comes with symfony 1.2 but the rewrite rule does not seem to work. When users enter mydomain.com, their browser continues to use mydomain.com, being unaware of the rewrite rule that I added. The .htaccess file is shown below: Options +FollowSymLinks +ExecCGI IfModule mod_rewrite.c RewriteEngine On # this is the rewrite rule that I added # it should redirect to www.mydomain.com if http_post variable does not start with www # but I have no idea why it does not work RewriteCond %{HTTP_HOST} !^www\.mydomain\.com [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/(.*) http://www.mydomain.com/$1 [L,R=301] # uncomment the following line, if you are having trouble # getting no_script_name to work #RewriteBase / # we skip all files with .something #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 ^(.*)$ index.php [QSA,L] /IfModule I suspected that mod_rewrite is either not installed on the server (it's a shared hosting server), or it prevents people from doing any override. After a second thought, I changed my mind because all routing rules such as /user/new, /product/show defined in routing.yml work perfectly. And for these routing rules to work, the following rewrite rule defined in .htaccess must have got executed: RewriteRule ^(.*)$ index.php [QSA,L] This means that this might be the problem of my rewrite rule. Any ideas? Many thanks to you all. -- 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] Why doesn't the mydomain.com - www.mydomain rewrite rule work in this .htaccess file?
The second line after the RewriteCond is wrong. It should be more like: RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC] RewriteRule ^(.*) http://www.mydomain.com$1 [QSA,L,R=301] Bascht On 15.01.10 14:16, YTH wrote: Dear all, Hi, I would like to allow users getting redirected to www.mydomain.com if they enter mydomain.com in the browser. I added rewrite rule in the ..htaccess that comes with symfony 1.2 but the rewrite rule does not seem to work. When users enter mydomain.com, their browser continues to use mydomain.com, being unaware of the rewrite rule that I added. The .htaccess file is shown below: Options +FollowSymLinks +ExecCGI IfModule mod_rewrite.c RewriteEngine On # this is the rewrite rule that I added # it should redirect to www.mydomain.com if http_post variable does not start with www # but I have no idea why it does not work RewriteCond %{HTTP_HOST} !^www\.mydomain\.com [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/(.*) http://www.mydomain.com/$1 [L,R=301] # uncomment the following line, if you are having trouble # getting no_script_name to work #RewriteBase / # we skip all files with .something #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 ^(.*)$ index.php [QSA,L] /IfModule I suspected that mod_rewrite is either not installed on the server (it's a shared hosting server), or it prevents people from doing any override. After a second thought, I changed my mind because all routing rules such as /user/new, /product/show defined in routing.yml work perfectly. And for these routing rules to work, the following rewrite rule defined in .htaccess must have got executed: RewriteRule ^(.*)$ index.php [QSA,L] This means that this might be the problem of my rewrite rule. Any ideas? Many thanks to you all. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: doctrine many to one one the same table
I was thinking about it and I'm not right... You can, of course, display all folders in multiselectbox (child folders, free folders and folders with different parent folder) but, when you select a folder which has another parent, and set it as a child folder for actual folder, it will be child only for actual folder (the original parent folder will be gone) Hope you understand :) On 15 led, 10:25, Tom Ptacnik to...@tomor.cz wrote: Yes, you are right. In this multiselect box can be all his children, and also all folders without a parent. But there can't be a folders which have another parent folder. On 12 led, 19:33, smellycat37 charley.mail...@gmail.com wrote: if a folder has a parent with the reference on folder_id, he has children with the same reference... so it's a relation 1:n... so it could be possible to have in a form : 1- the parent (the folder who have as id the folder_id of the current item) in a select box 2- the children (all folders who have as folder_id , the id of the current folder) in a mutli select box On 12 jan, 19:22, Tom Ptacnik to...@tomor.cz wrote: I think that if you want a multiselect box for the children you will need a many to many relationship... think about how to store the informations from this multiselect box... Or if you don't want a M:N relationship then you have to not show (in this multiselect box) a folders which already has a parent ... because you can't store it's folder_id if it already has a parent... I hope you will understand my ideas :) On 12 led, 01:16, smellycat37 charley.mail...@gmail.com wrote: Hello, I have this schema structure Folder: columns: id: { type: integer, primary: true } name: { type: string(50), notnull: true } folder_id: { type: integer, notnull: true } relations: Parent: {onDelete: CASCADE, local: folder_id, foreign: id, foreignAlias: children} the symfony doctrine:build-form commande build the BaseFolderForm.class.php with two widgets : 1 - the id widget 2 - folder_id a sfWidgetFormDoctrineChoice (select box) containing the parent But i need a third one: 3 - folders_list a sfWidgetFormDoctrineChoice (multi select box) containing all the children is it possible? If you have any idea, thanks for your response, -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: Using same database for two projects
Two different projects with different tables/models? Or some tables will be shared? Or all tables will be shared? On 15 led, 10:31, DEEPAK BHATIA toreachdee...@gmail.com wrote: Hi, If we want to use the same database for the two projects in Symfony 1.1, how can we achieve that. I guess we just need to execute step1 and step 2 below. = 1. php symfony propel:build-model 2. php symfony cc 3. php symfony configure:database mysql://root:@localhost/rtdb2 4. php symfony propel:build-sql 5. mysqladmin -u root -p create rtdb2 6. mysql -u root -p rtdb2 data/sql/lib.model.schema.sql 7. php symfony propel:insert-sql 8. php symfony propel:build-schema 9. php symfony propel:build-schema --xml -- 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: sfForm clean bind
What's your purpose of clearing the form of its values? On Jan 15, 7:23 pm, DoRiaN doria...@gmail.com wrote: Hello, How to delete values after bind() ? I want to clean my form. Thank, -- 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: sfForm clean bind
When the form isValid(), i display again the same form empty to add a new element. I do new Form because i don't know how to clean values. On 15 jan, 14:27, ken marfillas...@gmail.com wrote: What's your purpose of clearing the form of its values? On Jan 15, 7:23 pm, DoRiaN doria...@gmail.com wrote: Hello, How to delete values after bind() ? I want to clean my form. Thank, -- 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] Why doesn't the mydomain.com - www.mydomain rewrite rule work in this .htaccess file?
Dear Bascht, Great! It works now. By the way, the rewrite rule that I used (which does not work) is from this page, under the URL Layout section and after the Canonical Hostnames heading: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html I just don't quite understand what's the problem with the rule, making it failed to work. - Original Message - From: Sebastian Schulze maili...@bascht.com To: symfony-users@googlegroups.com Sent: Friday, January 15, 2010 9:21 PM Subject: Re: [symfony-users] Why doesn't the mydomain.com - www.mydomain rewrite rule work in this .htaccess file? The second line after the RewriteCond is wrong. It should be more like: RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC] RewriteRule ^(.*) http://www.mydomain.com$1 [QSA,L,R=301] Bascht On 15.01.10 14:16, YTH wrote: Dear all, Hi, I would like to allow users getting redirected to www.mydomain.com if they enter mydomain.com in the browser. I added rewrite rule in the ..htaccess that comes with symfony 1.2 but the rewrite rule does not seem to work. When users enter mydomain.com, their browser continues to use mydomain.com, being unaware of the rewrite rule that I added. The .htaccess file is shown below: Options +FollowSymLinks +ExecCGI IfModule mod_rewrite.c RewriteEngine On # this is the rewrite rule that I added # it should redirect to www.mydomain.com if http_post variable does not start with www # but I have no idea why it does not work RewriteCond %{HTTP_HOST} !^www\.mydomain\.com [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/(.*) http://www.mydomain.com/$1 [L,R=301] # uncomment the following line, if you are having trouble # getting no_script_name to work #RewriteBase / # we skip all files with .something #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 ^(.*)$ index.php [QSA,L] /IfModule I suspected that mod_rewrite is either not installed on the server (it's a shared hosting server), or it prevents people from doing any override. After a second thought, I changed my mind because all routing rules such as /user/new, /product/show defined in routing.yml work perfectly. And for these routing rules to work, the following rewrite rule defined in .htaccess must have got executed: RewriteRule ^(.*)$ index.php [QSA,L] This means that this might be the problem of my rewrite rule. Any ideas? Many thanks to you all. __ NOD32 4759 (20100110) Information __ This message was checked by NOD32 antivirus system. http://www.eset.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. __ NOD32 4759 (20100110) Information __ This message was checked by NOD32 antivirus system. http://www.eset.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] Re: Have it so if a user doesnt fill in a field it stays as it was?
You mean the form fills the field with the password as default value? I don't think that is ever a good idea. If you want a change password form, here is the class that I'm using. http://gist.github.com/278064 On Jan 15, 6:38 pm, Tom Ptacnik to...@tomor.cz wrote: Left it unfilled, and then when saving the profile don't change the password if the password field is blank.. Also you have to optimize a validation process for this behaviour. On 14 led, 18:08, Darren884 darren...@gmail.com wrote: HI basically I want to make it so as if a user is filling out their account options if they don't change their password it stays as it is. This is very common with profile sites and such. On Jan 14, 6:17 am, Alexandru-Emil Lupu gang.al...@gmail.com wrote: what do you mean? if a user does not complete a field, and validation stop the process to have the password field filled in with previous entry? i yes, then i am not sure you can. also ... is not a good practice AFAIK. Alecs On Thu, Jan 14, 2010 at 1:44 AM, Darren884 darren...@gmail.com wrote: I have a password field and I want it so if the user doesn't fill it in it stays the same value. How do I accomplish this? I also have a password confirmation 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.comsymfony-users%2bunsubscr...@goog legroups.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] Re: sfForm clean bind
If you want to clear the form after it's proccessed, you can simply do redirect to the same form (in the action) On 15 led, 12:23, DoRiaN doria...@gmail.com wrote: Hello, How to delete values after bind() ? I want to clean my form. Thank, -- 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: Using same database for two projects
Thanks for all the scenarios. If possible, please send me the solution for some tables as well as all tables. Regards Deepak Bhatia On Fri, Jan 15, 2010 at 6:54 PM, Tom Ptacnik to...@tomor.cz wrote: Two different projects with different tables/models? Or some tables will be shared? Or all tables will be shared? On 15 led, 10:31, DEEPAK BHATIA toreachdee...@gmail.com wrote: Hi, If we want to use the same database for the two projects in Symfony 1.1, how can we achieve that. I guess we just need to execute step1 and step 2 below. = 1. php symfony propel:build-model 2. php symfony cc 3. php symfony configure:database mysql://root:@localhost/rtdb2 4. php symfony propel:build-sql 5. mysqladmin -u root -p create rtdb2 6. mysql -u root -p rtdb2 data/sql/lib.model.schema.sql 7. php symfony propel:insert-sql 8. php symfony propel:build-schema 9. php symfony propel:build-schema --xml -- 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. -- 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: Having trouble modifying filters.
If you are using the admin generator, override apps/myapp/modules/ mymodule/lib/mymoduleGeneratorConfiguration.php public function getFilterOptions() { return array('sf_user' = sfContext::getInstance()-getUser()); } On Jan 15, 6:35 pm, Tom Ptacnik to...@tomor.cz wrote: you can access to a user object via sfContext::getInstance()-getUser () if you user standard user object and credentials system... On 15 led, 00:41, Darren884 darren...@gmail.com wrote: Yes but how do I call the sfFormFilter object? I had tried $this- configuration-getFilterForm but it runs the class again. On Jan 14, 2:56 pm, Daniel Lohse annismcken...@googlemail.com wrote: sfFormFilter does have setOptions as it's only a subclass of BaseForm. Daniel On Jan 14, 2010, at 11:08 PM, Darren884 wrote: Actually that did not work. This is a flaw in Symfony itself, there is no way to pass values to the configre() method in the filters class. This needs to be fixed. On Jan 14, 12:11 pm, Darren884 darren...@gmail.com wrote: Hi guys, I had to actually add an argument to the original ConfigurationModelGenerator file and mimick the getForm() function to pass options. I have no idea why this wasn't implemented in the first place but who knows. On Jan 13, 3:04 pm, Darren884 darren...@gmail.com wrote: In my form I use the setOptions to pass my user object so I can check the credentials in the form class if I want to display or hide fields, however in the FilterForm class there is no setOptions and class variables do not seem to be shared among functions. How am I to get the user object into my FormFilter class from the action in order to check credentials against it and hide or display fields? Is there a different method in Symfony other than the __construct to get variables? Thanks, Darren -- 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] Re: Base GeneratorConfiguration not found
It should be located(generated) in /cache/controlpanel/modules/page/lib/ On 15 led, 10:46, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: When I go to my application, it says only this: Fatal error: Class 'BasePageGeneratorConfiguration' not found in /srv/ www/vhosts/startersspecialist.nl/httpdocs/apps/controlpanel/modules/ page/lib/pageGeneratorConfiguration.class.php on line 11 I think it has something to do with the admin generator, but what? I cannot recall the class and don't know where I should find it. -- 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: FormFilter - sfWidgetFormChoice 'multiple' = true ... error
You need to add a custom query method in your filter class. public function addTkskateColumnQuery($query, $field, $value) { if (!empty($value)) { $query-addWhereIn('p. tkstate', $value); } } On Jan 15, 5:50 pm, Tom Ptacnik to...@tomor.cz wrote: Nobody filter a list by checkboxes or by a multiple selectbox? On 11 led, 20:51, Tom Ptacnik to...@tomor.cz wrote: Hello, I have classic admin generated backend (Symfony 1.4). Today I've tried to customize the filter for the list view. The problem is that I want to filter by multiple select. So I've changed default widgets in configure method in my TicketFormFilter class from: 'tkstate' = new sfWidgetFormChoice(array('choices' = array('' = '', 'new' = 'new', 'waitingforuser' = 'waitingforuser', 'waitingforadmin' = 'waitingforadmin', 'closed' = 'closed', 'deleted' = 'deleted'))), 'tkstate' = new sfValidatorChoice(array('required' = false, 'choices' = array('new' = 'new', 'waitingforuser' = 'waitingforuser', 'waitingforadmin' = 'waitingforadmin', 'closed' = 'closed', 'deleted' = 'deleted'))), to $this-widgetSchema['tkstate'] = new sfWidgetFormChoice(array ('choices' = array('' = '', 'new' = 'new', 'waitingforuser' = 'waitingforuser', 'waitingforadmin' = 'waitingforadmin', 'closed' = 'closed', 'deleted' = 'deleted'), 'multiple' = true)); $this-validatorSchema['tkstate'] = new sfValidatorChoice(array ('required' = false, 'choices' = array('new' = 'new', 'waitingforuser' = 'waitingforuser', 'waitingforadmin' = 'waitingforadmin', 'closed' = 'closed', 'deleted' = 'deleted'), 'multiple' = true)); ... only added the multiple parameter. But when i click on the filter submit (with two selected items: new, waitingforuser), I got this error: stack trace at () in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib \vendor\doctrine\Doctrine\Connection.php line 1082 ... $message .= sprintf('. Failing Query: %s', $query); } $exc = new $name($message, (int) $e-getCode()); if ( ! isset($e-errorInfo) || ! is_array($e-errorInfo)) { $e-errorInfo = array(null, null, null, null); } at Doctrine_Connection-rethrowException(object('PDOException'), object ('Doctrine_Connection_Statement')) in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib \vendor\doctrine\Doctrine\Connection\Statement.php line 269 ... at Doctrine_Connection_Statement-execute(array('new', 'waitingforuser')) in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib \vendor\doctrine\Doctrine\Connection.php line 1006 ... at Doctrine_Connection-execute('SELECT COUNT(*) AS num_results FROM ticket t WHERE t.tkstate = ?', array('new', 'waitingforuser')) in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib \vendor\doctrine\Doctrine\Connection.php line 800 ... at Doctrine_Connection-fetchAll('SELECT COUNT(*) AS num_results FROM ticket t WHERE t.tkstate = ?', array('new', 'waitingforuser')) in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib \vendor\doctrine\Doctrine\Query.php line 2108 ... The problem seems to be in the generated query ... the should be OR statement (for this multiple choice), but it looks that it's generated classic simple WHERE, and as parameter is send whole array... and doctrine is confused of course Maybe the problem is only in my application. Did anybody of you ever tried to filter by multiple select? -- 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: widget multiple option
Have you defined the relation of documents_users to users in your schema.yml? Are you trying to achieve the behavior of sfGuardUser to sfGuardPermission via sfGuardUserPermission? On Jan 15, 7:01 pm, Javier Garcia tirengar...@gmail.com wrote: On 01/14/2010 11:20 PM, Gabo wrote: Help!! I have this in schema: documents_users: columns: document_id: { type: integer } user_id: { type: integer } created_at: { type: timestamp } y en the form, i change the widget user_id for this: 'user_id' = new sfWidgetFormDoctrineChoice(array('model' = 'sfGuardUser', 'add_empty' = true, *'multiple'= true*)), In the form the widget is multiple option... but i want to save the form, print error: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens i net to save more inserts becouse i selected 2 users_id in the form...but symfony dont save?? -- 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. Hi, could you send the part that appears below the error message? Javi -- 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: Base GeneratorConfiguration not found
Are you trying to override a module in a plugin? On Jan 15, 9:47 pm, Tom Ptacnik to...@tomor.cz wrote: It should be located(generated) in /cache/controlpanel/modules/page/lib/ On 15 led, 10:46, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: When I go to my application, it says only this: Fatal error: Class 'BasePageGeneratorConfiguration' not found in /srv/ www/vhosts/startersspecialist.nl/httpdocs/apps/controlpanel/modules/ page/lib/pageGeneratorConfiguration.class.php on line 11 I think it has something to do with the admin generator, but what? I cannot recall the class and don't know where I should find it. -- 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 migration fails
hi all, i've tried to use the doctrine:migrate task, but i'm getting the following error: php symfony doctrine:migrate doctrine Migrating from version 0 to 1 The following errors occurred: - SQLSTATE[23000]: Integrity constraint violation: 1217 Cannot delete or update a parent row: a foreign key constraint fails. Failing Query: DROP TABLE taggable_tag The project uses the doctrine taggable extension (http://www.doctrine- project.org/extension/Taggable/1_2-1_0). Anyone got migrations working together with this extension? I'm using symfony version 1.4 (svn) thanks! -robert -- 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: Deployed project does not load any javascript file
I don't call any include_javascripts(). I rely on the view.yml of each module I have defined. I tried clearing the cache but no success. Any ideas? On Fri, Jan 15, 2010 at 3:03 PM, Gábor Fási maerl...@gmail.com wrote: Do you call include_javascripts() in your layout? Did you clear your cache after the deployment? On Fri, Jan 15, 2010 at 08:47, domnuprofesor domnuprofe...@gmail.com wrote: yes, of course I cheked the html code... No script tag is generated. Firebug reports no JS files loaded nor any js request that could have failed. So, no requests for js files are performed whatsoever. Any ideas? On Jan 15, 9:29 am, Alvaro Videla harryjek...@gmail.com wrote: have you tried checking the HTML code of your page and see if there are some script tags including the Javascript? On Jan 15, 2010, at 3:24 PM, domnuprofesor wrote: Hi there! I just finished a project and I deployed on a server using symfony built in deploy tool. Everything is ok with the exception that NO JAVASCRIPT FILE IS LOADED. The js files are on the server in /web/js. I don't get a failed request to the files, it just does not request the files. On localhost both prod and dev environments are working as expected. On the server dev environment is working as well, only the prod environment has this issue with not loading js files. Can you help me with this one? Thank you! -- 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 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.comsymfony-users%2bunsubscr...@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.comsymfony-users%2bunsubscr...@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] Re: sfWidgetFormPropelChoice appears as ul class=checkbox_list
But in the documentation, it seems that it's supposed to be in a line by default. On Jan 15, 2:06 am, Alexandru-Emil Lupu gang.al...@gmail.com wrote: Maybe by adding some css? Alecs sent via htc magic On Jan 15, 2010 6:40 AM, Doraemon theoneandonlydorae...@gmail.com wrote: In the documentation:http://www.symfony-project.org/cookbook/1_2/en/make-a-choice It shows the checkbox in a line, however, when I try it, it appears in an unordered list. My code: $this-widgetSchema['category'] = new sfWidgetFormPropelChoice(array( 'model' = 'ItemCategoryList', 'key_method' = 'getPrimaryKey', 'order_by' = array('Name','asc'), 'expanded' = true, 'multiple' = true, )); I simply use ? echo $form; ? in my view to display my form. But this is what appears in the browser. HTML: ul class=checkbox_listliinput name=addItemForm[category][] type=checkbox value=1 id=addItemForm_category_1 /nbsp;label for=addItemForm_category_1Books/label/li .../ul I want it to appear in a line just like the documentation, how do I do this? -- 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 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.
Re: [symfony-users] Re: Deployed project does not load any javascript file
In view.yml you specify which js files should be included when you call include_javascripts() in your layout. Put the call right before your /body tag and it should work. sfCommonFilter did this for you, but it has been deprecated in 1.3/1.4. See http://www.symfony-project.org/tutorial/1_4/en/upgrade#chapter_161aacbf11b8cc24bbdc6951ba0fb57d_sub_removal_of_the_common_filter On Fri, Jan 15, 2010 at 15:35, Francisc Nopcea domnuprofe...@gmail.com wrote: I don't call any include_javascripts(). I rely on the view.yml of each module I have defined. I tried clearing the cache but no success. Any ideas? On Fri, Jan 15, 2010 at 3:03 PM, Gábor Fási maerl...@gmail.com wrote: Do you call include_javascripts() in your layout? Did you clear your cache after the deployment? On Fri, Jan 15, 2010 at 08:47, domnuprofesor domnuprofe...@gmail.com wrote: yes, of course I cheked the html code... No script tag is generated. Firebug reports no JS files loaded nor any js request that could have failed. So, no requests for js files are performed whatsoever. Any ideas? On Jan 15, 9:29 am, Alvaro Videla harryjek...@gmail.com wrote: have you tried checking the HTML code of your page and see if there are some script tags including the Javascript? On Jan 15, 2010, at 3:24 PM, domnuprofesor wrote: Hi there! I just finished a project and I deployed on a server using symfony built in deploy tool. Everything is ok with the exception that NO JAVASCRIPT FILE IS LOADED. The js files are on the server in /web/js. I don't get a failed request to the files, it just does not request the files. On localhost both prod and dev environments are working as expected. On the server dev environment is working as well, only the prod environment has this issue with not loading js files. Can you help me with this one? Thank you! -- 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. -- 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. -- 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] widget multiple option
Yes, I create the relation with the tables.. but the widget is multiple = true print this error, but is false no print error: THE ERROR: *Notice*: Undefined offset: 2 in * C:\development\sfprojects\bambu\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib\vendor\doctrine\Doctrine\Connection\Pgsql\Exception.php * on line *101* * * *SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens* 2010/1/15 Javier Garcia tirengar...@gmail.com On 01/14/2010 11:20 PM, Gabo wrote: Help!! I have this in schema: documents_users: columns: document_id: { type: integer } user_id: { type: integer } created_at: { type: timestamp } y en the form, i change the widget user_id for this: 'user_id' = new sfWidgetFormDoctrineChoice(array('model' = 'sfGuardUser', 'add_empty' = true, *'multiple'= true*)), In the form the widget is multiple option... but i want to save the form, print error: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens i net to save more inserts becouse i selected 2 users_id in the form...but symfony dont save?? -- 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. Hi, could you send the part that appears below the error message? Javi -- 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. -- 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: Deployed project does not load any javascript file
Gábor, thank you for the hint. I don't use symfony 1.3, I use symfony 1.2.9 so the problem should not be there. On Fri, Jan 15, 2010 at 5:08 PM, Gábor Fási maerl...@gmail.com wrote: In view.yml you specify which js files should be included when you call include_javascripts() in your layout. Put the call right before your /body tag and it should work. sfCommonFilter did this for you, but it has been deprecated in 1.3/1.4. See http://www.symfony-project.org/tutorial/1_4/en/upgrade#chapter_161aacbf11b8cc24bbdc6951ba0fb57d_sub_removal_of_the_common_filter On Fri, Jan 15, 2010 at 15:35, Francisc Nopcea domnuprofe...@gmail.com wrote: I don't call any include_javascripts(). I rely on the view.yml of each module I have defined. I tried clearing the cache but no success. Any ideas? On Fri, Jan 15, 2010 at 3:03 PM, Gábor Fási maerl...@gmail.com wrote: Do you call include_javascripts() in your layout? Did you clear your cache after the deployment? On Fri, Jan 15, 2010 at 08:47, domnuprofesor domnuprofe...@gmail.com wrote: yes, of course I cheked the html code... No script tag is generated. Firebug reports no JS files loaded nor any js request that could have failed. So, no requests for js files are performed whatsoever. Any ideas? On Jan 15, 9:29 am, Alvaro Videla harryjek...@gmail.com wrote: have you tried checking the HTML code of your page and see if there are some script tags including the Javascript? On Jan 15, 2010, at 3:24 PM, domnuprofesor wrote: Hi there! I just finished a project and I deployed on a server using symfony built in deploy tool. Everything is ok with the exception that NO JAVASCRIPT FILE IS LOADED. The js files are on the server in /web/js. I don't get a failed request to the files, it just does not request the files. On localhost both prod and dev environments are working as expected. On the server dev environment is working as well, only the prod environment has this issue with not loading js files. Can you help me with this one? Thank you! -- 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 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.comsymfony-users%2bunsubscr...@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.comsymfony-users%2bunsubscr...@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.comsymfony-users%2bunsubscr...@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.comsymfony-users%2bunsubscr...@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] Get raw/unprocessed route in a Template
I am trying to better integrate a Javascript Datagrid that I'm using with the symfony routing system. I want to pass the unprocessed route for to view a particular entity type to the javascript class. For example, I have the following route: email_show /email/:id.sf_format When displaying a datagrid on the client that was built with Javascript, I can't simply use url_for('email_show'), because I need to generate the URL *after* PHP has finished processing (on the client side). 1. When the Javascript requests the emails (via XMLHttpRequest) to populate the datagrid with, use url_for to embed the URL for each entity in the entity itself. (I don't like this, it sounds messy). 2. Pass the raw route above to the Javascript, and have it build the URL for the entity whenever it needs it. So if I was to use method 2 above, I would need a way to get the unprocessed route via a template. (I would imagine some helper like route_for('email_show')) -- 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] 2 layers of embedded forms
I'm trying to have 2 layers of embedded forms, meaning i have a Product model that has many Series and the Series have many Documents. I wanted to have the series form embedded in the product and the documents embedded in series thus having two layers of embedding. I followed the advanced techniques tutorial on Forms but the problem is that in the Series form i cannot check if the newDocument form was filled because the form is never bound so getValues returns an empty array. Is it possible to achieve the above easly? Thanks, Andrew -- 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] Embed optional form
Hi there ! I'm working on a simple Quiz plugin for my Symfony project, so I'm heavily using the Symfony embedding form system to have one big form to edit my whole quiz : - Quiz title - Quiz questions - For each questions, a list of proposals I want to be able to add a question and a proposal when I edit my quiz, so here is what I do : abstract class PluginNoeQuizQuestionForm extends BaseNoeQuizQuestionForm { public function configure() { parent::configure(); $this-useFields(array('label', 'multiple')); foreach ($this-getObject()-getProposals() as $id = $proposition) { $pForm = new NoeQuizProposalForm($proposition); $this-embedForm(sprintf('proposal%d', $id), $pForm); } // new proposal $newProposal = new NoeQuizProposal(); $newProposal-setQuestion($this-getObject()); $pForm = new NoeQuizProposalForm($newProposal); $pForm-getValidator('value')-setOption('required', false); $pForm-getValidator('is_valid')-setOption('required', false); $this-embedForm('newproposal', $pForm); } } As you can see, my $pForm does not contain any mandatory fields because I want the user to be able to add a proposal to one question only if he wants to. So it works, I don't have any fatal error, but every time I save my form, I have an empty proposal that is created. Can you see where I went wrong and how to fix 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-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] Symfony PHP Developer in Pune, India
Hello friends, I have a good job opening for symfony and thought it will better to share it here. Here's the description: Position: Senior Software Engineer - PHP Company Profile: Our firm is a product engineering company that builds commercial grade software for its customers. Our customers are ISVs that are building, implementing and maintaining cutting edge products, focused on time to market, client satisfaction, brand recognition, and technology advantage. We help our customers meet these objectives. Our approach to software development is characterized by our refreshing approach best articulated as ‘Fresh Thinking! New Ideas!’. We have the right blend of experience and can-do attitude. We deploy high-end infrastructure facilities, state-of-the-art technology and best-in- class resources to meet and exceed customer expectations. Job Description: We have an opening for a SSE / SE - PHP in Pune, India. Key responsibilities: * Part of development team. * Participate in project scope definition and requirements definition. * Write/review requirements and design documents. * Periodically communicate with client and provide them project status. * Code applications using PHP 5, MySQL 5, AJAX and JavaScript. * Configure Linux, Apache, PHP and MySQL for development, QA and production environments. Candidate Will Have: * Overall 3+ years of experience for SSE level with experience in PHP, Symfony frameworks, JavaScript, Apache and Linux servers (including Linux command line and SSH). * Strong SQL and data manipulation skills (joining tables, calculating fields, writing complex sql queries, etc). * Good knowledge of HTML, DHTML and CSS. * Good verbal and written communication skills. * Hands on skills on LAMP technologies. * applications using LAMP technologies. * Candidate should be able to manage a team of developers or complete projects alone. * BE /B.Tech/ MCA from reputed institute To be considered for this post email your resume to:shi...@apexglobal.co.in Please feel free to pass on the opportunity to your friends. Thanks, Adi http://www.appliedeye.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] Re: Deployed project does not load any javascript file
Are your files chowned to the apache group? Does symfony has access on your ymls for parsing? Are you sure that you have the correct priviledges on your cache folder? Switch it to dev mode (i think you have to upload the dev file) and check whatever your debug bar says. I guess you are a romanian guy. If so, i think we could use a chat system to try fixing your problem. Alecs sent via htc magic On Jan 15, 2010 5:21 PM, Francisc Nopcea domnuprofe...@gmail.com wrote: Gábor, thank you for the hint. I don't use symfony 1.3, I use symfony 1.2.9 so the problem should not be there. On Fri, Jan 15, 2010 at 5:08 PM, Gábor Fási maerl...@gmail.com wrote: In view.yml you specif... -- 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. -- 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] Editing a embedded form | Alterando um form embeddado
Hi ppl, I'm trying to alter a formulary which is being embedded on another form, in order to change from table to divs, but i'm getting stuck, since i don't know which template should i change. I tried to create a _form.php on both of the forms, but it only change the father form, not the children ones. Any ideas? === Olá pessoal! Eu estou tentando alterar um formulário que está embeddado em outro, de maneira que eu possa mudar ele de tabelas para divs, mas eu estou preso, já que não sei que template eu devo alterar. Eu tentei criar um _form.php em ambos os formulários, mas isso alterou apenas o formulário pai, não os filhos. Alguma idéia? -- 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] Identify the module in the referer URL.
Hi, I have a referer url and I want to identify what is the module from that url. So I will need to parse this url the same way symfony does it on it´s routing or front controller. How can I parse a string containing a URL to know what is the module in it considering the actual defined routing configuration? Thanks, Bruno -- 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] sfDoctrineGuardPlugin in Project with multiple DB connections
Hello, I'm having some issues trying to use sfDoctrineGuardPlugin with a symfony project that uses 2 Doctrine connections. I use 2 connections because I have a phpBB forum embedded in my project (using prestaForumConnectorPlugin), and I want to keep the forum and application specific databases separate. What I want to know, is how to specify which connection should sfDoctrineGuardPlugin use to manage it's users, grups and permissions. My current databases.yml reads as follows: all: doctrine: class: sfDoctrineDatabase param: dsn: mysql:host=localhost;dbname=mydb;unix_socket=/var/run/mysqld/mysqld.sock username: mydb password: * forum: class: sfDoctrineDatabase param: dsn: mysql:host=localhost;dbname=forum;unix_socket=/var/run/mysqld/mysqld.sock username: forum password: * and currently, sfDoctrineGuardPlugin is trying to create it's tables and manage it's users in the forum DB, which is not what I want. What's the best way to tell the plugin to use the doctrine connection (instead of the forum one)? The solutions that come to mind are: 1. Specify it in ProjectConfiguration::configureDoctrine() or ProjectConfiguration::setupPlugins() using the Doctrine Manager; 2. Change the plugin schema.yml to add the connection property to each model (bad and ugly, and not the preferred aproach); 3. Override some kind of plugin configuration and set it there? (how?) What's the best way to do this? Best Regards, -- Tiago Nunes -- 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] Trying to add prototype functions
Hi, I have added this in a template: div id=mutsu class=apple/div ?php if( $('mutsu').hasClassName(apple) ){ alert(div has CSS apple class.); ? } but when i load the template in the browser, the javascript alert is not showed. Even in Netbeans i have a syntax error... I added also the code above in a file where im using another prototype function (toggleClassName()) that works ok to be sure the problem is not caused because im not loading prototype.js. This is the code i say: ?php echo link_to_remote('Marcar como leido', array( 'url' = 'mensaje/cambiarEstadoLeido?id='.$m-getId(), // Aqui se desplegará el resultado de la acción. 'update' = 'mensaje_'.$m, complete = $('$m').toggleClassName('mensaje_1');, )); ? Any help? Javi -- 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]
Chris LeBlanc webPragmatist (817) 988-9616 http://www.webPragmatist.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] Re: Trying to add prototype functions
Hi, Just lose the ?php ? tags and you're good to go. ;) You're trying to run javascript code in the PHP interpreter, which isn't going to work. All you have to do is replace your code with: div id=mutsu class=apple/div if( $('mutsu').hasClassName(apple) ) { alert(div has CSS apple class.); } and then that code will be executed on the client. You're confusing PHP code with Javascript code, and that's not good. PHP is intended to be executed *on the server*, before sending a response to the client, while Javascript is supposed to execute *on the client browser* (although it's also possible to run javascript server-side). Perhaps you're confused because symfony has some javascript helpers that should be placed inside ?php ? tags, but these javascript helpers are actually PHP functions, hence the tags. When you want to write real javascript, you should write it outside the ?php ? tags, or echo/print it from inside them. Best Regards, -- Tiago Nunes On Jan 15, 8:09 pm, Javier Garcia tirengar...@gmail.com wrote: Hi, I have added this in a template: div id=mutsu class=apple/div ?php if( $('mutsu').hasClassName(apple) ){ alert(div has CSS apple class.); ? } but when i load the template in the browser, the javascript alert is not showed. Even in Netbeans i have a syntax error... I added also the code above in a file where im using another prototype function (toggleClassName()) that works ok to be sure the problem is not caused because im not loading prototype.js. This is the code i say: ?php echo link_to_remote('Marcar como leido', array( 'url' = 'mensaje/cambiarEstadoLeido?id='.$m-getId(), // Aqui se desplegar el resultado de la acci n. 'update' = 'mensaje_'.$m, complete = $('$m').toggleClassName('mensaje_1');, )); ? Any help? Javi -- 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: Trying to add prototype functions
On 01/15/2010 09:20 PM, Tiago Nunes wrote: You're confusing PHP code with Javascript code, and that's not good. Thanks Tiago, it's true.. Anywy im trying this: ?php echo javascript_tag( if($('mutsu').hasClassName(apple)) { alert(div has CSS apple class.); } ) ? And it doesn't work... No problem with ordinary code: script type=text/javascript if($('mutsu').hasClassName(apple)) { alert(div has CSS apple class.); } /script Javi -- 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: Trying to add prototype functions
El 15/01/2010 18:10, Javier Garcia escribió: Thanks Tiago, it's true.. Anywy im trying this: ?php echo javascript_tag( if($('mutsu').hasClassName(apple)) { alert(div has CSS apple class.); } ) ? And it doesn't work... No problem with ordinary code: script type=text/javascript if($('mutsu').hasClassName(apple)) { alert(div has CSS apple class.); } /script Javi Javier, try just using (') into javascript_tag: ?php echo javascript_tag( if($('mutsu').hasClassName('apple')) { //= ' alert('div has CSS apple class.'); //= ' } ) ? -- Rodrigo Ruiz Fuentes -- 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] is there a way to unsubscribe from this group?
Was there any follow up regarding the bug that kept sending out email? I recall Fabien looked into it and decided that Google was responsible for the bug, but usually Google fixes such bugs in 24 or 48 hours. This has been going on for 2 months or so. I've trouble believing that Google would leave Google Groups broken for this long. I have repeatedly tried to turn off the email from this group, but I keep getting sent email. -- 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] is there a way to unsubscribe from this group?
No, it's forever or you die instantaneously ! :-) 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.comsymfony-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Fri, Jan 15, 2010 at 11:13 PM, Zeek z...@thesecondroad.org wrote: Was there any follow up regarding the bug that kept sending out email? I recall Fabien looked into it and decided that Google was responsible for the bug, but usually Google fixes such bugs in 24 or 48 hours. This has been going on for 2 months or so. I've trouble believing that Google would leave Google Groups broken for this long. I have repeatedly tried to turn off the email from this group, but I keep getting sent email. -- 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. -- 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: Trying to add prototype functions
In my last email I forgot the opening and closing javascript tags (or the symfony helper), but Rodrigo already gave you the correct answer. Try: ?php echo javascript_tag( if($('mutsu').hasClassName('apple')) { alert('div has CSS apple class.'); } ) ? -- Tiago Nunes On Jan 15, 9:10 pm, Javier Garcia tirengar...@gmail.com wrote: On 01/15/2010 09:20 PM, Tiago Nunes wrote: You're confusing PHP code with Javascript code, and that's not good. Thanks Tiago, it's true.. Anywy im trying this: ?php echo javascript_tag( if($('mutsu').hasClassName(apple)) { alert(div has CSS apple class.); } ) ? And it doesn't work... No problem with ordinary code: script type=text/javascript if($('mutsu').hasClassName(apple)) { alert(div has CSS apple class.); } /script Javi -- 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] How to access form filter object from within action?
Can someone please tell me or show me an example on how to access a form filter object from within an action so I can pass objects and variables to it? This is killing me that Symfony does not allow instances to travel globally. -- 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: How to access form filter object from within action?
Hi guys I finally found the solution. The setOptions does not work with FilterForms. You must edit /lib/generate/sfModelGeneratorConfiguration.php and make getFilterForm resemble getForm so it can contain options. The first instance of the getFilterForm will be called in the protected buildQuery method which you can pass the options to. I hope this helps anyone who had as much trouble as I did with this issue. Thanks, Darren On Jan 15, 2:51 pm, Darren884 darren...@gmail.com wrote: Can someone please tell me or show me an example on how to access a form filter object from within an action so I can pass objects and variables to it? This is killing me that Symfony does not allow instances to travel globally. -- 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: Installation on shared hosting
There is an easier way which works when you have ssh access. Remove public_html directory and create symbolic link to project/web ln -s where/your/project/is/web public_html This method allows to place files wherever you want. -- 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.