[symfony-users] Symfony-NYC Meetup Group meeting again this Wednesday 4/14

2010-04-12 Thread isleshocky77
I know this is now probably short notice; but I figured I would post
here that the Symfony-NYC Meetup group will be meeting again this week
to discuss XDebug and Symfony.  For anyone who is in the New York City
area please check out the event page at 
http://www.meetup.com/Symfony-NYC/calendar/12834368/

--
Stephen Ostrow

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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

To unsubscribe, reply using "remove me" as the subject.


[symfony-users] [symfony 1.2+] Output Escaping Help attribute for a field in Admin Generator

2011-01-06 Thread isleshocky77
Anyone ever tried putting  or \n in the help text of a field for
the admin-generator in sf1.2+? I used to do it, but I don't think
since 1.0. Now it looks like it's not working due to output escaping.
Is there a way of easily turning it off for a single field or module
or another way of doing it?

--
Stephen Ostrow 

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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] an example of embedForm() and its use

2008-10-31 Thread isleshocky77

With 1.2 around the corner I'm taking my first crack at the new form
system brought by the 1.1 release.  I need to make a form which is
essentially made up of a bunch of inner forms.

I'll post my schema at the bottom.  Basically I have a table of
Skills, just consist of a name, description and group the skill
belongs to.  Then I have a table named SkillReport which is just a
name and descrtiption, and finally a table named SkillPerson which
combines a skill_id, skill_report_id, sf_guard_user_id, and rating.
Basically ties everything together to keep track of a skill for a
given person in that report.

So I need to make a form which contains many SkillPerson's after going
around in circles of trying to make a single form object with a
skill_person[rating][0]  where 0 is the skill_id, I stumbled upon
embedForm.  Using this
I'm able to make my own form which embed multiple  SkillPeron forms.
{{{
#!php
$Skills = Doctrine::getTable('Skill')->findAll();
foreach ( $Skills as $Skill ) {
  $SkillPerson = new SkillPerson();
  $SkillPerson['skill_report_id'] = 1;
  $SkillPerson['sf_guard_user_id'] = 2;
  $SkillPerson['skill_id'] = $Skill['id'];
  $this->embedForm("rating[{$Skill['id']}]", new
SkillPersonForm($SkillPerson));
}
}}}
It displays correctly but I'm having a hard time with the bind
function in my action and validation.  Validation is all over the
place.

It would be greatly helpful if someone could post an example of using
the embedForm functionality as well as validating it and using it's
values.  Below is the schema.yml, the SkillFillOutReportForm.class.php
(my custom form), and SkillPersonForm.clas.php (the modified generated
form, and my action.

Thanks for any help in advance.

{{{
#yml
#schema.yml
SkillGroup:
  columns:
name: string
description: string

Skill:
  columns:
skill_group_id: integer
name: string
description: string
  relations:
Group:
  class: SkillGroup

SkillReport:
  columns:
name: string
description: string
date: timestamp
deadline: timestamp

SkillPerson:
  columns:
skill_id: integer
sf_guard_user_id: integer(4)
skill_report_id: integer
rating: integer(2)
  relations:
User:
  class: sfGuardUser
Skill:
  class: Skill
Report:
  class: SkillReport
}}}

{{{
#!php
//  SkillFillOutReportForm.class.php
class SkillFillOutReportForm extends sfForm
{
  public function setup()
  {
$Skills = Doctrine::getTable('Skill')->findAll();
foreach ( $Skills as $Skill ) {
  $SkillPerson = new SkillPerson();
  $SkillPerson['skill_report_id'] = 1;
  $SkillPerson['sf_guard_user_id'] = 2;
  $SkillPerson['skill_id'] = $Skill['id'];
  $this->embedForm("rating[{$Skill['id']}]", new
SkillPersonForm($SkillPerson));
}
$this->widgetSchema->setNameFormat('skill_person[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this-
>validatorSchema);
parent::setup();
  }
}
}}}

{{{
#!php
// SkillPersonForm.class.php
class SkillPersonForm extends BaseSkillPersonForm
{
  public function configure()
  {
 unset($this['created_at'], $this['updated_at'], $this['slug']);
 $this->setWidgets(array(
 'sf_guard_user_id' => new sfWidgetFormInputHidden(),
 'skill_report_id'  => new sfWidgetFormInputHidden(),
 'rating'   => new sfWidgetFormChoice(array(
 'choices' => SkillPersonTable::getRatingChoices(),
 'expanded' => true))
 ));
 $this->setValidators(array(
  'sf_guard_user_id' => new
sfValidatorDoctrineChoice(array('model' => 'sfGuardUser', 'required'
=> true)),
  'skill_report_id'  => new
sfValidatorDoctrineChoice(array('model' => 'SkillReport', 'required'
=> true)),
  'rating'   => new sfValidatorChoice(array('choices' =>
array_keys(SkillPersonTable::getRatingChoices(,
 ));
  }
}
}}}

{{{
#!php
//actions.class.php
public function executeFillOut($request)
  {
$this->form = new SkillFillOutReportForm();
if ($request->isMethod('post'))
{
  $this->form->bind($request->getParameter('skill_person'));
  if ($this->form->isValid())
  {
$values = $this->form->getValues();
  }
}
  }
}}}
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: an example of embedForm() and its use

2008-10-31 Thread isleshocky77

Yeah. I realized that. I was planning on doing all the db updates
manually since it shouldn't be very complex. I'm not up to that
though. This is purely a sfForms thing I believe.

Thanks for the response though.

Any other direction would be helpful.

-- Stephen

On Oct 31, 3:48 pm, "Jonathan Wage" <[EMAIL PROTECTED]> wrote:
> Remember, the submitted values from the form are bound to the form, and then
> the values are passed to fromArray() on your Doctrine object. If you've used
> fromArray() before it is not a magic way to always update your object from
> an array of data. It isn't magically able to accept any form data and know
> what to do with it in your object. In your case you will need to do some
> manual work to update your object properly from the form->getValues().
>
> - Jon
>
> On Fri, Oct 31, 2008 at 2:39 PM, isleshocky77 <[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > With 1.2 around the corner I'm taking my first crack at the new form
> > system brought by the 1.1 release.  I need to make a form which is
> > essentially made up of a bunch of inner forms.
>
> > I'll post my schema at the bottom.  Basically I have a table of
> > Skills, just consist of a name, description and group the skill
> > belongs to.  Then I have a table named SkillReport which is just a
> > name and descrtiption, and finally a table named SkillPerson which
> > combines a skill_id, skill_report_id, sf_guard_user_id, and rating.
> > Basically ties everything together to keep track of a skill for a
> > given person in that report.
>
> > So I need to make a form which contains many SkillPerson's after going
> > around in circles of trying to make a single form object with a
> > skill_person[rating][0]  where 0 is the skill_id, I stumbled upon
> > embedForm.  Using this
> > I'm able to make my own form which embed multiple  SkillPeron forms.
> > {{{
> > #!php
> >    $Skills = Doctrine::getTable('Skill')->findAll();
> >    foreach ( $Skills as $Skill ) {
> >      $SkillPerson = new SkillPerson();
> >      $SkillPerson['skill_report_id'] = 1;
> >      $SkillPerson['sf_guard_user_id'] = 2;
> >      $SkillPerson['skill_id'] = $Skill['id'];
> >      $this->embedForm("rating[{$Skill['id']}]", new
> > SkillPersonForm($SkillPerson));
> >    }
> > }}}
> > It displays correctly but I'm having a hard time with the bind
> > function in my action and validation.  Validation is all over the
> > place.
>
> > It would be greatly helpful if someone could post an example of using
> > the embedForm functionality as well as validating it and using it's
> > values.  Below is the schema.yml, the SkillFillOutReportForm.class.php
> > (my custom form), and SkillPersonForm.clas.php (the modified generated
> > form, and my action.
>
> > Thanks for any help in advance.
>
> > {{{
> > #yml
> > #schema.yml
> > SkillGroup:
> >  columns:
> >    name: string
> >    description: string
>
> > Skill:
> >  columns:
> >    skill_group_id: integer
> >    name: string
> >    description: string
> >  relations:
> >    Group:
> >      class: SkillGroup
>
> > SkillReport:
> >  columns:
> >    name: string
> >    description: string
> >    date: timestamp
> >    deadline: timestamp
>
> > SkillPerson:
> >  columns:
> >    skill_id: integer
> >    sf_guard_user_id: integer(4)
> >    skill_report_id: integer
> >    rating: integer(2)
> >  relations:
> >    User:
> >      class: sfGuardUser
> >    Skill:
> >      class: Skill
> >    Report:
> >      class: SkillReport
> > }}}
>
> > {{{
> > #!php
> > //  SkillFillOutReportForm.class.php
> > class SkillFillOutReportForm extends sfForm
> > {
> >  public function setup()
> >  {
> >    $Skills = Doctrine::getTable('Skill')->findAll();
> >    foreach ( $Skills as $Skill ) {
> >      $SkillPerson = new SkillPerson();
> >      $SkillPerson['skill_report_id'] = 1;
> >      $SkillPerson['sf_guard_user_id'] = 2;
> >      $SkillPerson['skill_id'] = $Skill['id'];
> >      $this->embedForm("rating[{$Skill['id']}]", new
> > SkillPersonForm($SkillPerson));
> >    }
> >    $this->widgetSchema->setNameFormat('skill_person[%s]');
> >    $this->errorSchema = new sfValidatorErrorSchema($this-
> > >val

[symfony-users] Form in sf_standard_helpers in sf1.2 not working

2008-11-04 Thread isleshocky77

I went to try out symfony 1.2 the other day. One of the first things I
figured I'd test is the new sfDoctrineManagerPlugin.  Whenever I get
to a page with a form it crashes stating the function form_tag() was
not found. I can fix this is by putting use_helper('Form') at the tops
of those pages.  I thought this might be a bug so I submitted a ticket
for the plugin.

While moving on to try out the new form framework I realized that the
sf_standard_helpers of Form is not working.  It's listed in it in the
config panel on the debug toolbar correctly.

I found a ticket related to this for 1.1
http://trac.symfony-project.org/ticket/4039

The comment says you must turn on sf_compat_10 and closed the ticket
as invalid.

I have tried turning sf_compat_10 on as well and it still does not
work.

Any direction in this would greatly appreciated.

-- Stephen
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Form in sf_standard_helpers in sf1.2 not working

2008-11-05 Thread isleshocky77

Just wanted to update this in case anyone else had any problems.  With
a little help from frederic who told me he had to use $this-
>enableAllPluginsExcept() to get the plugin to work, I realized that I
was enable the compat10plugin in the wrong way for sf1.2.  When I
added 'sfCompat10Plugin' to my array of enabled plugins the
sfDoctrineManagerPlugin started to wor correctly along with the Form
helper.

-- Stephen Ostrow

On Nov 4, 6:51 pm, isleshocky77 <[EMAIL PROTECTED]> wrote:
> I went to try out symfony 1.2 the other day. One of the first things I
> figured I'd test is the new sfDoctrineManagerPlugin.  Whenever I get
> to a page with a form it crashes stating the function form_tag() was
> not found. I can fix this is by putting use_helper('Form') at the tops
> of those pages.  I thought this might be a bug so I submitted a ticket
> for the plugin.
>
> While moving on to try out the new form framework I realized that the
> sf_standard_helpers of Form is not working.  It's listed in it in the
> config panel on the debug toolbar correctly.
>
> I found a ticket related to this for 
> 1.1http://trac.symfony-project.org/ticket/4039
>
> The comment says you must turn on sf_compat_10 and closed the ticket
> as invalid.
>
> I have tried turning sf_compat_10 on as well and it still does not
> work.
>
> Any direction in this would greatly appreciated.
>
> -- Stephen
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] One to many relationship for embedded Form (Doctrine if it matters)

2008-11-11 Thread isleshocky77

Ok, I've been trying to get this to work properly for a few days now
and have made a little progress but cannot get this to fully work.

So My model looks something like this:
{{{
#!yaml
User:
  columns:
first_name: string(255)
last_name: string(255)

Email:
  columns:
user_id:  integer
address: string(255)
  relations:
User:
}}}

I'm embedding the form in the action just for ease of testing this
before I put it in the form class.

My Action:
{{{
#!php
  public function executeIndex(sfWebRequest $request)
  {
$this->form = new UserForm();
$email_form = new EmailForm();

$this->form->embedForm('Email', $email_form);

if ($request->isMethod('post'))
{

  $this->form->bind($request->getParameter('user'));
  if ($this->form->isValid())
  {
$this->form->save();
  }
}
  }
}}}

When I try to submit the form I get an error:
{{{
Catchable fatal error: Argument 1 passed to
Doctrine_Record::fromArray() must be an array, string given, called
in /srv/symfony/branches/1.2/lib/plugins/sfDoctrinePlugin/lib/doctrine/
Doctrine/Collection.php on line 702 and defined in /srv/symfony/
branches/1.2/lib/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/
Record.php on line 1506
}}}

When I change the embedForm('Email', $email_form) to
embedForm('email', $email_form) then the form submits without error,
but doesn't save the email address.

I would preferably like it like this:
embedForm('Email[], $email_form);
This way I can have multiple Email Addresses on this one form.  When I
do this it displays correctly but when I go to submit it fails
validation with the following output:
{{{
Unexpected extra form field named "Email".
}}}

I'm thinking there has to be some way to link the Email's user_id to
the new user, but I'm not sure of the proper way to do this.

Thanks in advance for any help.

--
Stephen Ostrow <[EMAIL PROTECTED]>
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: One to many relationship for embedded Form (Doctrine if it matters)

2008-11-11 Thread isleshocky77

Jon,
  Thanks for the quick reply.
  With my knowledge of Doctrine, that's what I assumed the first error
which is why I had tried Email[] and I had tried Email[0] before that
as well.  When I tried your code I get the same problem as with just
Email[]
{{{
Unexpected extra form field named "Email".
}}}

This is what lead me to believe that it might be a problem I'm having
with symfony and not just Doctrine in symfony.

If it helps here is the outputted form:
{{{
#!html
 First name
  


  Last name
  


  Email[0]
  

  
  User id
  

1
2



  Address

  




  Email[1]
  
  
  User id
  


1
2



  Address
  



}}}

-- Stephen Ostrow <[EMAIL PROTECTED]>

On Nov 11, 9:55 am, "Jonathan Wage" <[EMAIL PROTECTED]> wrote:
> Well, you get that error because when you embed it with a name of Email, it
> tries to set something to a Doctrine record which is a collection, and you
> are passing it a single piece of data.
>
> Try:
>
> for ($i = 0; $i < 5; $i++)
> {
>    $form->embedForm('Email[' . $i . ']', new EmailForm());
>
> }
>
> On Tue, Nov 11, 2008 at 2:09 AM, isleshocky77 <[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > Ok, I've been trying to get this to work properly for a few days now
> > and have made a little progress but cannot get this to fully work.
>
> > So My model looks something like this:
> > {{{
> > #!yaml
> > User:
> >  columns:
> >    first_name: string(255)
> >    last_name: string(255)
>
> > Email:
> >  columns:
> >    user_id:  integer
> >    address: string(255)
> >  relations:
> >    User:
> > }}}
>
> > I'm embedding the form in the action just for ease of testing this
> > before I put it in the form class.
>
> > My Action:
> > {{{
> > #!php
> >  public function executeIndex(sfWebRequest $request)
> >  {
> >    $this->form = new UserForm();
> >    $email_form = new EmailForm();
>
> >    $this->form->embedForm('Email', $email_form);
>
> >    if ($request->isMethod('post'))
> >    {
>
> >      $this->form->bind($request->getParameter('user'));
> >      if ($this->form->isValid())
> >      {
> >        $this->form->save();
> >      }
> >    }
> >  }
> > }}}
>
> > When I try to submit the form I get an error:
> > {{{
> > Catchable fatal error: Argument 1 passed to
> > Doctrine_Record::fromArray() must be an array, string given, called
> > in /srv/symfony/branches/1.2/lib/plugins/sfDoctrinePlugin/lib/doctrine/
> > Doctrine/Collection.php on line 702 and defined in /srv/symfony/
> > branches/1.2/lib/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/
> > Record.php on line 1506
> > }}}
>
> > When I change the embedForm('Email', $email_form) to
> > embedForm('email', $email_form) then the form submits without error,
> > but doesn't save the email address.
>
> > I would preferably like it like this:
> > embedForm('Email[], $email_form);
> > This way I can have multiple Email Addresses on this one form.  When I
> > do this it displays correctly but when I go to submit it fails
> > validation with the following output:
> > {{{
> > Unexpected extra form field named "Email".
> > }}}
>
> > I'm thinking there has to be some way to link the Email's user_id to
> > the new user, but I'm not sure of the proper way to do this.
>
> > Thanks in advance for any help.
>
> > --
> > Stephen Ostrow <[EMAIL PROTECTED]>
>
> --
> Jonathan H. Wage
> Open Source Software Developer & 
> Evangelisthttp://www.jwage.comhttp://www.doctrine-project.orghttp://www.symfony-project.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: One to many relationship for embedded Form (Doctrine if it matters)

2008-11-11 Thread isleshocky77

This does not fail validation, and it saves both objects; but it
doesn't save them related to each other.  The Email['user_id'] is left
null after this form submittal.

I have submitted a ticket for this: http://trac.symfony-project.org/ticket/4906

-- Stephen Ostrow <[EMAIL PROTECTED]>

On Nov 11, 12:15 pm, "Jonathan Wage" <[EMAIL PROTECTED]> wrote:
> This works:http://pastebin.com/m1db73fde
>
> I think though that this should work:
>
> class UserForm extends BaseUserForm
> {
>   public function configure()
>   {
>     foreach ($this->getObject()->getEmails() as $email)
>     {
>       $this->embedForm('Emails[' . $email['id'] . ']', new
> EmailForm($email));
>     }
>   }
>
> }
>
> We will have to ask Fabien if this is supposed to work or not, can you
> create a ticket asking about this?
>
> Thanks, Jon
>
> On Tue, Nov 11, 2008 at 9:29 AM, isleshocky77 <[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > Jon,
> >  Thanks for the quick reply.
> >  With my knowledge of Doctrine, that's what I assumed the first error
> > which is why I had tried Email[] and I had tried Email[0] before that
> > as well.  When I tried your code I get the same problem as with just
> > Email[]
> > {{{
> > Unexpected extra form field named "Email".
> > }}}
>
> > This is what lead me to believe that it might be a problem I'm having
> > with symfony and not just Doctrine in symfony.
>
> > If it helps here is the outputted form:
> > {{{
> > #!html
> >  First name
> >  
> > 
> > 
> >  Last name
> >  
> > 
> > 
> >  Email[0]
> >  
>
> >  
> >  User id
> >   > id="user_Email_0_user_id">
> > 
> > 1
> > 2
> > 
> > 
> > 
> >  Address
>
> >   > id="user_Email_0_address" />
> > 
> > 
> > 
> > 
> >  Email[1]
> >  
> >  
> >  User id
> >   > id="user_Email_1_user_id">
> > 
>
> > 1
> > 2
> > 
> > 
> > 
> >  Address
> >   > id="user_Email_1_address" />
> > 
> > 
> > 
> > }}}
>
> > -- Stephen Ostrow <[EMAIL PROTECTED]>
>
> > On Nov 11, 9:55 am, "Jonathan Wage" <[EMAIL PROTECTED]> wrote:
> > > Well, you get that error because when you embed it with a name of Email,
> > it
> > > tries to set something to a Doctrine record which is a collection, and
> > you
> > > are passing it a single piece of data.
>
> > > Try:
>
> > > for ($i = 0; $i < 5; $i++)
> > > {
> > >    $form->embedForm('Email[' . $i . ']', new EmailForm());
>
> > > }
>
> > > On Tue, Nov 11, 2008 at 2:09 AM, isleshocky77 <[EMAIL PROTECTED]
> > >wrote:
>
> > > > Ok, I've been trying to get this to work properly for a few days now
> > > > and have made a little progress but cannot get this to fully work.
>
> > > > So My model looks something like this:
> > > > {{{
> > > > #!yaml
> > > > User:
> > > >  columns:
> > > >    first_name: string(255)
> > > >    last_name: string(255)
>
> > > > Email:
> > > >  columns:
> > > >    user_id:  integer
> > > >    address: string(255)
> > > >  relations:
> > > >    User:
> > > > }}}
>
> > > > I'm embedding the form in the action just for ease of testing this
> > > > before I put it in the form class.
>
> > > > My Action:
> > > > {{{
> > > > #!php
> > > >  public function executeIndex(sfWebRequest $request)
> > > >  {
> > > >    $this->form = new UserForm();
> > > >    $email_form = new EmailForm();
>
> > > >    $this->form->embedForm('Email', $email_form);
>
> > > >    if ($request->isMethod('post'))
> > > >    {
>
> > > >      $this->form->bind($request->getParameter('user'));
> > > >      if ($this->form->isValid())
> > > >      {
> > > >        $this->form->save();
> > > >      }
> > > >    }
> > > >  }
> > > > }}}
>
> > > > When I try to submit the form I get an error:
> > > > {{{
> > > > Catchable fatal error: Argument 1 passed 

[symfony-users] Re: sfWidgetFormInputFile Not working ?

2008-11-17 Thread isleshocky77

Fredlab: Checkout my string of comments on that ticket, I had the same
problem at first.

Tiago:  I was about to leave a post or a ticket for some direction on
using the rest of sfWidgetFormInputFileEditable. I got it so it
displays the image which is cool, but the form fails validation
because of the way they're displaying the delete tag, and the delete
functionality obviously doesn't work.  You have direction you can
point me in or code snippets?

-- Stephen Ostrow <[EMAIL PROTECTED]>

On Nov 16, 3:56 am, fredlab <[EMAIL PROTECTED]> wrote:
> Tiago,
>
> Did you find how to get it works ? I can't get it to work correctly ?
>
> It saves the name of the file in the database but I cannot get it to
> copy the file to the sf_upload_dir directory.
>
> Frédéric
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfWidgetFormInputFile Not working ?

2008-11-17 Thread isleshocky77

Fredlab,
  First I don't think that it was necessary to overwrite the
executeUpdate.  processForm was protected and not private and this is
where you wanted to overwrite, just to add tot he bind function.
{{{
#!php
#/apps/admin/modules/images/actions/actions.class.php
class imagesActions extends autoImagesActions
{

  protected function processForm(sfWebRequest $request, sfForm $form)
  {
$form->bind($request->getParameter('image'), $request->getFiles
('image'));
if ($form->isValid())
{
  $this->getUser()->setFlash('notice', $form->getObject()->isNew
() ? 'The item was created successfully.' : 'The item was updated
successfully.');

  $image = $form->save();

  $this->dispatcher->notify(new sfEvent($this,
'admin.save_object', array('object' => $image)));

  if ($request->hasParameter('_save_and_add'))
  {
$this->getUser()->setFlash('notice', $this->getUser()->getFlash
('notice').' You can add another one below.');

$this->redirect('@images_new');
  }
  else
  {
$this->redirect('@images_edit?id='.$image['id']);
  }
}
else
{
  $this->getUser()->setFlash('error', 'The item has not been saved
due to some errors.');
}
  }
}
}}}

However, all of that is not necessary after today since Jonathon.Wage
has fixed that ticket.

However, to make the file upload work you should upload your form
class.  In my case it looks like this:
{{{
#!
/lib/form/doctrine/ImageForm.class.php
widgetSchema['filename'] = new sfWidgetFormInputFileEditable
(array('file_src' => '/uploads/'.$this->getObject()->getFilename(),
'is_image' => true));
$this->validatorSchema['filename'] = new sfValidatorFile();

  }

  /**
  * Here I'm making deleting the old file on save if it exists, making
the filename, and setting the filename in the database on save
  */
  public function doSave($con = null)
  {
if (file_exists($this->getObject()->getFilename()))
{
  unlink($this->getObject()->getFilename());
}

$file = $this->getValue('filename');
$filename = sha1($file->getOriginalName()).$file->getExtension
($file->getOriginalExtension());
$file->save(sfConfig::get('sf_upload_dir').'/'.$filename);

return parent::doSave($con);
  }


  /**
  * Here I'm changing the full absolute file path to just the relative
path on update
  */
  public function updateObject($values = null)
  {
$object = parent::updateObject($values);

$object->setFilename(str_replace(sfConfig::get
('sf_upload_dir').'/', '', $object->getFilename()));

return $object;
  }

}
}}}

Like I said all of this can be found and explained at
http://www.symfony-project.org/book/forms/1_2/en/11-Doctrine-Integration

Hope this helps you and anyone else that needs this functionality.

P.s. Like I wrote originally the delete uploaded file checkbox
functionality does not work for this widget.

-- Stephen Ostrow <[EMAIL PROTECTED]>

On Nov 17, 12:55 pm, fredlab <[EMAIL PROTECTED]> wrote:
> Stephen: I did overwrite my executeUpdate function as it is public
> while the processform is private (did it under the action.class.php of
> the author module).
>
> This is my code :
>
> lass authorsActions extends autoAuthorsActions
> {
>   public function executeUpdate(sfWebRequest $request)
>   {
>     $this->author = $this->getRoute()->getObject();
>     $this->form = $this->configuration->getForm($this->author);
>
>     $this->form->bind($request->getParameter('author'), 
> $request->getFiles('author'));
>
>     if ($this->form->isValid())
>     {
>       $this->getUser()->setFlash('notice', $this->form->getObject()->isNew() 
> ? 'The item was created successfully.' : 'The item was
>
> updated successfully.');
>
>         $module_name = $this->getContext()->getModuleName();
>         $file = $this->form->getValue('file');
>         $filename =  $module_name;
>         $extension = $file->getExtension($file->getOriginalExtension
> ());
>         $file->save(sfConfig::get('sf_app_module_dir').'/'.
> $module_name.'/'.sfConfig::get('sf_upload_dir').'/'.$filename.
> $extension);
>         $this->getUser()->setFlash('error', sfConfig::get
> ('sf_app_module_dir').'/'.$module_name.'/'.sfConfig::get
> ('sf_upload_dir').'/'.$filename.$extension.' ___FILENAME :'.$file);
>
>    // ...
>       $author = $this->form->save();
>
>       $this->dispatcher->notify(new sfEvent($this,
> 'admin.save_object', array('object' => $author)));
>
>       if ($request->hasParameter('_save_and_add'))
>       {
>         $this->getUser()->setFlash('notice', $this->getUser()->getFlash
> ('notice').' You can add another one below.');
>
>         $this->redirect('@authors_new');
>       }
>       else
>       {
>         $this->redirect('@authors_edit?id='.$author['id']);
>       }
>     }
>     else
>     {
>       $this->getUser()->setFlash('error', 'The item has not been saved
> due to some errors.');
>     }
>     $this->setTemplate('edit');
>   }
>
> }
>
> Hope it can helps someone.
>
> Note that I also 

[symfony-users] Organization in new Form Framework

2008-11-18 Thread isleshocky77

I went looking for a solution to this problem and found a whole bunch
of posts in the forum asking the same thing with no replies to any of
them.  I figured I'd try asking here.

Is there a way to organize form fields in the new form framwork so
that certain fields are displayed within a ?

And a second question is there a way to re-order fields?

-- Stephen Ostrow <[EMAIL PROTECTED]>
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Organization in new Form Framework

2008-11-18 Thread isleshocky77

Fabien,
  First, thanks for the answer on the second question; It's good to
know there is a way to re-order the fields.  I had noticed that it's
based off of the setWidgets() functions so far and thus because propel
and doctrine generate that automatically it would be be based off of
the schema. I thought it would be a pain if I would have to redo the
setWidgets() call for any form which I wanted to reorder, so I'll
definitely be using the moveField() function.

  Second, along with my own purpose in mind, I saw other people as
well on the forums requesting grouping. It would be cool if we could
group fields either by using "fieldset" or a "div".  I'm not sure I
would I would do it in the decorator or in the template since fields
are dynamically created in the form class so I Have to echo out the
whole form in the template.

-- Stephen Ostrow <[EMAIL PROTECTED]>

On Nov 18, 7:10 am, Fabien Potencier <[EMAIL PROTECTED]
project.com> wrote:
> isleshocky77 wrote:
> > I went looking for a solution to this problem and found a whole bunch
> > of posts in the forum asking the same thing with no replies to any of
> > them.  I figured I'd try asking here.
>
> > Is there a way to organize form fields in the new form framwork so
> > that certain fields are displayed within a ?
>
> Nothing special to do here. Just add the fieldsets in your templates. If
> the question is, can the  generate fieldsets for you,
> the answer is no. The echo $form is for prototyping, and does not
> replace proper templating.
>
>
>
> > And a second question is there a way to re-order fields?
>
> By default, the order of fields is the one defined in the schema.yml
> file or if not using a Model form, the one you define when creating the
> widgets.
>
> You can change the order of fields like this:
>
> $this->widgetSchema->moveField('password_again', 'after', 'password');
>
> The actions can be one of: first, last, before, or after.
>
> Fabien
>
>
>
> > -- Stephen Ostrow <[EMAIL PROTECTED]>
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Organization in new Form Framework

2008-11-18 Thread isleshocky77

Has been created as ticket #4989 http://trac.symfony-project.org/ticket/4989
I made the milestone 1.3

-- Stephen Ostrow <[EMAIL PROTECTED]>

On Nov 18, 3:44 pm, Fabien Potencier <[EMAIL PROTECTED]
project.com> wrote:
> isleshocky77 wrote:
> > Fabien,
> >   First, thanks for the answer on the second question; It's good to
> > know there is a way to re-order the fields.  I had noticed that it's
> > based off of the setWidgets() functions so far and thus because propel
> > and doctrine generate that automatically it would be be based off of
> > the schema. I thought it would be a pain if I would have to redo the
> > setWidgets() call for any form which I wanted to reorder, so I'll
> > definitely be using the moveField() function.
>
> >   Second, along with my own purpose in mind, I saw other people as
> > well on the forums requesting grouping. It would be cool if we could
> > group fields either by using "fieldset" or a "div".  I'm not sure I
> > would I would do it in the decorator or in the template since fields
> > are dynamically created in the form class so I Have to echo out the
> > whole form in the template.
>
> This is definitely a possibility. Please, create a ticket and we will
> talk about this for the symfony 1.3 version.
>
> Thanks,
> Fabien
>
>
>
> > -- Stephen Ostrow <[EMAIL PROTECTED]>
>
> > On Nov 18, 7:10 am, Fabien Potencier <[EMAIL PROTECTED]
> > project.com> wrote:
> >> isleshocky77 wrote:
> >>> I went looking for a solution to this problem and found a whole bunch
> >>> of posts in the forum asking the same thing with no replies to any of
> >>> them.  I figured I'd try asking here.
> >>> Is there a way to organize form fields in the new form framwork so
> >>> that certain fields are displayed within a ?
> >> Nothing special to do here. Just add the fieldsets in your templates. If
> >> the question is, can the  generate fieldsets for you,
> >> the answer is no. The echo $form is for prototyping, and does not
> >> replace proper templating.
>
> >>> And a second question is there a way to re-order fields?
> >> By default, the order of fields is the one defined in the schema.yml
> >> file or if not using a Model form, the one you define when creating the
> >> widgets.
>
> >> You can change the order of fields like this:
>
> >> $this->widgetSchema->moveField('password_again', 'after', 'password');
>
> >> The actions can be one of: first, last, before, or after.
>
> >> Fabien
>
> >>> -- Stephen Ostrow <[EMAIL PROTECTED]>
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Re : [symfony-users] Re: File upload deletes previous file if field is empty

2008-11-18 Thread isleshocky77

I don't know if this will help anyone in this thread, but I just
updated a ticket I had made regarding the
sfWidgetFormInputFieldEditable. It has a fix for the problem described
in this thread of always deleting the file, as well as for allowing
the "remove file" functionality to work.
http://trac.symfony-project.org/ticket/4978

If anyone thinks this can or should be done in a better cleaner way,
please let me know or post to the ticket.  Thanks.

-- Stephen Ostrow <[EMAIL PROTECTED]>

On Nov 18, 3:09 pm, Jonathan Franks <[EMAIL PROTECTED]> wrote:
> Daniel -
> I managed to dig out the code for the solution I found for this  
> problem. Try the following...
>
>    public function save($con = null)
>    {
>         $file = $this->getValue('file');
>         if ($file) {
>             if (file_exists($this->getObject()->getFile()))
>             {
>               unlink($this->getObject()->getFile());
>             }
>        $filename = sha1($file->getOriginalName()).$file-
>  >getExtension($file->getOriginalExtension());
>        $file->save(sfConfig::get('sf_upload_dir').'/'.$filename);
>         }
>         return parent::save($con);
>    }
>
>    public function updateObject()
>    {
>      $new_file = $this->getValue('file');
>
>      if (!$new_file) {
>         $old_file = $this->object->getFile();
>         parent::updateObject();
>          $this->object->setFile($old_file);
>      } else {
>         parent::updateObject();
>      }
>      return $this->object;
>    }
>
> Let me know if that works
> - Jonathan
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Remove a embedded form from the form before processing

2008-12-09 Thread isleshocky77

So I'm moifying the admin generator to handle embedded forms.  I have
the save and insert functionality working fine and quite easily as
well.  However, when I try to implement the delete functionality I can
have it delete the related record, but the I receive error about
property that was supposed to be in that embedded record.  I wanted to
know if there is a way, and if so what is the proper way to remove an
embedded form and/or fields from a form once it has already been
submitted.  A few attempts are below and all yield similar errors
about my related objects id being invalid.

Thanks for any help with this.

{{{
#/actions/actions.class.php
 public function executeUpdate(sfWebRequest $request)
  {
$this->sw2_bind_domain = $this->getRoute()->getObject();
$this->form = $this->configuration->getForm($this-
>sw2_bind_domain);

//get the submit value from the request, and split it into an
array of command, id
$submit = ($request->hasParameter('submit') ? $request-
>getParameter('submit') : '_');
$submit = explode('_',$submit);

switch ($submit[0])
{
  case 'insert':
$this->sw2_bind_domain['Records'][] = new sw2BindRecord();
break;
  case 'delete':
$this->forward404Unless($record = Doctrine::getTable
('sw2BindRecord')->find($submit[1]));
$record->delete();
# Up to here works
// None of the following work

$this->form->offsetUnset('sw2_bind_domain[records][record_'.$submit
[1].'][id]');
unset($this->form->getValidator('records'));
unset($this->form['records']['record_'.$submit[1]]);
unset($request->parameters['records']['record_'.$submit[1]]);
$this->form->removeRecord($submit[1]);
break;
}

$this->processForm($request, $this->form);

$this->setTemplate('edit');
  }
}}}

{{{
#/lib/model/form/DomainForm.class.php
 // I thought accessing it from within the class might work better
 public function removeRecord($id)
  {
$this->offsetUnset($this['records']['record_'.$id]);
   unset($this['record_'.$id]);
  }
}}}

--
Stephen Ostrow <[EMAIL PROTECTED]>
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Using an sfUser inside of a unit test

2009-01-15 Thread isleshocky77

One of my model methods takes an sfUser as a parameter so I need to
create and user an sfUser in my unit testing.  What is the best way of
doing this?  I've copied some of the code out of the symfony's unit
test for sfUser, but I can't get it to work properly. I get an error
saying

Fatal error: Uncaught exception 'sfException' with message 'Call to
undefined method sfUser::getTable.' in /srv/symfony/branches/1.2/lib/
user/sfUser.class.php:287


Any help would be appreciated.

-- Stephen Ostrow 
--~--~-~--~~~---~--~~
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] Displaying an embedded form without nesting it

2009-01-23 Thread isleshocky77

I've run across this problem a few times now. I have a form with an
embedded form.  But I want it to displayed without being nested within
the form.

So instead of:
[code]

  
  

  

  

[/code]

I would like just:
[code]

  
  

[/code]

I had tried just doing this:
[code]
getFormFieldSchema() as $field ) : ?>
  renderRow() ?>

[/code]

but it still nests the form.  So I'm thinking I might be able to build
a new decorator, but I'm not sure if that will still nest the form.

And I'm trying to stay away from doing every field manually.

Thanks for any help

--
Stephen Ostrow
--~--~-~--~~~---~--~~
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: Displaying an embedded form without nesting it

2009-01-23 Thread isleshocky77

Jukea, Thanks for the reply. I was just coming back to say I found a
way of doing it but I don't think it's as clean as I would like.

[CODE]
class RegistrationForm extends sfGuardUserForm
{
  public function configure() {
parent::configure();

$profile_form = new RegistrationProfileForm($this->getObject()-
>getProfile());
$this->embedForm('profile', $profile_form);
$this->getWidget('profile')->setLabel(false);
$this->getWidget('profile')->setFormFormatterName
('listNoDecorator');
  }
}
[/CODE]

[CODE]
class sfWidgetFormSchemaFormatterListNoDecorator extends
sfWidgetFormSchemaFormatter
{
  protected
$rowFormat   = "\n  %error%%label%\n  %field%%help%\n
%hidden_fields%\n",
$errorRowFormat  = "\n%errors%\n",
$helpFormat  = '%help%',
$decoratorFormat = "\n  %content%"; // Only change is  this line
removing the 
}
[/CODE]

[CODE]
// registrationSuccess.php

  
getFormFieldSchema() as $field ) : ?>
getWidget()) == 'sfWidgetForm' ||
$field->getWidget() instanceOf sfWidgetFormInputHidden) : ?>
  

  renderRow() ?>



  
' ?>
[/CODE]

Like I said, I really wish there was a cleaner implementation to
this.  One I was thinking of was being able to set the "rowDecorator"
on a specific widget
$this->widgetSchema['profile']->setRowFormat("\n  %error%%label%\n
%field%%help%\n%hidden_fields%\n");
notice I removed the 

Any other ideas on a better way to do this would be greatly
appreciated. I'm thinking this has to be a common problem?  Or are
most people just solving it through css and I should  tell my html/css
coders to deal with it?

--
Stephen Ostrow 

On Jan 23, 3:44 pm, jukea  wrote:
> yes, it's because the nested form is rendered as a row itself, with
> the widget being the whole form .
>
> I guess you might be able to do that by displaying each embedded form
> row like this
>
> $this->embedded_forms['myForm']['embedded_form_username']->renderRow
> ();
>
> (check sfFormDoctrine (or propel ) to verify embedded_form, i'm not
> sure)
>
> Julien
>
> On Jan 23, 2:08 pm, isleshocky77  wrote:
>
> > I've run across this problem a few times now. I have a form with an
> > embedded form.  But I want it to displayed without being nested within
> > the form.
>
> > So instead of:
> > [code]
> > 
> >   
> >   
> >     
> >       
> >     
> >   
> > 
> > [/code]
>
> > I would like just:
> > [code]
> > 
> >   
> >   
> > 
> > [/code]
>
> > I had tried just doing this:
> > [code]
> > getFormFieldSchema() as $field ) : ?>
> >   renderRow() ?>
> > 
> > [/code]
>
> > but it still nests the form.  So I'm thinking I might be able to build
> > a new decorator, but I'm not sure if that will still nest the form.
>
> > And I'm trying to stay away from doing every field manually.
>
> > Thanks for any help
>
> > --
> > Stephen Ostrow
--~--~-~--~~~---~--~~
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: Using an sfUser inside of a unit test

2009-01-23 Thread isleshocky77

FIgured I would update this for anyone in the future trying to do this
same thing.  I got this to work by adding this to the top of my unit
test file.

[CODE]
$_SERVER['session_id'] = 'test';

$dispatcher = new sfEventDispatcher();
$sessionPath = sfToolkit::getTmpDir().'/sessions_'.rand(1, 9);
$storage = new sfSessionTestStorage(array('session_path' =>
$sessionPath));

$user_1 = new sfUser($dispatcher, $storage);
[/CODE]

--
Stephen Ostrow 

On Jan 15, 6:50 pm, isleshocky77  wrote:
> One of my model methods takes an sfUser as a parameter so I need to
> create and user an sfUser in my unit testing.  What is the best way of
> doing this?  I've copied some of the code out of the symfony's unit
> test for sfUser, but I can't get it to work properly. I get an error
> saying
>
> Fatal error: Uncaught exception 'sfException' with message 'Call to
> undefined method sfUser::getTable.' in /srv/symfony/branches/1.2/lib/
> user/sfUser.class.php:287
>
> Any help would be appreciated.
>
> -- Stephen Ostrow 
--~--~-~--~~~---~--~~
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 with scope of autoloaded classes for components in a different module

2009-02-03 Thread isleshocky77

Just came across a problem with the auto-loading or access of classes
with components.

The situation is a I have a Comment module, with a component called
Add which is just a component with a form to add comments.  So
naturally I added the form class for this component to
/apps/public/modules/comment/lib/form/AddForm.class.php

Now I'm going to use this component and I simple drop into my video/
view action's template
# /apps/public/modules/video/templates/viewSuccess.php
 $video) ?>

The problem is this is creating an error that it can't find the form
class. In order to get this to work I have to move the
AddForm.class.php from
/apps/public/modules/comment/lib/form/
to
/apps/public/lib/form/

I believe since the component is actually the one calling for the form
class that this should work and might be a bug in symfony.

I'm running symfony 1.2.4-dev

Any feedback would be great or do you think I should put a ticket in
for this?

--
Stephen Ostrow 
--~--~-~--~~~---~--~~
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 with scope of autoloaded classes for components in a different module

2009-02-03 Thread isleshocky77

Kris,
  Of course I cleared the cache. Like I said it's where I place the
class.  I think it should be in the module with the component.  But
then the component won't work from any other module.

--
Stephen Ostrow 

On Feb 3, 3:09 pm, Kris Wallsmith 
wrote:
> I assume you've cleared the cache after adding the file?
>
> --
>
> Kris Wallsmith | Community Manager
> kris.wallsm...@symfony-project.com
> Portland, Oregon USA
>
> http://twitter.com/kriswallsmith
>
> On Feb 3, 2009, at 11:49 AM, isleshocky77 wrote:
>
>
>
> > Just came across a problem with the auto-loading or access of classes
> > with components.
>
> > The situation is a I have a Comment module, with a component called
> > Add which is just a component with a form to add comments.  So
> > naturally I added the form class for this component to
> > /apps/public/modules/comment/lib/form/AddForm.class.php
>
> > Now I'm going to use this component and I simple drop into my video/
> > view action's template
> > # /apps/public/modules/video/templates/viewSuccess.php
> >  $video) ?>
>
> > The problem is this is creating an error that it can't find the form
> > class. In order to get this to work I have to move the
> > AddForm.class.php from
> > /apps/public/modules/comment/lib/form/
> > to
> > /apps/public/lib/form/
>
> > I believe since the component is actually the one calling for the form
> > class that this should work and might be a bug in symfony.
>
> > I'm running symfony 1.2.4-dev
>
> > Any feedback would be great or do you think I should put a ticket in
> > for this?
>
> > --
> > Stephen Ostrow 
--~--~-~--~~~---~--~~
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] Plugin Unit tests with Doctrine

2009-02-08 Thread isleshocky77

I'm trying to add some unit tests for my plugin which relies upon
Doctrine.  I'm wondering if anyone has a best practice?  Currently for
unit testing my projects with Doctrine I include the following in all
my unit tests.


getCurrentConnection();
Doctrine::loadData(sfConfig::get('sf_test_dir').'/fixtures', false);

When trying to do this for plugins I get an error that it doesn't have
the DoctrineManager loaded. I'm using sfTaskExtraPlugin to create the
plugin and I've updated the /plugins/myPlugin/fixtures/project/config/
ProjectConfiguration.class.php to enable sfDoctrinePlugin

Thanks in advance for any help.

--
Stephen Ostrow 
--~--~-~--~~~---~--~~
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] Plugin creating an extra form in the wrong place

2009-02-09 Thread isleshocky77

I'm not sure if this a symfony problem, a doctrine problem, or where
it's coming from. But I'm trying to update sfDoctrineSettingsPlugin to
work in sf1.2

Whenever I do a build-all-reload symfony is creating an extra form
 /lib/form/doctrine/PluginsfSettingForm.class.php

This form should only be in
/plugins/sfDoctrineSettingsPlugin/lib/form/doctrine/

It's causing the actual form class from the plugin to not load
properly.  Anyone have a clue why this would be happening?

--
Stephen Ostrow 
--~--~-~--~~~---~--~~
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: Plugin creating an extra form in the wrong place

2009-02-09 Thread isleshocky77

You can ignore this. It was a problem with all the old files from 1.0

--
Stephen Ostrow 

On Feb 9, 3:36 pm, isleshocky77  wrote:
> I'm not sure if this a symfony problem, a doctrine problem, or where
> it's coming from. But I'm trying to update sfDoctrineSettingsPlugin to
> work in sf1.2
>
> Whenever I do a build-all-reload symfony is creating an extra form
>  /lib/form/doctrine/PluginsfSettingForm.class.php
>
> This form should only be in
> /plugins/sfDoctrineSettingsPlugin/lib/form/doctrine/
>
> It's causing the actual form class from the plugin to not load
> properly.  Anyone have a clue why this would be happening?
>
> --
> Stephen Ostrow 
--~--~-~--~~~---~--~~
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 Use the Great sfDoctrineUserPlugin?

2009-02-14 Thread isleshocky77

Xin,
  Yep.  I have not completely finished the upgrade. Sorry, I probably
should have marked it as beta instead of stable.  I'm almost done with
it since I'm using it in another new project which I'm doing in 1.2.
It will be a lot cleaner and I'm hoping to include unit and functional
test as well.   I've also created some new forms which I'll include
for use in both the frontend and backend as it is now really easy to
do that.  I hope to have a new version up in a day or two; I've hit a
bug in doctrine 1.1 which has caused me to stall until it's ironed
out.  I'll post back to this thread when it is completely finished.

   For now the model and all the listeners work correctly if you check
it out from subversion and generating an admin section for a one table
at a time should be as easy as ./symfony doctrine:generate-admin
backend sfUserUser sfUserUser

--
Stephen Ostrow 

On Feb 14, 10:20 pm, Xin Jia  wrote:
> Thanks all for your reply. Sorry for my inconsiderateness. My sf is 1.2.4. I
> don't know whether what I did are right.
>
> 1 - PEAR on online install sfDoctrineGuardPlugin
>
> 2 - PEAR locally install sfDoctrineUserPlugin 1.2
>
> 3 - myUser extends sfUserSecurityUser
>
> 4 - enable_modules all in both plugins, login and security setting in
> settings.yml and security.yml
>
>      Later I even add sf_guard_plugin: profile_class in app.yml but result
> is the same.
>
> 5 - build-all
>
> 6 - cc
>
> 7 - add an user and access /sfGuardUser, login, no anything about
> sfDoctrineUserPlugin content
>
> 6 - access /sfUserUser, got an error "Class sfDoctrineAdminGenerator does
> not exist", then I generate-admin sfUserUser, doesn't work as what I
> imagine.
>
> Stephen, do you mean you've not finished the update yet? Then the 6th point
> should be reasonable.
>
> Could anybody help me on my procedure and show me a right way? Thanks all!
>
> - xj
>
> 2009/2/15 Stephen Ostrow - Hide quoted text -
>
> Thank you for the complements. It's great to know other people are getting
> use from from them and i'm helping others.
>
> First, what version of symfony are you using and how are you getting the
> plugin (svn or pear)?
>
> Two, 1.1 i never really did anything with because I went straight from 1.0
> to 1.2.
>
> However, im now completely done with 1.2. I updated the model and listeners
> last week and will start and finish the admin and forms for it this week.
>
> Let me know if its the admin stuff on 1.2 which is where your getting your
> errors.
>
> -
> Stephen Ostrow 
> (516) 263-3574
> 33 North End Ave
> Kenmore, NY 14217http://www.sowebdesigns.com
>
> On Sat, Feb 14, 2009 at 5:39 PM, Bernhard Schussek wrote:
>
>
>
> > Hi Xin,
>
> > 2009/2/14 Xin Jia :
> > > I've just followed it but failed.  Well,  what URL should I enter, need
> > any
> > > other setting or codes ? Thanks.
>
> > What failed? What URL enter where? You need to give a little more
> > information if you want us to help you ;-)
>
> > Bernhard
--~--~-~--~~~---~--~~
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: Remove embedded forms / update object runtime

2009-02-14 Thread isleshocky77

Patter,
 Did you happen to email this week?  Someone emailed me regarding this
issue, and I just went to reply but I can't find the email.  If it was
or wasn't you, according to a changeset I have from a month or two ago
I did get it to work correctly; however, I'm not exactly sure what I
did. If you give me a day or two I'm going to be doing the exact same
thing again for sfDoctrineUserPlugin to finish up some of the backend
functionality and I'll point you towards the code on the symfony trac
servers.  It will have the exact same example you're looking for,
especially since my User has Phones (1-n) which will need to be able
to be added and deleted.

--
Stephen Ostrow 

On Feb 11, 11:06 am, patter  wrote:
> Hello,
>
> I have a 1:n relation: User have two phone numbers (well my real use
> case is a bit complicated :-) ).
>
> In my UserForm::configure() I have something like this:
>
> $p1 = $this->object['phones'][0] = new Phone();
> $p2 = $this->object['phones'][1] = new Phone();
>
> $subForm = new sfForm();
> $subForm->embedForm(0, new PhoneForm($p1 );
> $subForm->embedForm(1, new PhoneForm($p2));
>
> $this->embedForm('phones', $subForm);
>
> This works perfect. I can add a new User with 2 phones.
>
> The problem is that if the user doesn't provide information for second
> phone I should not insert a blank record (in fact I can't because of
> not null fields).
>
> I have read a lot of articles but I'm not able to find solution yet.
>
> I think that I have to use UpdateObject() method to remove unwanted
> relation, but if this is the better solution ?
>
> I use Doctrine :-)
--~--~-~--~~~---~--~~
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] Changing an embedded form's decorator after embedding it

2009-02-19 Thread isleshocky77

The following code works:
[php]
getObject()->getUser());
$sf_user_user->widgetSchema->setFormFormatterName
('definitionListNoDecorator');
unset($sf_user_user['sf_guard_user_id']);
$this->embedForm('sf_user_user', $sf_user_user);

However the following code does not work:
[php]
getObject()->getUser());
unset($sf_user_user['sf_guard_user_id']);
$this->embedForm('sf_user_user', $sf_user_user);
# The following two lines should be the same as the first
examples's line 2
$this->getWidget('sf_user_user')->setFormFormatterName
('definitionListNoDecorator');
$this->widgetSchema['sf_user_user']->setFormFormatterName
('definitionListNoDecorator');

The reason I need the second set of code to work is so that a class
extending this form class can change the decorator of an embedded
form.  Unless I'm doing something wrong, it looks like there is no way
to do this.

Thanks for any help.

--
Stephen Ostrow 
--~--~-~--~~~---~--~~
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: Changing an embedded form's decorator after embedding it

2009-02-19 Thread isleshocky77

They should be protected. It's not like it's erroring, I should've
mentioned that. It's just not working.  It's using the default
decorator instead which is table.  So it's wrapping my embedded form
with a  while using a definition list as the inside.

--
Stephen Ostrow 

On Feb 19, 6:22 pm, Gandalf  wrote:
> the widgets are protected or private?
>
> On 2/19/09, isleshocky77  wrote:
>
>
>
> > The following code works:
> >     [php]
> >      >     $sf_user_user = new sfUserUserForm($this->getObject()->getUser());
> >     $sf_user_user->widgetSchema->setFormFormatterName
> > ('definitionListNoDecorator');
> >     unset($sf_user_user['sf_guard_user_id']);
> >     $this->embedForm('sf_user_user', $sf_user_user);
>
> > However the following code does not work:
> >     [php]
> >      >     $sf_user_user = new sfUserUserForm($this->getObject()->getUser());
> >     unset($sf_user_user['sf_guard_user_id']);
> >     $this->embedForm('sf_user_user', $sf_user_user);
> >     # The following two lines should be the same as the first
> > examples's line 2
> >     $this->getWidget('sf_user_user')->setFormFormatterName
> > ('definitionListNoDecorator');
> >     $this->widgetSchema['sf_user_user']->setFormFormatterName
> > ('definitionListNoDecorator');
>
> > The reason I need the second set of code to work is so that a class
> > extending this form class can change the decorator of an embedded
> > form.  Unless I'm doing something wrong, it looks like there is no way
> > to do this.
>
> > Thanks for any help.
>
> > --
> > Stephen Ostrow 
--~--~-~--~~~---~--~~
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: Remove embedded forms / update object runtime

2009-03-05 Thread isleshocky77

Patter,
 So I just updated my plugin which is using a lot of this.  I think
what I ended up doing is actually pretty clean.  I took some cues from
what you said as far as the updateObject, but I didn't need to make an
embeddedForm function because I'm deleting the object there.  You can
check out the full class in trac.  With the way it's done here I don't
have to have anything in the action which is how it was being done
before.

http://trac.symfony-project.org/browser/plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAdvancedUser/lib/form/sfUserAdvancedUserForm.class.php

The meat of it is in the two last protected functions.

--
Stephen Ostrow 

On Feb 16, 4:41 am, patter  wrote:
> Hi Stephen,
> yes I mailed you :-). I have used User just for example and my form is
> more complicated. Let say a UserObject have one FamilyObject and this
> FamilyObject have one or two ParentsObjects. So in UserForm is
> embedded FamilyForm with embedded FamilyForms (something like this -
> three levels of embedding)
>
> I have a solution , but I'm not sure if it is the best one.
>
> It is easy to unset an embedded form for the form class itself:
>
> unset($this->embeddedForms('formName');
>
> but because it is private property it is not possible from outside the
> form.
> I have created a new form class which extends the base sfForm and this
> class adds one public method - removeEmbedded($name).
> Now I can use:
>
> $embedded  = $form->getEmbeddedForms();
> $embedded['relations']->removeEmbedded($name);
>
> I do this in updateObject() because it is called after the form is
> validated and everything is o.k.
> If I do this in bind() method and the form is not valid it will not be
> shown properly .
>
> On Feb 15, 4:46 pm, jukea  wrote:
>
> > Hi patter,
>
> > What I'd do is unset the embedded form as if ot was any other field.
>
> > if($postedValues[..insert your input name...]=='')
> >unset($subForm['embededFormName'])
>
> > Do this from anywhere before you bind the data. You could also
> > override the bind method in your form, unset the form there, and call
> > the parent method.
>
> > Julien
>
> > On Feb 11, 11:06 am, patter  wrote:
>
> > > Hello,
>
> > > I have a1:n relation: User have two phone numbers (well my real use
> > > case is a bit complicated :-) ).
>
> > > In my UserForm::configure() I have something like this:
>
> > > $p1 = $this->object['phones'][0] = new Phone();
> > > $p2 = $this->object['phones'][1] = new Phone();
>
> > > $subForm = new sfForm();
> > > $subForm->embedForm(0, new PhoneForm($p1 );
> > > $subForm->embedForm(1, new PhoneForm($p2));
>
> > > $this->embedForm('phones', $subForm);
>
> > > This works perfect. I can add a new User with 2 phones.
>
> > > The problem is that if the user doesn't provide information for second
> > > phone I should not insert a blank record (in fact I can't because of
> > > not null fields).
>
> > > I have read a lot of articles but I'm not able to find solution yet.
>
> > > I think that I have to use UpdateObject() method to remove unwanted
> > > relation, but if this is the better solution ?
>
> > > I use Doctrine :-)
--~--~-~--~~~---~--~~
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 - how can I make default is_active = 0 ?

2009-03-09 Thread isleshocky77

Of lately I've been all about putting everything in the model, it just
makes all the code cleaner.  Anyways, if you're going to want users to
be set as inactive by default more than active you might want to think
about making that field default to false.  Then you would only have to
handle it in the forms which you would actually want the user to be
active.

This can be done by overriding the setTableDefinition method really
easily:

{{{
#/lib/model/doctrine/sfDoctrineGuardPlugin/sfGuardUser.class.php

class sfGuardUser extends PluginsfGuardUser
{
public function setTableDefinition()
{
parent::setTableDefinition();
$this->hasColumn('is_active', 'boolean', null, array('type' =>
'boolean', 'default' => '0'));
}

}
}}}

--
Stephen Ostrow 

On Mar 9, 3:59 am, dziobacz  wrote:
> I am making registration users. I have tried change column is_active
> in table sf_guard_user to default value=0 but still after registration
> new user has is_active=1. What should I do ? It is my code:
>
> First file:
>
> class RegistrationForm extends sfGuardUserForm
> {
>  public function configure()
>  {
>    unset(
>      $this['id'],
>      $this['is_active'],
>      $this['is_super_admin'],
>      $this['updated_at'],
>      $this['groups_list'],
>      $this['permissions_list'],
>      $this['last_login'],
>      $this['created_at'],
>      $this['salt'],
>      $this['algorithm']
>    );
>
>        $this->widgetSchema['password'] = new sfWidgetFormInputPassword
> ();
>        $this->widgetSchema['password_confirmation'] = new
> sfWidgetFormInputPassword();
>    $this->widgetSchema['name'] = new sfWidgetFormInput();
>    $this->widgetSchema['surname'] = new sfWidgetFormInput();
>    $this->widgetSchema['email'] = new sfWidgetFormInput();
>
> //validators. I deleted them - code will be too long
>
>  }
>
> }
>
> Second file:
>
> class registrationActions extends sfActions
> {
>
>  public function executeIndex(sfWebRequest $request)
>  {
>    $this->form = new RegistrationForm();
>      if ($request->isMethod('post'))
>      {
>        $this->form->bind($request->getParameter('sf_guard_user'));
>        if ($this->form->isValid())
>        {
>
>            $conn = Doctrine_Manager::connection();
>
>            $conn->beginTransaction();
>            try
>            {
>                $user = $this->form->save();
>
>                 $profil = new SfGuardUserProfile();
>                $profil -> setUserId($user->getId());
>                $profil -> setName($this->form->getValue('name'));
>                $profil -> setSurname($this->form->getValue
> ('surname'));
>                $profil -> setEmail($this->form->getValue('email'));
>                $profil -> save();
>
>                $conn->commit();
>            }
>            catch (Exception $e)
>              {
>                $conn->rollBack();
>                throw $e;
>              }
>
>        }
>      }
>  }
>
> }
--~--~-~--~~~---~--~~
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] sfDoctrineGuard Plugin and Doctrine 1.1

2009-03-09 Thread isleshocky77

So I've been pulling my hair out for the past few days because I
couldn't figure out why the basic functionality of the sfGuardUser
module wouldn't work in my project. The form would return on save with
a validation error simply stating

"The item has not been saved due to some errors."

At first I had narrowed it down to it was failing on a missing unset
for updated_at which you would think would be at
http://trac.symfony-project.org/browser/plugins/sfGuardPlugin/branches/1.2/lib/form/sfGuardUserAdminForm.class.php#L19

That is the link to the sfGuardPlugin which is missing it as well.

I fixed this in my project and the form then attempted to save but
bombed with an error in doctrine with the link function.

So today I started from scratch, first testing the module with sf1.2
and propel. It worked fine.  Then I moved on to sf1.2 and doctrine,
and it worked fine.  Finally I added in the Doctrine 1.1 as explained
here:
http://www.symfony-project.org/blog/2009/01/12/call-the-expert-using-a-custom-version-of-doctrine

And that's where I duplicated the error message seen below.

I'm not sure why the missing unset doesn't affect the first two cases
as it really should.  The form should be expecting updated_at, but the
admin generator isn't displaying that form field.

But more importantly it looks like the link functionality is broken in
1.1 some how.

Any help with this issue would be greatly appreciated.

--
Stephen Ostrow 

--~--~-~--~~~---~--~~
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 Plugin and Doctrine 1.1

2009-03-10 Thread isleshocky77

So no quick fix in your eyes?  I'm not sure what would cause it not to
work. I feel like what's causing it to fail shouldn't.

--
Stephen Ostrow 

On Mar 10, 8:49 pm, Jonathan Wage  wrote:
> It looks like sfDoctrinePlugin is not compatible with 1.1 anymore. We will
> update sfDoctrinePlugin for symfony 1.3 to use Doctrine 1.1 possibly.
>
> - Jon
>
> On Mon, Mar 9, 2009 at 2:02 PM, isleshocky77 wrote:
>
>
>
>
>
> > So I've been pulling my hair out for the past few days because I
> > couldn't figure out why the basic functionality of the sfGuardUser
> > module wouldn't work in my project. The form would return on save with
> > a validation error simply stating
>
> > "The item has not been saved due to some errors."
>
> > At first I had narrowed it down to it was failing on a missing unset
> > for updated_at which you would think would be at
>
> >http://trac.symfony-project.org/browser/plugins/sfGuardPlugin/branche...
>
> > That is the link to the sfGuardPlugin which is missing it as well.
>
> > I fixed this in my project and the form then attempted to save but
> > bombed with an error in doctrine with the link function.
>
> > So today I started from scratch, first testing the module with sf1.2
> > and propel. It worked fine.  Then I moved on to sf1.2 and doctrine,
> > and it worked fine.  Finally I added in the Doctrine 1.1 as explained
> > here:
>
> >http://www.symfony-project.org/blog/2009/01/12/call-the-expert-using-...
>
> > And that's where I duplicated the error message seen below.
>
> > I'm not sure why the missing unset doesn't affect the first two cases
> > as it really should.  The form should be expecting updated_at, but the
> > admin generator isn't displaying that form field.
>
> > But more importantly it looks like the link functionality is broken in
> > 1.1 some how.
>
> > Any help with this issue would be greatly appreciated.
>
> > --
> > Stephen Ostrow 
>
> --
> Jonathan H. Wage
> Open Source Software Developer & 
> Evangelisthttp://www.jwage.comhttp://www.doctrine-project.orghttp://www.symfony-project.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] Symfony CMS Plugins

2009-03-10 Thread isleshocky77

So I've been noticing more and more CMS Plugins popup for symfony. I
was wondering if anyone knew enough about all of them to make a chart
in the wiki comparing all the different implementations.

http://trac.symfony-project.org/wiki/CMSPlugins

I decided to start the page and see if anyone could add to it. I don't
know a lot about any of them accept sfDoctrineCMSPlugin which I've
work a little with.

Thanks in advance for anyone who can help out with this.

--
Stephen Ostrow 
--~--~-~--~~~---~--~~
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: pkContextCMS: the first beta is out!

2009-03-12 Thread isleshocky77

Tim,
  Do you think you could update this page to explain the advantages of
your plugin over sfSimpleCMSPlugin?
http://trac.symfony-project.org/wiki/CMSPlugins

--
Stephen Ostrow 

On Mar 12, 8:48 am, Tom Boutell  wrote:
> In response to two questions...
>
> 1. You'll probably get a faster response from us right now by
> commenting on the window.punkave.com post. I read this list as well.
>
> 2. Since we're using Doctrine's column aggregation inheritance,
> sfDbFinder is not an option. I'm also not crazy about the overhead.
>
> --
> Tom Boutell
>
> www.punkave.comwww.boutell.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] Loading a new class during program execution

2009-03-17 Thread isleshocky77

Is there a way to reload the autoloaded classes?  Specifically I'm
creating a new Doctrine model class on the fly. For my test I'm trying
to call the class after generating but it will only work if I run the
test a second time.

I've tried calling the CacheClearTask() but I think it has to do with
autoloading.

Any help would be appreciated

--
Stephen Ostrow 
--~--~-~--~~~---~--~~
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] Loading a new class during program execution

2009-03-18 Thread isleshocky77

I'm creating a class file during execution and need to be able to use
it after creating it.  I've tried calling the sfCacheClearTask::run()
as well as sfAutoloader::unregister(); sfAutoloader::register();
methods.

Anyone have any idea how I can get this functionality?

--
Stephen Ostrow 
--~--~-~--~~~---~--~~
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: Loading a new class during program execution

2009-03-20 Thread isleshocky77

Yeah. I had found that yesterday I guess I should've posted a reply in
case anyone had the same problem. My problem was that I was looking
through the sfCoreAutoad class instead the sfAutoload class.  But
thanks again.

--
Stephen Ostrow 

On Mar 20, 3:06 am, Gareth McCumskey  wrote:
> I know this response is a bit late but thought you might still find this
> handy:
>
> http://www.symfony-project.org/api/1_1/sfAutoload#method_reloadclasses
>
> Gareth
>
> On Tue, Mar 17, 2009 at 11:47 PM, isleshocky77 
> wrote:
>
>
>
> > Is there a way to reload the autoloaded classes?  Specifically I'm
> > creating a new Doctrine model class on the fly. For my test I'm trying
> > to call the class after generating but it will only work if I run the
> > test a second time.
>
> > I've tried calling the CacheClearTask() but I think it has to do with
> > autoloading.
>
> > Any help would be appreciated
>
> > --
> > Stephen Ostrow 
--~--~-~--~~~---~--~~
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 vs. Doctrine - Pros and Cons

2009-03-24 Thread isleshocky77

Just wanted to point out that the benchmark is being done on Doctrine
version 0.10.2.  A LOT of work has been done on doctrine since and the
current doctrine included with symfony is 1.0 and the current stable
version of doctrine is 1.1 and much much more stable from the days
0.10.

P.s. No I'm not sure if the results would definitely be affected, but
I'd love to see the test re-run with current versions.

--
Stephen Ostrow 

On Mar 24, 9:17 am, Dheeraj Kumar Aggarwal 
wrote:
> Hi
>
> A comparison between LightORM, Propel and Doctrine is given at this link
>
> http://phplightorm.wiki.sourceforge.net/LightOrm+vs+Propel+vs+Doctrin...
>
>
>
> On Tue, Mar 24, 2009 at 6:28 PM, Campezzi  wrote:
>
> > Hello there,
>
> > I've been a PHP developer for some time now, and recently I began
> > exploring the world of Symfony. So far, I like what I see, but there's
> > one thing that I still haven't quite figured out: in a real-world
> > environment, what are the basic advantages and drawbacks of Propel and
> > Doctrine?
>
> > I think the only way of getting a realistic answer is to ask people
> > who are clearly more experienced with real projects using sf than me.
> > So, if you feel like it, please share a quick view on what you love
> > and hate about Propel and Doctrine! :)
>
> > Cheers!
>
> --
> Regards,
> Dheeraj
--~--~-~--~~~---~--~~
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] sfFinder pattern with case-insensitive modifier

2009-04-30 Thread isleshocky77

Before I put a ticket in for this I was wondering if I'm correct in my
assessment that sfFinder cannot currently work with a name patter
which has a case-insensitive modifier.

Looking at line 116 of the sfFinder.class.php it looks like if you
have a pattern such as
/\.jpg$/i  that it would look at that as not being a regex expression
because it's last character is not a /

Anyone have a good way of doing this?

Thanks

--
Stephen Ostrow
sost...@sowebdesigns.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: sfFinder pattern with case-insensitive modifier

2009-04-30 Thread isleshocky77

I think this might be a really ugly way of doing it, but I changed
that line from

if ($str{0} == '/' && $str{strlen($str) - 1} == '/')
to

if ($str{0} == '/' && ($str{strlen($str) - 1} == '/' || $str{strlen
($str) - 2} == '/'))

and it obviously now works.  Can anyone think of a cleaner way this
should be implemented?

--
Stephen Ostrow
sost...@sowebdesigns.com

On Apr 30, 6:55 pm, isleshocky77  wrote:
> Before I put a ticket in for this I was wondering if I'm correct in my
> assessment that sfFinder cannot currently work with a name patter
> which has a case-insensitive modifier.
>
> Looking at line 116 of the sfFinder.class.php it looks like if you
> have a pattern such as
> /\.jpg$/i  that it would look at that as not being a regex expression
> because it's last character is not a /
>
> Anyone have a good way of doing this?
>
> Thanks
>
> --
> Stephen Ostrow
> sost...@sowebdesigns.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: sfFinder pattern with case-insensitive modifier

2009-04-30 Thread isleshocky77

Yes, I know this, but like 116 of sfFinder.class.php has it looking
exclusively for '/something/' by stating the first character and the
last character must be slashes.  If you had something like '/someTHING/
i' it would not recognise it as being a regex pattern and therefore
not treat it as one.  I've put in a ticket along with a patch and
update tests.  It appears not to have affected any of the other
symfony tests.

http://trac.symfony-project.org/ticket/6379

--
Stephen Ostrow
sost...@sowebdesigns.com

On Apr 30, 7:26 pm, FÁSI Gábor  wrote:
> It is a regexp. The slashes mark the start and the end of the pattern,
> the i is the case-insensitive flag, so it also matches .JPG, .jPG,
> etc.
> Recommended reading:http://hu.php.net/manual/en/regexp.reference.php
>
> > /\.jpg$/i  that it would look at that as not being a regex expression
> > because it's last character is not a /
>
> > Anyone have a good way of doing this?
>
> > Thanks
>
> > --
> > Stephen Ostrow
> > sost...@sowebdesigns.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] sfTask::logProgress()

2009-05-18 Thread isleshocky77

I don't know if I'm the first or only person to find this
functionality useful, but in a recent project of mine one of my tasks
was used for importing large amounts of data which took a total of 20
minutes combined.  It was extremely nice knowing where in the import
it was so I wrote a function which would write out the progress, clear
the previous, and re-write.  (Side note, it was entirely too much
information and overwhelming to log each change without clearing the
previous.  This way I was able to keep note of what section I was in.)

The problem I ran into was the way sfConsoleLogger writes to the
command line does not allow for the use of chr(8) in order to delete
previous printed characters.  So I had to just do a simple echo rather
than using the commandline logger.

My question is first, does anyone know of a way to erase characters
printed using sfTask::log() which in turn uses the sfConsoleLogger?

Second, does anyone else think it would really useful to have this
type of functionality built into sfTask.

My function and use of it is below but I'm sure it could be
implemented a lot cleaner.

public function _logProgress(&$num, $goal, $message = 'Importing %d of
%d (%1.2f%%)')
{
$logMessage = sprintf($message, (isset($num) ? (++$num) : ($num =
1) ) ,$goal, ($num/$goal*100) );
if ( $num > 1 ) {
  echo str_repeat(chr(8), strlen($logMessage));
}
echo $logMessage . ($num==$goal ? "\n" : '');
return $num;
}

# It's use
$num = 0;
foreach($TblTypes as $type) {
  $this->_logProgress($num, count($TblTypes));
  // Do something
}

--
Stephen Ostrow 
--~--~-~--~~~---~--~~
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: sfTask::logProgress()

2009-05-19 Thread isleshocky77

I was thinking that we could some how re-use the work done in the PEAR
project here:
http://pear.php.net/manual/en/package.console.console-progressbar.php

--
Stephen Ostrow 

On May 18, 8:49 pm, nick  wrote:
> On May 18, 3:12 pm, isleshocky77  wrote:
>
> > I don't know if I'm the first or only person to find this
> > functionality useful, but in a recent project of mine one of my tasks
> > was used for importing large amounts of data which took a total of 20
> > minutes combined.  It was extremely nice knowing where in the import
> > it was so I wrote a function which would write out the progress, clear
> > the previous, and re-write.  (Side note, it was entirely too much
> > information and overwhelming to log each change without clearing the
> > previous.  This way I was able to keep note of what section I was in.)
>
> > The problem I ran into was the way sfConsoleLogger writes to the
> > command line does not allow for the use of chr(8) in order to delete
> > previous printed characters.  So I had to just do a simple echo rather
> > than using the commandline logger.
>
> Great idea. Useful for big imports.
--~--~-~--~~~---~--~~
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: sfTask::logProgress()

2009-05-20 Thread isleshocky77

Put in a enhancement ticket
http://trac.symfony-project.org/ticket/6509

--
Stephen Ostrow 

On May 19, 2:49 pm, isleshocky77  wrote:
> I was thinking that we could some how re-use the work done in the PEAR
> project 
> here:http://pear.php.net/manual/en/package.console.console-progressbar.php
>
> --
> Stephen Ostrow 
>
> On May 18, 8:49 pm, nick  wrote:
>
> > On May 18, 3:12 pm, isleshocky77  wrote:
>
> > > I don't know if I'm the first or only person to find this
> > > functionality useful, but in a recent project of mine one of my tasks
> > > was used for importing large amounts of data which took a total of 20
> > > minutes combined.  It was extremely nice knowing where in the import
> > > it was so I wrote a function which would write out the progress, clear
> > > the previous, and re-write.  (Side note, it was entirely too much
> > > information and overwhelming to log each change without clearing the
> > > previous.  This way I was able to keep note of what section I was in.)
>
> > > The problem I ran into was the way sfConsoleLogger writes to the
> > > command line does not allow for the use of chr(8) in order to delete
> > > previous printed characters.  So I had to just do a simple echo rather
> > > than using the commandline logger.
>
> > Great idea. Useful for big imports.
--~--~-~--~~~---~--~~
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] Plain text field in admin generator for 1.2+

2009-08-27 Thread isleshocky77

This seems to me like it would be a big problem; however, it's been
quite a while and I haven't heard anything on a clean solution as of
yet.

Is there anything in the works for 1.3 or anything that can be
packported to 1.2 for this?

http://trac.symfony-project.org/ticket/5296

--
Stephen Ostrow 
--~--~-~--~~~---~--~~
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: ysfYUIPlugin state. Is this plugin dead?

2009-10-08 Thread isleshocky77

I'm trying to upgrade my project from sf1.2 to sf1.3. I had used the
ysfYUIPlugin previously with good results.  Upon upgrading I got an
error about not having the YUI helper. I see that is no longer
included so I removed this from settings.  Now I'm not sure how this
plugin is supposed to be used. For now I'm just trying to get back the
file
/ysfYUIPlugin/yui/reset-fonts-grids/reset-fonts-grids.css

Any help would be greatly appreciated.
Thanks.

--
Stephen Ostrow


On Sep 9, 4:58 pm, Dustin Whittle 
wrote:
> Tiago,
>
> Yes, YUI 3.x will replace YUI 2.x and there will be  the same widgets and
> functionality. Also, see the yuilibrary.com for more information and a
> timeline. I believe widgets will be released end of ear.
>
> Cheers,
>
> Dustin
>
> On 9/9/09 1:14 PM, "Tiago Nunes"  wrote:
>
> > Hi Dustin,
>
> > Thanks for your response. I just have a few more questions. :)
>
> > Does YUI 3.x replace YUI 2.x? I know they can work together and don't have
> > namespace collisions, but does YUI 3.x provide all the widgets and
> > functionality already present in YUI 2.x?
>
> > Also, when is YUI 3.x stable expected to be released?
>
> > Thanks for your help.
> > Best Regards,
> > --
> > Tiago Nunes
>
> > Dustin Whittle wrote:
>
> >> Hi Tiago,
>
> >> The plugin is not dead, but I have been waiting for the release of YUI3 and
> >> YUI3 widgets before I work on it.
>
> >> I don't really plan to support ysfYUIPlugin for YUI 2.x (the 1.1 and 1.2
> >> branches).. I am actively working on the 1.3 branch (which is based on YUI
> >> 3.x). The biggest problem is that the widget infrastructure is not 
> >> available
> >> yet -- most of the ysfYUIPlugin is around creating widgets.
>
> >> I don't like the pear packaging so if you want to use the plugin before
> >> stable release simply export or checkout from subversion.
>
> >> Should you start a project with it? Yes, if you intend to use YUI 3.x - it
> >> already has the built in debugger and as soon as the widgets are committed
> >> to github I will add them to the plugin.
>
> >> Cheers,
>
> >> Dustin
>
> >> On 9/9/09 11:21 AM, "Tiago Nunes" 
> >>   wrote:
>
> >>> Hi.
>
> >>> I'm looking for a good plugin to act as a wrapper to YUI.
>
> >>> Because I think ysfYUIPlugin has been developed by Yahoo developers,
> >>> it's the most promising YUI symfony plugin I can think of. The problem
> >>> is that the plugin looks dead to me!
>
> >>> In the plugin pagehttp://www.symfony-project.org/plugins/ysfYUIPlugin
> >>> there's no info about the supported symfony versions, nor plugin
> >>> releases. There's not even a plugin author to get in touch with.
>
> >>> My question is, what's the state of this plugin? Is it reliable?
> >>> Should I start a project using it?
>
> >>> Best Regards,
> >>> --
> >>> Tiago Nunes
--~--~-~--~~~---~--~~
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] Supplying a helper with a plugin with 1.3+

2009-12-14 Thread isleshocky77
Can plugins no longer contain helpers? I have the helper in plugins/
xxxPlugin/lib/helper/xxxHelper.php  and it's not finding it.

>From the deprecated in 1.3/1.4 doc it says "Helpers must be located in
one of the project, application or module lib/helper/ directories."

Does that mean plugins can't contain helpers?

--
Stephen Ostrow

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: Supplying a helper with a plugin with 1.3+

2009-12-14 Thread isleshocky77
I've just went digging through the code, and it appears that it is
only searching plugin's module/lib/helper directories for helpers, not
that /plugins /lib/helper base directory. Is this a bug or was this
done for reason?

My plugin contains a helper which is used across multiple modules and
outside of the module all together. So this will not work as I see it.
Any help would be appreciated.

--
Stephen Ostrow

On Dec 14, 2:19 pm, isleshocky77  wrote:
> Can plugins no longer contain helpers? I have the helper in plugins/
> xxxPlugin/lib/helper/xxxHelper.php  and it's not finding it.
>
> From the deprecated in 1.3/1.4 doc it says "Helpers must be located in
> one of the project, application or module lib/helper/ directories."
>
> Does that mean plugins can't contain helpers?
>
> --
> Stephen Ostrow

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] [SOLVED] Re: Supplying a helper with a plugin with 1.3+

2009-12-14 Thread isleshocky77
Nevermind guys, rookie mistake with the new version.  I needed to
explicitly enable the plugin first.

Thanks jwage

--
Stephen Ostrow

On Dec 14, 2:35 pm, isleshocky77  wrote:
> I've just went digging through the code, and it appears that it is
> only searching plugin's module/lib/helper directories for helpers, not
> that /plugins /lib/helper base directory. Is this a bug or was this
> done for reason?
>
> My plugin contains a helper which is used across multiple modules and
> outside of the module all together. So this will not work as I see it.
> Any help would be appreciated.
>
> --
> Stephen Ostrow
>
> On Dec 14, 2:19 pm, isleshocky77  wrote:
>
> > Can plugins no longer contain helpers? I have the helper in plugins/
> > xxxPlugin/lib/helper/xxxHelper.php  and it's not finding it.
>
> > From the deprecated in 1.3/1.4 doc it says "Helpers must be located in
> > one of the project, application or module lib/helper/ directories."
>
> > Does that mean plugins can't contain helpers?
>
> > --
> > Stephen Ostrow

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] Having a helper within a plugin used across multiple modules

2009-12-14 Thread isleshocky77
Can plugins no longer contain helpers? I have the helper in plugins/
xxxPlugin/lib/helper/xxxHelper.php  and it's not finding it.

>From the deprecated in 1.3/1.4 doc it says "Helpers must be located in
one of the project, application or module lib/helper/ directories."

does that mean plugins can't contain helpers?

After looking through code it appears that symfony is only searching
if a helper is contained with a module directory.  So the plugin can't
contain a helper to be used by any module.

--
Stephen Ostrow

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] Best practices using a Form class without html form submission

2009-12-22 Thread isleshocky77
I'm using ZendAMF with symfony and having a form in flash submit
information to a service in symfony. I wanted to know if anyone had
best practices for doing something like this.  It does include a file
which is where I'm running into the problems.

So far I have this:
http://isleshocky77.pastebin.com/f1434534c

  /**
   * Uploads an Image and sets its information
   *
   * @param array $image_arrayThe Image which contains all
information about the Image
   * @param byteArray $image_file The image file as a byteArray
   *
   * @todo Complete and test
   *
   */
  public function upload($image_array, $image_file)
  {
$ImageForm = new ImageServiceImageForm();

# Do something with image file
# @todo

$ImageForm->bind($image, $image_file);

if ($ImageForm->isValid()) {
  $ImageForm->save();
  return "Success";
} else {
  return "Error";
}

  }

Thanks for any help

--
Stephen Ostrow

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] Passing a file to a form class without a form submission

2009-12-23 Thread isleshocky77
So I'm just changing the subject on this cause it really is how I can
get a file which I have passed in as a byteArray from flash to be used
by a form class. Not sure if I should manually save it to a tmp file
first and the pass an array to the form class with the proper
information or there is an easier and cleaner way to do this.

Thanks for any help.

--
Stephen Ostrow

On Dec 22, 5:56 pm, isleshocky77  wrote:
> I'm using ZendAMF with symfony and having a form in flash submit
> information to a service in symfony. I wanted to know if anyone had
> best practices for doing something like this.  It does include a file
> which is where I'm running into the problems.
>
> So far I have this:http://isleshocky77.pastebin.com/f1434534c
>
>   /**
>    * Uploads an Image and sets its information
>    *
>    * @param array     $image_array    The Image which contains all
> information about the Image
>    * @param byteArray $image_file     The image file as a byteArray
>    *
>    * @todo Complete and test
>    *
>    */
>   public function upload($image_array, $image_file)
>   {
>     $ImageForm = new ImageServiceImageForm();
>
>     # Do something with image file
>     # @todo
>
>     $ImageForm->bind($image, $image_file);
>
>     if ($ImageForm->isValid()) {
>       $ImageForm->save();
>       return "Success";
>     } else {
>       return "Error";
>     }
>
>   }
>
> Thanks for any help
>
> --
> Stephen Ostrow

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: custom actions in generator.yml

2007-08-11 Thread isleshocky77

_save_and_list: ~ should work.  I complained about this a long time
ago and wrote a patch for the functionality. I believe it has been in
the symfony core for quite some time now, but is not documented.

On Aug 10, 12:57 pm, Rhinocerologist <[EMAIL PROTECTED]> wrote:
> I saw that someone posted on this before and no one answered...
> perhaps we're trying to do something that isn't supported by symfony
> yet. In any case, here goes:
>
> In generator.yml I have:
>
> edit:
>   actions:
> _list: ~
> _save: ~
> _save_and_add: ~
> save_and_list:
>   name: save and list
>   action: saveandlist
> _delete:   ~
>
> To quote the other person's post:
>
> as result  booth "save" and "save_and_add" actions are  type="submit"
> but "save_and_do_something" action is 
> I've tried adding...
> type: submit
> type: submit_tag
> params: type=submit
> params: type=submit_tag
>
> None of these work.
>
> So, can this be done? The type needs to be "submit" so that the form
> fields get submitted to the saveandlist action.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Dynamic CSS Tabs

2007-10-01 Thread isleshocky77

Nice piece of code, two recommendations I would make if you're
planning on making this reuasable is to pass in the array as a
parameter.  You could also get rid of the switch statement and use the
getModuleName and getActionName methods to some work automatically.  I
think I'll store this away for later use though.  Thank you for
contributing it to the community.

On Oct 1, 12:41 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I came across a nice solution based on the sliding doors technique.
> Provides dynamic width + rollover. Thought I would share:
>
> http://blog.thembid.com/index.php/2007/07/09/dynamic-css-tabs-in-symf...
>
> Cheers,
>
> Alexis P


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: advanced Symfony usage - not enough tutorials or docs available

2007-10-01 Thread isleshocky77

Zend Development Environment's Inspector is my best friend.  Click
through classes and seeing what extends what and what does what is the
best way to learn the framework.

On Sep 30, 1:21 pm, Lukas Kahwe Smith <[EMAIL PROTECTED]> wrote:
> rihad wrote:
>
> > On Sep 29, 11:13 pm, Thierry <[EMAIL PROTECTED]> wrote:
> >> After using Symfony for some time, there is just not that much left in
> >> the manuals to learn.
>
> >> We could really do with some posts on the more advanced problems and
> >> topics.
>
> > Reading the Symfony source code itself is one of the best ways to
> > understand how to use it. RTSL (Read the Source, Luke).
>
> Well for symfony, just opening the lib dir and going through that will
> get you no where. you have to run a step by step debugger like xdebug to
> get some sort of idea of whats going on. there is just too much magic.
> alternatively you can grep through the source code to search for a
> specific setting or call. so download xdebug and step through a request.
>
> regards,
> Lukas


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] AdminGenerated Many-to-Many Relationships

2007-12-30 Thread isleshocky77

Is there a way to set how both the available and the selected lists
are sorted?  Currently the only way I can get them to be given is
sorted by id.  I would like to have them sorted by a field called
name.

I am currently using symfony 1.0.10 and sfDoctrine 1.0
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: AdminGenerated Many-to-Many Relationships

2007-12-30 Thread isleshocky77

I'm thinking that would probably only work with propel, correct?

On Dec 30, 6:02 pm, Jonathan Franks <[EMAIL PROTECTED]> wrote:
> You can override doSelect in your peer class:
>
> public static function doSelect(Criteria $criteria, $con = null)
> {
>
> // by default order by name
> /// getOrderByColumns()
>
> if(count($criteria->getOrderByColumns()) == 0)
> {
> $criteria->addAscendingOrderByColumn(self::NAME);
> }
>
> return self::populateObjects(self::doSelectRS($criteria, 
> $con));
> }
>
> isleshocky77 wrote:
> > Is there a way to set how both the available and the selected lists
> > are sorted?  Currently the only way I can get them to be given is
> > sorted by id.  I would like to have them sorted by a field called
> > name.
>
> > I am currently using symfony 1.0.10 and sfDoctrine 1.0
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: AdminGenerated Many-to-Many Relationships

2007-12-31 Thread isleshocky77

I'm thinking that there should be a parameter or something you can
give the admin-generator to do it.

On Dec 31, 3:07 am, Jonathan Franks <[EMAIL PROTECTED]> wrote:
> Yep, sorry i missed that. I assume that you can do something similar
> with doctrine but I don't know how.isleshocky77 wrote:
> > I'm thinking that would probably only work with propel, correct?
>
> > On Dec 30, 6:02 pm, Jonathan Franks <[EMAIL PROTECTED]> wrote:
>
> >> You can override doSelect in your peer class:
>
> >> public static function doSelect(Criteria $criteria, $con = null)
> >> {
>
> >> // by default order by name
> >> /// getOrderByColumns()
>
> >> if(count($criteria->getOrderByColumns()) == 0)
> >> {
> >> $criteria->addAscendingOrderByColumn(self::NAME);
> >> }
>
> >> return self::populateObjects(self::doSelectRS($criteria, 
> >> $con));
> >> }
>
> >> isleshocky77 wrote:
>
> >>> Is there a way to set how both the available and the selected lists
> >>> are sorted?  Currently the only way I can get them to be given is
> >>> sorted by id.  I would like to have them sorted by a field called
> >>> name.
>
> >>> I am currently using symfony 1.0.10 and sfDoctrine 1.0
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: project global settings and how to retrieve them

2008-02-25 Thread isleshocky77

There is a php.yml file?  Is this documented anywhere, and what can be
modified in it.  I would be very interested in this because it could
be very useful for php.ini settings.

On Feb 25, 3:55 am, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> 2008. 02. 24, vasárnap keltezéssel 15.10-kor Kiril Angov ezt írta:
>
> > If you create the file I mentioned it will be merged into the
> > application app.yml. For your information, there are many yml files
> > which are not created by default because they are not commonly used
> > (php.yml, module.yml, etc)
>
> that's cool because its much easier than having to load it manually with
> checkConfig.
> but is it documented anywhere? because I didn't find it, that's why I
> made all my project global configs with the more complicated method
>
> greets
> Zoltán Németh
>
>
>
> > Kupo
>
> > On Sun, Feb 24, 2008 at 1:43 PM, Zoltán Németh
> > <[EMAIL PROTECTED]> wrote:
>
> > 2008. 02. 22, péntek keltezéssel 14.44-kor Kiril Angov ezt
> > írta:
> > > The global configuration file is project/config/app.yml
>
> > actually there is no such file.
> > there is project/apps/appname/app.yml and that is for app-wide
> > globals,
> > not project-wide globals.
> > but, as I already mentioned, you can create any config file in
> > project/config, so that could be called app.yml if you
> > wanted...
>
> > greets
> > Zoltán Németh
>
> > > And inside:
>
> > > all:
> > >   my_config: Hello
>
> > > and then you do sfConfig::get('app_my_config');
>
> > > Kupo
>
> > > On Fri, Feb 22, 2008 at 11:44 AM, Zoltán Németh
> > > <[EMAIL PROTECTED]> wrote:
>
> > > just create a whatever.yml file in project/config
> > dir and add
> > > this to
> > > project/config/config_handlers.yml:
>
> > > config/whatever.yml:
> > >  class: sfSimpleYamlConfigHandler
>
> > > and then in your code you might use it like:
>
> > > $whatever =
>
> > 
> > include(sfConfigCache::getInstance()->checkConfig(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'config/whatever.yml'));
>
> > > and then you have all the config values in
> > whatever.yml in the
> > > $whatever
> > > array
>
> > > greets
> > > Zoltán Németh
>
> > > 2008. 02. 22, péntek keltezéssel 08.01-kor pihentagy
> > ezt írta:
>
> > > > Hi!
>
> > > > I'd like to have some project-global
> > configuration.
> > > > In
>
> >
> > http://www.symfony-project.org/book/1_0/05-Configuring-Symfony#Projec...
> > > > it is not so much about where should I write such
> > config,
> > > and how can
> > > > I retrieve them, just talks about app-global
> > configs.
>
> > > > Can sy. help me out?
> > > > thanks
> > > > Gergo
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Correct Routed URL for AJAX in an external .js file

2008-05-03 Thread isleshocky77

I posed this question in the irc room and didn't get any responses so
I'll pose it here again because I can't seem to find an answer in the
forums or the mailing list anywhere.

I have a general question about AJAX in symfony which just came to
mind while reading through the blog and seeing the mailing list issue
on javascript in symfony.  If you put your javascript in an
external .js file which you really should be doing.  How do you get
the correct routing for an ajax url? Does anyone have any best
practices for this?

The only way I have found around this is by putting in manually my
onclick events which call the function in the external js file and
this function takes a parameter of the url.

Example:
indexSuccess.php
---
Click Here to update div

external.js
---
updateUserList = function(url) {
  jQuery('#userList').load(url);
}

This however would be better if I could just use an onclick listener
in the external js file.
external.js
jQuery("#userList").click( function() {
  jQuery('#userList').load('CORRECT_URL');
});

Any ideas would be greatly appreciated.  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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfDoctrinePlugin SVN organization changes

2008-05-03 Thread isleshocky77

I suppose someone could and probably should tgz a copy of each tag and
attach it to the wiki for the plugin at: 
http://trac.symfony-project.com/wiki/sfDoctrinePlugin
Although as of now I don't believe we actually have any tags:
http://svn.symfony-project.com/plugins/sfDoctrinePlugin/tags/

--
Stephen Ostrow
[EMAIL PROTECTED]

On Apr 30, 3:37 pm, arhak <[EMAIL PROTECTED]> wrote:
> Not working
> svn: PROPFIND request failed on '/sfDoctrinePlugin/branches/1.0-sf1.0'
> svn: PROPFIND of '/sfDoctrinePlugin/branches/1.0-sf1.0': Could not
> resolve hostname `svn.symfony-project.com': Temporary failure in name
> resolution (http://svn.symfony-project.com)
>
> Is not a fault, just unavailable because of local net configuration
>
> whoiswww.google.com
> getaddrinfo(...): Temporary failure in name resolution
>
> So, please, make something available somehow, nevermind if it's
> outdated
>
> On Apr 29, 8:31 pm, "Jonathan Wage" <[EMAIL PROTECTED]> wrote:
>
> > It is only available via svn currently :( Sorry
>
> > What is the problem with getting it via svn?
>
> > - Jon
>
> > On Tue, Apr 29, 2008 at 7:28 PM, arhak <[EMAIL PROTECTED]> wrote:
>
> > > Please, allow some kind of download, ...for any version... I would
> > > like to try it (above 0.1 of course) and can't get it through svn, and
> > > shouldn't get it through pear.
> > > Is there any chance?
>
> > > On Apr 29, 6:37 pm, "Jonathan Wage" <[EMAIL PROTECTED]> wrote:
> > > > Hello all,
>
> > > > I will be doing some work on the sfDoctrinePlugin for a new version.
> > > This
> > > > will require that we make some changes to the way things are organized
> > > in
> > > > svn. I am going to propose a structure for the branches and tags.
>
> > > > Currently we have sfDoctrinePlugin/branches/0.1 and
> > > > sfDoctrinePlugin/branches/1.0, below is an explanation of what each is
> > > > currently, and what I want to change it to.
>
> > > > sfDoctrinePlugin/branches/0.1 - The very first version of the
> > > > sfDoctrinePlugin, which is linked to a super outdated version of
> > > Doctrine.
> > > > This branch likely doesn't even work anymore. I would recommend removing
> > > it
> > > > completely?
>
> > > > sfDoctrinePlugin/branches/1.0 - The current stable sfDoctrinePlugin 1.0
> > > that
> > > > is compatible with symfony 1.0
>
> > > > sfDoctrinePlugin/trunk - The current stable sfDoctrinePlugin 1.0 that is
> > > > compatiable with symfony 1.1
>
> > > > I want to propose a new structure.
>
> > > > Rename sfDoctrinePlugin/branches/0.1 to
> > > sfDoctrinePlugin/branches/0.1-sf1.0
> > > > Rename sfDoctrinePlugin/branches/1.0 to
> > > sfDoctrinePlugin/branches/1.0-sf1.0
> > > > Branch sfDoctrinePlugin/trunk to sfDoctrinePlugin/branches/1.0-sf1.1(I
> > > have
> > > > already done this)
>
> > > > Continue development of new version of sfDoctrinePlugin-1.1 compatible
> > > with
> > > > symfony 1.1 in trunk and when it is done:
>
> > > > Branch sfDoctrinePlugin/trunk to sfDoctrinePlugin/branches/1.1-sf1.1
>
> > > > The naming pattern is "Plugin.Version-sfDependency-Version". Tags would
> > > be
> > > > pretty much the same except with point releases on the version numbers,
> > > i.e.
> > > > sfDoctrinePlugin/tags/1.1.2-sf1.1, sfDoctrinePlugin/tags/1.0.2-sf1.1,
> > > etc.
>
> > > > I think having this pattern for all plugins would be a good thing.
> > > Thoughts?
>
> > > > Thanks, Jon
>
> > > > --
> > > > Jonathan Wagehttp://www.jwage.comhttp://www.centresource.com
>
> > --
> > Jonathan Wagehttp://www.jwage.comhttp://www.centresource.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Correct Routed URL for AJAX in an external .js file

2008-05-03 Thread isleshocky77

Ohhh. I like that, for that example.  I'm thinking of lots of
situations where it wouldn't be a link and therefore not work, but at
the same time I'm thinking of ways to do it anyways using that same
sort of setup.  Cool. Thanks.

--
Stephen Ostrow
[EMAIL PROTECTED]

On May 3, 3:51 pm, "Nicolas Perriault" <[EMAIL PROTECTED]> wrote:
> On Sat, May 3, 2008 at 9:12 PM, isleshocky77 <[EMAIL PROTECTED]> wrote:
> > Does anyone have any best practices for this?
>
> In a template :
>
>  'mylink') ?>
> 
>
> In an external js file, using jQuery:
>
> $(document).ready(function() {
>   $('a#mylink').click(function() {
>     $.ajax({
>       type: 'post',
>       url: $(this).attr('href'),
>       success: function(msg) {
>         $('p#result').html(msg);
>       }});
>       return false;
>     });
>
> });
>
> Here you grab the href value of the link tag via javascript. You can
> of course do the same thing with form tag. With the Ajax request
> detection provided by symfony, you can then use the same actions for
> both Ajax and non-Ajax request processing, decorating or not your
> template.
>
> HTH
>
> ++
>
> --
> Nicolas Perriaulthttp://prendreuncafe.com/blog
> GSM: 06.60.92.08.67
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Correct Routed URL for AJAX in an external .js file

2008-05-04 Thread isleshocky77

Yeah, I've done it this way before but I didn't like the way it came
out. Not really that clean of way to do it.

On May 4, 2:14 am, red <[EMAIL PROTECTED]> wrote:
> You could set a javascript variable with the content of url_for...
>
> On 4 Mai, 02:26, isleshocky77 <[EMAIL PROTECTED]> wrote:
>
> > Ohhh. I like that, for that example.  I'm thinking of lots of
> > situations where it wouldn't be a link and therefore not work, but at
> > the same time I'm thinking of ways to do it anyways using that same
> > sort of setup.  Cool. Thanks.
>
> > --
> > Stephen Ostrow
> > [EMAIL PROTECTED]
>
> > On May 3, 3:51 pm, "Nicolas Perriault" <[EMAIL PROTECTED]> wrote:
>
> > > On Sat, May 3, 2008 at 9:12 PM, isleshocky77 <[EMAIL PROTECTED]> wrote:
> > > > Does anyone have any best practices for this?
>
> > > In a template :
>
> > >  'mylink') 
> > > ?>
> > > 
>
> > > In an external js file, using jQuery:
>
> > > $(document).ready(function() {
> > >   $('a#mylink').click(function() {
> > >     $.ajax({
> > >       type: 'post',
> > >       url: $(this).attr('href'),
> > >       success: function(msg) {
> > >         $('p#result').html(msg);
> > >       }});
> > >       return false;
> > >     });
>
> > > });
>
> > > Here you grab the href value of the link tag via javascript. You can
> > > of course do the same thing with form tag. With the Ajax request
> > > detection provided by symfony, you can then use the same actions for
> > > both Ajax and non-Ajax request processing, decorating or not your
> > > template.
>
> > > HTH
>
> > > ++
>
> > > --
> > > Nicolas Perriaulthttp://prendreuncafe.com/blog
> > > GSM: 06.60.92.08.67
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Correct Routed URL for AJAX in an external .js file

2008-05-04 Thread isleshocky77

Thanks for the response.  I have a general practice for making it both
ajax and non-ajax friendly.  Just I don't know why I've never thought
of using the actual href attribute.  I've put custom not standards
compliant attributes in to tags to pass certain information before to
get around this.   I guess it's always about learning.  Thanks

On May 4, 5:35 am, "Francois Zaninotto" <[EMAIL PROTECTED]
project.com> wrote:
> Hi,
>
> I'd say that the good practice, for links and forms that you want to turn
> into ajax links and forms, is to write them in a non-ajax way, so that they
> work with browsers where JavaScript is not enabled, and then transform them
> in JavaScript. In your case, that would give:
>
> indexSuccess.php
> ---
> Click Here to update div
> 
> external.js
> ---
> jQuery(function() {
>   jQuery('#my_link').click(function() {
>     jQuery('#userList').load(this.href);
>     return false;
>   });
>
> });
>
> This will work in 80% of the cases, where the HTML response provides enough
> information to power the Ajax. For the rest of the cases, I guess that you
> have two solutions:
>  1 - Set a global variable in the emplate that will be reused by the
> external JS. That way, the external JS is purely static, can be cached, and
> you can use the data processed by the action to define the variables the
> Javascript needs.
>  2 - Use a dynamic JavaScript, by way of the PJS ^plugin in symfony 1.0, or
> using the built-in multiformat hooks in symfony 1.1. That way, your external
> JavaScript file can be a js template, where you can echo dynamic data
> processed by a third party action.
>
> Cheers,
>
> François
>
> 2008/5/3 isleshocky77 <[EMAIL PROTECTED]>:
>
>
>
> > I posed this question in the irc room and didn't get any responses so
> > I'll pose it here again because I can't seem to find an answer in the
> > forums or the mailing list anywhere.
>
> > I have a general question about AJAX in symfony which just came to
> > mind while reading through the blog and seeing the mailing list issue
> > on javascript in symfony.  If you put your javascript in an
> > external .js file which you really should be doing.  How do you get
> > the correct routing for an ajax url? Does anyone have any best
> > practices for this?
>
> > The only way I have found around this is by putting in manually my
> > onclick events which call the function in the external js file and
> > this function takes a parameter of the url.
>
> > Example:
> > indexSuccess.php
> > ---
> > Click Here to update div
> > 
> > external.js
> > ---
> > updateUserList = function(url) {
> >  jQuery('#userList').load(url);
> > }
>
> > This however would be better if I could just use an onclick listener
> > in the external js file.
> > external.js
> > jQuery("#userList").click( function() {
> >  jQuery('#userList').load('CORRECT_URL');
> > });
>
> > Any ideas would be greatly appreciated.  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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: [symfony-devs] sfDoctrinePlugin SVN organization changes

2008-05-23 Thread isleshocky77

I was discussing this issue with a co-worker earlier and he had an
idea I actually kind of liked.  Rather than debating whether it should
be:
/plugins/sfDoctrinePlugin/branches/sf1.0do1.0 and so on.. it would be
better to do:
/1.0/plugins/sfDoctrinePlugin/branches/0.10
/1.0/plugins/sfDoctrinePlugin/branches/0.11
/1.1/plugins/sfDoctrinePlugin/branches/0.10

This would allow for anyone looking for a 1.1 plugin quickly to be
able to look at
/1.1/plugins and would be assured it would work there.

I know this would be more on the part fabien to setup this structure
along with all the other plugin developers to change their ways.  But
I believe this would be really helpful moving forward.

-- Stephen Ostrow <[EMAIL PROTECTED]>

On Apr 29, 8:09 pm, "Jonathan Wage" <[EMAIL PROTECTED]> wrote:
> For those of you using sfDoctrinePlugin with symfony 1.1 from 
> here:http://svn.symfony-project.com/plugins/sfDoctrinePlugin/trunk, please 
> switch
> tohttp://svn.symfony-project.com/plugins/sfDoctrinePlugin/branches/1.0-...
>
> I will be working in trunk to get the sfDoctrinePlugin 1.1 version prepared
> and will branch to 1.1-sf1.1 as soon as it is complete and stable.
>
> Thanks, Jon
>
>
>
> On Tue, Apr 29, 2008 at 6:52 PM, Jonathan Wage <[EMAIL PROTECTED]> wrote:
> > Their is no standard rule. It is basically up to the developer :) I think
> > it would be worth enforcing a naming pattern for plugins so that we can have
> > proper naming for multiple versions of plugins which depend on multiple
> > versions of symfony.
>
> > - Jon
>
> > On Tue, Apr 29, 2008 at 6:44 PM, Jay Klehr <[EMAIL PROTECTED]> wrote:
>
> > > How are other plugins dealing with Symfony 1.1?  (naming of branches and
> > > the sort)
>
> > > Jay
>
> > > Jonathan Wage wrote:
> > > > Hello all,
>
> > > > I will be doing some work on the sfDoctrinePlugin for a new version.
> > > > This will require that we make some changes to the way things are
> > > > organized in svn. I am going to propose a structure for the branches
> > > > and tags.
>
> > > > Currently we have sfDoctrinePlugin/branches/0.1 and
> > > > sfDoctrinePlugin/branches/1.0, below is an explanation of what each is
> > > > currently, and what I want to change it to.
>
> > > > sfDoctrinePlugin/branches/0.1 - The very first version of the
> > > > sfDoctrinePlugin, which is linked to a super outdated version of
> > > > Doctrine. This branch likely doesn't even work anymore. I would
> > > > recommend removing it completely?
>
> > > > sfDoctrinePlugin/branches/1.0 - The current stable sfDoctrinePlugin
> > > > 1.0 that is compatible with symfony 1.0
>
> > > > sfDoctrinePlugin/trunk - The current stable sfDoctrinePlugin 1.0 that
> > > > is compatiable with symfony 1.1
>
> > > > I want to propose a new structure.
>
> > > > Rename sfDoctrinePlugin/branches/0.1 to
> > > > sfDoctrinePlugin/branches/0.1-sf1.0
> > > > Rename sfDoctrinePlugin/branches/1.0 to
> > > > sfDoctrinePlugin/branches/1.0-sf1.0
> > > > Branch sfDoctrinePlugin/trunk to sfDoctrinePlugin/branches/1.0-sf1.1(I
> > > > have already done this)
>
> > > > Continue development of new version of sfDoctrinePlugin-1.1 compatible
> > > > with symfony 1.1 in trunk and when it is done:
>
> > > > Branch sfDoctrinePlugin/trunk to sfDoctrinePlugin/branches/1.1-sf1.1
>
> > > > The naming pattern is "Plugin.Version-sfDependency-Version". Tags
> > > > would be pretty much the same except with point releases on the
> > > > version numbers, i.e. sfDoctrinePlugin/tags/1.1.2-sf1.1,
> > > > sfDoctrinePlugin/tags/1.0.2-sf1.1, etc.
>
> > > > I think having this pattern for all plugins would be a good thing.
> > > > Thoughts?
>
> > > > Thanks, Jon
>
> > > > --
> > > > Jonathan Wage
> > > >http://www.jwage.com
> > > >http://www.centresource.com
>
> > --
> > Jonathan Wage
> >http://www.jwage.com
> >http://www.centresource.com
>
> --
> Jonathan Wagehttp://www.jwage.comhttp://www.centresource.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Application XHTML+Xml header and debug bar.

2008-05-27 Thread isleshocky77

I don't know about in sf1.1 but I know in sf1.0 I always manually kill
the debug bar on xml and ajax content.
sfConfig::set('sf_web_debug', false);

-- Stephen Ostrow <[EMAIL PROTECTED]>

On May 26, 7:52 am, CaffeineInc <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
> I'm using the application/xhtml+xml header in my view.yml
>
> default:
>   http_metas:
>     content-type: application/xhtml+xml; charset=utf-8
>
> but it seems the debug toolbar doesn't output correct XHTML1.1
>
> "XML Parsing Error: junk after document element
> Location:http://xxx
> Line Number 3467, Column 8:
> ---^
>
> I've no idea where in the debug it adds it, but running the action
> normally without the debug toolbar seems to fix the problem.
>
> some system setup
> Symfony 1.1.0 RC1, Doctrine 0.11.0-RC2
>
> If anyone else gets this, I'll add it as a bug :)
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: how do to execute symfony doctrine-dump-data

2008-05-30 Thread isleshocky77

./symfony doctrine-dump-data [filename.yml]

if you don't specify filename.yml it will dump it to /data/fixtures/
data.yml, otherwise it will go to /data/fixtures/
{the_filename_you_give}

-- Stephen Ostrow <[EMAIL PROTECTED]>

On May 28, 11:06 pm, Carlos Henrique <[EMAIL PROTECTED]> wrote:
> Hi, guys
>
> How do to execute symfony doctrine-dump-data?
>
> somebody can show some example?
>
> 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Indentation while defining a multiple line string in YAML

2008-06-04 Thread isleshocky77

Listing 5-3 of http://www.symfony-project.org/book/1_0/05-Configuring-Symfony
has "Indentation doesn't appear in the resulting string "; but I need
indentation in that resulting string. Is there a way to do this?  My
example of why is from the sfDoctrineSimpleCMSPlugin fixture file.

  home_en_slot3:
value:|
  test1:
component: sfSimpleCMS/latestPages

the line "  component: sfSimpleCMS/latestPages"  has to be indented,
but right now is not; this causes an error from SimpleCMS.  I've tried
placing quotes around it and replacing the spaces with   but
neither worked.

Any help would be greatly appreciated.

-- Stephen Ostrow <[EMAIL PROTECTED]>
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Indentation while defining a multiple line string in YAML

2008-06-04 Thread isleshocky77

According to the manual page that character causes all lines below to
be turned into a one line string.  I tried it anyways and received a
yaml error as surrounding it with quotations caused.  I need to keep
the two line breaks but also have indentation of the second line.

-- Stephen Ostrow <[EMAIL PROTECTED]>

On Jun 4, 1:11 pm, Fabien Potencier <[EMAIL PROTECTED]
project.com> wrote:
> try
>
>     home_en_slot3:
>       value:        >
>         test1:
>           component: sfSimpleCMS/latestPages
>
> --
> Fabien Potencier
> Sensio CEO - symfony lead developer
> sensiolabs.com | symfony-project.com | aide-de-camp.org
> Tél: +33 1 40 99 80 80
>
> isleshocky77 wrote:
> > Listing 5-3 ofhttp://www.symfony-project.org/book/1_0/05-Configuring-Symfony
> > has "Indentation doesn't appear in the resulting string "; but I need
> > indentation in that resulting string. Is there a way to do this?  My
> > example of why is from the sfDoctrineSimpleCMSPlugin fixture file.
>
> >   home_en_slot3:
> >     value:        |
> >       test1:
> >         component: sfSimpleCMS/latestPages
>
> > the line "  component: sfSimpleCMS/latestPages"  has to be indented,
> > but right now is not; this causes an error from SimpleCMS.  I've tried
> > placing quotes around it and replacing the spaces with   but
> > neither worked.
>
> > Any help would be greatly appreciated.
>
> > -- Stephen Ostrow <[EMAIL PROTECTED]>
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Bump: Functional tests of file uploads?

2008-06-04 Thread isleshocky77

Does anyone know how to do a functional test on a field which has a
input_file_tag in it?

Was asked here a long time ago without response:
http://groups.google.com/group/symfony-users/browse_frm/thread/8689db669eaed1c6/b60566061185287c
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---