[symfony-users] Re: sfWidgetFormPropelChoice

2009-08-10 Thread cokker
I'm not sure what you want to know but in your form: $crit = new criteria(); $crit->add(x); $this->widgetSchema[] = new sfWidgetFormPropelChoice(array('model' => '', 'criteria' => $crit));new sfWidgetFormPropelChoice(array()); For further information, read the docs: http://www.s

[symfony-users] Re: sfWidgetFormPropelChoice

2009-08-10 Thread asim nizam
also how to display only selected data in dropdown using where clause thanks On Tue, Aug 11, 2009 at 11:31 AM, asim nizam wrote: > i am newbie can use show me how to right correct code > > > On Tue, Aug 11, 2009 at 11:29 AM, cokker wrote: > >> >> It takes a criteria option. Look at the docs.

[symfony-users] Re: sfWidgetFormPropelChoice

2009-08-10 Thread asim nizam
i am newbie can use show me how to right correct code On Tue, Aug 11, 2009 at 11:29 AM, cokker wrote: > > It takes a criteria option. Look at the docs. > > Greets > Sven > > sunny schrieb: > > How to use criteria > > in > > > > sfWidgetFormPropelChoice widget > > > > > > > > --~--~-~-

[symfony-users] Re: sfWidgetFormPropelChoice

2009-08-10 Thread cokker
It takes a criteria option. Look at the docs. Greets Sven sunny schrieb: > How to use criteria > in > > sfWidgetFormPropelChoice widget > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group

[symfony-users] sfWidgetFormPropelChoice

2009-08-10 Thread sunny
How to use criteria in sfWidgetFormPropelChoice widget --~--~-~--~~~---~--~~ 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

[symfony-users] Doctine build-all - execute custom sql for a model

2009-08-10 Thread Ken Golovin
Hi, I've created a custom model that uses mysql view instead of a table, so I don't need symfony to create a table for me. When I do build-all, however, Doctrine creates a table for that model. Is there a way in the model to disable table generation and/or execute a custom sql query that will dro

[symfony-users] Re: Problems with setting default in input in a form

2009-08-10 Thread sharkkiller
Hi, from my first post on this, this solution as already been tried. Didn't work either :( On 10 août, 14:50, Germana Oliveira wrote: > I had the same problem, and i solved it like this: > > in my Form Class, > > $this->setDefault('[widget Name]', '[default value]'); > > good luck!!! > --~--~---

[symfony-users] Problems with setting default in input in a form

2009-08-10 Thread Germana Oliveira
I had the same problem, and i solved it like this: in my Form Class, $this->setDefault('[widget Name]', '[default value]'); good luck!!! _ Thanks, however this didn't work. I have tried to use either the value I want to put as default or a dummy

[symfony-users] Re: Problems with setting default in input in a form

2009-08-10 Thread sharkkiller
Thanks, however this didn't work. I have tried to use either the value I want to put as default or a dummy value. $this->setWidget($student->getId(), new sfWidgetFormInput(array ('default' => '5'), array('size' => 5))); $this->setWidget($student->getId(), new sfWidgetFormInput(array ('default' =

[symfony-users] Date widget without days?

2009-08-10 Thread Richtermeister
Hi all, is there a date widget without days somewhere? I'm looking to use this for the expiration date of a credit card.. Thanks, Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To po

[symfony-users] Re: symfony & database

2009-08-10 Thread Eno
On Mon, 10 Aug 2009, soltani samir wrote: > Hi > the form class in this path: > > /var/www/sf_sandbox/lib/form/DocumentForm.class.php > > and the structure is : > > class DocumentForm extends sfForm > { > protected static $vtypedoc = array('facture', 'bon de commande', > 'tunisiana', 'RH',

[symfony-users] Re: visual_effect not working: Effect is not defined

2009-08-10 Thread Eno
On Mon, 10 Aug 2009, Zach wrote: > I am trying to implement some visual effects with link_to_function() > but I get this error in firebug: Effect is not defined > function onclick(event) { new (Effect.Appear)("new-number", {}); > return false; }(click clientX=490, clientY=574) > > This is the co

[symfony-users] Re: $object->name Vs $object->getName()

2009-08-10 Thread Tom Haskins-Vaughan
Hey, thanks for that, Russ. Just realised that I sent two copies of that email. I think the second one was actually an earlier copy that was stuck on my outbox. Thanks again. Tom rooster (Russ) wrote: > Well, since the functions will be called anyway, there is a very > marginal overhead when

[symfony-users] Re: $object->name Vs $object->getName()

2009-08-10 Thread rooster (Russ)
Well, since the functions will be called anyway, there is a very marginal overhead when using property access (since they invoke the php magic __get() method) - it's not something you should worry about though. In most cases using array access is the way to go, because it means you can switch bet

[symfony-users] Doctrine Admin Generator: javascript message localization

2009-08-10 Thread televas
Hi, I'm using the i18n support in some modules based on the doctrine admin generator. I'm configuring some messages, but I can't find how to have localized javascript messages. When I click on the "delete" link in the list, a message box ask me for confirmation. But I need to translate the message

[symfony-users] $object->name Vs $object->getName()

2009-08-10 Thread Tom Haskins-Vaughan
Hi, I'm just wondering if there's a difference in terms of style or performance between the following: $product->getCategory()->getName(); $product->Category->name; Thanks, Tom --~--~-~--~~~---~--~~ You received this message because you are subscribed t

[symfony-users] visual_effect not working: Effect is not defined

2009-08-10 Thread Zach
I am trying to implement some visual effects with link_to_function() but I get this error in firebug: Effect is not defined function onclick(event) { new (Effect.Appear)("new-number", {}); return false; }(click clientX=490, clientY=574) This is the code I am using: echo link_to_function('Change'

[symfony-users] Re: symfony & database

2009-08-10 Thread rooster (Russ)
Hi, save() is functionality that requires an "object" form, so your form needs to extend a "BaseFormDoctrine" or Propel equivalent, normally via a "BaseMyClassForm". Since your form has no reference to an object, there is nothing to save. I'd suggest having a quick blast through the docs http:/

[symfony-users] Re: $object->name Vs $object->getName()

2009-08-10 Thread rooster (Russ)
Hi, it's mainly down to preference as $product->Category->name utimately invokes $product()->getCategory()->getName() anyway, as would $product ["Category"]["Name"] Check http://www.symfony-project.org/doctrine/1_2/en/06-Working-With-Data#chapter_06_altering_data And http://www.doctrine-projec

[symfony-users] Re: symfony & database

2009-08-10 Thread soltani samir
Hi the form class in this path: /var/www/sf_sandbox/lib/form/DocumentForm.class.php and the structure is : new sfWidgetFormSelectRadio(array('choices' => self::$vreges)), 'date' => new sfWidgetFormDate(), 'type' => new sfWidgetFormSelect(array('choices' => self::$vty

[symfony-users] Re: help needed

2009-08-10 Thread Eno
On Mon, 10 Aug 2009, asim nizam wrote: > Can you tell how to upload the file which have no relative path Question makes no sense. Why? Well, when you upload an image, your action stores it and sets the path, so you can set it to whatever you want in your own code. -- --~--~-~--

[symfony-users] Re: Problem in downloading a file via an action...

2009-08-10 Thread Eno
On Mon, 10 Aug 2009, Sumedh wrote: > We are trying to download a file in Symfony 1.0 action... > > But it just returns the content as text in the HTTP response and the > file-save dialog of the browser doesn't appear at all... :( Im assuming you switch off the layout too when sending the file?

[symfony-users] Re: symfony & database

2009-08-10 Thread Eno
On Mon, 10 Aug 2009, soltanstein wrote: > I'm trying to create my first website with symfony framework, I have > create a simple form, and I try to sent the datas to the mysql > database (using propel). when I click to the button for submit, then > this message appears: > > Fatal error: Call to

[symfony-users] Re: help needed

2009-08-10 Thread Gábor Fási
I have no idea how you get that path you echo, but you may try the public_path helper function. http://www.symfony-project.org/api/1_2/UrlHelper#method_public_path On Mon, Aug 10, 2009 at 14:29, asim nizam wrote: > Than please tell me solution. > > On Mon, Aug 10, 2009 at 6:12 PM, asim nizam wr

[symfony-users] $object->name Vs $object->getName()

2009-08-10 Thread Tom Haskins-Vaughan
Hi, I see the following in various snippets and tutorials and I'm just wondering if there's a difference in terms of style or performance between the two: $product->getCategory()->getName(); $product->Category->name; Thanks, Tom --~--~-~--~~~---~--~~ Yo

[symfony-users] Re: help needed

2009-08-10 Thread asim nizam
Than please tell me solution. On Mon, Aug 10, 2009 at 6:12 PM, asim nizam wrote: > > ok thanks > > On Mon, Aug 10, 2009 at 6:11 PM, Gábor Fási wrote: > >> >> You must have the public path over there. Assuming your webroot is >> /var/www, with this src your server is looking for a file in >> /va

[symfony-users] Re: help needed

2009-08-10 Thread asim nizam
ok thanks On Mon, Aug 10, 2009 at 6:11 PM, Gábor Fási wrote: > > You must have the public path over there. Assuming your webroot is > /var/www, with this src your server is looking for a file in > /var/www/var/www/civil/web/uploads/assets. The path you echo there > should be /vicil/web/uploads/as

[symfony-users] Re: help needed

2009-08-10 Thread Gábor Fási
You must have the public path over there. Assuming your webroot is /var/www, with this src your server is looking for a file in /var/www/var/www/civil/web/uploads/assets. The path you echo there should be /vicil/web/uploads/assets/abc.jp Just like Eric told you already. On Mon, Aug 10, 2009 at 14

[symfony-users] Re: help needed

2009-08-10 Thread asim nizam
sorry it is i have stores file with this path /var/www/civil/web/ uploads/assets/abc.jpg i simply want to display thanks ause 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 grou

[symfony-users] Re: help needed

2009-08-10 Thread soltani samir
Hi, the problem maybe in the path: you have writed: isnt ? cordially. 2009/8/10 sunny > > how to display uploaded image in template! > > i used > > it works but > > > > this not works!! > > need help > > new to symfony > > > -- SOLTANI Samir Technicien Superieur Informatique MSN: solta

[symfony-users] symfony & database

2009-08-10 Thread soltanstein
hi all, I'm trying to create my first website with symfony framework, I have create a simple form, and I try to sent the datas to the mysql database (using propel). when I click to the button for submit, then this message appears: Fatal error: Call to undefined method DocumentForm::save() in /va

[symfony-users] Re: Problems with setting default in input in a form

2009-08-10 Thread Jintao Ding
$this->setWidgets(array( 'email' => new sfWidgetFormInput(array('default' => 'happy'), array('size'=>'30', )), 'password' => new sfWidgetFormInputPassword(array(), array('size'=>'30')) )); 2009/8/10 sharkkiller > > Nobody have an idea on how this could hap

[symfony-users] Re: sfdoctrineguard login on homepage next to the normal website

2009-08-10 Thread Gábor Fási
Use the sfGuardFormSignin form, and post it to the route @sf_guard_signin (presuming you didn't modify it - it's the 'signin' action in the sfGuardAuth module. On Sun, Aug 9, 2009 at 13:35, Verhavert Maarten wrote: > > Hey guys, > > Sorry about the poor title, don't know how to put it correctly.

[symfony-users] Re: help needed

2009-08-10 Thread asim nizam
no i am using correct path while this show image thanks > >>> >>> >> > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To

[symfony-users] Re: help needed

2009-08-10 Thread asim nizam
Can you tell how to upload the file which have no relative path thanks On Mon, Aug 10, 2009 at 5:40 PM, asim nizam wrote: > Thanks it works > > > On Mon, Aug 10, 2009 at 5:37 PM, Eric wrote: > >> >> I assume your webservers root path is /var/www >> Your first path "/civil/web/uploads/assets/ab

[symfony-users] Re: Problem in downloading a file via an action...

2009-08-10 Thread Sumedh
One more thing to add... We are trying this through an AJAX action... could that be a problem? On Aug 10, 4:13 pm, Sumedh wrote: > Hi Friends, > > We are trying to download a file in Symfony 1.0 action... > > But it just returns the content as text in the HTTP response and the > file-save dial

[symfony-users] Re: help needed

2009-08-10 Thread asim nizam
Thanks it works On Mon, Aug 10, 2009 at 5:37 PM, Eric wrote: > > I assume your webservers root path is /var/www > Your first path "/civil/web/uploads/assets/abc.jpg" is absolute to > this path, so it works. > Your second path "var/www/civil/web/uploads/assets/abc.jpg" is > relative. The correspo

[symfony-users] Re: help needed

2009-08-10 Thread Eric
I assume your webservers root path is /var/www Your first path "/civil/web/uploads/assets/abc.jpg" is absolute to this path, so it works. Your second path "var/www/civil/web/uploads/assets/abc.jpg" is relative. The corresponding absolute path ist "var/www/var/www/civil/ web/uploads/assets/abc.jpg"

[symfony-users] help needed

2009-08-10 Thread sunny
how to display uploaded image in template! i used it works but this not works!! need help new to symfony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email

[symfony-users] Problem in downloading a file via an action...

2009-08-10 Thread Sumedh
Hi Friends, We are trying to download a file in Symfony 1.0 action... But it just returns the content as text in the HTTP response and the file-save dialog of the browser doesn't appear at all... :( Here is the snippet from action. It tries to send a couple of words as a PDF file - $filename="

[symfony-users] image display issue

2009-08-10 Thread sunny
how to display uploaded image in template! i used it works but this not works!! need 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-u

[symfony-users] Re: SfGuard : "Remember me" not working...

2009-08-10 Thread Alan Bem
Did you enabled sfGuardBasicSecurityFilter in filters.yml? On Mon, Aug 10, 2009 at 11:39 AM, Aurélien Lansmanne wrote: > > Hello, > > I know this problem is not new, and maybe it has already been asked, > but I haven't been able to find one. > > When I want to login on my website, and check the "

[symfony-users] Providing custom errors in productive environment

2009-08-10 Thread Eric
Hi, I am writing an API providing data in different formats like xml and json. Now when someone uses the api in a wrong way, I would like to provide error-messages in the expected format. I created custom files in /config/error/ directory and fire the exceptions like so: $this->forward404('User

[symfony-users] SfGuard : "Remember me" not working...

2009-08-10 Thread Aurélien Lansmanne
Hello, I know this problem is not new, and maybe it has already been asked, but I haven't been able to find one. When I want to login on my website, and check the "Remember me", it works until I close the browser... I've checked : - my browser (firefox and opera) allows cookies - both cookies (s

[symfony-users] Re: Media Library Plugin

2009-08-10 Thread Johannes Heinen
Perhaps you could also take a look at sfFilebasePlugin, its a media library with frontend GUI, drag/drop stuff of files and also a fundamentally new way to deal with your files programmatically by providing a file management layer based on SPL classes. sfFilebasePlugin ships with an swfUpload for

[symfony-users] Re: sfdoctrineguard login on homepage next to the normal website

2009-08-10 Thread Verhavert Maarten
Anyone, really having a problem here and can't figure it out. thx Maarten Verhavert Maarten schreef: > Hey guys, > > Sorry about the poor title, don't know how to put it correctly. > I just installed sfdoctrineguard plugin. It works perfectly. > I can define witch modules i want to secure and

[symfony-users] Re: How to reset Doctrine completely in a unit test

2009-08-10 Thread klemens_u
I see, thanks Bernhard! Jon: is there an easier way built into Doctrine? Thanks, Klemens On Aug 9, 10:05 pm, Bernhard Schussek wrote: > Hi, > > > Do I have to manually clear all involved tables? > > Yes, AFAIK. But Jon will surely correct me. > > > Is there a shortcut to clear all tables? > >

[symfony-users] doctrine admin generator: custom label and icon in object_actions

2009-08-10 Thread silvio.cimino
I also tried the i18n support, but no success. Besides, when I set a string with only one blank space (“ “) no icons are shown. It seems that there's no solution to this behaviour… blank labels not expected. _ No success with this values: label: “” label: false label:

R: R: [symfony-users] Re: doctrine admin generator: custom label and icon in object_actions

2009-08-10 Thread silvio.cimino
No success with this values: label: “” label: false label: NULL The aforementioned values show the URL. _ Yes I also notice that. Nut it seems to be the normal behaviour of link_to() ; if no text is precised, it shows the URL as text... perhaps try "label: false" as in

Re: R: [symfony-users] Re: doctrine admin generator: custom label and icon in object_actions

2009-08-10 Thread Tugdual SAUNIER
Yes I also notice that. Nut it seems to be the normal behaviour of link_to() ; if no text is precised, it shows the URL as text... perhaps try "label: false" as in sfForm... Le 10/08/09 10:09, silvio.cim...@televas.it a écrit : > > I need to have no label in some case and I tried to set something

R: [symfony-users] Re: doctrine admin generator: custom label and icon in object_actions

2009-08-10 Thread silvio.cimino
I need to have no label in some case and I tried to set something like: actions: _new:{ label: "" } But when I set an empty value, the list shows the address link (mysite/mymodule/new) nearby the icon. So I tried to set: actions: _new:{

[symfony-users] Re: doctrine admin generator: custom label and icon in object_actions

2009-08-10 Thread Tugdual SAUNIER
You can choose the label in the list/edit section: generator: class: ... param: config: actions: your_custom_action: ... [...] list: object_actions: your_custom_action: label: Labe

[symfony-users] doctrine admin generator: custom label and icon in object_actions

2009-08-10 Thread silvio.cimino
I hoped to set all my preferences into the generator.yml. Maybe I could enable the i18n support and customize the messages (but no the icons). I can't explain why the admin generator doesn't include this simple configuration in the yaml: I think this is a common requirement. Thank you, I'll

[symfony-users] Re: Identity Management in PHP

2009-08-10 Thread Stefan Koopmanschap
Hi, Why is OpenID out of the question for internal applications? You could set up an OpenID server on your local network which will allow people to log in within your local server. Just an idea ;) Stefan On Mon, Aug 10, 2009 at 1:38 AM, Sherif wrote: > > Thanks Guys. > OpenID is out of the que