[symfony-users] Realize this UML model (job interviews system) in symfony

2009-10-13 Thread Cosimo Zecchi

Hi all,
i'm trying to realize this model using symfony. (http:// 
img96.imageshack.us/img96/3193/diagrammadiclasse2.png or something  
like that..).. it should be a flexible job-interview system.. so I  
need an application for making (by an admin) and answering (the  
users) questionaries.
Maybe my uml is not the best, but it gives an idea.

An interview in made of three parts (personal informations, skills  
and attitudes) and an Admin should decide for every category the  
questions: personal informations and attitudes are the same for every  
category.. only skills change depending on category.
i don't know how to realize it with symfony, because i have two  
levels of submits: the admin submits questions for category, and the  
user submit the answers to the questions.. but how do i do to relate  
questions with answer in an unique form for the user?
Do you have any ideas?

I have another doubt.. in this way maybe my Answers Table will be  
huge in a short time (hundred questions for every user, thousand  
users..).
Mysql can afford this amount of data and queries?

Thank you in advance.

Cosimo Zecchi

P.IVA: 02035150974
c.zec...@gmail.com
tel. 3475851188




--~--~-~--~~~---~--~~
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] Change default/homepage route dynamically?

2009-10-13 Thread tom cowin

I've been searching for way to simply change the default route (module/
action) that is followed from within an action. I've come across a few
posts that describe how to add routes, but I've not been able to make
it work. Is there a straightforward way to accomplish this (in
1.2.8+)?

many thanks 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: entity-relationship editors?

2009-10-13 Thread Pablo Godel
I've been using Mysql Workbench with great success when using Propel. I
recently switched to Doctrine and run into some issues with my work flow.
The relations in the schema file after converting from a DB is not exactly
what Doctrine likes. I have not tried the yml plugin for Mysql Workbench
yet, but I am looking for the best way to tight these 2 together.

Pablo

On Tue, Oct 13, 2009 at 5:11 PM, Juan Pablo Romero Bernal <
jromerober...@gmail.com> wrote:

>
> Hi,
>
> > what is the difference to the doctrine plugin? i guess the one you
> > linked above is propel only?
>
> Yes, the plugin works only for propel.
>
> > http://code.google.com/p/mysql-workbench-doctrine-plugin/
>
> Great !. I didn't know. I'll review it.
>
> Bye,
>
> --
> Juan Pablo Romero Bernal
> Blog: http://jpromerobx.blogspot.com/
>
> >
>


-- 
Pablo Godel
ServerGrove Networks
http://servergrove.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: entity-relationship editors?

2009-10-13 Thread Juan Pablo Romero Bernal

Hi,

> what is the difference to the doctrine plugin? i guess the one you
> linked above is propel only?

Yes, the plugin works only for propel.

> http://code.google.com/p/mysql-workbench-doctrine-plugin/

Great !. I didn't know. I'll review it.

Bye,

-- 
Juan Pablo Romero Bernal
Blog: http://jpromerobx.blogspot.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: entity-relationship editors?

2009-10-13 Thread Lukas Kahwe Smith


On 13.10.2009, at 22:58, Juan Pablo Romero Bernal wrote:

>
> Hi,
>
>> Generally i use Argouml for designing my uml model diagrams.
>> I was wondering if does exist an editor that generate yml code for my
>> symfony (doctrine) projects, or sql code for my mysql-server..
>
> I've used MySQL workbench [1], with great results. You can export your
> model to sql or make reverse engineering from the existent database.
>
> There is a plugin to export from Mysql WB to YML in [2].
>
>
> [1] http://wb.mysql.com/
> [2] http://trac.symfony-project.org/wiki/ 
> SymfonyYamlMyqlWorkbenchPlugin


what is the difference to the doctrine plugin? i guess the one you  
linked above is propel only?

http://code.google.com/p/mysql-workbench-doctrine-plugin/

regards,
Lukas Kahwe Smith
m...@pooteeweet.org




--~--~-~--~~~---~--~~
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: entity-relationship editors?

2009-10-13 Thread Juan Pablo Romero Bernal

Hi,

> Generally i use Argouml for designing my uml model diagrams.
> I was wondering if does exist an editor that generate yml code for my
> symfony (doctrine) projects, or sql code for my mysql-server..

I've used MySQL workbench [1], with great results. You can export your
model to sql or make reverse engineering from the existent database.

There is a plugin to export from Mysql WB to YML in [2].


[1] http://wb.mysql.com/
[2] http://trac.symfony-project.org/wiki/SymfonyYamlMyqlWorkbenchPlugin

-- 
Juan Pablo Romero Bernal
Blog: http://jpromerobx.blogspot.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: entity-relationship editors?

2009-10-13 Thread Casey

There is an experimental plugin that will convert Clay files into
schema files.  I've not used it, but I have used clay, which as an
eclipse plugin I believe will generate sql for the design database.
There is also DBDesigner, which I haven't used.  There are also seems
to be a symfony plugin for DBdesigner, but again, I can't speak to its
quality because I have used it.

http://www.symfony-project.org/plugins/smClayToDoctrineSchemaPlugin
http://www.symfony-project.org/plugins/sfDbDesignerPlugin
http://www.azzurri.jp/en/clay/index.html
http://fabforce.net/dbdesigner4/

HTH,
Casey Cambra


On Oct 13, 5:55 am, cosmy  wrote:
> Hi all.
> Generally i use Argouml for designing my uml model diagrams.
> I was wondering if does exist an editor that generate yml code for my
> symfony (doctrine) projects, or sql code for my mysql-server..
>
> 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: sfGuard passwords get corrupted with doctrine:data-dump/load

2009-10-13 Thread Pablo Godel
I tried this one briefly and did not fix the problem. The password keeps
changing.

The other patch looks like it would be the fix but when doing the data-load
I get an exception and nothing gets loaded. Need to look further when I get
some time.


On Tue, Oct 13, 2009 at 11:40 AM, david wrote:

>
> There appears to be another work-around:
> http://trac.symfony-project.org/ticket/6196
>
>
> On Tue, 13 Oct 2009 17:15:08 +0200, Pablo Godel  wrote:
>
> > shouldn't this be applied to the plugin code?
> >
> >
> > On Tue, Oct 13, 2009 at 11:10 AM, david
> > wrote:
> >
> >>
> >> Checkout: http://forum.symfony-project.org/index.php/m/83831/ for more
> >> info
> >>
> >> On Tue, 13 Oct 2009 16:40:25 +0200, david  >
> >> wrote:
> >>
> >> >
> >> > The password is hashed when it's set - expecting a plaintext password
> >> > rather than a hashed one.
> >> > There was a post a while ago about this issue - you need to created a
> >> > method on the model that skips the hashing process.
> >> >
> >> > On Tue, 13 Oct 2009 16:35:07 +0200, Pablo Godel 
> >> wrote:
> >> >
> >> >> That's what I thought is happening, but since the data-dump is raw
> >> that,
> >> >> shouldn't data-load load the raw data ? is there any existing method
> >> to
> >> >> load
> >> >> the raw dumped data directly to the DB ?
> >> >>
> >> >> thanks for your reply.
> >> >>
> >> >> On Tue, Oct 13, 2009 at 10:19 AM, Gábor Fási 
> >> wrote:
> >> >>
> >> >>>
> >> >>> The data-dump task exports the raw values found in the database, ie.
> >> >>> the encrypted ones. While doing the data-load, the plugin's
> >> >>> overwritten setPassword() setter is called, that expect to get a
> >> >>> plaintext value, so it encodes it. Your passwords get corrupted
> >> >>> because of being encrypted again.
> >> >>>
> >> >>> On Tue, Oct 13, 2009 at 16:13, Pablo Godel 
> wrote:
> >> >>> > I am using sfDoctrineGuard plugin. When I run doctrine:data-dump
> >> and
> >> >>> then
> >> >>> > data-load the passwords which are encripted by default with sha1
> >> get
> >> >>> > corrupted.
> >> >>> >
> >> >>> > The passwords are ok in data/fixtures/data.yml but when running
> >> >>> data-load
> >> >>> I
> >> >>> > see the insert queries with a new value.
> >> >>> >
> >> >>> > Is this a bug? Is there something that I am missing?
> >> >>> >
> >> >>> > Thanks
> >> >>> >
> >> >>> > --
> >> >>> > Pablo Godel
> >> >>> >
> >> >>> > >
> >> >>> >
> >> >>>
> >> >>> >
> >> >>>
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >> --
> >> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
> >>
> >> >
> >>
> >
> >
>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
> >
>


-- 
Pablo Godel
ServerGrove Networks
http://servergrove.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] Is posible to embed lists in the same way forms are embeded (embedForm)?

2009-10-13 Thread tirengarfio

hi,

is posible to embed lists in the same way forms are embeded
(embedForm)?

I would like to embed the profile list in the user list for the
backend.

Bye
--~--~-~--~~~---~--~~
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: Outputing dynamic image fail

2009-10-13 Thread Russen

Yes, the magic string is definitely:

return $this->renderText('/myimage/url.jpg');

or

return $this->renderText($imagecontent);


The use of that line will make Symfony forget about rendering any
template, just like " return sfView::NONE; " would, but that the
latter flushes any output as well. If you want to put something in a
template, like outputting a file on disk, the template would look like
this:





Cheers!

On Oct 12, 5:49 pm, Casey  wrote:
> the imagejpeg() function echoes the image string, but text echoed in
> actions seem to get thrown out in symfony (I don't know the exact
> mechanism for this, but it seems to be the case).  You need to call
> $this->renderText(imagejpeg($image)) or something along those lines so
> that the action actually sends the text output somewhere.  Right now
> there is nothing being output to the response.  Thats why the function
> works outside of symfony, but doesn't when you are working within
> symfony.  So your final method should look something like this:
>
> public function executeShowCaptcha(sfWebRequest $request)
> {
>               $this->getResponse()->setContentType('image/jpeg');
>               return $this->renderText(myTools::genCaptcha(uniqid
> ()));
>
> }
>
> I haven't tried it, but I think it should work.
>
> HTH
> --Casey
>
> On Oct 12, 5:45 am, Ahmed  wrote:
>
>
>
> > @Alexandre
> > no change
> > I have Always a 0x0 blanc image
> > i search in all my project for a line break
> > and i don't found any off them
>
> > @Vasos
> > I try this trick
>
> > Cordialy
> > Ahmed
> > On 12 oct, 13:41, basos g  wrote:
>
> > > 2009/10/12 Ahmed 
>
> > > > Hi all;
> > > > I use symfony 1.2.9
> > > > I have a strange error in ouputing image with symfony , so i have a
> > > > simple function to create image
> > > > public static function genCaptcha($pass){
> > > >              $image = ImageCreatetruecolor(100, 20);
> > > >              $clr_white = ImageColorAllocate($image, 255, 255, 255);
> > > >              $clr_black = ImageColorAllocate($image, 0, 0, 0);
> > > >              imagefill($image, 0, 0, $clr_black);
>
> > > >              // *** Set the image height and width ***
> > > >              imagefontheight(15);
> > > >              imagefontwidth(15);
>
> > > >              // *** Add the passcode in white to the image ***
> > > >              imagestring($image, 5, 30, 3, $pass, $clr_white);
>
> > > >              // *** Throw in some lines to trick those cheeky bots!
> > > > ***
> > > >              imageline($image, 5, 1, 50, 20, $clr_white);
> > > >              imageline($image, 60, 1, 96, 20, $clr_white);
> > > >              imageline($image, 5, 1, 100, 50, $clr_white);
> > > >              // *** Output the newly created image in jpeg format ***
> > > >              imagejpeg($image);
>
> > > >              // *** Clear up some memory... ***
> > > >              imagedestroy($image);
> > > > }
>
> > > > And in the action i write:
> > > > public function executeShowCaptcha(sfWebRequest $request)
> > > > {
> > > >              $response = $this->getResponse();
> > > >              $response->setContentType('image/jpeg');
>
> > > >              myTools::genCaptcha(uniqid());
>
> > > >              $this->setLayout(false);
>
> > > >              return sfView::NONE;
> > > > }
> > > > i use it in a template like this 
> > > > But i dont see any image in my template and whene i try to point it
> > > > directly on the url like :
> > > >http://127.0.0.1/test/frontend_dev.php/home/showCaptcha
> > > > also i dont see the generated image
>
> > > For me it worked a code like this in the action:
>
> > >         $response = $this->getResponse() ;
> > >         $response->setContentType('the contet type header');
> > >         $response->setContent($image->asString());
> > >         $response->send() ;
>
> > > But this supposes that you have the image as an object that supports the
> > > asString() method, whick returns the data as string instead of outputing
> > > them directly.
>
> > > One php method that returns string data is file_get_contents('filepath') 
> > > but
> > > it reads from disk. Maybe you could find something that returns a memory
> > > image as string. Try setContent($image) as a speculation. If you find the
> > > solution say it here.
>
> > > Vasos
--~--~-~--~~~---~--~~
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 passwords get corrupted with doctrine:data-dump/load

2009-10-13 Thread david

There appears to be another work-around:  
http://trac.symfony-project.org/ticket/6196


On Tue, 13 Oct 2009 17:15:08 +0200, Pablo Godel  wrote:

> shouldn't this be applied to the plugin code?
>
>
> On Tue, Oct 13, 2009 at 11:10 AM, david  
> wrote:
>
>>
>> Checkout: http://forum.symfony-project.org/index.php/m/83831/ for more
>> info
>>
>> On Tue, 13 Oct 2009 16:40:25 +0200, david 
>> wrote:
>>
>> >
>> > The password is hashed when it's set - expecting a plaintext password
>> > rather than a hashed one.
>> > There was a post a while ago about this issue - you need to created a
>> > method on the model that skips the hashing process.
>> >
>> > On Tue, 13 Oct 2009 16:35:07 +0200, Pablo Godel 
>> wrote:
>> >
>> >> That's what I thought is happening, but since the data-dump is raw  
>> that,
>> >> shouldn't data-load load the raw data ? is there any existing method  
>> to
>> >> load
>> >> the raw dumped data directly to the DB ?
>> >>
>> >> thanks for your reply.
>> >>
>> >> On Tue, Oct 13, 2009 at 10:19 AM, Gábor Fási 
>> wrote:
>> >>
>> >>>
>> >>> The data-dump task exports the raw values found in the database, ie.
>> >>> the encrypted ones. While doing the data-load, the plugin's
>> >>> overwritten setPassword() setter is called, that expect to get a
>> >>> plaintext value, so it encodes it. Your passwords get corrupted
>> >>> because of being encrypted again.
>> >>>
>> >>> On Tue, Oct 13, 2009 at 16:13, Pablo Godel  wrote:
>> >>> > I am using sfDoctrineGuard plugin. When I run doctrine:data-dump  
>> and
>> >>> then
>> >>> > data-load the passwords which are encripted by default with sha1  
>> get
>> >>> > corrupted.
>> >>> >
>> >>> > The passwords are ok in data/fixtures/data.yml but when running
>> >>> data-load
>> >>> I
>> >>> > see the insert queries with a new value.
>> >>> >
>> >>> > Is this a bug? Is there something that I am missing?
>> >>> >
>> >>> > Thanks
>> >>> >
>> >>> > --
>> >>> > Pablo Godel
>> >>> >
>> >>> > >
>> >>> >
>> >>>
>> >>> >
>> >>>
>> >>
>> >>
>> >
>> >
>>
>>
>> --
>> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>>
>> >
>>
>
>


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

--~--~-~--~~~---~--~~
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 passwords get corrupted with doctrine:data-dump/load

2009-10-13 Thread Pablo Godel
shouldn't this be applied to the plugin code?


On Tue, Oct 13, 2009 at 11:10 AM, david wrote:

>
> Checkout: http://forum.symfony-project.org/index.php/m/83831/ for more
> info
>
> On Tue, 13 Oct 2009 16:40:25 +0200, david 
> wrote:
>
> >
> > The password is hashed when it's set - expecting a plaintext password
> > rather than a hashed one.
> > There was a post a while ago about this issue - you need to created a
> > method on the model that skips the hashing process.
> >
> > On Tue, 13 Oct 2009 16:35:07 +0200, Pablo Godel 
> wrote:
> >
> >> That's what I thought is happening, but since the data-dump is raw that,
> >> shouldn't data-load load the raw data ? is there any existing method to
> >> load
> >> the raw dumped data directly to the DB ?
> >>
> >> thanks for your reply.
> >>
> >> On Tue, Oct 13, 2009 at 10:19 AM, Gábor Fási 
> wrote:
> >>
> >>>
> >>> The data-dump task exports the raw values found in the database, ie.
> >>> the encrypted ones. While doing the data-load, the plugin's
> >>> overwritten setPassword() setter is called, that expect to get a
> >>> plaintext value, so it encodes it. Your passwords get corrupted
> >>> because of being encrypted again.
> >>>
> >>> On Tue, Oct 13, 2009 at 16:13, Pablo Godel  wrote:
> >>> > I am using sfDoctrineGuard plugin. When I run doctrine:data-dump and
> >>> then
> >>> > data-load the passwords which are encripted by default with sha1 get
> >>> > corrupted.
> >>> >
> >>> > The passwords are ok in data/fixtures/data.yml but when running
> >>> data-load
> >>> I
> >>> > see the insert queries with a new value.
> >>> >
> >>> > Is this a bug? Is there something that I am missing?
> >>> >
> >>> > Thanks
> >>> >
> >>> > --
> >>> > Pablo Godel
> >>> >
> >>> > >
> >>> >
> >>>
> >>> >
> >>>
> >>
> >>
> >
> >
>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
> >
>


-- 
Pablo Godel
ServerGrove Networks
http://servergrove.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: sfGuard passwords get corrupted with doctrine:data-dump/load

2009-10-13 Thread david

Checkout: http://forum.symfony-project.org/index.php/m/83831/ for more info

On Tue, 13 Oct 2009 16:40:25 +0200, david   
wrote:

>
> The password is hashed when it's set - expecting a plaintext password
> rather than a hashed one.
> There was a post a while ago about this issue - you need to created a
> method on the model that skips the hashing process.
>
> On Tue, 13 Oct 2009 16:35:07 +0200, Pablo Godel  wrote:
>
>> That's what I thought is happening, but since the data-dump is raw that,
>> shouldn't data-load load the raw data ? is there any existing method to
>> load
>> the raw dumped data directly to the DB ?
>>
>> thanks for your reply.
>>
>> On Tue, Oct 13, 2009 at 10:19 AM, Gábor Fási  wrote:
>>
>>>
>>> The data-dump task exports the raw values found in the database, ie.
>>> the encrypted ones. While doing the data-load, the plugin's
>>> overwritten setPassword() setter is called, that expect to get a
>>> plaintext value, so it encodes it. Your passwords get corrupted
>>> because of being encrypted again.
>>>
>>> On Tue, Oct 13, 2009 at 16:13, Pablo Godel  wrote:
>>> > I am using sfDoctrineGuard plugin. When I run doctrine:data-dump and
>>> then
>>> > data-load the passwords which are encripted by default with sha1 get
>>> > corrupted.
>>> >
>>> > The passwords are ok in data/fixtures/data.yml but when running
>>> data-load
>>> I
>>> > see the insert queries with a new value.
>>> >
>>> > Is this a bug? Is there something that I am missing?
>>> >
>>> > Thanks
>>> >
>>> > --
>>> > Pablo Godel
>>> >
>>> > >
>>> >
>>>
>>> >
>>>
>>
>>
>
>


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

--~--~-~--~~~---~--~~
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 passwords get corrupted with doctrine:data-dump/load

2009-10-13 Thread Gábor Fási

By default, data-load loads the raw data from the yml, but
sfGuardPlugin has overwritten setPassword() to make sure passwords are
stored encrypted.
As doctrine:* tasks use doctrine (and therefore the overwritten
setPassword()) the only way to load the raw data is to go around
doctrine completely. For example, in mysql you can dump your database
with `mysqldump`, and load it with `mysql`.

On Tue, Oct 13, 2009 at 16:35, Pablo Godel  wrote:
> That's what I thought is happening, but since the data-dump is raw that,
> shouldn't data-load load the raw data ? is there any existing method to load
> the raw dumped data directly to the DB ?
>
> thanks for your reply.
>
> On Tue, Oct 13, 2009 at 10:19 AM, Gábor Fási  wrote:
>>
>> The data-dump task exports the raw values found in the database, ie.
>> the encrypted ones. While doing the data-load, the plugin's
>> overwritten setPassword() setter is called, that expect to get a
>> plaintext value, so it encodes it. Your passwords get corrupted
>> because of being encrypted again.
>>
>> On Tue, Oct 13, 2009 at 16:13, Pablo Godel  wrote:
>> > I am using sfDoctrineGuard plugin. When I run doctrine:data-dump and
>> > then
>> > data-load the passwords which are encripted by default with sha1 get
>> > corrupted.
>> >
>> > The passwords are ok in data/fixtures/data.yml but when running
>> > data-load I
>> > see the insert queries with a new value.
>> >
>> > Is this a bug? Is there something that I am missing?
>> >
>> > Thanks
>> >
>> > --
>> > Pablo Godel
>> >
>> > >
>> >
>>
>>
>
>
>
> --
> Pablo Godel
> ServerGrove Networks
> http://servergrove.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: sfGuard passwords get corrupted with doctrine:data-dump/load

2009-10-13 Thread david

The password is hashed when it's set - expecting a plaintext password  
rather than a hashed one.
There was a post a while ago about this issue - you need to created a  
method on the model that skips the hashing process.

On Tue, 13 Oct 2009 16:35:07 +0200, Pablo Godel  wrote:

> That's what I thought is happening, but since the data-dump is raw that,
> shouldn't data-load load the raw data ? is there any existing method to  
> load
> the raw dumped data directly to the DB ?
>
> thanks for your reply.
>
> On Tue, Oct 13, 2009 at 10:19 AM, Gábor Fási  wrote:
>
>>
>> The data-dump task exports the raw values found in the database, ie.
>> the encrypted ones. While doing the data-load, the plugin's
>> overwritten setPassword() setter is called, that expect to get a
>> plaintext value, so it encodes it. Your passwords get corrupted
>> because of being encrypted again.
>>
>> On Tue, Oct 13, 2009 at 16:13, Pablo Godel  wrote:
>> > I am using sfDoctrineGuard plugin. When I run doctrine:data-dump and  
>> then
>> > data-load the passwords which are encripted by default with sha1 get
>> > corrupted.
>> >
>> > The passwords are ok in data/fixtures/data.yml but when running  
>> data-load
>> I
>> > see the insert queries with a new value.
>> >
>> > Is this a bug? Is there something that I am missing?
>> >
>> > Thanks
>> >
>> > --
>> > Pablo Godel
>> >
>> > >
>> >
>>
>> >
>>
>
>


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

--~--~-~--~~~---~--~~
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 passwords get corrupted with doctrine:data-dump/load

2009-10-13 Thread Pablo Godel
That's what I thought is happening, but since the data-dump is raw that,
shouldn't data-load load the raw data ? is there any existing method to load
the raw dumped data directly to the DB ?

thanks for your reply.

On Tue, Oct 13, 2009 at 10:19 AM, Gábor Fási  wrote:

>
> The data-dump task exports the raw values found in the database, ie.
> the encrypted ones. While doing the data-load, the plugin's
> overwritten setPassword() setter is called, that expect to get a
> plaintext value, so it encodes it. Your passwords get corrupted
> because of being encrypted again.
>
> On Tue, Oct 13, 2009 at 16:13, Pablo Godel  wrote:
> > I am using sfDoctrineGuard plugin. When I run doctrine:data-dump and then
> > data-load the passwords which are encripted by default with sha1 get
> > corrupted.
> >
> > The passwords are ok in data/fixtures/data.yml but when running data-load
> I
> > see the insert queries with a new value.
> >
> > Is this a bug? Is there something that I am missing?
> >
> > Thanks
> >
> > --
> > Pablo Godel
> >
> > >
> >
>
> >
>


-- 
Pablo Godel
ServerGrove Networks
http://servergrove.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: sfGuard passwords get corrupted with doctrine:data-dump/load

2009-10-13 Thread Gábor Fási

The data-dump task exports the raw values found in the database, ie.
the encrypted ones. While doing the data-load, the plugin's
overwritten setPassword() setter is called, that expect to get a
plaintext value, so it encodes it. Your passwords get corrupted
because of being encrypted again.

On Tue, Oct 13, 2009 at 16:13, Pablo Godel  wrote:
> I am using sfDoctrineGuard plugin. When I run doctrine:data-dump and then
> data-load the passwords which are encripted by default with sha1 get
> corrupted.
>
> The passwords are ok in data/fixtures/data.yml but when running data-load I
> see the insert queries with a new value.
>
> Is this a bug? Is there something that I am missing?
>
> Thanks
>
> --
> Pablo Godel
>
> >
>

--~--~-~--~~~---~--~~
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 passwords get corrupted with doctrine:data-dump/load

2009-10-13 Thread Pablo Godel
I am using sfDoctrineGuard plugin. When I run doctrine:data-dump and then
data-load the passwords which are encripted by default with sha1 get
corrupted.

The passwords are ok in data/fixtures/data.yml but when running data-load I
see the insert queries with a new value.

Is this a bug? Is there something that I am missing?

Thanks

-- 
Pablo Godel

--~--~-~--~~~---~--~~
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] entity-relationship editors?

2009-10-13 Thread cosmy

Hi all.
Generally i use Argouml for designing my uml model diagrams.
I was wondering if does exist an editor that generate yml code for my
symfony (doctrine) projects, or sql code for my mysql-server..

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: About embed forms

2009-10-13 Thread Francisco José Núñez Rivera
Can you show me the schema?
Maybe something its incorrect in the relations.





2009/10/10 Dennis 

>
> Let's say you have a schema of:
>
> 'User'
> 'MovingBoxForBooks'
> 'Book'.
>
> 'User'->1-to-many->'MovingBoxForBooks'
> 'MovingBoxForBooks'->1-to-many->'Book'
>
> 'User' is a parent of 'MovingBoxForBooks'
> 'MovingBoxForBooks' is a CHILD of 'User'
>
> 'MovingBoxForBooks' is a parent of 'Book'
> 'Book' is a CHILD of 'MovingBoxForBooks'
>
> If you use the default CRUD generator and scaffolding, (which I am
> beginning to believe that more advanced Symfony users don't use after
> awhile), and go to the 'MovingBoxForBooks' form, you will find a drop
> down list for 'User'. It will probably have a title like, "No value
> available for User". (You need to define the __toString() method).
> That is the PARENT showing up in the CHILD form.
>
> BUT you will NOT see any form fields for 'Book' in the
> 'MovingBoxForBooks' form, NO CHILDREN form fields show up
> automagically.
>
> Does this clear it up?
>
> On Oct 9, 12:42 am, elkrema  wrote:
> > Hi Dennis,
> >
> > thank you for your comments.
> >
> > About your problem adding a Children to the Parent Object, i don't
> > understand it very well.
> >
> > I just take a look to your link about but i think it's more or less
> > like im doing? Adding some embeds , right?
> >
> > Can you explain me more?
> >
> > Thank you.
> >
> > On 7 oct, 01:24, Dennis  wrote:
> >
> >
> >
> > > Try this for adding an object's PARENT form to the child form.
> http://www.symfony-project.org/blog/2008/11/07/new-in-symfony-1-2-doc...
> >
> > > Where it says "Edit/Add Author" Exactly in the middle of the document.
> >
> > > Me, I'm looking to add Chidren to the Parent Object, but not a large
> > > quanity of them like this guy did:
> http://www.thatsquality.com/articles/can-the-symfony-forms-framework-...
> >
> > > Also, he had to go to a lot of trouble to get it to work.
> >
> > > There's got to be a way to add the children, or a blank one without
> > > going to the trouble that he went tol.
> >
> > > (doctrine btw)
> > > ParticularForm extends BaseParticularForm{
> >
> > > function configuration(){
> > >   $this->getObject()->getRelatedObjectForm
> >
> > > On Oct 5, 11:20 pm, Francisco José Núñez Rivera 
> > > wrote:
> >
> > > > I tried it with
> >
> > > > $opinion = new Opinion();
> > > > $opfeat = new $opinion->OpinionFeature;
> >
> > > > but cant find the class OpinionFeature...
> >
> > > > Otherwise i do the same you write (more or less). I think that when
> i'm
> > > > showing opinion form it creates a new Opinion(); variable.
> > > > Then i use that variable to set the new OpinionFeature var...
> > > > $opfeat->setOpinionId($this->getObject()->id);
> > > > $opfeat->setFeatureId($feature->getId());
> >
> > > > $OFform = new OpinionFeatureForm($opfeat);
> > > > $this->embedForm('feature_'.$feature->getId(), $OFform);
> >
> > > > But it doesnt work... i have to overwrite saveEmbedForms
> >
> > > > public function saveEmbeddedForms($con = null, $forms = null)
> > > >   {
> >
> > > > foreach($this->getEmbeddedForms() as $opinionForm)
> > > > {
> >
> > > > $opinionForm->getObject()->setOpinionId($this->getObject()->getId());
> > > > }
> >
> > > > parent::saveEmbeddedForms($con, $forms);
> > > >   }
> >
> > > > I think there's a easier way to do this but.. i dont know. :(
> >
> > > > 2009/10/6 Dennis 
> >
> > > > > I got this off of a Fabien post, somewhere. If you look at it, it
> > > > > makes everything connect to the same parent record. It SHOULD save
> > > > > correctly. I am goin to try it in my project tonight. Let me know
> if
> > > > > it works for you.
> >
> > > > > $user = new User();
> > > > > $profile = new $user->Profile;
> > > > > $userForm = new UserForm($user);
> > > > > $profileForm = new ProfileForm($profile);
> > > > > $userForm->embedForm('Profile', $profileForm);
> >
> > > > > On Oct 5, 2:13 am, elkrema  wrote:
> > > > > > Hi Dennis,
> >
> > > > > > there is my schema:
> >
> > > > > > Feature:
> > > > > >   tableName: feature
> > > > > >   columns:
> > > > > > id:
> > > > > >   type: integer(8)
> > > > > >   primary: true
> > > > > >   autoincrement: true
> > > > > > name:
> > > > > >   type: string(255)
> > > > > >   notnull: true
> > > > > > created_at: timestamp(25)
> > > > > > updated_at: timestamp(25)
> > > > > >   relations:
> > > > > > OpinionFeature:
> > > > > >   local: id
> > > > > >   foreign: feature_id
> > > > > >   type: many
> >
> > > > > > Opinion:
> > > > > >   tableName: opinion
> > > > > >   columns:
> > > > > > id:
> > > > > >   type: integer(8)
> > > > > >   primary: true
> > > > > >   autoincrement: true
> > > > > > title:
> > > > > >   type: string(255)
> > > > > >   notnull: true
> > > > > > opiniontxt:
> > > > > >   type: string(2147483647)
> > > > > >   notnull: true
> > > > > > is_active:
> > > > > >   type: int

[symfony-users] Re: Propel route problem

2009-10-13 Thread HAUSa

That's it. Thank you man!

On 13 okt, 10:29, Alexandre SALOME  wrote:
> Hu !
>
> Add in requirements : sf_method: [get, post]
>
> By default, i think only get is accepted, so it skip the route.
>
> This should fix the problem
>
> 2009/10/13 HAUSa 
>
>
>
>
>
> > With url_for('@user_activate', $user); I got an error, but without the
> > @ it works.
>
> > Now I changed the route to this:
>
> > user_activate:
> >  url:     /user-activate/:id
> >  class:   sfPropelRoute
> >  options: { model: User, type: object }
> >  param:   { module: user, action: activate }
>
> > When I type in the URL (/website_dev.php/user-activate/1), it shows
> > the page correctly. Then, when I submit a form to the exact same URL,
> > it says "Action "useractivate/1" does not exist.".
> > I guess the fact that it searches for a module named useractivate and
> > a action that is named 1, means that it takes the default route yet
> > again. On a form submit, it just doesn't recognize the route class
> > "user_activate"!
>
> > This is really weird!
>
> > On 12 okt, 12:10, Alexandre SALOME  wrote:
> > > For the route, use :
>
> > > url_for('@user_activate', $user);
>
> > > Could you try a simple thing ?
>
> > > Change your URL : set something like /user-activate/:id
>
> > > Does it works like this ?
>
> > > 2009/10/12 HAUSa 
>
> > > > With the requirements it works, the url_for('@user_activate?id=' .
> > > > $user->getId()) didn't have any effect.
> > > > But what is the difference with the requirements? It's strange that it
> > > > doesn't take the user_activate route in first place, because I placed
> > > > it on top of my routing.yml document...
>
> > > > On 9 okt, 18:18, Alexandre SALOME  wrote:
> > > > > 1 => true in routing parameters...
>
> > > > > Strange...
>
> > > > > Try adding :
>
> > > > > *requirements*:
> > > > >         id: \d+
>
> > > > > Finally :
>
> > > > > user_activate:
> > > > >   url:     /user/activate/:id
> > > > >   class:   sfPropelRoute
> > > > >   options: { model: User, type: object }
> > > > >   param:   { module: user, action: activate }
> > > > >   requirements:
> > > > >     id: \d+
>
> > > > > 2009/10/9 NairuS 
>
> > > > > > 2009/10/9 HAUSa 
>
> > > > > >> Hey, this is weird! I checked the log like you said Alexandre, and
> > it
> > > > > >> matches just the default one...
>
> > > > > >> Oct 09 10:17:36 symfony [info] {sfPatternRouting} Connect
> > > > > >> sfPropelRoute "user_activate" (/user/activate/:id)
> > > > > >> Oct 09 10:17:36 symfony [info] {sfPatternRouting} Connect
> > > > > >> sfPropelRoute "user_edit" (/user/edit/:id)
> > > > > >> Oct 09 10:17:36 symfony [info] {sfPatternRouting} Connect sfRoute
> > > > > >> "homepage" (/)
> > > > > >> Oct 09 10:17:36 symfony [info] {sfPatternRouting} Connect sfRoute
> > > > > >> "default_index" (/:module)
> > > > > >> Oct 09 10:17:36 symfony [info] {sfPatternRouting} Connect sfRoute
> > > > > >> "default" (/:module/:action/*)
> > > > > >> Oct 09 10:17:36 symfony [info] {sfPatternRouting} Match route
> > > > > >> "default" (/:module/:action/*) for /user/activate/1 with
> > parameters
> > > > > >> array (  1 => true,  'module' => 'user',  'action' => 'activate',)
>
> > > > > >> But why doesn't it match "user_active"? The URL is correct!
> > > > > >> /website_dev.php/user/activate/1
>
> > > > > >> On 9 okt, 10:15, HAUSa <
> > jeroen_heeft_behoefte_aan_r...@hotmail.com>
> > > > > >> wrote:
> > > > > >> > Ah, the URL problem is solved. I had to use
> > url_for('user_activate',
> > > > > >> > $user), and not url_for('@user_activate', $user) (mind the @).
>
> > > > > > Yep it's true.
>
> > > > > > Sorry! With this syntax :
> > > > > >   > url_for('@user_activate?id=' . $user->getId())
>
> > > > > > it must work too.
>
> > > > > >> > But, the form problem still remains.
> > > > > >> > When I submit my form, it says
> > > > > >> > "Fatal error: Call to undefined method sfRoute::getObject() in
> > > > /home/
> > > > > >> > snuber/domains/
> > snuber.net/public_html/apps/website/modules/user/
> > > > > >> > actions/actions.class.php on line 59"
>
> > > > > >> > This is my form now:
> > > > > >> >  > enctype="multipart/form-
> > > > > >> > data">
>
> > > > > >> > On 9 okt, 09:50, Alexandre SALOME 
> > > > wrote:
>
> > > > > >> > > Sure, your configuration is OK.
>
> > > > > >> > > Maybe the routing match another route before this one.
>
> > > > > >> > > Please check in the logs and tell us,
>
> > > > > >> > > look if you do you have any other rule that could catch your
> > url
> > > > > >> before ?
>
> > > > > >> > > Use the task *./symfony app:routes websites* to get the list
> > of
> > > > the
> > > > > >> app
> > > > > >> > > routes.
>
> > > > > >> > > Alexandre
>
> > > > > >> > > 2009/10/9 HAUSa 
>
> > > > > >> > > > Can someone help me with this please?
> > > > > >> > > > It's really becoming an obstacle in my development process
> > > > now... :(
>
> > > > > >> > > > On 8 okt, 21:01, HAUSa <
> > > > jeroen_heeft_behoefte_aan_r...@hotmail.com>
> > > > > >> > > >

[symfony-users] Re: is sfMediaLibraryPlugin compatible with Symfony 1.2 (Propel)?

2009-10-13 Thread Sid Bachtiar

I just tried sfMediaLibraryPlugin, could not get it to work!

For anyone else reading this, use sfAssetLibraryPlugin instead if you
are using Symfony 1.2 (Propel) with TinyMCE 3.

Apply the following patch to get rid of the Javascript error:
http://trac.symfony-project.org/attachment/ticket/3750/sfAssetsLibrary_tinymce3_justneeded_changes.patch

When executing "./symfony asset:create-root", specify the application ... e.g.:

./symfony asset:create-root --application="backend"

On Tue, Oct 13, 2009 at 8:04 PM, Alexandru-Emil Lupu
 wrote:
> Sid, AFAIK you can use it ... you might have some small problems, but i
> doubt  it .
> And yes ... is working with propel ... It is not ORM related ..
> browse this:
> http://trac.symfony-project.org/browser/plugins/sfMediaLibraryPlugin
> Alecs
>
> On Tue, Oct 13, 2009 at 9:04 AM, Sid Bachtiar 
> wrote:
>>
>> Hi,
>>
>> Does anyone know if sfMediaLibraryPlugin works with Symfony 1.2
>> (Propel)? It's flagged as Symfony 1.1, but 1.1 and 1.2 are quite
>> similar.
>>
>> Kind regards,
>>
>> Sid
>>
>>
>
>
>
> --
> As programmers create bigger & better idiot proof programs, so the universe
> creates bigger & better idiots!
> I am on web:  http://www.alecslupu.ro/
> I am on twitter: http://twitter.com/alecslupu
> I am on linkedIn: http://www.linkedin.com/in/alecslupu
> Tel: (+4)0748.543.798
>
>
> >
>



-- 
Blue Horn Ltd - System Development
http://bluehorn.co.nz

--~--~-~--~~~---~--~~
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: Propel route problem

2009-10-13 Thread Alexandre SALOME
Hu !

Add in requirements : sf_method: [get, post]

By default, i think only get is accepted, so it skip the route.

This should fix the problem


2009/10/13 HAUSa 

>
> With url_for('@user_activate', $user); I got an error, but without the
> @ it works.
>
> Now I changed the route to this:
>
> user_activate:
>  url: /user-activate/:id
>  class:   sfPropelRoute
>  options: { model: User, type: object }
>  param:   { module: user, action: activate }
>
> When I type in the URL (/website_dev.php/user-activate/1), it shows
> the page correctly. Then, when I submit a form to the exact same URL,
> it says "Action "useractivate/1" does not exist.".
> I guess the fact that it searches for a module named useractivate and
> a action that is named 1, means that it takes the default route yet
> again. On a form submit, it just doesn't recognize the route class
> "user_activate"!
>
> This is really weird!
>
>
>
> On 12 okt, 12:10, Alexandre SALOME  wrote:
> > For the route, use :
> >
> > url_for('@user_activate', $user);
> >
> > Could you try a simple thing ?
> >
> > Change your URL : set something like /user-activate/:id
> >
> > Does it works like this ?
> >
> > 2009/10/12 HAUSa 
> >
> >
> >
> >
> >
> > > With the requirements it works, the url_for('@user_activate?id=' .
> > > $user->getId()) didn't have any effect.
> > > But what is the difference with the requirements? It's strange that it
> > > doesn't take the user_activate route in first place, because I placed
> > > it on top of my routing.yml document...
> >
> > > On 9 okt, 18:18, Alexandre SALOME  wrote:
> > > > 1 => true in routing parameters...
> >
> > > > Strange...
> >
> > > > Try adding :
> >
> > > > *requirements*:
> > > > id: \d+
> >
> > > > Finally :
> >
> > > > user_activate:
> > > >   url: /user/activate/:id
> > > >   class:   sfPropelRoute
> > > >   options: { model: User, type: object }
> > > >   param:   { module: user, action: activate }
> > > >   requirements:
> > > > id: \d+
> >
> > > > 2009/10/9 NairuS 
> >
> > > > > 2009/10/9 HAUSa 
> >
> > > > >> Hey, this is weird! I checked the log like you said Alexandre, and
> it
> > > > >> matches just the default one...
> >
> > > > >> Oct 09 10:17:36 symfony [info] {sfPatternRouting} Connect
> > > > >> sfPropelRoute "user_activate" (/user/activate/:id)
> > > > >> Oct 09 10:17:36 symfony [info] {sfPatternRouting} Connect
> > > > >> sfPropelRoute "user_edit" (/user/edit/:id)
> > > > >> Oct 09 10:17:36 symfony [info] {sfPatternRouting} Connect sfRoute
> > > > >> "homepage" (/)
> > > > >> Oct 09 10:17:36 symfony [info] {sfPatternRouting} Connect sfRoute
> > > > >> "default_index" (/:module)
> > > > >> Oct 09 10:17:36 symfony [info] {sfPatternRouting} Connect sfRoute
> > > > >> "default" (/:module/:action/*)
> > > > >> Oct 09 10:17:36 symfony [info] {sfPatternRouting} Match route
> > > > >> "default" (/:module/:action/*) for /user/activate/1 with
> parameters
> > > > >> array (  1 => true,  'module' => 'user',  'action' => 'activate',)
> >
> > > > >> But why doesn't it match "user_active"? The URL is correct!
> > > > >> /website_dev.php/user/activate/1
> >
> > > > >> On 9 okt, 10:15, HAUSa <
> jeroen_heeft_behoefte_aan_r...@hotmail.com>
> > > > >> wrote:
> > > > >> > Ah, the URL problem is solved. I had to use
> url_for('user_activate',
> > > > >> > $user), and not url_for('@user_activate', $user) (mind the @).
> >
> > > > > Yep it's true.
> >
> > > > > Sorry! With this syntax :
> > > > >   > url_for('@user_activate?id=' . $user->getId())
> >
> > > > > it must work too.
> >
> > > > >> > But, the form problem still remains.
> > > > >> > When I submit my form, it says
> > > > >> > "Fatal error: Call to undefined method sfRoute::getObject() in
> > > /home/
> > > > >> > snuber/domains/
> snuber.net/public_html/apps/website/modules/user/
> > > > >> > actions/actions.class.php on line 59"
> >
> > > > >> > This is my form now:
> > > > >> >  enctype="multipart/form-
> > > > >> > data">
> >
> > > > >> > On 9 okt, 09:50, Alexandre SALOME 
> > > wrote:
> >
> > > > >> > > Sure, your configuration is OK.
> >
> > > > >> > > Maybe the routing match another route before this one.
> >
> > > > >> > > Please check in the logs and tell us,
> >
> > > > >> > > look if you do you have any other rule that could catch your
> url
> > > > >> before ?
> >
> > > > >> > > Use the task *./symfony app:routes websites* to get the list
> of
> > > the
> > > > >> app
> > > > >> > > routes.
> >
> > > > >> > > Alexandre
> >
> > > > >> > > 2009/10/9 HAUSa 
> >
> > > > >> > > > Can someone help me with this please?
> > > > >> > > > It's really becoming an obstacle in my development process
> > > now... :(
> >
> > > > >> > > > On 8 okt, 21:01, HAUSa <
> > > jeroen_heeft_behoefte_aan_r...@hotmail.com>
> > > > >> > > > wrote:
> > > > >> > > > > I have this route:
> >
> > > > >> > > > > user_activate:
> > > > >> > > > >   url: /user/activate/:id
> > > > >> > > > >   class:   sfPropelRoute
> > > > >> > > > >   options: { model:

[symfony-users] Re: Get only language

2009-10-13 Thread Jose R. Prieto
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

en   => Language
US   => country / zone

en_US, en_GB, en_AU

Spanish is a better example :)

es_ES (spanish in Spain)
es_AR (spanish in Argentina)

An special example is galician, a regional language that is spoken in
Galician, a region (Autonomic Community) of Spain; for this, you have
gl_ES; other special examples like this, are the catalonian, ca_ES,
and the vasque, eu_ES.

Some references:

http://www.w3.org/International/articles/language-tags/Overview.en.php
http://www.w3.org/International/articles/bcp47/
http://www.iana.org/assignments/language-subtag-registry
http://www.oasis-open.org/committees/xliff/documents/cs-xliff-core-1.1-20031031.htm
http://www.ietf.org/rfc/rfc3066.txt



Alexandru-Emil Lupu escribió:
> then use  just "en" culture ... not en_US.
> Alecs
>
> On Tue, Oct 13, 2009 at 6:32 AM, HAUSa
>  > wrote:
>
>
> The following function exists:
> $this->getUser()->getCulture();
>
> Now the output is for example "en_US".
> But is there also a way to only get the language returned (only
> "en")?
>
> I tried $this->getUser()->getCulture()->getLanguage(), but helas no
> result.
>
>
>
>
> --
> As programmers create bigger & better idiot proof programs, so the
> universe creates bigger & better idiots!
> I am on web:  http://www.alecslupu.ro/
> I am on twitter: http://twitter.com/alecslupu
> I am on linkedIn: http://www.linkedin.com/in/alecslupu
> Tel: (+4)0748.543.798
>
>
> >
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJK1DahAAoJEFlRSentq+j0JbAH/iOVGqLpHXf+Zp2DChMc1wv4
uG/zvIW1uDWO34v6j6Qk0+wMBior5kug8J/G7XAPMFdGOYJZiND9sm/Jo7FQwo2T
czM4UV+gSziWHwcC1cBIjo+oiWyMGoHZKXRLrJJ8VpS0pAlGyfPkTV+Q5MR5IP/Z
vkMubsvIJbWa16dT6bpccoJIhSNtA05BUNsJx01EK7tAE8muk+QfAv0MuzB3bWxb
JDMuUOwBsKdtynAgA3l3v6S1LVVfnyXUIHyXmJnleaTPa9ECDBGRUT9g6Ov7pBdv
h1WuJ+Q6BO0J7CPmdd4XbjAA0d79qJ9WQdy1eo0K+tnPrLi3G/46ISxOwOSVhig=
=lzYw
-END PGP SIGNATURE-


--~--~-~--~~~---~--~~
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: is sfMediaLibraryPlugin compatible with Symfony 1.2 (Propel)?

2009-10-13 Thread Alexandru-Emil Lupu
Sid, AFAIK you can use it ... you might have some small problems, but i
doubt  it .
And yes ... is working with propel ... It is not ORM related ..
browse this:
http://trac.symfony-project.org/browser/plugins/sfMediaLibraryPlugin
Alecs

On Tue, Oct 13, 2009 at 9:04 AM, Sid Bachtiar wrote:

>
> Hi,
>
> Does anyone know if sfMediaLibraryPlugin works with Symfony 1.2
> (Propel)? It's flagged as Symfony 1.1, but 1.1 and 1.2 are quite
> similar.
>
> Kind regards,
>
> Sid
>
> >
>


-- 
As programmers create bigger & better idiot proof programs, so the universe
creates bigger & better idiots!
I am on web:  http://www.alecslupu.ro/
I am on twitter: http://twitter.com/alecslupu
I am on linkedIn: http://www.linkedin.com/in/alecslupu
Tel: (+4)0748.543.798

--~--~-~--~~~---~--~~
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: Get only language

2009-10-13 Thread Alexandru-Emil Lupu
then use  just "en" culture ... not en_US.
Alecs

On Tue, Oct 13, 2009 at 6:32 AM, HAUSa <
jeroen_heeft_behoefte_aan_r...@hotmail.com> wrote:

>
> The following function exists:
> $this->getUser()->getCulture();
>
> Now the output is for example "en_US".
> But is there also a way to only get the language returned (only "en")?
>
> I tried $this->getUser()->getCulture()->getLanguage(), but helas no
> result.
> >
>


-- 
As programmers create bigger & better idiot proof programs, so the universe
creates bigger & better idiots!
I am on web:  http://www.alecslupu.ro/
I am on twitter: http://twitter.com/alecslupu
I am on linkedIn: http://www.linkedin.com/in/alecslupu
Tel: (+4)0748.543.798

--~--~-~--~~~---~--~~
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: __() in Peer and Form

2009-10-13 Thread Alexandru-Emil Lupu
in the form you don't need to use it ... i have made an
"sfi18nfromExtractorplugin" that takes your errors by instantiating your
class, and creates a dictionary using those files ... you might wanna try it
...
about the peer class, i might say that you are doing something wrong ... On
the other way you can make a toolsHelper class that would have this code :



function __($text, $args = array(), $catalogue = 'messages') {   if (
sfConfig::get('sf_i18n'))   { return sfContext::getInstance()->getI18N
()->__($text, $args, $catalogue);   }   else   { if (empty($args)) {
   $args = array(); }
 // replace object with strings foreach ($args as $key => $value)
 {   if (is_object($value) && method_exists($value, '__toString'))
 { $args[$key] = $value->__toString();   } }
 return strtr($text, $args);   } }

Alecs

On Tue, Oct 13, 2009 at 7:29 AM, HAUSa <
jeroen_heeft_behoefte_aan_r...@hotmail.com> wrote:

>
> I see the __('translate') function does not work in the ObjectPeer and
> ObjectForm.
> How can I make this work, or what other function can I use for this?
> >
>


-- 
As programmers create bigger & better idiot proof programs, so the universe
creates bigger & better idiots!
I am on web:  http://www.alecslupu.ro/
I am on twitter: http://twitter.com/alecslupu
I am on linkedIn: http://www.linkedin.com/in/alecslupu
Tel: (+4)0748.543.798

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