[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 question as they are all 'internal' applications
> - non-internet facing.
>
> Tim - yes, I meant shared passwords not the 'seamless' experience.
>
> Custom App or DB or LDAP might be the way I will need to go
> Sherif
>
>
>
>
> On Aug 10, 1:26 am, Tom Boutell  wrote:
>> Hi Sharif,
>>
>> Thanks for plugging Accountify... but I wouldn't use Accountify myself
>> in a Symfony project. Most of its functionality is redundant with
>> sfGuardPlugin/sfDoctrineGuardPlugin. The major thing missing is a way
>> for people to apply for accounts... which is why I wrote
>> sfDoctrineApplyPlugin, which adds the "apply for an account, verify
>> your account by email, verify your password change request by email
>> etc" features of Accountify to Symfony 1.2.
>>
>> You do mention single sign on across multiple sites. Accountify
>> doesn't provide that, neither do the Symfony plugins mentioned above.
>> If you just mean shared passwords, you can of course use a single
>> database. If you mean literally avoiding the need to log in twice,
>> then you need to take it up a notch by implementing something like
>> OpenID.
>>
>> --
>> Tom Boutell
>> P'unk Avenue
>> 215 755 1330
>> punkave.com
>> window.punkave.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 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 try the i18n and your suggestion too.

 

  _  

 

On the admin generator you can use a partial but i don't no if what's you
wan't but i think is usefull or use the formatter or overlord
_form_field.php and modify this template in the admin generator 

 
http://www.symfony-project.org/jobeet/1_2/Doctrine/en/12 

_form_field.php Displays a singe form field



2009/8/8 televas 


Hi,
how can I customize label and icon in the object_actions of the
doctrine admin generator? I would show an empty label with a custom
icon, but I can't find the correct method to set the generator.yml. I
tried label: "" or label: " " or icon: /mydir/myicon.png but no one
with success.

Can you help me?

Thank you in advance


--~--~-~--~~~---~--~~
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 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: Label for your custom action in list view
 [...]
  edit:
 actions:
 your_custom_action:
 label: Label for your custom action in editing view

For the icon, I use CSS (if you look, actions from Sf like delete, new, 
... don't use img but ul li css style):
#sf_admin_container ul li.sf_admin_action_YOURACTION a {
 background:transparent url(../images/your_image.png) no-repeat 
scroll 0 0;
}

Le 10/08/09 09:35, silvio.cim...@televas.it a écrit :
>
> 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 try the i18n and your suggestion too.
>
> 
>
> On the admin generator you can use a partial but i don't no if what's 
> you wan't but i think is usefull or use the formatter or overlord 
> _form_field.php and modify this template in the admin generator
>
> http://www.symfony-project.org/jobeet/1_2/Doctrine/en/12
>
> |_form_field.php| Displays a singe form field
>
> 2009/8/8 televas  >
>
>
> Hi,
> how can I customize label and icon in the object_actions of the
> doctrine admin generator? I would show an empty label with a custom
> icon, but I can't find the correct method to set the generator.yml. I
> tried label: "" or label: " " or icon: /mydir/myicon.png but no one
> with success.
>
> Can you help me?
>
> Thank you in advance
>
>
> >

-- 
Tugdual SAUNIER


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



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:{ label: " " }

 

But this inserts an ugly blank space nearby the icon.

 

 

  _  

 

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: Label for your custom action in list view
[...]
 edit:
actions:
your_custom_action:
label: Label for your custom action in editing view

For the icon, I use CSS (if you look, actions from Sf like delete, new, ...
don't use img but ul li css style):
#sf_admin_container ul li.sf_admin_action_YOURACTION a {
background:transparent url(../images/your_image.png) no-repeat scroll 0
0;
}

Le 10/08/09 09:35, silvio.cim...@televas.it a écrit : 

 

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 try the i18n and your suggestion too.

 

  _  

 

On the admin generator you can use a partial but i don't no if what's you
wan't but i think is usefull or use the formatter or overlord
_form_field.php and modify this template in the admin generator 

 
http://www.symfony-project.org/jobeet/1_2/Doctrine/en/12 

_form_field.php Displays a singe form field




2009/8/8 televas 


Hi,
how can I customize label and icon in the object_actions of the
doctrine admin generator? I would show an empty label with a custom
icon, but I can't find the correct method to set the generator.yml. I
tried label: "" or label: " " or icon: /mydir/myicon.png but no one
with success.

Can you help me?

Thank you in advance

 





-- 
Tugdual SAUNIER

 


Controllato da AVG - www.avg.com
Versione: 8.5.387 / Database dei virus: 270.13.49/2293 - Data di rilascio:
08/09/09 18:10:00



--~--~-~--~~~---~--~~
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: 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 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:{ label: " " }
>
> But this inserts an ugly blank space nearby the icon.
>
> 
>
> 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: Label for your custom action in list view
> [...]
>  edit:
> actions:
> your_custom_action:
> label: Label for your custom action in editing view
>
> For the icon, I use CSS (if you look, actions from Sf like delete, 
> new, ... don't use img but ul li css style):
> #sf_admin_container ul li.sf_admin_action_YOURACTION a {
> background:transparent url(../images/your_image.png) no-repeat 
> scroll 0 0;
> }
>
> Le 10/08/09 09:35, silvio.cim...@televas.it 
>  a écrit :
>
> 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 try the i18n and your suggestion too.
>
> 
>
> On the admin generator you can use a partial but i don't no if what's 
> you wan't but i think is usefull or use the formatter or overlord 
> _form_field.php and modify this template in the admin generator
>
> http://www.symfony-project.org/jobeet/1_2/Doctrine/en/12
>
> |_form_field.php| Displays a singe form field
>
>
> 2009/8/8 televas  >
>
>
> Hi,
> how can I customize label and icon in the object_actions of the
> doctrine admin generator? I would show an empty label with a custom
> icon, but I can't find the correct method to set the generator.yml. I
> tried label: "" or label: " " or icon: /mydir/myicon.png but no one
> with success.
>
> Can you help me?
>
> Thank you in advance
>
>
>
> -- 
> Tugdual SAUNIER
>
>
> >
> Controllato da AVG - www.avg.com
> Versione: 8.5.387 / Database dei virus: 270.13.49/2293 - Data di 
> rilascio: 08/09/09 18:10:00
>
>

-- 
Tugdual SAUNIER


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



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 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 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:{ label: " " }

 

But this inserts an ugly blank space nearby the icon.

 

 

  _  

 

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: Label for your custom action in list view
[...]
 edit:
actions:
your_custom_action:
label: Label for your custom action in editing view

For the icon, I use CSS (if you look, actions from Sf like delete, new, ...
don't use img but ul li css style):
#sf_admin_container ul li.sf_admin_action_YOURACTION a {
background:transparent url(../images/your_image.png) no-repeat scroll 0
0;
}

Le 10/08/09 09:35, silvio.cim...@televas.it a écrit : 

 

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 try the i18n and your suggestion too.

 

  _  

 

On the admin generator you can use a partial but i don't no if what's you
wan't but i think is usefull or use the formatter or overlord
_form_field.php and modify this template in the admin generator 

 
http://www.symfony-project.org/jobeet/1_2/Doctrine/en/12 

_form_field.php Displays a singe form field





2009/8/8 televas 


Hi,
how can I customize label and icon in the object_actions of the
doctrine admin generator? I would show an empty label with a custom
icon, but I can't find the correct method to set the generator.yml. I
tried label: "" or label: " " or icon: /mydir/myicon.png but no one
with success.

Can you help me?

Thank you in advance

 






-- 
Tugdual SAUNIER

 

 

Controllato da AVG - www.avg.com
Versione: 8.5.387 / Database dei virus: 270.13.49/2293 - Data di rilascio:
08/09/09 18:10:00

 





-- 
Tugdual SAUNIER

 


Controllato da AVG - www.avg.com
Versione: 8.5.387 / Database dei virus: 270.13.49/2293 - Data di rilascio:
08/09/09 18:10:00



--~--~-~--~~~---~--~~
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 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: 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 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 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:{ label: " " }

 

But this inserts an ugly blank space nearby the icon.

 

 

  _  

 

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: Label for your custom action in list view
[...]
 edit:
actions:
your_custom_action:
label: Label for your custom action in editing view

For the icon, I use CSS (if you look, actions from Sf like delete, new, ...
don't use img but ul li css style):
#sf_admin_container ul li.sf_admin_action_YOURACTION a {
background:transparent url(../images/your_image.png) no-repeat scroll 0
0;
}

Le 10/08/09 09:35, silvio.cim...@televas.it a écrit : 

 

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 try the i18n and your suggestion too.

 

  _  

 

On the admin generator you can use a partial but i don't no if what's you
wan't but i think is usefull or use the formatter or overlord
_form_field.php and modify this template in the admin generator 

 
http://www.symfony-project.org/jobeet/1_2/Doctrine/en/12 

_form_field.php Displays a singe form field




2009/8/8 televas 


Hi,
how can I customize label and icon in the object_actions of the
doctrine admin generator? I would show an empty label with a custom
icon, but I can't find the correct method to set the generator.yml. I
tried label: "" or label: " " or icon: /mydir/myicon.png but no one
with success.

Can you help me?

Thank you in advance

 





-- 
Tugdual SAUNIER

 

 

Controllato da AVG - www.avg.com
Versione: 8.5.387 / Database dei virus: 270.13.49/2293 - Data di rilascio:
08/09/09 18:10:00

 

 

-- 
Tugdual SAUNIER

 




Controllato da AVG - www.avg.com
Versione: 8.5.387 / Database dei virus: 270.13.49/2293 - Data di rilascio:
08/09/09 18:10:00



Controllato da AVG - www.avg.com
Versione: 8.5.387 / Database dei virus: 270.13.49/2293 - Data di rilascio:
08/09/09 18:10:00



--~--~-~--~~~---~--~~
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: 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?
>
> If I need to clear many tables, I usually iterate over all loaded models:
>
> foreach (Doctrine::getLoadedModels() as $model)
> {
>   Doctrine::getTable($model)->clear();
>
> }
>
> Bernhard
> --
> Software Architect & Engineer
> Blog:http://webmozarts.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: 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 witch i don't want to 
> secure.
> Now i want the login page from the guard together on one page with for 
> example my home page.
>
> for example:
>
> http://www.posters.be/ (symfony build website)
>
> You can see on the right side their is a login box. I want to create 
> something similar. So when people log in, they can go and create an 
> order or booking.
> I gues this is done by  the guard? How do i get the guard in that position ?
>
> thx,
>
> Maarten
>
>
>
> >
>   

--~--~-~--~~~---~--~~
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: 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 form widget, sf 1.2 plus
doctrine 1.1 support.




On 6 Aug., 13:01, Kevin Bond  wrote:
> Hi Guys,
>
> Wondering if there is a media library plugin that is in development that is
> friendly with symfony 1.2 and doctrine (similar to sfMediaLibraryPlugin /
> sfAssetLibraryPlugin).
>
> --
> Kevin
--~--~-~--~~~---~--~~
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 : "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 (session and remember me) are present, with the right
name (changed from "symfony" to "myprojectname_remember_me".

But if I close firefox (or Opera) and go back to my website, I'm not
connected anymore. The whole website is secure, even the home page
need a login/pass... (I've heard about a bug that make the remember me
not working if the first page is not secure...)

I really need help (ok, we all really need help :-) ) because it's a
bit annoying, and not professionnal at all !

Lansmanne A.
--~--~-~--~~~---~--~~
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] 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 is already activated');

What I get is that:


sfError404Exception
User is already activated


But when in productive environment, I get just this:


404
Not Found


Is there a way I can tell symfony to distinguish between sf exceptions
and my api exceptions, maybe by writing an error module handyling API-
errors? My main goal is to provide errors in productive environment
including custom http status and an error message.
--~--~-~--~~~---~--~~
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: 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 "Remember me", it
> works until I close the browser...
> I've checked :
> - my browser (firefox and opera) allows cookies
> - both cookies (session and remember me) are present, with the right
> name (changed from "symfony" to "myprojectname_remember_me".
>
> But if I close firefox (or Opera) and go back to my website, I'm not
> connected anymore. The whole website is secure, even the home page
> need a login/pass... (I've heard about a bug that make the remember me
> not working if the first page is not secure...)
>
> I really need help (ok, we all really need help :-) ) because it's a
> bit annoying, and not professionnal at all !
>
> Lansmanne A.
> >
>

--~--~-~--~~~---~--~~
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] 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-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] 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="ravi.pdf";

$this->getResponse()->setHttpHeader('Pragma', 'public');

$this->getResponse()->setHttpHeader("Content-Description","File
Transfer");

$this->getResponse()->setContentType('application/pdf',TRUE);

$this->getResponse()->setHttpHeader('content-transfer-encoding',
'binary', TRUE);

$this->getResponse()->setHttpHeader("Content-Disposition","attachment;
filename=\"".$filename."\"", TRUE);

$this->getResponse()->sendHttpHeaders();

$this->getResponse()->setContent("sample content");

return sfView::NONE;


What's the issue with the code?

Thanks a lot for reading... :)


--~--~-~--~~~---~--~~
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] 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 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: 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" which is obviously wrong.

On 10 Aug., 13:30, sunny  wrote:
> 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 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: 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 corresponding absolute path ist "var/www/var/www/civil/
> web/uploads/assets/abc.jpg" which is obviously wrong.
>
> On 10 Aug., 13:30, sunny  wrote:
> > 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 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: 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 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="ravi.pdf";
>
> $this->getResponse()->setHttpHeader('Pragma', 'public');
>
> $this->getResponse()->setHttpHeader("Content-Description","File
> Transfer");
>
> $this->getResponse()->setContentType('application/pdf',TRUE);
>
> $this->getResponse()->setHttpHeader('content-transfer-encoding',
> 'binary', TRUE);
>
> $this->getResponse()->setHttpHeader("Content-Disposition","attachment;
> filename=\"".$filename."\"", TRUE);
>
> $this->getResponse()->sendHttpHeaders();
>
> $this->getResponse()->setContent("sample content");
>
> return sfView::NONE;
>
> What's the issue with the code?
>
> Thanks a lot for reading... :)
--~--~-~--~~~---~--~~
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: 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/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" which is obviously wrong.
>>
>> On 10 Aug., 13:30, sunny  wrote:
>> > 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 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: 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 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: 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.
> I just installed sfdoctrineguard plugin. It works perfectly.
> I can define witch modules i want to secure and witch i don't want to
> secure.
> Now i want the login page from the guard together on one page with for
> example my home page.
>
> for example:
>
> http://www.posters.be/ (symfony build website)
>
> You can see on the right side their is a login box. I want to create
> something similar. So when people log in, they can go and create an
> order or booking.
> I gues this is done by  the guard? How do i get the guard in that position ?
>
> thx,
>
> Maarten
>
>
>
> >
>

--~--~-~--~~~---~--~~
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: 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 happen and how I could correct
> it? I have been on that single problem for a week now and I can't find
> any solution...
>
> Thanks in advance for any advice or clue
>
> sharkkiller
> >
>

--~--~-~--~~~---~--~~
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] 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 /var/www/
sf_sandbox/apps/frontend/modules/document/actions/a ctions.class.php
on line 11

the structure of actions.class.php is:

class documentActions extends sfActions
{
public function executeIndex(sfWebRequest $request)
{
$form = new DocumentForm();
if ($request->isMethod('post'))
{
$form->bind($request->getParameter('document'));
$form->save();

$this->redirect('@homepage');
}

$this->form = $form;
}
}

can you help me please.
cordially.

--~--~-~--~~~---~--~~
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: 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: soltanst...@hotmail.de
Tel: (+216) 96 29 10 57

===
= “   Wer den Pfennig nicht ehrt, ist des Talers nicht =
=  wert   ”  =
===

--~--~-~--~~~---~--~~
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: 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 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
> -~--~~~~--~~--~--~---
>
>

--~--~-~--~~~---~--~~
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: 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:04, asim nizam wrote:
>
>
> 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 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
>> -~--~~~~--~~--~--~---
>>
>
>
> >
>

--~--~-~--~~~---~--~~
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: 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/assets/abc.jp
> Just like Eric told you already.
>
> On Mon, Aug 10, 2009 at 14:04, asim nizam wrote:
> >
> >
> > 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 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
> >> -~--~~~~--~~--~--~---
> >>
> >
> >
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
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: 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
>> /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:04, asim nizam wrote:
>> >
>> >
>> > 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 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
>> >> -~--~~~~--~~--~--~---
>> >>
>> >
>> >
>> > >
>> >
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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] $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


--~--~-~--~~~---~--~~
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: 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  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
>>> /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:04, asim nizam wrote:
>>> >
>>> >
>>> > 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 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
>>> >> -~--~~~~--~~--~--~---
>>> >>
>>> >
>>> >
>>> > >
>>> >
>>>
>>>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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: 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 undefined method DocumentForm::save() in /var/www/
> sf_sandbox/apps/frontend/modules/document/actions/a ctions.class.php
> on line 11

Where is your form class defined?



-- 



--~--~-~--~~~---~--~~
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: 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?


-- 



--~--~-~--~~~---~--~~
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: 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.




-- 



--~--~-~--~~~---~--~~
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: 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::$vtypedoc)),
  'source'   => new sfWidgetFormInput(),
  'destination'  => new sfWidgetFormInput(),
  'description'  => new sfWidgetFormTextarea(),
  'classement'   => new sfWidgetFormSelect(array('choices' =>
self::$vclassement)),
  'Commentaires' => new sfWidgetFormTextarea(),

));

$widgetSchema->setNameFormat('document[%s]');
$this->setWidgetSchema($widgetSchema);

  }
}

cordially.

2009/8/10 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 undefined method DocumentForm::save() in /var/www/
> > sf_sandbox/apps/frontend/modules/document/actions/a ctions.class.php
> > on line 11
>
> Where is your form class defined?
>
>
>
> --
>
>
>
> >
>


-- 
SOLTANI Samir
Technicien Superieur Informatique
MSN: soltanst...@hotmail.de
Tel: (+216) 96 29 10 57
 *********
Sag' nicht alles was du weisst,
Wisse nicht alles was du liesest,
Glaube nicht alles was du hörest,
Tu' nicht alles was du kannst.

--~--~-~--~~~---~--~~
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: $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-project.org/documentation/manual/1_0/en/working-with-models#dealing-with-relations

Russ

On Aug 10, 2:50 pm, Tom Haskins-Vaughan 
wrote:
> 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
--~--~-~--~~~---~--~~
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: 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://www.symfony-project.org/forms/1_2/en/ then shout again if you
are still having problems.

Russ.

On Aug 10, 3:30 pm, 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', 'cnss', 'bank', 'appel d\'offre','autre'  );
>   protected static $vclassement = array('facture', 'bon de commande',
> 'devis', 'reglement', 'CV', 'administratif', 'lettre de demande',
> 'consultation', 'appel d\'offre','autre'  );
>   protected static $vreges = array('entrant', 'sortant' );
>   public function configure()
>   {
>     $widgetSchema = new sfWidgetFormSchema(array(
>      // 'registre'     => new sfWidgetFormSelectRadio(array('choices' =>
> self::$vreges)),
>       'date'         => new sfWidgetFormDate(),
>       'type'         => new sfWidgetFormSelect(array('choices' =>
> self::$vtypedoc)),
>       'source'       => new sfWidgetFormInput(),
>       'destination'  => new sfWidgetFormInput(),
>       'description'  => new sfWidgetFormTextarea(),
>       'classement'   => new sfWidgetFormSelect(array('choices' =>
> self::$vclassement)),
>       'Commentaires' => new sfWidgetFormTextarea(),
>
>     ));
>
>     $widgetSchema->setNameFormat('document[%s]');
>     $this->setWidgetSchema($widgetSchema);
>
>   }
>
> }
>
> cordially.
>
> 2009/8/10 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 undefined method DocumentForm::save() in /var/www/
> > > sf_sandbox/apps/frontend/modules/document/actions/a ctions.class.php
> > > on line 11
>
> > Where is your form class defined?
>
> > --
>
> --
> SOLTANI Samir
> Technicien Superieur Informatique
> MSN: soltanst...@hotmail.de
> Tel: (+216) 96 29 10 57
>          ***    ***    ***
> Sag' nicht alles was du weisst,
> Wisse nicht alles was du liesest,
> Glaube nicht alles was du hörest,
> Tu' nicht alles was du kannst.
--~--~-~--~~~---~--~~
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] 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', visual_effect('appear', 'new-number'))

the same code works fine on another page.

I don't see any difference in implementation... any ideas as to why
Effect would not be defined?

Thanks in advance,
Zach
--~--~-~--~~~---~--~~
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] $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 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 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 "Are you sure?" with the i18n support in the
current user language. How can I do this?

Besides, are available some complete catalogs with standard symfony
messages already translated? For example a "messages.xml" file already
configured for some languages? Has the Symfony community a common
repository with resources like this?

Thank you in advance.
--~--~-~--~~~---~--~~
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: $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 between object and array hydration without changing the
rest of your code!
http://www.doctrine-project.org/documentation/manual/1_1/en/improving-performance#conservative-fetching

Really it just comes down to a matter of preference. If the
performance of property access was an issue, Doctrine would probably
not provide it.

Russ.

On Aug 10, 5:09 am, Tom Haskins-Vaughan 
wrote:
> 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 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: $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 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 between object and array hydration without changing the
> rest of your code!
> http://www.doctrine-project.org/documentation/manual/1_1/en/improving-performance#conservative-fetching
> 
> Really it just comes down to a matter of preference. If the
> performance of property access was an issue, Doctrine would probably
> not provide it.
> 
> Russ.
> 
> On Aug 10, 5:09 am, Tom Haskins-Vaughan 
> wrote:
>> 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 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: 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 code I am using:
> 
> echo link_to_function('Change', visual_effect('appear', 'new-number'))
> 
> the same code works fine on another page.
> 
> I don't see any difference in implementation... any ideas as to why
> Effect would not be defined?

Is your page loading Prototype?



-- 



--~--~-~--~~~---~--~~
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: 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', 'cnss', 'bank', 'appel d\'offre','autre'  );
>   protected static $vclassement = array('facture', 'bon de commande',
> 'devis', 'reglement', 'CV', 'administratif', 'lettre de demande',
> 'consultation', 'appel d\'offre','autre'  );
>   protected static $vreges = array('entrant', 'sortant' );
>   public function configure()
>   {
> $widgetSchema = new sfWidgetFormSchema(array(
>  // 'registre' => new sfWidgetFormSelectRadio(array('choices' =>
> self::$vreges)),
>   'date' => new sfWidgetFormDate(),
>   'type' => new sfWidgetFormSelect(array('choices' =>
> self::$vtypedoc)),
>   'source'   => new sfWidgetFormInput(),
>   'destination'  => new sfWidgetFormInput(),
>   'description'  => new sfWidgetFormTextarea(),
>   'classement'   => new sfWidgetFormSelect(array('choices' =>
> self::$vclassement)),
>   'Commentaires' => new sfWidgetFormTextarea(),
> 
> ));
> 
> $widgetSchema->setNameFormat('document[%s]');
> $this->setWidgetSchema($widgetSchema);
> 
>   }
> }


So the error message is correct: there is no save() method in your form 
class.



-- 



--~--~-~--~~~---~--~~
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] 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 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: 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' => $existing_note->getValueProf()), array('size' => 5)));

I remind that $existing_note is valid and Symfony retrieve data from
the DB without problems in the log as I can see...

Really, I don't know what to do next...

I might state also that cell with data entered in the DB show "0",
other show nothing, even with the default setted data.

Maybe the problem is elsewhere... but I can't find where it could be! :
(

Any other advice please?

Thanks,
sharkkiller



On 10 août, 04:11, Jintao Ding  wrote:
> $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 happen and how I could correct
> > it? I have been on that single problem for a week now and I can't find
> > any solution...
>
> > Thanks in advance for any advice or clue
>
> > sharkkiller
--~--~-~--~~~---~--~~
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] 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 value.

$this->setWidget($student->getId(), new sfWidgetFormInput(array
('default' => '5'), array('size' => 5)));
$this->setWidget($student->getId(), new sfWidgetFormInput(array
('default' => $existing_note->getValueProf()), array('size' => 5)));

I remind that $existing_note is valid and Symfony retrieve data from
the DB without problems in the log as I can see...

Really, I don't know what to do next...

I might state also that cell with data entered in the DB show "0",
other show nothing, even with the default setted data.

Maybe the problem is elsewhere... but I can't find where it could be! :
(

Any other advice please?

Thanks,
sharkkiller



On 10 août, 04:11, Jintao Ding  wrote:
> $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 happen and how I could correct
> > it? I have been on that single problem for a week now and I can't find
> > any solution...
>
> > Thanks in advance for any advice or clue
>
> > sharkkiller


--~--~-~--~~~---~--~~
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: 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!!!
>
--~--~-~--~~~---~--~~
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] 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 drop the table and create my view when build-all task
is executed?


--~--~-~--~~~---~--~~
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] 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 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: 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.
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: 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
> > >
>
>
> >
>

--~--~-~--~~~---~--~~
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: 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.
>>
>> 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.
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: 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.symfony-project.org/get/pdf/forms-1.2-en.pdf

greets
Sven



asim nizam schrieb:
> 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
>>
> 
> > 
> 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---