[symfony-users] Re: where do most Symfony developers resize images, in the Form class, or in a validator?

2009-09-03 Thread harryjekyll
I will create a class that handle that, and passing some parameters I will do the resize/crop there. In this way you can reuse the code say from a batch script or the backend, etc. On Sep 3, 2009, at 1:35 PM, Jake Barnes wrote: I've a form that allows users to upload images that can

[symfony-users] how to get the module name bu giving a route name

2009-09-03 Thread Ahsanul
Hello all, I have the route name and I want to get the module name of the route. just wondering what could be the way to find it! for example: Zip: url: home/:zip param: { module: home, action: results } so, I have the route name Zip and I want to get the module name which is home in this

[symfony-users] Re: Primary Key Forgery Attack?

2009-09-03 Thread Crafty_Shadow
Would you share your solution? I would suspect one way to go about doing it is keeping the current ID in the session (as a flash variable) and comparing it upon post. On Sep 2, 7:03 pm, Jeremy Thomerson jeremythomer...@gmail.com wrote: Yeah - but it's better to have both kinds of security.  The

[symfony-users] Re: sfForm-save() for an update

2009-09-03 Thread Krishan .G
Using both solutions getting following error.. Cannot insert a value for auto-increment primary key [Profile.ID] :( On Mon, Aug 31, 2009 at 6:00 PM, Alexandre SALOME alexandre.sal...@gmail.com wrote: 2 solutions : - check the id field is set and be sure it is rendered in form (hidden

[symfony-users] Re: can't use Criteria() class in frontendConfiguration.class.php

2009-09-03 Thread Davide Borsatto
I don't know what you want to do, but you can try in myUser.class.php something like class myUser extends sfBasicSecurityUser { public function initialize(sfEventDispatcher $dispatcher, sfStorage $storage, $options = array()) { parent::initialize($dispatcher, $storage, $options); //

[symfony-users] Re: can't use Criteria() class in frontendConfiguration.class.php

2009-09-03 Thread ev...@freshheads.com
You should take a look at the symfony Routing Classes if your Criteria is based on the url (sfRoute / sfPropelRoute). There you can catch the url and do your database logic... Note, every defined route should then use that class ;) Or you should take a look at symfony Filters (sfFilter)

[symfony-users] Re: can't use Criteria() class in frontendConfiguration.class.php

2009-09-03 Thread CaffeineInc
I would suggest reading the filter chapter again. On Sep 2, 8:56 pm, javo javom...@gmail.com wrote: Hi there, I've read many Symfony docs and tried to explore Symfony code but I can't figure out where can I put some code that will be executed by every module/action (something like

[symfony-users] my first plugin

2009-09-03 Thread berni
hello, I write my first plugin. This plugin will fetch data from google analytics api but I have one problem - plugin not work. I make default structure: plugins + sfGoogleAnalytics (name of my plugin) + + config + + modules + + + googleAnalytics + + + + actions + + + + lib + + + + config I

[symfony-users] Re: my first plugin

2009-09-03 Thread Thomas Rabaix
name it *sfGoogleAnalyticsPlugin* On Thu, Sep 3, 2009 at 12:25 PM, berni andr...@itma.pl wrote: hello, I write my first plugin. This plugin will fetch data from google analytics api but I have one problem - plugin not work. I make default structure: plugins + sfGoogleAnalytics (name of

[symfony-users] Re: how to get the module name bu giving a route name

2009-09-03 Thread Ahsanul
Would be glad if anyone could help! --~--~-~--~~~---~--~~ 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

[symfony-users] Re: sfDoctrineActAsTaggablePlugin question

2009-09-03 Thread Kevin Bond
Yes, I get an error Couldn't find class tg On Wed, Sep 2, 2009 at 1:32 PM, Andrei Dziahel trickster...@gmail.comwrote: Hi. Have you tried to pass to getPopulars() a query similar to this one? $q = Doctrine_Query::create()-from('Article a')-where('a.active = ?', true); 2009/9/1 Kevin

[symfony-users] Re: how to get the module name bu giving a route name

2009-09-03 Thread Thomas Rabaix
$routes = sfContext::getInstance()-getRouting()-getRoutes(); $route = $routes['Zip']; You can then have access to the sfRoute object On Thu, Sep 3, 2009 at 12:51 PM, Ahsanul ahsanu...@gmail.com wrote: Would be glad if anyone could help! -- Thomas Rabaix http://rabaix.net

[symfony-users] Re: my first plugin

2009-09-03 Thread Bernhard Schussek
Other than that, make sure to enable the plugin in the project configuration: $this-enablePlugins('nameOfThePlugin'); Bernhard -- Software Architect Engineer Blog: http://webmozarts.com --~--~-~--~~~---~--~~ You received this message because you are subscribed

[symfony-users] Re: how to get the module name bu giving a route name

2009-09-03 Thread Germana Oliveira
Question: Why do you need to know the route??? is it important?? or you just want to know the module name?? Thomas Rabaix escribió: $routes = sfContext::getInstance()-getRouting()-getRoutes(); $route = $routes['Zip']; You can then have access to the sfRoute object On Thu, Sep 3, 2009

[symfony-users] Re: sfForm-save() for an update

2009-09-03 Thread Avnish Pundir
For this to work, you'll have to find existing records first and then use it while building the form object. -- $profile = "">Profile')-find($request-getParameter('id')); $this-form = new ProfileForm($profile);

[symfony-users] propel:generate-admin module name

2009-09-03 Thread Dawid Ferenczy
Hi Symfony developers :) I'm writing my first complex aplication in the Symfony framework and I have a problem with the propel admin generator. I'm using the Symfony 1.2.8 and trying to generate an admin module named auction_admin for the model class Auction: symfony

[symfony-users] add field which does not belong to the model

2009-09-03 Thread Germana Oliveira
I have this Code: class DenunciaForm extends BaseDenunciaForm { public function configure() { parent::configure(); $this-widgetSchema['remitido'] = new sfWidgetFormChoice(array( 'choices' = array('f' = 'Fiscalizacion', 'c' = 'Conciliacion')

[symfony-users] Re: my first plugin

2009-09-03 Thread Eno
On Thu, 3 Sep 2009, berni wrote: When I try to call the address http://my_host.com/googleAnalytics i have Action googleAnalytics/index does not exist. You did not supply an action in your URL so index is called by default. Either put an action in the URL or change the default action in your

[symfony-users] Re: User group and permission in sfGuardPlugin

2009-09-03 Thread Tom Boutell
has_credential: groupname is not the right way to check for a group. The right approach is to assign permissions *to the group*, and then check for those permissions with: actionName: is_secure: on credentials: [permission-name-here] You can assign permissions to a group via the

[symfony-users] can't use Criteria() class in frontendConfiguration.class.php

2009-09-03 Thread javo
Hi there, I've read many Symfony docs and tried to explore Symfony code but I can't figure out where can I put some code that will be executed by every module/action (something like frontendConfiguration.class.php) Unfortunatelly I can't use Criteria() class there // I want to read some

[symfony-users] leftJoin() with Doctrine (DQL) between two databases

2009-09-03 Thread Matias
Hello, I'm using Doctrine as ORM and I configured my schema for that the tables are MyISAM, two databases, two connections, two schemas, etc. All right, it works correctly! but when I want to use leftJoin method to relation two (or more) tables, it says me: SQLSTATE[42S02]: Base table or view

[symfony-users] Re: my first plugin

2009-09-03 Thread berni
Thomas, exactly - error was in the name of the directory ... Thanks all for help On Sep 3, 12:46 pm, Thomas Rabaix thomas.rab...@gmail.com wrote: name it *sfGoogleAnalyticsPlugin* On Thu, Sep 3, 2009 at 12:25 PM, berni andr...@itma.pl wrote: hello, I write my first plugin. This plugin

[symfony-users] Two foreign keys on a schema

2009-09-03 Thread jaime
Hi everyone. I'm working with a database not made by symfony. So, they are references made with more than one foreign key. Simplier: There is no a reference to one id, but a reference to 2 columns. There is CodItem1, and CodItem2 the foreign keys. Someone know how to define this on the

[symfony-users] Re: where do most Symfony developers resize images, in the Form class, or in a validator?

2009-09-03 Thread Jake Barnes
I will create a class that handle that, and passing some parameters I will do the resize/crop there. In this way you can reuse the code say from a batch script or the backend, etc. So you do this in a helper? Okay, but then where do you call the helper? The form class? The action? The

[symfony-users] Re: my first plugin

2009-09-03 Thread Jake Barnes
name it *sfGoogleAnalyticsPlugin* I thought the initials sf were suppose to indicate that the plugin came from the core Symfony team? I remember asking about this once last year, and someone suggested to me that I use my own initials for the first 2 letters. lawrence On Sep 3, 6:46 

[symfony-users] Re: help with customizing sfguard

2009-09-03 Thread rekarnar
In answer to your second question. Towards the end of the sfGuard doc there is a section regarding this. Cut and paste from there: (http://www.symfony-project.org/plugins/ sfGuardPlugin) You can change the redirect values in app.yml: all: sf_guard_plugin: success_signin_url:

[symfony-users] Re: help with customizing sfguard

2009-09-03 Thread jarthel
new questions please :) I want to change the validation. username uses sfValidatorString. I want to use sfCallbackValidator. Do I need to edit the original class or do I need to create my own? thank you --~--~-~--~~~---~--~~ You received this message because you

[symfony-users] Check duplicate for registration

2009-09-03 Thread avani pujara
Hi Everyone, I m very new to symfony. I have created Registration form in my project. But how can I *check for duplicate username*? Can I use any *SFVALIDATOR* for this? OR if I am checking from my action page, after submitting the details, then I want to redirect again to my registration

[symfony-users] Re: Check duplicate for registration

2009-09-03 Thread Eno
On Fri, 4 Sep 2009, avani pujara wrote: I m very new to symfony. I have created Registration form in my project. But how can I *check for duplicate username*? Can I use any *SFVALIDATOR* for this? http://www.symfony-project.org/book/1_2/10-Forms#chapter_10_form_validation OR if I am

[symfony-users] Re: add field which does not belong to the model

2009-09-03 Thread Eno
On Thu, 3 Sep 2009, Germana Oliveira wrote: I have this Code: class DenunciaForm extends BaseDenunciaForm { public function configure() { parent::configure(); $this-widgetSchema['remitido'] = new sfWidgetFormChoice(array(

[symfony-users] Re: sfForm-save() for an update

2009-09-03 Thread Krishan .G
Thank you Avnish, I got that, But is there some other way in which we do not need to retrieve record first and then update. I know one which is by using $form = new Profile() and then using $form-setNew(false) for update, instead of using new ProfileForm object. But I was not able to verify the

[symfony-users] Re: help with customizing sfguard

2009-09-03 Thread jarthel
I need to use a custom validators because the username can be either username or an email address. If the user supplied an email address, I need to check if the email address supplied is valid. I have created 4 files which I have mentioned below. my custom validator (usernameChecker) throws an