[symfony-users] Routing with sf_method question

2010-12-06 Thread Michael Smith
I have the following routing.yml: lead_import_upload: url: /lead/import.:sf_format param: { module: lead, action: importUpload, sf_format: html } requirements: { sf_method: get } lead_import_config: url: /lead/import.:sf_format param: { module: lead, action: importConfig,

[symfony-users] Re: Routing with sf_method question

2010-12-06 Thread Michael Smith
... http://redotheweb.com/2008/08/08/add-request-method-requirement-to-ro...Does that shed any light for you? On Mon, Dec 6, 2010 at 11:52, Michael Smith sitecr...@gmail.com wrote: I have the following routing.yml: lead_import_upload:  url:     /lead/import.:sf_format  param

[symfony-users] Re: Newbie problems: sfFlashMessagePlugin installation

2010-01-06 Thread Michael Smith
Also symfony plugin:publish-assets does a copy on windows and creates a symbolic link on *nix platforms. On Jan 6, 12:01 pm, Dineu Henrique dineu...@gmail.com wrote: Problem solved!    The answer was: Windows is helpless!... I just created all the environment at Kubuntu and the things worked

[symfony-users] Reusing Admin List in Another Module

2009-08-07 Thread Michael Smith
I used the admin generator to generate a backend for my app which has Company and CompanyAddress objects. I want to put a list of that company's addresses on its show page and was wondering what the best practice for this is. I thought I could just use include_partial('company_address/list') but

[symfony-users] Re: sfDoctrineGuardPlugin strange behavior

2009-08-07 Thread Michael Smith
Do you have any credentials declared in your generator.yml? http://www.symfony-project.org/book/1_2/14-Generators#chapter_14_sub_restricting_user_actions_using_credentials On Aug 7, 11:43 am, Kevin Bond kevinb...@gmail.com wrote: Having some odd behavior with this plugin. Here is what

[symfony-users] Re: Change the Edit behaviour to Copy

2009-08-07 Thread Michael Smith
You could add a new action that did an $article-copy($deep) (syntax is doctrine I believe there is something similar in propel) and then pass to the form which will allow you to make any changes and then save as normal On Aug 7, 7:53 am, Nayef naye...@gmail.com wrote: Hi Everyone, I am trying

[symfony-users] Re: BUG: sfYaml can't parse collections

2009-08-07 Thread Michael Smith
try: Recipients: - title: 'Mr' firstname: 'Peter' lastname: 'Pan' - title: 'Mr' firstname: 'John' lastname: 'Doe' On Aug 7, 12:16 am, danielwinter spinw...@gmail.com wrote: Why is it that sfYaml in Symfony 1.0 can parse the YAML below but the sfYaml

[symfony-users] Re: Object delete(), only by success

2009-03-11 Thread Michael Smith
Try using transactions if your db supports it. Begin the transaction before setting the rank and if the object can't be deleted roll back otherwise commit it. On Mar 11, 4:47 pm, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Hi everybody, In one of my class models, I added an

[symfony-users] Re: sfDoctrineActAsTaggablePlugin problem removing tags

2009-03-06 Thread Michael Smith
') -whereIn('t.name', $removed_tags); On Mar 4, 10:31 am, Michael Smith sitecr...@gmail.com wrote: I'm having an issue with -removeAllTags() removing the association to tags. The below test case will fail with the titi tag still associated after

[symfony-users] Re: sfDoctrineActAsTaggablePlugin problem removing tags

2009-03-06 Thread Michael Smith
be best to create a ticket? - Jon On Fri, Mar 6, 2009 at 3:21 PM, Michael Smith sitecr...@gmail.com wrote: There is a bug in the index by statement where the table alias is not referenced. Here is a patch file for the change: Index: TaggableTemplate.class.php

[symfony-users] sfDoctrineActAsTaggablePlugin problem removing tags

2009-03-04 Thread Michael Smith
I'm having an issue with -removeAllTags() removing the association to tags. The below test case will fail with the titi tag still associated after -save(). Any ideas what is causing this using symfony 1.2 svn and sfDoctrineActAsTaggablePlugin svn? $object = _create_object();

[symfony-users] Re: Symfony integration with Zend Lucene Search library

2009-02-26 Thread Michael Smith
For info on loading the zend framework see http://www.symfony-project.org/jobeet/1_2/Propel/en/16#chapter_16_sub_installing_and_configuring_the_zend_framework also for using zend search with symfony http://www.symfony-project.org/jobeet/1_2/Propel/en/17 Thanks, Michael On Feb 26, 11:16 am, Java

[symfony-users] Re: Redirect escaping ampersand

2009-02-25 Thread Michael Smith
in XHTML documents. Are your links working or are they broken? Tom Michael Smith wrote: If I use (in an action) $this-redirect('history/index? date_from=autodate_to=auto') it will escape the ampersand and the url will be /summary.html?date_from=autoamp;date_to=auto. A work around

[symfony-users] Re: Redirect escaping ampersand

2009-02-25 Thread Michael Smith
Yes On Feb 25, 11:01 am, Tom Haskins-Vaughan t...@templestreetmedia.com wrote: Is date_from available? Michael Smith wrote: It redirects to the page but date_to does not appear in the request parameters of the page unless I decode the special chars before redirecting. On Feb 25, 10

[symfony-users] Re: Redirect escaping ampersand

2009-02-25 Thread Michael Smith
? Michael Smith wrote: Yes On Feb 25, 11:01 am, Tom Haskins-Vaughan t...@templestreetmedia.com wrote: Is date_from available? Michael Smith wrote: It redirects to the page but date_to does not appear in the request parameters of the page unless I decode the special chars before

[symfony-users] Re: Redirect escaping ampersand

2009-02-25 Thread Michael Smith
? Have you tried a different browser? Do you get a different result? Michael Smith wrote: Sorry, 1.2 branch On Feb 25, 11:29 am, Tom Haskins-Vaughan t...@templestreetmedia.com wrote: No, but which branch? 1.0, 1.1, 1.2, 1.3? Michael Smith wrote: The latest svn. I did an update right

[symfony-users] Override save() of embedded forms

2009-01-28 Thread Michael Smith
I have an embedded sfFormDoctrine which I was trying to override the save method so that if key fields are blank then the object isn't saved to the db but it appears that saveEmbeddedForms() at line 396 saves the object of embeded forms directly without calling the embedded form's save method. Is

[symfony-users] Get number of values in a filter form

2008-12-12 Thread Michael Smith
I want to customize the admin generator template with the number of filters that are currently applied if any. Is there a way to get this easily from the generated filter form? The code below works but I was wondering if there was a better way. $cx = 0; foreach($form-getDefaults() as $default){

[symfony-users] sfDoctrine and overriding plugin schemas

2008-06-27 Thread Michael Smith
Is there a way using Doctrine to override or add columns to the schema of a plugin like sfPropelAlternativeSchemaPlugin? I can just use the extension classes setTableDefinition() but is there a way to do it from my schema file itself? Thanks, Michael

[symfony-users] Re: Symfony 1.1 task - can't use SoapClient

2008-06-26 Thread Michael Smith
The command line php is probably using a different php.ini which doesn't have the soap extension enabled. Check c:\windows\php.ini Thanks, Michael On Jun 26, 2:43 am, obalais [EMAIL PROTECTED] wrote: Hi every one. I'm currently developping a task with the symfony 1.1 framework. This task use

[symfony-users] Custom Module Config File

2008-05-13 Thread Michael Smith
I want to use my own yml config file in the module config dir. I have the config handler setup, but symfony 1.0 never seems to check the module/config dir for the specified yaml with: include(sfConfigCache::getInstance()-checkConfig('config/list.yml')); I checked sfLoader::getConfigPaths() and

[symfony-users] Re: Symfony 1.1Dev - sfWidgetFormInputCheckbox (checked value ?)

2008-04-25 Thread Michael Smith
I think Joao is trying to set the value to a number. I use the name of the widget to store this info $widgets = $form-getWidgetSchema(); $widgets[123] = new sfWidgetFormInputCheckbox(); and after validation use this info from the $form-getValues() Thanks, Michael On Apr 25, 7:35 am, Cédric

[symfony-users] Module config files

2008-03-10 Thread Michael Smith
I want to use my own yml config file in the module config dir. I have the config handler setup, but symfony never seems to check the module/ config dir for the specified yaml with: include(sfConfigCache::getInstance()- checkConfig(sfConfig::get('sf_app_config_dir_name').'/lists/ list.yml')); I

[symfony-users] Date fields in sf1.1 forms

2008-03-06 Thread Michael Smith
Is it possible to use a js date picker like input_date_tag() with the sfWidgetFormDate class in the form framework? Thanks, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to

[symfony-users] Re: Advanced propel question

2008-02-07 Thread Michael Smith
parent::getActivitylogs($criteria) should return an array of objects so if you know you are going to get one result you could return current(parent::getActivitylogs($criteria)) which should be the first object. Thanks, Michael On Feb 7, 12:03 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

[symfony-users] Re: Increasing the amount of information in the symfony logs

2008-01-31 Thread Michael Smith
Give sfErrorLoggerPlugin a try http://trac.symfony-project.com/wiki/sfErrorLoggerPlugin there is even a screencast http://www.symfony-project.com/screencast/sfErrorLoggerPlugin Thanks, Michael On Jan 31, 10:00 am, Bernhard Schussek [EMAIL PROTECTED] wrote: Hello all! I manage a live

[symfony-users] Re: Increasing the amount of information in the symfony logs

2008-01-31 Thread Michael Smith
... Regards Bernhard 2008/1/31 Michael Smith [EMAIL PROTECTED]: Give sfErrorLoggerPlugin a tryhttp://trac.symfony-project.com/wiki/sfErrorLoggerPlugin there is even a screencasthttp://www.symfony-project.com/screencast/sfErrorLoggerPlugin Thanks, Michael

[symfony-users] Re: Doctrine or Propel 1.3

2008-01-25 Thread Michael Smith
Most of the ActAs plugins for propel can be done in doctrine with class templates http://www.phpdoctrine.org/documentation/manual/1_0?one-page#class-templates without the need for a plugin. Thanks, Michael On Jan 25, 3:32 am, Lee Bolding [EMAIL PROTECTED] wrote: OK, looks like the consensus

[symfony-users] Re: Doctrine or Propel 1.3

2008-01-25 Thread Michael Smith
to change code in my model objects, otherwise I'll never upgrade my plugins because I'll have to make changes to those too. Lee Bolding w:http://www.leesbian.net -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Smith Sent: 25

[symfony-users] sfDoctrine Attributes

2008-01-11 Thread Michael Smith
I wanted my enum fields to use mysql enums so I created the following doctrine.yml: all: attributes: #use mysql enums instead of int use_native_enum: true This didn't effect it. I checked out sfDoctrineDatabase and added print_r($this-_doctrineConnection-getAttributes()); to the end

[symfony-users] Re: sfDoctrine Attributes

2008-01-11 Thread Michael Smith
attributes manually at the code level. Thanks, Jon On Jan 11, 2008 2:00 PM, Michael Smith [EMAIL PROTECTED] wrote: I wanted my enum fields to use mysql enums so I created the following doctrine.yml: all: attributes: #use mysql enums instead of int use_native_enum: true

[symfony-users] Re: I18n in Action

2007-11-07 Thread Michael Smith
The n should be N as in sfLoader::loadHelpers(array('I18N')); On Nov 7, 9:29 am, Jonas Schnelli [EMAIL PROTECTED] wrote: Hi How can i use __() function in actions? i've tried to load it with: sfLoader::loadHelpers(array('I18n')); but then i got a error because of double declaration?

[symfony-users] Re: php 5.1 compatibility

2007-10-29 Thread Michael Smith
Is $this-getTrainings() returning a Trainings object or an array containing 1 Trainings object? Michael On Oct 26, 3:21 pm, Jay Klehr [EMAIL PROTECTED] wrote: PHP isn't complaining that the method doesn't exist, but rather that $this-getTrainings() is not an object. Jay Michael Smith

[symfony-users] Re: php 5.1 compatibility

2007-10-29 Thread Michael Smith
do a var_dump($this-getTrainings()) it will print directly to output so it will probably mess up the output in the browser see the tip in http://www.php.net/manual/en/function.var-dump.php if this a problem. If it is an array current($this-getTrainings())-__toString() should work. If it is an

[symfony-users] Re: php 5.1 compatibility

2007-10-26 Thread Michael Smith
I've had similar problems with concatenation. Try return $this- getTrainings()-__toString() . ' ('.$this-getDate('m/d/Y').')'; Michael On Oct 26, 8:23 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, My development server runs php 5.2 and prod runs 5.1. I am having trouble with the data

[symfony-users] Re: Can Symfony be configured to serve multiple domains?

2007-10-18 Thread Michael Smith
They do something similar in the askeet tutorial http://www.symfony-project.com/askeet/1_0/18 Michael On Oct 18, 7:26 am, Ian P. Christian [EMAIL PROTECTED] wrote: Noam wrote: Hi, I build small to medium size web sites in PHP/MySQL. Can I configure a single Symfony installation to

[symfony-users] Re: Form error and i18n

2007-08-20 Thread Michael Smith
I believe the form_error() already makes a call to __() if i18n is on. I'm not sure how you specify an alternate message file for it though. Try digging into its source. On Aug 20, 5:18 am, Tchinkatchuk [EMAIL PROTECTED] wrote: Hi everybody ! I need to display form_error with i18n. I tried

[symfony-users] Re: Works with MySQL 4, doesn't with 5

2007-08-17 Thread Michael Smith
I had the same problem and modified BasePeer-doInsert() and BasePeer- doUpdate() to escape the field names. It works for MySQL I'm not sure of others. Change . ( . implode(,, $columns) . ) to . (` . implode(`,`, $columns) . `) and

[symfony-users] Re: Handling Foreign Key Constraints in the applcation

2007-07-31 Thread Michael Smith
You have to pares the exception message to determine if it was a foreign key and which one it was. I wish there was a cleaner way of doing it but the function below works for mysql at least. /** * Parses out the table, field, and error message from a foreign key failure

[symfony-users] Getting a template's altBody

2007-06-07 Thread Michael Smith
I'm using a batch script for sending emails like the snippet http://www.symfony-project.com/snippets/snippet/47 . I get the html main body by calling $mail-setBody($this-getPresentationFor('email', 'newsletter')). I was wondering if there was a way to get the altbody template parsed like