[symfony-users] How do I put an AND clause in the LEFT JOIN statement?
How do I put an AND clause in the LEFT JOIN statement part? Symfony/Propel/Whatever wants to put it in the WHERE clause... This is the SQL I'm trying to re-create: select * from team_schedule left join team_member_schedule on team_schedule_id = team_schedule.id and team_member_id = 10 and team_id = 1; this is in our action.class.php public static function getTeamSchedulesFromTeamMember($team_member) { $c = new Criteria(); // must be a valid team $c-add(TeamSchedulePeer::TEAM_ID, $team_member-getTeamId()); $c-addJoin(TeamMemberSchedulePeer::TEAM_SCHEDULE_ID, TeamSchedulePeer::ID, Criteria::LEFT_JOIN); $c-addAnd(TeamMemberSchedulePeer::TEAM_MEMBER_ID, $team_member-getId()); return self::doSelect($c); } And this is the WRONG SQL query it generated... SELECT team_schedule.ID, team_schedule.TEAM_ID, team_schedule.PLAYS_AT, ... FROM team_member_schedule LEFT JOIN team_schedule ON (team_member_schedule.TEAM_SCHEDULE_ID=team_schedule.ID) WHERE team_schedule.TEAM_ID=1 AND team_member_schedule.TEAM_MEMBER_ID=37; --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How do I access a validate .yml setting in my template?
Finally a possible solution! If I understand this correctly, you're saying I would put all my errors and min / max values in this FormErrors class (pseudo code below). FormErrors { const PASS_REQUIRED_ERROR = 'A password is required'; } Then in the validate.yml file I would do as you show there fields: password: required: msg: ?php echo FormErrors::PASS_REQUIRED_ERROR ? AND finally in the template I could also do something like: if( password.value == '' ) alert(?php echo FormErrors::PASS_REQUIRED_ERROR ?); Is that correct? And BTW, Kris, I do appreciate the help, my *sigh* is directed at Symfony. rant I'm not a big fan of it so far as I keep hitting issues like the one here and several others, and this list is my only mentor, yet most of my questions either go unanswered or I'm told I can't do what I want to do. Unfortunately I've inherited a site/project that uses Symfony so I'm stuck with it. I think it has a lot of potential, and perhaps my frustration lies with the previous developers and I'm not getting a good example of Symfony's power. Right now though, it seems like more of a hinderance than a help. I find I have to jump through hoops to get even the simplest things working and I'm also absolutely HATING this ORM stuff which does excessive SQL queries. But again, some of this could be out of ignorance and lack of mastery of Symfony as I have of PHP/mySQL. For example. Just yesterday I tried to refactor something into a partial, then include the partial into my layout.php. The partial code all of the sudden didn't have access to variables in it using the include_partial() [or whatever the call is]. So I then do a simple PHP include(PATH.SOMEDELIMETERBS.TO.SOMEDELIMETERBS._partial.php) and it magically worked. WTF!? UGH. /rant Thanks for the help. http://daevid.com -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kris Wallsmith Sent: Wednesday, June 18, 2008 9:57 AM To: symfony users Subject: [symfony-users] Re: How do I access a validate .yml setting in my template? Sighs all around... If all you're concerned about is the error messages you could take advantage of the YAML files being parsed as PHP before being parsed as YAML: fields: my_field: required: msg: ?php echo FormErrors::MY_FIELD_ERROR ? Then you can easily access the error messages from the FormErrors class in your templates. I'm just trying to be helpful, by the way. Kris On Jun 17, 10:01 pm, Daevid Vincent [EMAIL PROTECTED] wrote: Kris, We're not building some rinky-dink toy site here. We're doing a sports social network with hundreds of thousands of concurrent users accessing the site simultaneously. If I can prevent stupid user errors on THEIR end via JS, it adds up to lots of bandwidth saved, CPU and Disk I/O reduced. Using AJAX is just a glorified version of PHP validation. PHP validation is great as a second level of defense for malitious crackers who deliberately turn off JS trying to bypass security (and of couse we have that implemented as already mentioned). But the majority of folks are honest and so JS is perfect for their accidental oops, I forgot that field or oops, I forgot the .com in my email or whatever. I find it inconceivable that the designers of Symfony could make such a glaring oversight as to not give me direct access to the validate.yml file parameters in an easy to access manor. *sigh* d -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kris Wallsmith Sent: Friday, June 13, 2008 8:34 PM To: symfony users Subject: [symfony-users] Re: How do I access a validate .yml setting in my template? Hi Daevid, Take a look at the execution filter to see how symfony uses the validation.yml files: http://trac.symfony-project.com/browser/branches/1.0/lib/filte r/sfExecutionFilter.class.php#L91 More to your point, isn't duplication of the validation logic a larger DRY concern than duplication of error messages? Perhaps you should consider using an AJAX validation mechanism the runs the form parameters through a symfony action and responds 200 or 412 + a JSON object with any error messages. This can easily be accomplished with the handleErrorFoo() methods. Kris On Jun 13, 7:22 pm, Daevid Vincent [EMAIL PROTECTED] wrote: *sigh* Thanks for the reply Richtermeister. I thought I was pretty clear in my email below, but just to re-iterate. I'm trying to prevent the redundancy of having to type a string of error message in the Javascript AND in the .yml file. It seems utterly stupid to me that Symfony has all this validation, and I can set a min/max length and an error string to output, yet doesn't have basic JS validation built in. Further exacerbated by the fact
[symfony-users] Re: a _partial rant
Thanks for that tidbit Peter. But this just illustrates my point. Why should I have to be bothered with passing the variables explicitly when a simple PHP include() works just fine?! It seems that Symfony has just reduced functionality and in the name of MVC or something gone out of it's way to make my life more difficult. That's lame! Make my life easier, not harder. I have enough problems ;-p As for my (premature) problems, I addressed what you said in my earlier rant. Again, perhaps the previous developers didn't know what they were doing and therefore I'm seeing poor examples to follow. But this list has been not very helpful either -- I don't mean that in a mean or derogatory way -- just that I post, and often times it goes unanswered. So I'm stuck trying to figure stuff out on my own, often to no avail, or re-posting (like this initial thread was posted THREE times before Kris gave me something useable). I am really WANTING to like Symfony. I think it has a lot of potential. But it seems I'm always going 2 steps backwards to go 1 step forward with it. And the online documentation kind of sucks. I'm sorry but it does. There is a severe lack of examples, it's very hard to find anything, and if you do find the method, more often than not it's a simple stub! UGH. On the contrary, the php.net website is trivial to use, and the CHM files are amazingly convenient. I use both daily and find the user contributed snippets invaluable. -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Haza Sent: Wednesday, June 18, 2008 12:18 PM To: symfony-users@googlegroups.com Subject: [symfony-users] Re: How do I access a validate .yml setting in my template? Sounds like someone hasn't read the manual: Partials have access to the usual symfony helpers and template shortcuts. But since partials can be called from anywhere in the application, they do not have automatic access to the variables defined in the action calling the templates that includes them, unless passed explicitly as an argument. This makes perfect sense to me. Do like this: ?php include_partial('mypartial', array('mytotal' = $total)) ? and your partial has access to $mytotal. Look at the partials section here: http://www.symfony-project.org/book/1_0/07-Inside-the-View-Layer I don't mind you discussing symfony's problems and shortcomings, but your problems sound a bit premature. All frameworks start with a steep learning curve in my experience. ph On 18. juni. 2008, at 20.58, Daevid Vincent wrote: *snip* For example. Just yesterday I tried to refactor something into a partial, then include the partial into my layout.php. The partial code all of the sudden didn't have access to variables in it using the include_partial() [or whatever the call is]. So I then do a simple PHP include(PATH.SOMEDELIMETERBS.TO.SOMEDELIMETERBS._partial.php) and it magically worked. WTF!? UGH. /rant Thanks for the help. http://daevid.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How do I access a validate .yml setting in my template?
*sigh* Thanks for the reply Richtermeister. I thought I was pretty clear in my email below, but just to re-iterate. I'm trying to prevent the redundancy of having to type a string of error message in the Javascript AND in the .yml file. It seems utterly stupid to me that Symfony has all this validation, and I can set a min/max length and an error string to output, yet doesn't have basic JS validation built in. Further exacerbated by the fact that it appears I can't even pull those min/max/error string values out from the .yml file and display them in my javascript validation routines. So this defeats the whole purpose of MVC, refactoring and write-once-use-many, etc. -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Richtermeister Sent: Friday, June 13, 2008 10:21 AM To: symfony users Subject: [symfony-users] Re: How do I access a validate .yml setting in my template? Hi Daevid, other than parsing the file into an array via the Yaml class I don't think you can get to it. Out of interest, what are you trying to do? Daniel On Jun 12, 2:40 pm, Daevid Vincent [EMAIL PROTECTED] wrote: I asked this before and got no real answer. Is this not possible? Can I not access values of the validate/update.yml file? -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daevid Vincent Sent: Tuesday, June 03, 2008 1:58 PM To: symfony-users@googlegroups.com Subject: [symfony-users] Re: How do I access a validate .yml setting in my template? You misunderstand. We're using that already. But it's assinine to bog down the server just to find out that the person didn't supply a form element properly. That's why God invented Javascript and form validation. The server side validation should be used as a last resort for those unfortunate fools (or crackers trying to trick the system) that don't have JS in their browser. As found herehttp://www.symfony-project.org/book/1_0/10-Forms#Form%20Validation The client-side validation is to be done with custom JavaScript. This is exactly what I'm trying to do! I'm using onClick=return checkForm(this.form); on the submit button. SCRIPT LANGUAGE=JavaScript TYPE=text/javascript !-- ?php //TODO: these should be using the entries from modules\user\validate\update.yml ... how do I do that? ? function checkForm(myForm) { with ( myForm ) { if( new_password.value.length 6 ) { alert(?=__('Please enter a secure password of at least 6 characters.')?); new_password.focus(); new_password.select(); return false; } return true; } //-- /script But how the [EMAIL PROTECTED]($ do I pull the 6 from the update.yml file that my sfFormValidation is using?! http://www.symfony-project.org/book/1_0/05-Configuring-Symfony #The%20... g%20Class Says, you can access settings from within the application code through the sfConfig class. It is a registry for configuration parameters, with a simple getter class method, accessible from every part of the code: // Retrieve a setting parameter = sfConfig::get('param_name', $default_value); The parameter name is the concatenation of several elements, separated by underscores, in this order: * A prefix related to the configuration file name (sf_ for settings.yml, app_ for app.yml, mod_ for module.yml, sf_i18n_ for i18n.yml, and sf_logging_ for logging.yml) * The parent keys (if defined), in lowercase * The name of the key, in lowercase But as you notice it says NOTHING of the _update.yml_ file! I simply want to do something like this in my JS: if( new_password.value.length ?php echo sfConfig::get('update_password_min_length'); ? ) { Is there seriously no way to do this seemingly obvious task built in?!?!? Do I actually have to read the update.yml file with $updateParams = sfYaml::load('modules\user\validate\update.yml'); And parse it out, even though it should be available to me? http://www.symfony-project.org/book/1_0/05-Configuring-Symfony #Browsi... ur%20Own%20YAML%20File -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Stereo Sent: Monday, June 02, 2008 5:51 PM To: symfony users Subject: [symfony-users] Re: How do I access a validate .yml setting in my template? Hi Daevid, I haven't used it myself but you may want to try this plugin: http://trac.symfony-project.com/wiki/sfFormValidationPlugin On Jun 2, 8:27 pm, Daevid Vincent [EMAIL PROTECTED] wrote: I asked this before, but got no replies. Surely this is possible no? I wish to use JS to validate the form first before bogging
[symfony-users] Re: How do I access a validate .yml setting in my template?
I asked this before and got no real answer. Is this not possible? Can I not access values of the validate/update.yml file? -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daevid Vincent Sent: Tuesday, June 03, 2008 1:58 PM To: symfony-users@googlegroups.com Subject: [symfony-users] Re: How do I access a validate .yml setting in my template? You misunderstand. We're using that already. But it's assinine to bog down the server just to find out that the person didn't supply a form element properly. That's why God invented Javascript and form validation. The server side validation should be used as a last resort for those unfortunate fools (or crackers trying to trick the system) that don't have JS in their browser. As found here http://www.symfony-project.org/book/1_0/10-Forms#Form%20Validation The client-side validation is to be done with custom JavaScript. This is exactly what I'm trying to do! I'm using onClick=return checkForm(this.form); on the submit button. SCRIPT LANGUAGE=JavaScript TYPE=text/javascript !-- ?php //TODO: these should be using the entries from modules\user\validate\update.yml ... how do I do that? ? function checkForm(myForm) { with ( myForm ) { if( new_password.value.length 6 ) { alert(?=__('Please enter a secure password of at least 6 characters.')?); new_password.focus(); new_password.select(); return false; } return true; } //-- /script But how the [EMAIL PROTECTED]($ do I pull the 6 from the update.yml file that my sfFormValidation is using?! http://www.symfony-project.org/book/1_0/05-Configuring-Symfony#The%20sfConfi g%20Class Says, you can access settings from within the application code through the sfConfig class. It is a registry for configuration parameters, with a simple getter class method, accessible from every part of the code: // Retrieve a setting parameter = sfConfig::get('param_name', $default_value); The parameter name is the concatenation of several elements, separated by underscores, in this order: * A prefix related to the configuration file name (sf_ for settings.yml, app_ for app.yml, mod_ for module.yml, sf_i18n_ for i18n.yml, and sf_logging_ for logging.yml) * The parent keys (if defined), in lowercase * The name of the key, in lowercase But as you notice it says NOTHING of the _update.yml_ file! I simply want to do something like this in my JS: if( new_password.value.length ?php echo sfConfig::get('update_password_min_length'); ? ) { Is there seriously no way to do this seemingly obvious task built in?!?!? Do I actually have to read the update.yml file with $updateParams = sfYaml::load('modules\user\validate\update.yml'); And parse it out, even though it should be available to me? http://www.symfony-project.org/book/1_0/05-Configuring-Symfony#Browsing%20Yo ur%20Own%20YAML%20File -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Stereo Sent: Monday, June 02, 2008 5:51 PM To: symfony users Subject: [symfony-users] Re: How do I access a validate .yml setting in my template? Hi Daevid, I haven't used it myself but you may want to try this plugin: http://trac.symfony-project.com/wiki/sfFormValidationPlugin On Jun 2, 8:27 pm, Daevid Vincent [EMAIL PROTECTED] wrote: I asked this before, but got no replies. Surely this is possible no? I wish to use JS to validate the form first before bogging down my server, it would be nice to use the same .yml entries rather than hard-code them into the page. Sent: Monday, May 19, 2008 7:00 PM In my modules\user\validate\register.yml file I have: usernameSizeValidator: class: sfStringValidator param: min:4 min_error: Username must be 4 or more characters max:15 max_error: Username must be 15 or less characters How can I access the min and max values to display in my registerSuccess.php page? As in, No spaces minimum 4 characters, maximum 15 characters. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How do I access a validate .yml setting in my template?
You misunderstand. We're using that already. But it's assinine to bog down the server just to find out that the person didn't supply a form element properly. That's why God invented Javascript and form validation. The server side validation should be used as a last resort for those unfortunate fools (or crackers trying to trick the system) that don't have JS in their browser. As found here http://www.symfony-project.org/book/1_0/10-Forms#Form%20Validation The client-side validation is to be done with custom JavaScript. This is exactly what I'm trying to do! I'm using onClick=return checkForm(this.form); on the submit button. SCRIPT LANGUAGE=JavaScript TYPE=text/javascript !-- ?php //TODO: these should be using the entries from modules\user\validate\update.yml ... how do I do that? ? function checkForm(myForm) { with ( myForm ) { if( new_password.value.length 6 ) { alert(?=__('Please enter a secure password of at least 6 characters.')?); new_password.focus(); new_password.select(); return false; } return true; } //-- /script But how the [EMAIL PROTECTED]($ do I pull the 6 from the update.yml file that my sfFormValidation is using?! http://www.symfony-project.org/book/1_0/05-Configuring-Symfony#The%20sfConfi g%20Class Says, you can access settings from within the application code through the sfConfig class. It is a registry for configuration parameters, with a simple getter class method, accessible from every part of the code: // Retrieve a setting parameter = sfConfig::get('param_name', $default_value); The parameter name is the concatenation of several elements, separated by underscores, in this order: * A prefix related to the configuration file name (sf_ for settings.yml, app_ for app.yml, mod_ for module.yml, sf_i18n_ for i18n.yml, and sf_logging_ for logging.yml) * The parent keys (if defined), in lowercase * The name of the key, in lowercase But as you notice it says NOTHING of the _update.yml_ file! I simply want to do something like this in my JS: if( new_password.value.length ?php echo sfConfig::get('update_password_min_length'); ? ) { Is there seriously no way to do this seemingly obvious task built in?!?!? Do I actually have to read the update.yml file with $updateParams = sfYaml::load('modules\user\validate\update.yml'); And parse it out, even though it should be available to me? http://www.symfony-project.org/book/1_0/05-Configuring-Symfony#Browsing%20Yo ur%20Own%20YAML%20File -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Stereo Sent: Monday, June 02, 2008 5:51 PM To: symfony users Subject: [symfony-users] Re: How do I access a validate .yml setting in my template? Hi Daevid, I haven't used it myself but you may want to try this plugin: http://trac.symfony-project.com/wiki/sfFormValidationPlugin On Jun 2, 8:27 pm, Daevid Vincent [EMAIL PROTECTED] wrote: I asked this before, but got no replies. Surely this is possible no? I wish to use JS to validate the form first before bogging down my server, it would be nice to use the same .yml entries rather than hard-code them into the page. Sent: Monday, May 19, 2008 7:00 PM In my modules\user\validate\register.yml file I have: usernameSizeValidator: class: sfStringValidator param: min:4 min_error: Username must be 4 or more characters max:15 max_error: Username must be 15 or less characters How can I access the min and max values to display in my registerSuccess.php page? As in, No spaces minimum 4 characters, maximum 15 characters. Username will be shown publicly. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: blog and or email platform needed to incorporate into our social site
Actually Eno, as Halfer pointed out, there is a Blog plugin for symfony: http://trac.symfony-project.com/wiki/sfSimpleBlogPlugin This is exactly the kind of answer/thing I am looking for. Now does anyone know of an email plugin (symfony or otherwise). The squirrelmail and roundcube projects are for REAL mail. I need more of a linked in, myspace, facebook mail system. Where the mail doesn't actually leave the server. It's local. I'm not even sure where to search for such a beast. All my searching has come up with either email service providers or the kinds mentioned above (like Horde/Imp) that are actually just GUIs to SMTP/IMAP/POP. -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Eno Sent: Friday, May 30, 2008 11:57 AM To: symfony users Subject: [symfony-users] Re: blog and or email platform needed to incorporate into our social site On May 29, 9:24 pm, Daevid Vincent [EMAIL PROTECTED] wrote: Wondering if anyone knows of, or can recommend (or avoid for that matter), any kind of web logging (blogging as the kids call it) and / or email system. By email system, I refer to the kind like you'd find on MySpace - compose, inbox, sent, folders for things like friend requests, comments, etc) And of course a blog is pretty straight forward. You post a bunch of ramblings and people can comment on them. Basic editing features of course. And ideally a thumbs up/down or ranking system. This sounds like you want to use something already built - symfony doesn't give you that (you could use symfony to BUILD something like that but out of the box its just a tool). WebMail systems: look at squirrelmail or roundcube. Blog systems: Look at Wordpress, TextPattern, Typo (there are tons out there). You dont mention what the social site is? Nor do you mention what sort of languages and/or database it uses, so our answers can only be generic. Moreover, if you want something pre-built then you're probably asking on the wrong mailing list. -- --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Website uptime
http://mon.itor.us @ 11:57AM PST The irony. Mon. itor. us Error Internal server error. Please, try later. BAH BAHHAHA HAHAHAHHAHAHA Seriously, just install Nagios http://www.nagios.org on a few servers that point at each other and don't waste your time with these free services - you get what you pay for. (well, Nagios is free too, but in a FOSS way, not a crappy-service way) -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of superhaggis Sent: Sunday, June 01, 2008 3:32 PM To: symfony users Subject: [symfony-users] Re: Website uptime We use http://mon.itor.us/ - another great free service. :-) On Jun 1, 2:32 pm, Michael Nolan [EMAIL PROTECTED] wrote: We use Pingdom. On May 31, 2:06 pm, Tom Haskins-Vaughan [EMAIL PROTECTED] wrote: Hi Guys, This is ever so slightly off topic, but I was wondering what people use to monitor uptime with their websites? Tom -- Tom Haskins-Vaughan Temple Street Media: Design and Development for the Web [EMAIL PROTECTED] |www.templestreetmedia.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How do I access a validate .yml setting in my template?
I asked this before, but got no replies. Surely this is possible no? I wish to use JS to validate the form first before bogging down my server, it would be nice to use the same .yml entries rather than hard-code them into the page. Sent: Monday, May 19, 2008 7:00 PM In my modules\user\validate\register.yml file I have: usernameSizeValidator: class: sfStringValidator param: min:4 min_error: Username must be 4 or more characters max:15 max_error: Username must be 15 or less characters How can I access the min and max values to display in my registerSuccess.php page? As in, No spaces minimum 4 characters, maximum 15 characters. Username will be shown publicly. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: symfony and Vim
FYI: http://www.e-texteditor.com/ -Original Message- From: Tom Haskins-Vaughan I have just started using Vim for my symfony development and so far (touch wood) I find it very good. (I did try Textmate once and loved it, but I can't justify buying a Mac for that sole purpose). --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] blog and or email platform needed to incorporate into our social site
Wondering if anyone knows of, or can recommend (or avoid for that matter), any kind of web logging (blogging as the kids call it) and / or email system. By email system, I refer to the kind like you'd find on MySpace - compose, inbox, sent, folders for things like friend requests, comments, etc) And of course a blog is pretty straight forward. You post a bunch of ramblings and people can comment on them. Basic editing features of course. And ideally a thumbs up/down or ranking system. We're looking to incorporate both features into our social network site. They're not hard to make, just time consuming, and I figured since they're such common features, perhaps someone has made a Symfony plug-in / module, or knows of a third party one (ideally we host it on our site, but I suppose externally hosted is an option if it's _really good_ and flexible.) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How do you sync your production db ?
-Original Message- symfony has nice features to deploy your applications and to create the database from the schema files etc. However, once you got data on your production machine its not that easy to keep the database layout in sync, so how do you do it ? Since my symfony project is not production ready i am thinking about this, and these are the possibilities that came to my mind: 1. Edit the database on the prod. machine manually and alter the tables to match local tables (very bad) 2. Dump the data on the prod. machine, sync the project and run propel- build-all, and then reimport the dump again (quite ok, but still some work) Well, in our case each developer has a VMWare (or other sandbox). Then we have a testing server. And finally production. We do all the normal propel stuff, AND in data/sql/ we created an 'update.sql' file where any database modifications are added to as ALTER statements. These are dated with comments. Then we manually run the proper SQL statements as needed (backup prior, yadda yadda). The database doesn't really change all that much once you get it built and your site is live. It's mostly a new column here or there. For really big changes (for example, today I added a zipcode lookup for city/state and 'friends near you' feature) I just created a zipcode.sql file. It's a one-off and was like 100k so no sence in cluttering the update.sql file. We use SQLYog. So when you make a change to the table via the GUI, it will show you the ALTER statement used. Simply copy/paste it to update.sql. It also has a great feature to syncronize two databases. We don't use it much, but it comes in handy if they deviate too far for some reason -- like when you are initially setting this process up and say you had sloppy/lazy coders. Daevid. http://daevid.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How can I tell if a $user is my user?
In my user/templates/viewSuccess.php I have a block of HTML that I don't want to show if I'm looking at my own profile (Add friend / Email user). How can I tell if the user I'm looking at is the one I'm logged in as? In normal PHP, I'd have saved my user's database ID in a $_SESSION upon login and compare to the ID of the record I just pulled up. Simple. I made the mistake of doing this (so I could look for some similarities in variables/methods): var_dump($sf_user); var_dump($user); And was horrified to see that $sf_user consumed literally 60,136 LINES! Are you f'n kidding me!?!! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How do I bypass symfony to make my own editor section page?
I need to create a web page accessible from /editor/foo.php How can I do that without all the symfony overhead and involvement? Is there some routing rule I need to add? Where would I put foo.php then (there is no web directory)? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How do I know in a template if this is the first time the page was shown, or a re-submit?
In my template/registerSuccess.php I want to do something like this, however I am getting undefined method errors for $this (no matter what incantation I've tried) All I want to do is have the checkbox checked by default (upon entering the registration page), but if the user un-checks it, then I want to respect that too (in case there are errors with their submission and we have to show the page again). What is the way to do this in symfony? In normal PHP, I'd simply just see if $_POST['newsletter'] is set. input type=checkbox name=newsletter ?php if ( !$this-getRequest()-hasRequestParameter('newsletter') || $sf_params-get('newsletter') ) echo 'checked' ? / ?php echo __('Sign up for our newsletter.') ? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Javascript form validation built in?
I'm curious if there is a standard library or practice for form validation using JS just as there is for PHP. It is sort of baffling to me as to why symfony would omit something as useful as this. Seems silly that if symfony knows a form field is required, what kind of form element it is, what it's name/id is, and even what error message to display, that it can't plug these into some standard JS functions. In fact there's even a form_tag() that could be used to automatically stick in the proper onSubmit handler. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How do I access a validate .yml setting in my template?
In my modules\user\validate\register.yml file I have: usernameSizeValidator: class: sfStringValidator param: min:4 min_error: Username must be 4 or more characters max:15 max_error: Username must be 15 or less characters How can I access the min and max values to display in my registerSuccess.php page? As in, No spaces minimum 4 characters, maximum 15 characters. Username will be shown publicly. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: select_month_tag() not respecting NULL default [SOLVED]
Well, I didn't get a single reply to this. Awesome. Turns out you have to pass in '' NOT null as the documentation erroneously says. *sigh* Maybe someone can update the docs to reflect the real deal, or else fix the functions so that they work as designed (with null). -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daevid Vincent Sent: Thursday, May 08, 2008 4:57 PM To: symfony-users@googlegroups.com Subject: [symfony-users] select_month_tag() not respecting NULL default I am new to symfony. In some page that already existed, I've been tasked to fix a bug. There is this block of code: ?php echo select_month_tag('bmonth', null, 'include_custom='.__('Month'), array('style'='margin-left: 10px;')) ? - ?php echo select_day_tag('bday', null, 'include_custom='.__('Day')) ? - ?php echo select_year_tag('byear', null, array('year_start'='1900', 'year_end'='2008', 'include_custom'=__('Year'))) ? But what happens is that when we load the page, the select boxes are all set to the current date values. If I put 1 instead of null, they obviously go to January 1st. I want them to each be defaulting to the top option of Month, Day and Year so the user must choose the proper values. What gives? http://www.symfony-project.org/api/1_0/DateFormHelper#method_select_month_ta g By default, the $value parameter is set to todayapos;s month. To override this, simply pass an integer (1 - 12) to the $value parameter. You can also set the $value parameter to null which will disable the $value, however this will only be useful if you pass apos;include_blankapos; or apos;include_customapos; to the $options parameter. (also, what's with the apos; in the docs? Can't someone fix those? Why even use that at all - just use ' and avoid this messy output) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How to prevent validation errors on first view of the form (before any submit)?
We have a system where the user puts in an invitation code and then is redirected to a registration page. I can't figure out how to prevent this from happening the first time the user see's the page. In case the image doesn't go though the list, it is basically. ? Username is required ? Choose a Username [_] For every field on the form. L I thought I read in the guide or in the Askeet tutorial a way to fix that, but I've been hunting for hours and can't 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-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~--- inline: image001.png
[symfony-users] select_month_tag() not respecting NULL default
I am new to symfony. In some page that already existed, I've been tasked to fix a bug. There is this block of code: ?php echo select_month_tag('bmonth', null, 'include_custom='.__('Month'), array('style'='margin-left: 10px;')) ? - ?php echo select_day_tag('bday', null, 'include_custom='.__('Day')) ? - ?php echo select_year_tag('byear', null, array('year_start'='1900', 'year_end'='2008', 'include_custom'=__('Year'))) ? But what happens is that when we load the page, the select boxes are all set to the current date values. If I put 1 instead of null, they obviously go to January 1st. I want them to each be defaulting to the top option of Month, Day and Year so the user must choose the proper values. What gives? http://www.symfony-project.org/api/1_0/DateFormHelper#method_select_month_ta g By default, the $value parameter is set to todayapos;s month. To override this, simply pass an integer (1 - 12) to the $value parameter. You can also set the $value parameter to null which will disable the $value, however this will only be useful if you pass apos;include_blankapos; or apos;include_customapos; to the $options parameter. (also, what's with the apos; in the docs? Can't someone fix those? Why even use that at all - just use ' and avoid this messy output) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] http://www.symfony-project.org/ is down. again.
I'm new to symphony (but a guru at PHP) and this is my frist post. I've been taking the tutorial off and on since 04/21 (between reading the paper book I purchased and doing my other job duties), and in that time, I've been frustrated by the number of times the http://www.symfony-project.org/ site has been down. Specifically the Askeet tutorial (I assume they're on the same site). It is down right now in fact. L Is this a problem with the hosting provider or symphony itself? Might I suggest http://www.nagios.org to monitor and alert someone whenever this occurs. I'm getting concerned, as we're developing a rather large site in this framework, and this constant down-time doesn't instill a sense of security or enterprise-iness (if I may coin a new word). What is the largest known site to use symphony? Can it handle hundreds of thousands of users? Can it handle millions of users/requests? (currently we do have a load balancer, two LAP web servers and two mySQL servers) I've never been one for using frameworks due to all the overhead, and already I'm noticing there are excessive SQL queries. Often times the same query multiple times on the same page! I'm sure some of this can be fixed with refactoring, or direct SQL, but this is also another problem I've experienced with Ruby on Rails (and I assume all frameworks have this symptom). Nonetheless this is what the company I joined is using, so alas it's too late. Don't get me wrong, I think a framework is wonderful if you want a quick prototype, but they seem to try and be all things to all people, and that doesn't come free. The cost is usually either complexity or speed (or lack thereof). But I digress. I look forward to the day I'm competent enough in symphony to actually start coding brain - to - keys as it were, as I am with plain PHP. Perhaps then I will be swayed. In any event, can someone please get the site back up and working ASAP. every minute it's down is another minute I slip behind in my learning and ultimately this is sliding our limited-funded company. So, in this case, time truly is money. Thanks! I cross-posted as I wasn't sure which is the best email to send this to. And with the site down, I had no direct email contact information. What is the usual protocol for notification of this type of event? Daevid. http://daevid.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---