[symfony-users] Accessing Databases not specified in databases.yml
Hi, I have four projects in the htdocs directory and each have separate database in databases.yml. Now I have user login/password in each of the four different databases. How can I write the code in symfony when user change password, it gets changed in all the databases. Regards Deepak Bhatia -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: mobile site strategy
Hi, it's basically really just a question of view. Here's an old blog post about creating an iphone view: http://www.symfony-project.org/blog/2008/06/09/how-to-create-an-optimized-version-of-your-website-for-the-iphone-in-symfony-1-1 Most of it is still valid and it works. But there is one serious drawback: You have to provide a mobile template for each action. That's why we created a tiny patch (for our ullright platform) to provide a fallback to normal templates in case there is no special mobile one. Here are the required parts: Mobile detection: This belongs into your project configuration: http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/config/ullCorePluginConfiguration.class.php Symfony patch enabling fallback to html templates: (Patches sfView.class.php) http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/sfView.patch.txt Finally provide a mobile template (or not): Normaly you would put your template in apps/frontend/modules/myModule/ templates/myActionSuccess.php Now you can provide a mobile template by creating the following file: apps/frontend/modules/myModule/templates/myActionSuccess.mobile.php This also works for layouts, partials and components. Example: apps/ frontend/modules/myModule/templates/_head.mobile.php Have a nice day, Klemens On 6 Sep., 00:29, Alexandre Salomé alexandre.sal...@gmail.com wrote: It's just a question of view. You should create dedicated routes with a sf_format mini 2010/9/2 Dennis gear...@sbcglobal.net Rather than go the plugin route, why not use either a '.mobi' tld, or '.movi' subdomain, and symlinnk any directories that you need between the two projects? On Sep 1, 4:57 am, Benoit Montuelle benoit.montue...@gmail.com wrote: I've done it by adding specific layout, templates and stylesheet to the existing app. You can trigger events in your project configuration upon user agent to change templates and specific configuration. The strategy to use another app depends wether your mobile app should have the same functionnality as the 'classic' web app does, but it will be easier if most code still shared. -Original Message- From: Kevin kevinb...@gmail.com Sent: mercredi 1 septembre 2010 12:51 To: symfony users symfony-users@googlegroups.com Subject: [symfony-users] mobile site strategy I am wondering what others have done to create a mobile site for their symfony projects (when more than just a handheld stylesheet is required). What I am planning on doing is moving all my modules to a plugin and creating another app called 'mobile'. I can then override any modules I need optimized for a mobile device. What strategies have you come up with? Is there an agreed upon best practice? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Alexandre Saloméhttp://alexandre-salome.fr -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: mobile site strategy
Hi, it's basically really just a question of view. Here's an old blog post about creating an iphone view: http://www.symfony-project.org/blog/2008/06/09/how-to-create-an-optimized-version-of-your-website-for-the-iphone-in-symfony-1-1 Most of it is still valid and it works. But there is one serious drawback: You have to provide a mobile template for each action. That's why we created a tiny patch (for our ullright platform) to provide a fallback to normal templates in case there is no special mobile one. Here are the required parts: Mobile detection: This belongs into your project configuration: http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/config/ullCorePluginConfiguration.class.php Symfony patch enabling fallback to html templates: (Patches sfView.class.php) http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/sfView.patch.txt Finally provide a mobile template (or not): Normaly you would put your template in apps/frontend/modules/myModule/ templates/myActionSuccess.php Now you can provide a mobile template by creating the following file: apps/frontend/modules/myModule/templates/myActionSuccess.mobile.php This also works for layouts, partials and components. Example: apps/ frontend/modules/myModule/templates/_head.mobile.php Have a nice day, Klemens On 6 Sep., 00:29, Alexandre Salomé alexandre.sal...@gmail.com wrote: It's just a question of view. You should create dedicated routes with a sf_format mini 2010/9/2 Dennis gear...@sbcglobal.net Rather than go the plugin route, why not use either a '.mobi' tld, or '.movi' subdomain, and symlinnk any directories that you need between the two projects? On Sep 1, 4:57 am, Benoit Montuelle benoit.montue...@gmail.com wrote: I've done it by adding specific layout, templates and stylesheet to the existing app. You can trigger events in your project configuration upon user agent to change templates and specific configuration. The strategy to use another app depends wether your mobile app should have the same functionnality as the 'classic' web app does, but it will be easier if most code still shared. -Original Message- From: Kevin kevinb...@gmail.com Sent: mercredi 1 septembre 2010 12:51 To: symfony users symfony-users@googlegroups.com Subject: [symfony-users] mobile site strategy I am wondering what others have done to create a mobile site for their symfony projects (when more than just a handheld stylesheet is required). What I am planning on doing is moving all my modules to a plugin and creating another app called 'mobile'. I can then override any modules I need optimized for a mobile device. What strategies have you come up with? Is there an agreed upon best practice? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Alexandre Saloméhttp://alexandre-salome.fr -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] [symfony1.4] not sure how to make parent-child category structure in doctrine schema
I've had the same issue recently and decided NOT to go with nested set. Nested set is a great tool if you really have hierarchical data that should be represented by a tree of unknown depth and need to input new data anywhere in the tree. In my case, and it seems true in your case too, I was sure not to go over 2 levels. My elements are either parents or children, but you cannot be children category of a parent one, and at the same time still have children categories. In that case with only 2 levels, I found faster and more easy to have something like: Category: columns: name: text parent_id:integer relations: Parent: class:Category local: parent_id foreign: id foreignAlias: Children If you know your structure and data will not (or very rarely) change and if you do not need a big depth, I find this solution way more convenient than using the nested set. Those are my 2cents on this topic ;-) use them if you will! On Mon, Sep 6, 2010 at 2:33 PM, Christopher Schnell christopher.schn...@mda.ch wrote: That’s right, Nested Set is the way to go. Both Propel and Doctrine support them. Regards, Christopher. *Von:* symfony-users@googlegroups.com [mailto: symfony-us...@googlegroups.com] *Im Auftrag von *Arnold Ispan *Gesendet:* Sonntag, 5. September 2010 21:31 *An:* symfony-users@googlegroups.com *Betreff:* Re: [symfony-users] [symfony1.4] not sure how to make parent-child category structure in doctrine schema Hello, Why don't use nested sets to represent this structure? On Sun, Sep 5, 2010 at 9:39 PM, ryr ryr1...@gmail.com wrote: Hello, I want to make a two-tier structure of the categories in which each item is either a parent of, or relate to one of the parents. Example structure: Category 1 - Subcategory 1 - Subcategory 2 - Subcategory 3 Category 2 Category 3 - Subcategory 4 - Subcategory 5 Category 4 How to implement this in config/doctrine/schema.yml? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Accessing Databases not specified in databases.yml
I had to do something like that some time ago to integrate the logins of 2 soft we were using (not our code) and did so using triggers in mysql. On Tue, Sep 7, 2010 at 2:07 PM, DEEPAK BHATIA toreachdee...@gmail.comwrote: Hi, I have four projects in the htdocs directory and each have separate database in databases.yml. Now I have user login/password in each of the four different databases. How can I write the code in symfony when user change password, it gets changed in all the databases. Regards Deepak Bhatia -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Accessing Databases not specified in databases.yml
Hi, Thanks for your mail. Can get some google link which is useful or send me some sample code of mysql trigger and how it gets invoked in symfony project ? Regards Deepak Bhatia On Tue, Sep 7, 2010 at 2:31 PM, Sebastien Armand [Pink] khe...@gmail.comwrote: I had to do something like that some time ago to integrate the logins of 2 soft we were using (not our code) and did so using triggers in mysql. On Tue, Sep 7, 2010 at 2:07 PM, DEEPAK BHATIA toreachdee...@gmail.comwrote: Hi, I have four projects in the htdocs directory and each have separate database in databases.yml. Now I have user login/password in each of the four different databases. How can I write the code in symfony when user change password, it gets changed in all the databases. Regards Deepak Bhatia -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Accessing Databases not specified in databases.yml
I absolutely cannot and I'm sorry for that! It was a few years ago that I did it! My original meaning was that you probably would not need any PHP and symfony in here. See the mysql doc about triggers and stored procedures: On certain actions (any password modification in your case) you will start a trigger that can perform a stored procedure (sql script) to copy the new value everywhere you need. This would be handled directly within mysql and only within mysql. On Tue, Sep 7, 2010 at 5:49 PM, DEEPAK BHATIA toreachdee...@gmail.comwrote: Hi, Thanks for your mail. Can get some google link which is useful or send me some sample code of mysql trigger and how it gets invoked in symfony project ? Regards Deepak Bhatia On Tue, Sep 7, 2010 at 2:31 PM, Sebastien Armand [Pink] khe...@gmail.comwrote: I had to do something like that some time ago to integrate the logins of 2 soft we were using (not our code) and did so using triggers in mysql. On Tue, Sep 7, 2010 at 2:07 PM, DEEPAK BHATIA toreachdee...@gmail.comwrote: Hi, I have four projects in the htdocs directory and each have separate database in databases.yml. Now I have user login/password in each of the four different databases. How can I write the code in symfony when user change password, it gets changed in all the databases. Regards Deepak Bhatia -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: mobile site strategy
Thanks, this stuff is great. Never thought of that. On Sep 7, 3:49 am, klemens_u klem...@ull.at wrote: Hi, it's basically really just a question of view. Here's an old blog post about creating an iphone view:http://www.symfony-project.org/blog/2008/06/09/how-to-create-an-optim... Most of it is still valid and it works. But there is one serious drawback: You have to provide amobile template for each action. That's why we created a tiny patch (for our ullright platform) to provide a fallback to normal templates in case there is no specialmobileone. Here are the required parts: Mobiledetection: This belongs into your project configuration:http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/config/u... Symfony patch enabling fallback to html templates: (Patches sfView.class.php)http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/sf... Finally provide amobiletemplate (or not): Normaly you would put your template in apps/frontend/modules/myModule/ templates/myActionSuccess.php Now you can provide amobiletemplate by creating the following file: apps/frontend/modules/myModule/templates/myActionSuccess.mobile.php This also works for layouts, partials and components. Example: apps/ frontend/modules/myModule/templates/_head.mobile.php Have a nice day, Klemens On 6 Sep., 00:29, Alexandre Salomé alexandre.sal...@gmail.com wrote: It's just a question of view. You should create dedicated routes with a sf_format mini 2010/9/2 Dennis gear...@sbcglobal.net Rather than go the plugin route, why not use either a '.mobi' tld, or '.movi' subdomain, and symlinnk any directories that you need between the two projects? On Sep 1, 4:57 am, Benoit Montuelle benoit.montue...@gmail.com wrote: I've done it by adding specific layout, templates and stylesheet to the existing app. You can trigger events in your project configuration upon user agent to change templates and specific configuration. The strategy to use another app depends wether yourmobileapp should have the same functionnality as the 'classic' web app does, but it will be easier if most code still shared. -Original Message- From: Kevin kevinb...@gmail.com Sent: mercredi 1 septembre 2010 12:51 To: symfony users symfony-users@googlegroups.com Subject: [symfony-users]mobilesite strategy I am wondering what others have done to create amobilesite for their symfony projects (when more than just a handheld stylesheet is required). What I am planning on doing is moving all my modules to a plugin and creating another app called 'mobile'. I can then override any modules I need optimized for amobiledevice. What strategies have you come up with? Is there an agreed upon best practice? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Alexandre Saloméhttp://alexandre-salome.fr -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Any way to retrieve from the layout to the name of the template of the action?
Hi, hi, any way to retrieve from the layout to the name of the template of the action? -- Javi Ubuntu 10.04, sf 1.4 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Abridged summary of symfony-users@googlegroups.com - 19 Messages in 12 Topics
Beste, Tot en met vrijdag 10 september ben ik niet aanwezig op kantoor. U kunt voor dringende zaken contact opnemen met mijn collega Dimitri van Hees: dimi...@freshheads.com of 013 5448761. Met vriendelijke groet, Joost Farla joost.fa...@freshheads.com - - freshheads grafisch ontwerp en internet applicaties Dunantstraat 1c | 5017 KC Tilburg | Nederland tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762 i...@freshheads.com | www.freshheads.com -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] automated response
Merci de votre message. Nos bureaux sont présentement fermés aujourd'hui, le 6 septembre 2010. En cas d’urgence, vous pouvez rejoindre notre équipe technique en envoyant un courriel à l’adresse suivante: supp...@twistimage.com. Cordialement, Saad Tazi - - - - - - - - - - - - - Thank you for your message. Our offices are closed today, September 6th, 2010. For urgent technical matters, please send an email to supp...@twistimage.com. Best regards, Saad Tazi | Senior Web Developer Twist Image | www.twistimage.com T - 514 987 9992 x.158 407, rue McGill, 2e étage, Montréal (Québec) H2Y 2G3 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Using mysql php functions in symfony
On 7 Set, 07:52, DEEPAK BHATIA toreachdee...@gmail.com wrote: I tried accessing some other database than specified in databases.yml. But below is not working. Please help. $con=mysql_connect(localhost,root,); if(!$con) { echo Database Connection Not Estabilished\n; exit(0); } $temp = mysql_select_db(rtdb); if($temp == false) { exit(0); } $query = SELECT id FROM severity_table; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { echo $row[id]; echo BR; echo HELLO; } That's a really really wrong way. Add the connection you need in your databases.yml config file, then simply use it. cheers Massimiliano -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Any way to retrieve from the layout to the name of the template of the action?
Hi, What do you want to do ? Have you looked at slots ? On 7 sep, 15:03, Javier Garcia tirengar...@gmail.com wrote: Hi, hi, any way to retrieve from the layout to the name of the template of the action? -- Javi Ubuntu 10.04, sf 1.4 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Using mysql php functions in symfony
I am sure you mean this.. $connection = Propel::getConnection(); $query = 'SELECT MAX(?) AS max FROM ?'; $statement = $connection-prepareStatement($query); $statement-setString(1, ArticlePeer::CREATED_AT); $statement-setString(2, ArticlePeer::TABLE_NAME); $resultset = $statement-executeQuery(); $resultset-next(); $max = $resultset-getInt('max'); On Tue, Sep 7, 2010 at 6:42 PM, Massimiliano Arione garak...@gmail.comwrote: On 7 Set, 07:52, DEEPAK BHATIA toreachdee...@gmail.com wrote: I tried accessing some other database than specified in databases.yml. But below is not working. Please help. $con=mysql_connect(localhost,root,); if(!$con) { echo Database Connection Not Estabilished\n; exit(0); } $temp = mysql_select_db(rtdb); if($temp == false) { exit(0); } $query = SELECT id FROM severity_table; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { echo $row[id]; echo BR; echo HELLO; } That's a really really wrong way. Add the connection you need in your databases.yml config file, then simply use it. cheers Massimiliano -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Using mysql php functions in symfony
Thanks, Do I need to put various connections from different databases.yml ? all: propel: class: sfPropelDatabase param: dsn: 'mysql://root:@localhost/rtdb' all: propel: class: sfPropelDatabase param: dsn: 'mysql://root:@localhost/crb' === all: propel: class: sfPropelDatabase param: dsn: 'mysql://root:@localhost/amsdb' On Tue, Sep 7, 2010 at 6:42 PM, Massimiliano Arione garak...@gmail.comwrote: On 7 Set, 07:52, DEEPAK BHATIA toreachdee...@gmail.com wrote: I tried accessing some other database than specified in databases.yml. But below is not working. Please help. $con=mysql_connect(localhost,root,); if(!$con) { echo Database Connection Not Estabilished\n; exit(0); } $temp = mysql_select_db(rtdb); if($temp == false) { exit(0); } $query = SELECT id FROM severity_table; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { echo $row[id]; echo BR; echo HELLO; } That's a really really wrong way. Add the connection you need in your databases.yml config file, then simply use it. cheers Massimiliano -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Escaped Form
I'm getting that too and cannot find a work-around. I'm guessing this is PR3 current state because I _just_ got my src from the head revision of the PR3 branch, right off github. Stephane On Aug 28, 6:14 pm, Tomen Meta tommi.enen...@gmail.com wrote: I checked out the current PR3 Branch from symfony-sandbox and tried to build a Form with it (since it didnt work for me with PR2). My controller contains a register action: public function registerAction() { $user = new User(); $form = new Form('user', $user, $this-container-getValidatorService()); $form-add(new TextField('name')); $form-add(new Textfield('password')); return $this-render('MapEditorBundle:User:register', array('form' = $form)); } The view itself is just like in the tutorial: ?php $view-extend('MapEditorBundle::layout') ? ?php echo $form-renderFormTag('#') ? ?php echo $form-renderErrors() ? ?php echo $form-render() ? input type=submit value=Send! / /form I get some output, however, the html is escaped, this is an example of the html source: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleElenears Erben - Map Editor/title /head body h1Hello Application/h1 lt;form action=quot;#quot; method=quot;postquot;gt; lt;tablegt; lt;trgt; lt;tdgt;lt;label for=quot;user_namequot;gt;Namelt;/ labelgt;lt;/tdgt; lt;tdgt; lt;input id=quot;user_namequot; name=quot;user[name]quot; value=quot;quot; type=quot;textquot; /gt; lt;/tdgt;lt;/trgt; lt;trgt; lt;tdgt;lt;label for=quot;user_passwordquot;gt;Passwordlt;/ labelgt;lt;/tdgt; lt;tdgt; lt;input id=quot;user_passwordquot; name=quot;user[password]quot; value=quot;quot; type=quot;textquot; /gt; lt;/tdgt;lt;/trgt; lt;/tablegt; input type=submit value=Send! / /form !-- START of Symfony 2 Web Debug Toolbar -- Is this a current issue with the PR3 branch or is there something wrong with my code? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Action ... does not exist - sfError404Exception
Hi everyone, I'm currently running into an issue regarding the development of a custom action in the list view in the backend part of my application. Here is my generator.yml file : config: actions: ~ fields: description: { label: Nom } address:{ label: Addresse } list: object_actions: _edit: { label: Editer } _delete: { label: Supprimer } actions: new1: { label: Nouveau Type 1, action: new1 } new2: { label: Nouveau Type 2 } new3: { label: Nouveau Type 3 } As you can see, I tried different parameters for the actions part. Here is the actions.class.php : class gatewaysActions extends autoGatewaysActions { public function new1(sfWebRequest $request) { parent::executeNew($request); $this-gateway-type = 1; } public function executeListNew2(sfWebRequest $request) { parent::executeNew($request); $this-gateway-type = 2; } public function executeListNew3(sfWebRequest $request) { parent::executeNew($request); $this-gateway-type = 3; } } Now when I click on the link generated below the list, I get to this URL : http://localhost/backend_dev.php/gateways/new1/action for type 1 or http://localhost/backend_dev.php/gateways/ListNew2/action And then I get this result : error: code: 404 message: 'Action gateways/action does not exist.' debug: name: sfError404Exception message: 'Action gateways/action does not exist.' traces: - at () in SF_ROOT_DIR/lib/vendor/symfony/lib/controller/sfController.class.php line 196 ... $this-dispatcher-notify(new sfEvent($this, 'application.log', array(sprintf('Action \%s/%s\ does not exist', $moduleName, $actionName; \n } \n \n throw new sfError404Exception(sprintf('Action \%s/%s\ does not exist.', $moduleName, $actionName)); \n } \n \n // create an instance of the action - at sfController-forward('gateways', 'action') in SF_ROOT_DIR/lib/vendor/symfony/lib/controller/sfFrontWebController.class.php line 48 ... } \n \n // make the first request \n $this-forward($moduleName, $actionName); \n } \n catch (sfException $e) \n { - at sfFrontWebController-dispatch() in SF_ROOT_DIR/lib/vendor/symfony/lib/util/sfContext.class.php line 170 ... */ \n public function dispatch() \n { \n $this-getController()-dispatch(); \n } \n \n /** - at sfContext-dispatch() in SF_ROOT_DIR/web/backend_dev.php line 13 ... require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); \n \n $configuration = ProjectConfiguration::getApplicationConfiguration('backend', 'dev', true); \n sfContext::createInstance($configuration)-dispatch(); \n \n\n Do you have any idea of what I am doing wrong ? Thanks. Regards, Hugo Briand. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Escaped Form
There are a few work-arounds. When passing your form to the view, you can wrap it in a Symfony\Component\OutputEscaper\SafeDecorator object: return $this-render('ExampleBundle:Test:create', array('form' = new SafeDecorator($form))); or you can use the getRawValue() method on the automagically created escaper objects in your view: ?php echo $form-renderFormTag('#')-getRawValue() ? or you can also mark the entire Form class (preferably just your child class) as safe using the static Symfony\Component\OutputEscaper\Escaper::markClassAsSafe($className) method anywhere you want. There's no documentation on the OutputEscaper (that I could find) so all I can say is that it works for me. Good luck! Greg Thornton On Sep 6, 2010, at 10:31 PM, Stephane wrote: I'm getting that too and cannot find a work-around. I'm guessing this is PR3 current state because I _just_ got my src from the head revision of the PR3 branch, right off github. Stephane On Aug 28, 6:14 pm, Tomen Meta tommi.enen...@gmail.com wrote: I checked out the current PR3 Branch from symfony-sandbox and tried to build a Form with it (since it didnt work for me with PR2). My controller contains a register action: public function registerAction() { $user = new User(); $form = new Form('user', $user, $this-container-getValidatorService()); $form-add(new TextField('name')); $form-add(new Textfield('password')); return $this-render('MapEditorBundle:User:register', array('form' = $form)); } The view itself is just like in the tutorial: ?php $view-extend('MapEditorBundle::layout') ? ?php echo $form-renderFormTag('#') ? ?php echo $form-renderErrors() ? ?php echo $form-render() ? input type=submit value=Send! / /form I get some output, however, the html is escaped, this is an example of the html source: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleElenears Erben - Map Editor/title /head body h1Hello Application/h1 lt;form action=quot;#quot; method=quot;postquot;gt; lt;tablegt; lt;trgt; lt;tdgt;lt;label for=quot;user_namequot;gt;Namelt;/ labelgt;lt;/tdgt; lt;tdgt; lt;input id=quot;user_namequot; name=quot;user[name]quot; value=quot;quot; type=quot;textquot; /gt; lt;/tdgt;lt;/trgt; lt;trgt; lt;tdgt;lt;label for=quot;user_passwordquot;gt;Passwordlt;/ labelgt;lt;/tdgt; lt;tdgt; lt;input id=quot;user_passwordquot; name=quot;user[password]quot; value=quot;quot; type=quot;textquot; /gt; lt;/tdgt;lt;/trgt; lt;/tablegt; input type=submit value=Send! / /form !-- START of Symfony 2 Web Debug Toolbar -- Is this a current issue with the PR3 branch or is there something wrong with my code? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Hello fellow Symfony Users
Sorry, I had the group name wrong, this is updated. I am a php/xhtml/css/ etc developer in DFW Texas. I have recently started teaching myself Symfony, and hope to learn more here in your group. I don't know if I can post my group here, but I have started a layouts group for those interested in building, sharing, learning layouts of all kinds. There is a section devoted to HTML5/CSS3 that we could use some experts advice in. The group is googlegroups best- layouts Like I said, I hope this isn't a problem for me to put it here, it is not a conflict with this group. I look forward to being a part of this group! -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] doctrine query help needed
dear friends, I have the following tables. News [id, title, …] Education [id, title…..] Health [id, title, ….] ContentImage [id, contented (id of the News, Education, Health), type (like News, Education, Health), path…] The News, Education, Health may or may not have images in the ContentImage table. There is no relationship is set in between News, Education, Health table with ContentImage table. But we can link the programatically by using id=contentid and type = 'News'. I want to write a Doctrine query the return the left outer join between News, Education, Health tables and ContentImage table. Is it possible thru dotrine query? Or do I need to write the query like below, [code] $sql = SELECT * FROM... ; $pdo = Doctrine_Manager::connection()-getDbh(); $data = $pdo-query($sql)-fetchAll(); [/code] Please reply. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Race condition with session data
Hi, I currently have an action (A1) that performs some manipulation of objects saved in the session, and then loads a view containing an iframe. The iframe loads another action (A2) from the same application which relies on objects saved to the session in A1. Sometimes, particularly when accessing remotely, the objects do not seem to be present in the session and A2 throws a fatal error. After some discussion in IRC, it seems like A2 is probably loading the session before A1 has finished writing to it. This seems counter- intuitive, but I can't think of any other explanation. Is it possible to flush writes to the session from an action (A1) so that I can be sure the data has been saved? This is on a symfony 1.0 site and using sfMemcacheSessionStorage from http://www.symfony-project.org/plugins/sfMemcachePlugin. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: doctrine query help needed
Is your schema already fixed? If not, the normal way to do this would be to have m-m join tables: NewsImage [ news_id, image_id ] EducationImage [ education_id, image_id ] HealthImage [ health_id, image_id] and remove: content_id type from the ContentImage table. Then if you want all news images, something like: $q = Doctrine_Query::create() -from('ContentImage ci') -innerJoin('NewsImage'); $newsImages = $q-execute(); or images for a particular news item: $news-getImages(); On 7 Sep, 15:30, Shihab KB shiha...@gmail.com wrote: dear friends, I have the following tables. News [id, title, …] Education [id, title…..] Health [id, title, ….] ContentImage [id, contented (id of the News, Education, Health), type (like News, Education, Health), path…] The News, Education, Health may or may not have images in the ContentImage table. There is no relationship is set in between News, Education, Health table with ContentImage table. But we can link the programatically by using id=contentid and type = 'News'. I want to write a Doctrine query the return the left outer join between News, Education, Health tables and ContentImage table. Is it possible thru dotrine query? Or do I need to write the query like below, [code] $sql = SELECT * FROM... ; $pdo = Doctrine_Manager::connection()-getDbh(); $data = $pdo-query($sql)-fetchAll(); [/code] Please reply. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Race condition with session data
The session is closed after all content is sent from A1. You should find a way to delay the load of the iframe (via Javascript maybe) to make sure that A1 has completed and that A2 can load the new content. gabriel On Sep 7, 6:04 pm, Phil Moorhouse moorhouse.p...@gmail.com wrote: Hi, I currently have an action (A1) that performs some manipulation of objects saved in the session, and then loads a view containing an iframe. The iframe loads another action (A2) from the same application which relies on objects saved to the session in A1. Sometimes, particularly when accessing remotely, the objects do not seem to be present in the session and A2 throws a fatal error. After some discussion in IRC, it seems like A2 is probably loading the session before A1 has finished writing to it. This seems counter- intuitive, but I can't think of any other explanation. Is it possible to flush writes to the session from an action (A1) so that I can be sure the data has been saved? This is on a symfony 1.0 site and using sfMemcacheSessionStorage fromhttp://www.symfony-project.org/plugins/sfMemcachePlugin. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Doctrine Pager max per page problem
class articleActions extends sfActions { public function executeIndex(sfWebRequest $request) { // sorting if ($request-getParameter('sort') $this- isValidSortColumn($request-getParameter('sort'))) { $this-setSort(array($request-getParameter('sort'), $request- getParameter('sort_type'))); } // pager if ($request-getParameter('page')) { $this-setPage($request-getParameter('page')); } $this-sort = $this-getSort(); $this-pager = $this-getPager(); } public function executeShow(sfWebRequest $request) { $this-tracker_article = Doctrine::getTable('TrackerArticle')- find(array($request-getParameter('id'))); $this-forward404Unless($this-tracker_article); } public function executeConfirm(sfWebRequest $request) { $this-tracker_article = Doctrine::getTable('TrackerArticle')- find(array($request-getParameter('id'))); $this-forward404Unless($this-tracker_article); } public function executeReturn(sfWebRequest $request) { $this-tracker_article = Doctrine::getTable('TrackerArticle')- find(array($request-getParameter('id'))); $this-forward404Unless($this-tracker_article); } public function executeChangeStatus(sfWebRequest $request) { $id=$request-getParameter('id'); $q= Doctrine_Query::create() -update('TrackerArticle') -set('id_statut_article', $id) -where('id=6'); $this-tracker_article = $q-execute(); $this-redirect('article/index'); } /* public function executeFilter(sfWebRequest $request) { $this-setPage(1); if ($request-hasParameter('_reset')) { $this-setFilters($this-getFilterDefaults()); $this-redirect('article/index'); } $this-filters = new TrackerArticleFormFilter($this- getFilters()); $this-filters-bind($request-getParameter($this-filters- getName())); if ($this-filters-isValid()) { $this-setFilters($this-filters-getValues()); $this-redirect('article/index'); } $this-pager = $this-getPager(); $this-sort = $this-getSort(); $this-setTemplate('index'); }*/ public function executeFilter(sfWebRequest $request) { $this-setPage(1); if ($request-hasParameter('_reset')) { $this-setFilters(array()); //reset, filtre vide $this-redirect('article/index'); } $this-filters = new TrackerArticleFormFilter($this- getFilters()); $this-filters-bind($request-getParameter($this-filters- getName())); if ($this-filters-isValid()) { $this-setFilters($this-filters-getValues()); $this-redirect('article/index'); } $this-pager = $this-getPager(); $this-sort = $this-getSort(); $this-setTemplate('index'); } public function executeNew(sfWebRequest $request) { $this-form = new TrackerArticleForm(); } public function executeCreate(sfWebRequest $request) { $this-forward404Unless($request-isMethod(sfRequest::POST)); $this-form = new TrackerArticleForm(); $this-processForm($request, $this-form); $this-setTemplate('new'); } public function executeEdit(sfWebRequest $request) { $this-forward404Unless($tracker_article = Doctrine::getTable('TrackerArticle')-find(array($request- getParameter('id'))), sprintf('Object tracker_article does not exist (%s).', $request-getParameter('id'))); $this-form = new TrackerArticleForm($tracker_article); } public function executeUpdate(sfWebRequest $request) { $this-forward404Unless($request-isMethod(sfRequest::POST) || $request-isMethod(sfRequest::PUT)); $this-forward404Unless($tracker_article = Doctrine::getTable('TrackerArticle')-find(array($request- getParameter('id'))), sprintf('Object tracker_article does not exist (%s).', $request-getParameter('id'))); $this-form = new TrackerArticleForm($tracker_article); $this-processForm($request, $this-form); $this-setTemplate('edit'); } public function executeDelete(sfWebRequest $request) { $request-checkCSRFProtection(); $this-forward404Unless($tracker_article = Doctrine::getTable('TrackerArticle')-find(array($request- getParameter('id'))), sprintf('Object tracker_article does not exist (%s).', $request-getParameter('id'))); $tracker_article-delete(); $this-redirect('article/index'); } /* protected function processForm(sfWebRequest $request, sfForm $form) { $form-bind($request-getParameter($form-getName()), $request- getFiles($form-getName())); if ($form-isValid()) { $tracker_article = $form-save(); $this-redirect('article/edit?id='.$tracker_article-getId()); } } */ protected function processForm(sfWebRequest $request, sfForm $form) { $form-bind($request-getParameter($form-getName()), $request- getFiles($form-getName())); if ($form-isValid()) { $tracker_article = $form-save(); $this-redirect('article/confirm?id='.$tracker_article- getId()); } } protected
[symfony-users] Re: IE8 and isXmlHttpRequest
I keep seeing IE8 problems here with Symfony. Is IE8 turning out to be another IE6 - a long lived NIGHTMARE for developers? On Sep 2, 11:27 am, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Damn... it indeed was a cache problem. God I hate IE Thank you! On 2 sep, 15:18, Gustavo Adrian comfortablynum...@gmail.com wrote: Could you post the code of the action that receives the AJAX request? and the headers that is receiving from IE. Also, try to embed a variable with a random number (like the actual timestamp) in the URL, in your ajax JS function, to check if it's a cache problem. On Thu, Sep 2, 2010 at 9:03 AM, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Can you make something out of this? On 1 sep, 16:14, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Thx :) I've been using: * Symfony 1.4.9 * jQuery 1.4.2 My call in my HTML template: setTimeout(ajax('div_javascript_ajax', '/en/world');, 1); The JS function: function ajax(sId, sUrl){ $('#' + sId).load(sUrl); } On 1 sep, 14:34, Gustavo Adrian comfortablynum...@gmail.com wrote: I use Symfony with jQuery in my last app where I've made every functionality available via AJAX and it works perfectly on IE8. Can you give us more information abour your app so we can help you more? version of Symfony, jQuery and the code you're using to receive the AJAX request? On Wed, Sep 1, 2010 at 9:25 AM, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: I use jQuery... function ajax(sId, sUrl){ $('#' + sId).load(sUrl); } On 1 sep, 13:50, Gábor Fási maerl...@gmail.com wrote: Correct - jquery, prototype, mootols - all major ones do. If you use plain JS, you have to add it yourself. This is definitely not a symfony bug, if it only fails in ie8. On Wed, Sep 1, 2010 at 13:49, Benoit Montuelle benoit.montue...@gmail.com wrote: I think most javascript frameworks add this header to the request automatically, I don't know if its done using plain javascript. I once had this issue using mootools but it was a bug in our JS code overwriting all http header instead of adding the needed one, and not a symfony bug. Regards -Original Message- From: Gábor Fási maerl...@gmail.com Sent: mercredi 1 septembre 2010 12:25 To: symfony-users@googlegroups.com Subject: Re: [symfony-users] Re: IE8 and isXmlHttpRequest If you check the code of isXmlHttpRequest, you'll see it is very simple: return ($this-getHttpHeader('X_REQUESTED_WITH') == 'XMLHttpRequest'); So check if your javascript code sets that header, also check if it actually gets sent. On Wed, Sep 1, 2010 at 12:11, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Yes, but is there someone who can reproduce this? Seems like a Symfony bug...! On 31 aug, 20:33, Stéphane stephane.er...@gmail.com wrote: Compare the http request headers of the firefox's xhr over the ie8's one Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Tue, Aug 31, 2010 at 8:20 PM, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: In IE8, my isXmlHttpRequest function doesn't work. In my template, I use ?php if(!$sf_request-isXmlHttpRequest()): ? to hide content if it is an AJAX call. Firefox handles this okay, but IE8 shows the entire template, as well as the complete layout again! How is this possible? Bug? Anyone who knows a fix? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com symfony-users%2bunsubscr...@googlegroups.comsymfony-users%252bunsubscr...@googlegroups.com symfony-users%2bunsubscr...@googlegroups.comsymfony-users%252bunsubscr...@googlegroups.com symfony-users%252bunsubscr...@googlegroups.comsymfony-users%25252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this
[symfony-users] schema.yml // 2 relations for a same table problem
Hello, I have created a schema.yml but I do not know how to create 2 relations for a same table. How can i disctinct those 2 relations (rsource). With a suffix ? Here is my code : TrackerPret: actAs: { Timestampable: ~ } connection: doctrine attributes: export: tables columns: date_affectation: { type: timestamp, notnull: true } date_retour: { type: timestamp, notnull: true } date_retour_reel: { type: timestamp, notnull: true } nom_utilisateur:{ type: string(255) } prenom_utilisateur: { type: string(255) } id_manager: { type: integer, notnull: true } code_projet: { type: string(255) } id_article: { type: integer, notnull: true } commentaire_pret: { type: string(4000), notnull: true } oid_cdp: { type: integer, notnull: true } oid_user: { type: integer, notnull: true } oid_prj: { type: integer, notnull: true } relations: TrackerManager: {local: id_manager, foreign: id,foreignAlias: TrackerManagers } TrackerArticle: {local: id_article, foreign: id,foreignAlias: TrackerArticles } rsource: {local: oid_user, foreign: oid,foreignAlias: ASAusers } rsource: {local: oid_cdp, foreign: oid,foreignAlias: ASAcdps } -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] ahDoctrineEasyEmbeddedRelationsPlugin + Admin Generator
I'm using ahDoctrineEasyEmbeddedRelationsPlugin trunk (svn export) with symfony 1.4.6 but having a problem displaying the relation when using generator.yml. Everything works great if I do `edit: display: ~` and `new: display: ~` in generator.yml. But I am using the `display:` option to order my widgets in my form: edit: display: [active, slideshow, featured, category_id, speaker, speaker_title, title, start_time, end_time, location, special_text, description, image_filename, image_alt_text, slideshow_image_filename, slideshow_description, Documents, new_Documents] #Should be the same as edit: above new: display: [active, slideshow, featured, category_id, speaker, speaker_title, title, start_time, end_time, location, special_text, description, image_filename, image_alt_text, slideshow_image_filename, slideshow_description, Documents, new_Documents] class EventForm extends BaseEventForm { public function configure() { //... $this-embedRelations(array( 'Documents' = array( 'considerNewFormEmptyFields'= array('filename', 'description'), 'noNewForm' = false, 'newFormLabel' = 'New Documents', 'newFormClass' = 'DocumentForm', // Form class to add new objects //'newFormClassArgs' = array(array('sf_user' = $this-getOption('sf_user'))), 'displayEmptyRelations' = false, 'formClass' = 'DocumentEmbeddedForm', //Form class to edit existing objects //'formClassArgs' = array(array('ah_add_delete_checkbox' = false, 'another_form_option' = '')), 'newFormAfterExistingRelations' = true, 'formFormatter' = null, 'multipleNewForms' = true, 'newFormsInitialCount' = 1, 'newFormsContainerForm' = null, // pass BaseForm object here or we will create ahNewRelationsContainerForm 'newRelationButtonLabel'= '+ Add Another File', 'newRelationAddByCloning' = true, 'newRelationUseJSFramework' = 'jQuery', 'customEmbeddedFormLabelMethod' = 'getLabelTitle', ), )); //... } } Highlighted version: http://pastebin.com/8UJ3fhSH To get the `Documents` relation to appear using generator.yml, I must add `Documents` to embed the existing relations widget, and `new_Documents` to embed the new relation widget. My problem comes in the edit view when I don't have any existing `Documents` relations, symfony gives the error `Widget Documents does not exist.` Is there a way I can use generator.yml to order my widgets and still use this plugin? Or is there a different/better approach I can use? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Escaped Form
Hi! The getRawValue work-around didn't work (cannot call getRawValue on a non-object) but the SafeDecorator one worked fine! If it doesn't take much time, I would like to understand what was causing this bug and why using the SafeDecorator fixed it. I'm new to Symfony2 and trying to understand the framework. I might as well introduce myself... I'm a C++ programmer (3d engines) with 10 years of experience getting started on a web project and I'm learning php + javascript. Thanks! Stephane On Tue, Sep 7, 2010 at 9:39 AM, Greg Thornton g...@remarkablewit.comwrote: There are a few work-arounds. When passing your form to the view, you can wrap it in a Symfony\Component\OutputEscaper\SafeDecorator object: return $this-render('ExampleBundle:Test:create', array('form' = new SafeDecorator($form))); or you can use the getRawValue() method on the automagically created escaper objects in your view: ?php echo $form-renderFormTag('#')-getRawValue() ? or you can also mark the entire Form class (preferably just your child class) as safe using the static Symfony\Component\OutputEscaper\Escaper::markClassAsSafe($className) method anywhere you want. There's no documentation on the OutputEscaper (that I could find) so all I can say is that it works for me. Good luck! Greg Thornton On Sep 6, 2010, at 10:31 PM, Stephane wrote: I'm getting that too and cannot find a work-around. I'm guessing this is PR3 current state because I _just_ got my src from the head revision of the PR3 branch, right off github. Stephane On Aug 28, 6:14 pm, Tomen Meta tommi.enen...@gmail.com wrote: I checked out the current PR3 Branch from symfony-sandbox and tried to build a Form with it (since it didnt work for me with PR2). My controller contains a register action: public function registerAction() { $user = new User(); $form = new Form('user', $user, $this-container-getValidatorService()); $form-add(new TextField('name')); $form-add(new Textfield('password')); return $this-render('MapEditorBundle:User:register', array('form' = $form)); } The view itself is just like in the tutorial: ?php $view-extend('MapEditorBundle::layout') ? ?php echo $form-renderFormTag('#') ? ?php echo $form-renderErrors() ? ?php echo $form-render() ? input type=submit value=Send! / /form I get some output, however, the html is escaped, this is an example of the html source: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleElenears Erben - Map Editor/title /head body h1Hello Application/h1 lt;form action=quot;#quot; method=quot;postquot;gt; lt;tablegt; lt;trgt; lt;tdgt;lt;label for=quot;user_namequot;gt;Namelt;/ labelgt;lt;/tdgt; lt;tdgt; lt;input id=quot;user_namequot; name=quot;user[name]quot; value=quot;quot; type=quot;textquot; /gt; lt;/tdgt;lt;/trgt; lt;trgt; lt;tdgt;lt;label for=quot;user_passwordquot;gt;Passwordlt;/ labelgt;lt;/tdgt; lt;tdgt; lt;input id=quot;user_passwordquot; name=quot;user[password]quot; value=quot;quot; type=quot;textquot; /gt; lt;/tdgt;lt;/trgt; lt;/tablegt; input type=submit value=Send! / /form !-- START of Symfony 2 Web Debug Toolbar -- Is this a current issue with the PR3 branch or is there something wrong with my code? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- # Stéphane -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at
Re: [symfony-users] ahDoctrineEasyEmbeddedRelationsPlugin + Admin Generator
I also ran into this problem. I solved it by defining the fields in the form class (DocumentsForm in your case). For the fields I didn't wanted to display, I applied the widget InputHidden. I'm interested also if there's a better way, this one is not really clean. Le 7 sept. 2010 à 18:44, John Kary a écrit : I'm using ahDoctrineEasyEmbeddedRelationsPlugin trunk (svn export) with symfony 1.4.6 but having a problem displaying the relation when using generator.yml. Everything works great if I do `edit: display: ~` and `new: display: ~` in generator.yml. But I am using the `display:` option to order my widgets in my form: edit: display: [active, slideshow, featured, category_id, speaker, speaker_title, title, start_time, end_time, location, special_text, description, image_filename, image_alt_text, slideshow_image_filename, slideshow_description, Documents, new_Documents] #Should be the same as edit: above new: display: [active, slideshow, featured, category_id, speaker, speaker_title, title, start_time, end_time, location, special_text, description, image_filename, image_alt_text, slideshow_image_filename, slideshow_description, Documents, new_Documents] class EventForm extends BaseEventForm { public function configure() { //... $this-embedRelations(array( 'Documents' = array( 'considerNewFormEmptyFields'= array('filename', 'description'), 'noNewForm' = false, 'newFormLabel' = 'New Documents', 'newFormClass' = 'DocumentForm', // Form class to add new objects //'newFormClassArgs' = array(array('sf_user' = $this-getOption('sf_user'))), 'displayEmptyRelations' = false, 'formClass' = 'DocumentEmbeddedForm', //Form class to edit existing objects //'formClassArgs' = array(array('ah_add_delete_checkbox' = false, 'another_form_option' = '')), 'newFormAfterExistingRelations' = true, 'formFormatter' = null, 'multipleNewForms' = true, 'newFormsInitialCount' = 1, 'newFormsContainerForm' = null, // pass BaseForm object here or we will create ahNewRelationsContainerForm 'newRelationButtonLabel'= '+ Add Another File', 'newRelationAddByCloning' = true, 'newRelationUseJSFramework' = 'jQuery', 'customEmbeddedFormLabelMethod' = 'getLabelTitle', ), )); //... } } Highlighted version: http://pastebin.com/8UJ3fhSH To get the `Documents` relation to appear using generator.yml, I must add `Documents` to embed the existing relations widget, and `new_Documents` to embed the new relation widget. My problem comes in the edit view when I don't have any existing `Documents` relations, symfony gives the error `Widget Documents does not exist.` Is there a way I can use generator.yml to order my widgets and still use this plugin? Or is there a different/better approach I can use? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] schema.yml // 2 relations for a same table problem
Hi, just define a different name for each of them, and use a class attribute: relations: User: {class: rsource, local: oid_user, foreign: oid, foreignAlias: ASAusers } CDP: {class: rsource, local: oid_cdp, foreign: oid, foreignAlias: ASAcdps } Hope this helps, Pietro Hello, I have created a schema.yml but I do not know how to create 2 relations for a same table. How can i disctinct those 2 relations (rsource). With a suffix ? Here is my code : TrackerPret: actAs: { Timestampable: ~ } connection: doctrine attributes: export: tables columns: date_affectation: { type: timestamp, notnull: true } date_retour: { type: timestamp, notnull: true } date_retour_reel: { type: timestamp, notnull: true } nom_utilisateur:{ type: string(255) } prenom_utilisateur: { type: string(255) } id_manager: { type: integer, notnull: true } code_projet: { type: string(255) } id_article: { type: integer, notnull: true } commentaire_pret: { type: string(4000), notnull: true } oid_cdp: { type: integer, notnull: true } oid_user: { type: integer, notnull: true } oid_prj: { type: integer, notnull: true } relations: TrackerManager: {local: id_manager, foreign: id,foreignAlias: TrackerManagers } TrackerArticle: {local: id_article, foreign: id,foreignAlias: TrackerArticles } rsource: {local: oid_user, foreign: oid,foreignAlias: ASAusers } rsource: {local: oid_cdp, foreign: oid,foreignAlias: ASAcdps } -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] sfGuard Error
Hello: I'm getting this error when I'm trying to implement this code. The first code block with $user seems to work as the database is updated, but the second part fails. This is the error: Unknown record property / related component “sf_guard_user” on “sfGuardUserProfile” public function executeCreateAccount() { $user = new sfGuardUser(); $user-setUsername($this-getRequestParameter('username')); $user-setPassword($this-getRequestParameter('password')); $user-setIsActive(false); $user-save(); $profile = new sfGuardUserProfile(); $profile-setsfGuardUser($user); $profile-setEmail($this-getRequestParameter('user_email')); $profile-setRemember($this-getRequestParameter('remember', true)); $profile-save(); $this-getRequest()-setAttribute('user', $user); $raw_email = $this-sendEmail('user', 'registrationConfirmation'); $this-logMessage($raw_email, 'debug'); $this-setFlash('user_email', $this- getRequestParameter('user_email')); $this-redirect('user/askConfirmation'); } Here is my schema.yml for the user profile: sf_guard_user_profile: columns: id: { type: integer, primary: true, autoincrement: true } user_id: { type: integer } firstname: { type: string(255) } lastname: { type: string(255) } user_email: { type: string(255) } relations: sfGuardUser: type: one foreignType: one class: sfGuardUser local: user_id foreign: id onDelete: cascade foreignAlias: Profile -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Relationships, Schema.yml SfDoctrineGuard
The Context: a) Add new tables via mysql b) ./symfony doctrine:build-schema c) ./symfony doctrine:build --all-classes --model --forms --filters Item b) in the above list creates an issue: It reads the sf_guard_* tables and places the YAML into the newly generated /config/doctrine/schema.yml file. This causes a problem when doing the doctrine:build because there is also a YAML schema file for sfGuardDoctrinePlugin models in the plugin's directory, so now it appears twice. Right now I have to open the newly generated /config/doctrine/ schema.yml file and manually remove the SfGuard* entries in the YAML before building. I have two questions: 1) Is there a way to exclude the sfGuardDoctrinePlugin tables from the doctrine:build-schema task? (Then it will only use the schema in the Plugins directory thus removing the need for me to manually go in and remove those from the YAML) 2) I noticed when adding new tables that I want to have a relationship with the id field in the associated sfDoctrineGuardUser table, I need to edit the schema.yml for the sfDoctrineGuardUser plugin. What is the best way to do this so future updates don't remove these relationships, and rebuilding the models will always maintain/keep these relationships? Thank you in advance -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] find out if user has credentials for route
Hi all, I have a backend application with various access cerdentials for a variety of modules. I'd like to build a navigation list, which should obviously be adjusted depending on what access rights you have. Is there a reasonably easy way to find out if the current user can access a route? If it is easier, it may be sufficient to figure out if the user has rights to index Thanks for any pointers, Jochen -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: doctrine query help needed
Hi, Thanks for your reply. I cannot change my table structure.. I need to use the existing table.. regards Shihab On Sep 7, 8:55 pm, Phil Moorhouse moorhouse.p...@gmail.com wrote: Is your schema already fixed? If not, the normal way to do this would be to have m-m join tables: NewsImage [ news_id, image_id ] EducationImage [ education_id, image_id ] HealthImage [ health_id, image_id] and remove: content_id type from the ContentImage table. Then if you want all news images, something like: $q = Doctrine_Query::create() -from('ContentImage ci') -innerJoin('NewsImage'); $newsImages = $q-execute(); or images for a particular news item: $news-getImages(); On 7 Sep, 15:30, Shihab KB shiha...@gmail.com wrote: dear friends, I have the following tables. News [id, title, …] Education [id, title…..] Health [id, title, ….] ContentImage [id, contented (id of the News, Education, Health), type (like News, Education, Health), path…] The News, Education, Health may or may not have images in the ContentImage table. There is no relationship is set in between News, Education, Health table with ContentImage table. But we can link the programatically by using id=contentid and type = 'News'. I want to write a Doctrine query the return the left outer join between News, Education, Health tables and ContentImage table. Is it possible thru dotrine query? Or do I need to write the query like below, [code] $sql = SELECT * FROM... ; $pdo = Doctrine_Manager::connection()-getDbh(); $data = $pdo-query($sql)-fetchAll(); [/code] Please reply.- Hide quoted text - - Show quoted text - -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en