[symfony-users] Re: How do I share partials between apps?

2009-07-23 Thread Bernhard Schussek

Create a plugin :-)

--~--~-~--~~~---~--~~
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 do I share partials between apps?

2009-07-23 Thread Dennis

Or create a symbolic link in both projects to a common project
directory individual files as needed?

Not really fancy, a little maintenance demanding, but MUCH faster :-)

On Jul 22, 8:49 pm, jskidmore jbs...@gmail.com wrote:
 I can only see how to share partials between modules in a single app.
 How can I share them between multiple apps?

 Thanks for any guidance!
--~--~-~--~~~---~--~~
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] link_to + parameter - my parameters get overridden

2009-07-23 Thread mlu...@gmail.com

Hi!

I have again a routing problem(It seems the routing system doesn't
like me very much :-))

On my site I have a category list, which shoes entries by category.
The routing is defined as:
...
showcategory:
  url:   /category/:slug/:page
  param: { module: gamelists, action: category, slug: action, page:
1 }
...

A corrresponding url look like
/category/dress-up/1

The call to link_top looks like this:
link_to(dress-up,@showcategory?slug=dress-uppage=2)

The problem is, the page parameter in the generated link is always 1.


On my page I have also a list with the newest entries:

routing:
...
newgames:
  url:   /newgames/:page
  param: { module: gamelists, action: new, page: 1 }
...

url:
/newgames/1

link_to:
link_to(new games,@newgames?page=2);

In this list the page parameter works fine. The only point I see, is
the quantity of parameters, but I don't see any reason why it should
not work.

Do you have any ideas?

regards,

Michael
--~--~-~--~~~---~--~~
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: routing and slugify fieldnames

2009-07-23 Thread vinnie

OK thanks, I get it now.



On Jul 22, 5:37 pm, Gábor Fási maerl...@gmail.com wrote:
 the getCompanySlug is called camelCase, when the first letter is
 lowercase, every other first letter of a word is capital. Another was
 is to separate the words with an underscore, so companySlug is the
 same as company_slug, just with a different writing mode.
 As the route you mentioned has the class sfPropelRoute, symfony
 converts it to a getter propel can understand (get plus the CamelCase
 version of your route parameter) and uses that one.



 On Wed, Jul 22, 2009 at 17:17, vinniemille...@hotmail.com wrote:

  I am working my way though the jobeet tutorial and am on Day5.

  The class uses the getCompanySlug() function and the function slugify
  ($text) which all make sense but then the
  routing uses
  url:     /job/:company_slug

  So my question is where did company_slug come from I would have
  expected it to be companyslug but both seem to work?
--~--~-~--~~~---~--~~
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 do I share partials between apps?

2009-07-23 Thread Gareth McCumskey
He's talking about seperate apps in the same project, not two different
projects. Like a frontend and backend app:

project_directory
  apps
frontend
backend

On Thu, Jul 23, 2009 at 10:10 AM, Dennis gear...@sbcglobal.net wrote:


 Or create a symbolic link in both projects to a common project
 directory individual files as needed?

 Not really fancy, a little maintenance demanding, but MUCH faster :-)

 On Jul 22, 8:49 pm, jskidmore jbs...@gmail.com wrote:
  I can only see how to share partials between modules in a single app.
  How can I share them between multiple apps?
 
  Thanks for any guidance!
 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
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 do I share partials between apps?

2009-07-23 Thread fincom

Hi,

I don't know if it's the best solution, but i hope it can help.

Create a plugin with a module that contain your partials.

Then you can share those partials between apps, you'll have just to
activate your module for your apps.

On 23 juil, 05:49, jskidmore jbs...@gmail.com wrote:
 I can only see how to share partials between modules in a single app.
 How can I share them between multiple apps?

 Thanks for any guidance!

--~--~-~--~~~---~--~~
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] unwanted filtering of javascript onclick in widget

2009-07-23 Thread Roland Cruse

Hi

Anyone know how to avoid filtering of javascript code in attributes
passed to a widget?

For example  array( 'onclick' =
javascript:setFilterCbValue('foobar');) gets sent but when the
filter renders to html:

onclick=quot;javascript:setFilterCbValue(#039;foo#039;);quot;

I think it is the htmlspecialchars (or something like that) inside the
widget but how would I override it?

Thanks in advance for any clues, tips, links.

--~--~-~--~~~---~--~~
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: unwanted filtering of javascript onclick in widget

2009-07-23 Thread Gareth McCumskey
don't use the javascript: part.

array( 'onclick' =setFilterCbValue('foobar');)


On Thu, Jul 23, 2009 at 2:09 PM, Roland Cruse cruses...@gmail.com wrote:


 Hi

 Anyone know how to avoid filtering of javascript code in attributes
 passed to a widget?

 For example  array( 'onclick' =
 javascript:setFilterCbValue('foobar');) gets sent but when the
 filter renders to html:

 onclick=quot;javascript:setFilterCbValue(#039;foo#039;);quot;

 I think it is the htmlspecialchars (or something like that) inside the
 widget but how would I override it?

 Thanks in advance for any clues, tips, links.

 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
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: unwanted filtering of javascript onclick in widget

2009-07-23 Thread Gareth McCumskey
Also make sure that if you have any ajax function calling your form that you
set the script=true option for example if you had used link_to_remote():

link_to_remote(Link Text, array(
  url=module/action,
  update=div_to_update,
  script=true
))

On Thu, Jul 23, 2009 at 2:09 PM, Roland Cruse cruses...@gmail.com wrote:


 Hi

 Anyone know how to avoid filtering of javascript code in attributes
 passed to a widget?

 For example  array( 'onclick' =
 javascript:setFilterCbValue('foobar');) gets sent but when the
 filter renders to html:

 onclick=quot;javascript:setFilterCbValue(#039;foo#039;);quot;

 I think it is the htmlspecialchars (or something like that) inside the
 widget but how would I override it?

 Thanks in advance for any clues, tips, links.

 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
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: unwanted filtering of javascript onclick in widget

2009-07-23 Thread Roland Cruse

hmm, thats one way, but will not work as a solution for me.

Thanks anyhow.


On Thu, Jul 23, 2009 at 2:24 PM, Gareth McCumskeygmccums...@gmail.com wrote:
 don't use the javascript: part.

 array( 'onclick' =setFilterCbValue('foobar');)


 On Thu, Jul 23, 2009 at 2:09 PM, Roland Cruse cruses...@gmail.com wrote:

 Hi

 Anyone know how to avoid filtering of javascript code in attributes
 passed to a widget?

 For example  array( 'onclick' =
 javascript:setFilterCbValue('foobar');) gets sent but when the
 filter renders to html:

 onclick=quot;javascript:setFilterCbValue(#039;foo#039;);quot;

 I think it is the htmlspecialchars (or something like that) inside the
 widget but how would I override it?

 Thanks in advance for any clues, tips, links.





 --
 Gareth McCumskey
 http://garethmccumskey.blogspot.com
 twitter: @garethmcc

 


--~--~-~--~~~---~--~~
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: unwanted filtering of javascript onclick in widget

2009-07-23 Thread Roland Cruse

Not using ajax for this call but thanks for the tip.

On Thu, Jul 23, 2009 at 2:28 PM, Gareth McCumskeygmccums...@gmail.com wrote:
 Also make sure that if you have any ajax function calling your form that you
 set the script=true option for example if you had used link_to_remote():

 link_to_remote(Link Text, array(
   url=module/action,
   update=div_to_update,
   script=true
 ))

 On Thu, Jul 23, 2009 at 2:09 PM, Roland Cruse cruses...@gmail.com wrote:

 Hi

 Anyone know how to avoid filtering of javascript code in attributes
 passed to a widget?

 For example  array( 'onclick' =
 javascript:setFilterCbValue('foobar');) gets sent but when the
 filter renders to html:

 onclick=quot;javascript:setFilterCbValue(#039;foo#039;);quot;

 I think it is the htmlspecialchars (or something like that) inside the
 widget but how would I override it?

 Thanks in advance for any clues, tips, links.





 --
 Gareth McCumskey
 http://garethmccumskey.blogspot.com
 twitter: @garethmcc

 


--~--~-~--~~~---~--~~
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] Generate absolute URL for upload directory

2009-07-23 Thread Mo Mughrabi
Hello everyone,
   I was trying to generate an absolute URL inside my form classes using
sfContext::getInstance()-getController()-genUrl(); but apparently genUrl
only can be used when supplied a route or module/action but i cannot get it
to return the absolute path of my uploads folder. Any idea how can i do
that?

Thanks,

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Functional test count

2009-07-23 Thread sikk

Hi guys,


I'm just wondering, does someone implemented a way to do some count
verification at the end of a functional test file.


Kind of like unit testing, where we do :

$t = new lime_test(1, new lime_output_color());

Which mean indeed we gonna run 1 test.


Does something like that exist for functional testing ?

thanks !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] AJAX forms

2009-07-23 Thread HAUSa

How do you make AJAX forms? Do you check each field immediately after
the user completes it (by adding a green border to it by example)? And
how can I make this?
--~--~-~--~~~---~--~~
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: Embedding forms / Objects

2009-07-23 Thread -gary-

Apologies for replying to my own post, but does anybody have any idea
on this one?  I have no idea why I am getting this error.

Thanks in advance.

On Jul 22, 7:43 pm, -gary- gary.dun...@gmail.com wrote:
 Hi,

 I am trying to do a multiple edit on a database table.

 Whn I output like this:
 [code]
 ?php echo $form-getStatusObject($key)-getStatusname() ?
 [/code]
 I get this error:
 [code]
 Fatal error: Call to a member function getStatusname() on a non-
 object
 [/code]

 When I comment the above out the rest of the fields print out with the
 data as expected but with this error at the bottom of the page:

 [code]
 Fatal error: Cannot use object of type sfFormField as array
 [/code]

 Can you see what I am doing wrong here?  I put the full code below.

 Thank you in advance.

  Template:
  [code]
        ?php foreach($form as $key = $status): ?
          tr
            td?php echo $form-getStatusObject($key)-getStatusname
 () ?/td
            td
              ?php echo $status['statusOrder']; // should print text
 field with db value populated ?
              ?php echo $status['statusOrder']-renderError(); ?
            /td
            td
              ?php echo $status['startend'] ?
              ?php echo $status['statusOrder']-renderError(); ?
            /td
          /tr
        ?php endforeach; ?
 [/code]

 Forms:
 [code]
 ?php

 class StatusEditForm extends sfForm
 {
   protected $status_objects = array();

   public function configure()
   {
     foreach( StatusPeer::doSelect(new Criteria()) as $status_object )
     {
       $this-embedForm('status_'.$status_object-getId(), new
 StatusForm($status_object));
     }
   }

   public function getStatusObject($key)
   {
     return (isset($this-status_objects[$key])) ? $this-status_objects
 [$key] : null;
   }

   public function save()
   {
     $values = $this-getValues();

     foreach($this-getEmbeddedForms() as $key = $status_form)
     {
       $status_form-updateObject($values[$key]);
       $status_form-getObject()-save();
     }
   }

 }

 [/code]

 [code]
 class StatusForm extends BaseStatusForm
 {
   protected $status_objects;

   protected static $startend_choices = array(
     'entry_point' = 'Entry Point',
     'end_point'   = 'End Point'
   );

   public function configure()
   {
     // completely unset any fields you don't need
     unset(
       $this['id'],
       $this['report']
     );

     $this-widgetSchema['id'] = new sfWidgetFormInputHidden();
     $this-widgetSchema['startend'] = new sfWidgetFormSelectRadio
 ( array(
       'choices' = self::$startend_choices
     ));
     $this-widgetSchema['statusOrder'] = new sfWidgetFormInput();

     $this-validatorSchema['startend'] = new sfValidatorChoice(array(
       'choices' = array_keys(self::$startend_choices)
     ));
   }

  }
  [/code]

 This seems to be where the problem is.  It's not returning an object:

 [code]
   public function getStatusObject($key)
   {
     return (isset($this-status_objects[$key])) ? $this-status_objects
 [$key] : null;
   }
 [/code]

 Does anybody have any idea why?

 Thank you.
--~--~-~--~~~---~--~~
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: Embedding forms / Objects

2009-07-23 Thread Dirk Hartmann

getStatusObject[$key]-... Not Round brackets...

Dirk Hartmann
Schenckstr. 10
57074 Siegen
m

Am 23.07.2009 um 17:12 schrieb -gary- gary.dun...@gmail.com:


 Apologies for replying to my own post, but does anybody have any idea
 on this one?  I have no idea why I am getting this error.

 Thanks in advance.

 On Jul 22, 7:43 pm, -gary- gary.dun...@gmail.com wrote:
 Hi,

 I am trying to do a multiple edit on a database table.

 Whn I output like this:
 [code]
 ?php echo $form-getStatusObject($key)-getStatusname() ?
 [/code]
 I get this error:
 [code]
 Fatal error: Call to a member function getStatusname() on a non-
 object
 [/code]

 When I comment the above out the rest of the fields print out with  
 the
 data as expected but with this error at the bottom of the page:

 [code]
 Fatal error: Cannot use object of type sfFormField as array
 [/code]

 Can you see what I am doing wrong here?  I put the full code below.

 Thank you in advance.

  Template:
  [code]
?php foreach($form as $key = $status): ?
  tr
td?php echo $form-getStatusObject($key)-getStatusname
 () ?/td
td
  ?php echo $status['statusOrder']; // should print text
 field with db value populated ?
  ?php echo $status['statusOrder']-renderError(); ?
/td
td
  ?php echo $status['startend'] ?
  ?php echo $status['statusOrder']-renderError(); ?
/td
  /tr
?php endforeach; ?
 [/code]

 Forms:
 [code]
 ?php

 class StatusEditForm extends sfForm
 {
   protected $status_objects = array();

   public function configure()
   {
 foreach( StatusPeer::doSelect(new Criteria()) as $status_object )
 {
   $this-embedForm('status_'.$status_object-getId(), new
 StatusForm($status_object));
 }
   }

   public function getStatusObject($key)
   {
 return (isset($this-status_objects[$key])) ? $this- 
 status_objects
 [$key] : null;
   }

   public function save()
   {
 $values = $this-getValues();

 foreach($this-getEmbeddedForms() as $key = $status_form)
 {
   $status_form-updateObject($values[$key]);
   $status_form-getObject()-save();
 }
   }

 }

 [/code]

 [code]
 class StatusForm extends BaseStatusForm
 {
   protected $status_objects;

   protected static $startend_choices = array(
 'entry_point' = 'Entry Point',
 'end_point'   = 'End Point'
   );

   public function configure()
   {
 // completely unset any fields you don't need
 unset(
   $this['id'],
   $this['report']
 );

 $this-widgetSchema['id'] = new sfWidgetFormInputHidden();
 $this-widgetSchema['startend'] = new sfWidgetFormSelectRadio
 ( array(
   'choices' = self::$startend_choices
 ));
 $this-widgetSchema['statusOrder'] = new sfWidgetFormInput();

 $this-validatorSchema['startend'] = new sfValidatorChoice(array(
   'choices' = array_keys(self::$startend_choices)
 ));
   }

  }
  [/code]

 This seems to be where the problem is.  It's not returning an object:

 [code]
   public function getStatusObject($key)
   {
 return (isset($this-status_objects[$key])) ? $this- 
 status_objects
 [$key] : null;
   }
 [/code]

 Does anybody have any idea why?

 Thank you.
 

--~--~-~--~~~---~--~~
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: Embedding forms / Objects

2009-07-23 Thread -gary-

In the template?  This is a function call though.

On Jul 23, 11:22 am, Dirk Hartmann dirk.hartm...@gmail.com wrote:
 getStatusObject[$key]-... Not Round brackets...

 Dirk Hartmann
 Schenckstr. 10
 57074 Siegen
 m

 Am 23.07.2009 um 17:12 schrieb -gary- gary.dun...@gmail.com:



  Apologies for replying to my own post, but does anybody have any idea
  on this one?  I have no idea why I am getting this error.

  Thanks in advance.

  On Jul 22, 7:43 pm, -gary- gary.dun...@gmail.com wrote:
  Hi,

  I am trying to do a multiple edit on a database table.

  Whn I output like this:
  [code]
  ?php echo $form-getStatusObject($key)-getStatusname() ?
  [/code]
  I get this error:
  [code]
  Fatal error: Call to a member function getStatusname() on a non-
  object
  [/code]

  When I comment the above out the rest of the fields print out with  
  the
  data as expected but with this error at the bottom of the page:

  [code]
  Fatal error: Cannot use object of type sfFormField as array
  [/code]

  Can you see what I am doing wrong here?  I put the full code below.

  Thank you in advance.

   Template:
   [code]
         ?php foreach($form as $key = $status): ?
           tr
             td?php echo $form-getStatusObject($key)-getStatusname
  () ?/td
             td
               ?php echo $status['statusOrder']; // should print text
  field with db value populated ?
               ?php echo $status['statusOrder']-renderError(); ?
             /td
             td
               ?php echo $status['startend'] ?
               ?php echo $status['statusOrder']-renderError(); ?
             /td
           /tr
         ?php endforeach; ?
  [/code]

  Forms:
  [code]
  ?php

  class StatusEditForm extends sfForm
  {
    protected $status_objects = array();

    public function configure()
    {
      foreach( StatusPeer::doSelect(new Criteria()) as $status_object )
      {
        $this-embedForm('status_'.$status_object-getId(), new
  StatusForm($status_object));
      }
    }

    public function getStatusObject($key)
    {
      return (isset($this-status_objects[$key])) ? $this-
  status_objects
  [$key] : null;
    }

    public function save()
    {
      $values = $this-getValues();

      foreach($this-getEmbeddedForms() as $key = $status_form)
      {
        $status_form-updateObject($values[$key]);
        $status_form-getObject()-save();
      }
    }

  }

  [/code]

  [code]
  class StatusForm extends BaseStatusForm
  {
    protected $status_objects;

    protected static $startend_choices = array(
      'entry_point' = 'Entry Point',
      'end_point'   = 'End Point'
    );

    public function configure()
    {
      // completely unset any fields you don't need
      unset(
        $this['id'],
        $this['report']
      );

      $this-widgetSchema['id'] = new sfWidgetFormInputHidden();
      $this-widgetSchema['startend'] = new sfWidgetFormSelectRadio
  ( array(
        'choices' = self::$startend_choices
      ));
      $this-widgetSchema['statusOrder'] = new sfWidgetFormInput();

      $this-validatorSchema['startend'] = new sfValidatorChoice(array(
        'choices' = array_keys(self::$startend_choices)
      ));
    }

   }
   [/code]

  This seems to be where the problem is.  It's not returning an object:

  [code]
    public function getStatusObject($key)
    {
      return (isset($this-status_objects[$key])) ? $this-
  status_objects
  [$key] : null;
    }
  [/code]

  Does anybody have any idea why?

  Thank you.
--~--~-~--~~~---~--~~
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: Embedding forms / Objects

2009-07-23 Thread -gary-

In the template?  This is a function call though.

On Jul 23, 11:22 am, Dirk Hartmann dirk.hartm...@gmail.com wrote:
 getStatusObject[$key]-... Not Round brackets...

 Dirk Hartmann
 Schenckstr. 10
 57074 Siegen
 m

 Am 23.07.2009 um 17:12 schrieb -gary- gary.dun...@gmail.com:



  Apologies for replying to my own post, but does anybody have any idea
  on this one?  I have no idea why I am getting this error.

  Thanks in advance.

  On Jul 22, 7:43 pm, -gary- gary.dun...@gmail.com wrote:
  Hi,

  I am trying to do a multiple edit on a database table.

  Whn I output like this:
  [code]
  ?php echo $form-getStatusObject($key)-getStatusname() ?
  [/code]
  I get this error:
  [code]
  Fatal error: Call to a member function getStatusname() on a non-
  object
  [/code]

  When I comment the above out the rest of the fields print out with  
  the
  data as expected but with this error at the bottom of the page:

  [code]
  Fatal error: Cannot use object of type sfFormField as array
  [/code]

  Can you see what I am doing wrong here?  I put the full code below.

  Thank you in advance.

   Template:
   [code]
         ?php foreach($form as $key = $status): ?
           tr
             td?php echo $form-getStatusObject($key)-getStatusname
  () ?/td
             td
               ?php echo $status['statusOrder']; // should print text
  field with db value populated ?
               ?php echo $status['statusOrder']-renderError(); ?
             /td
             td
               ?php echo $status['startend'] ?
               ?php echo $status['statusOrder']-renderError(); ?
             /td
           /tr
         ?php endforeach; ?
  [/code]

  Forms:
  [code]
  ?php

  class StatusEditForm extends sfForm
  {
    protected $status_objects = array();

    public function configure()
    {
      foreach( StatusPeer::doSelect(new Criteria()) as $status_object )
      {
        $this-embedForm('status_'.$status_object-getId(), new
  StatusForm($status_object));
      }
    }

    public function getStatusObject($key)
    {
      return (isset($this-status_objects[$key])) ? $this-
  status_objects
  [$key] : null;
    }

    public function save()
    {
      $values = $this-getValues();

      foreach($this-getEmbeddedForms() as $key = $status_form)
      {
        $status_form-updateObject($values[$key]);
        $status_form-getObject()-save();
      }
    }

  }

  [/code]

  [code]
  class StatusForm extends BaseStatusForm
  {
    protected $status_objects;

    protected static $startend_choices = array(
      'entry_point' = 'Entry Point',
      'end_point'   = 'End Point'
    );

    public function configure()
    {
      // completely unset any fields you don't need
      unset(
        $this['id'],
        $this['report']
      );

      $this-widgetSchema['id'] = new sfWidgetFormInputHidden();
      $this-widgetSchema['startend'] = new sfWidgetFormSelectRadio
  ( array(
        'choices' = self::$startend_choices
      ));
      $this-widgetSchema['statusOrder'] = new sfWidgetFormInput();

      $this-validatorSchema['startend'] = new sfValidatorChoice(array(
        'choices' = array_keys(self::$startend_choices)
      ));
    }

   }
   [/code]

  This seems to be where the problem is.  It's not returning an object:

  [code]
    public function getStatusObject($key)
    {
      return (isset($this-status_objects[$key])) ? $this-
  status_objects
  [$key] : null;
    }
  [/code]

  Does anybody have any idea why?

  Thank you.
--~--~-~--~~~---~--~~
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] Custom Fields in sfGuardUser list filters

2009-07-23 Thread Denis Fingonnet
Hello all,

I'm stuck here, I need help from the community.

Here is my schema :

MyUser:
   columns:
 sf_guard_user_id:
   type: integer(4)
 my_customer_id:
   type: integer
 email:
   type: string(255)
   relations:
 sfGuardUser:
   local: sf_guard_user_id
   foreign: id
   type: one
   foreignType: one
 MyCustomer:
   local: my_customer_id
   foreign: id
   type: one
   foreignType: many

 MyCustomer:
   columns:
 name:
   type: string(255)


I installed sfDoctrineGuardPlugin and enabled the sfGuardUser module in the
backend app.

What I'm trying to do, without success, is to add a filter on the
my_customer.name field in the sfGuardUser list filters.

Here is my sfGuardUserFormFilter class :

 class sfGuardUserFormFilter extends PluginsfGuardUserFormFilter
 {
   public function configure()
   {
   $this-widgetSchema['sendit_customer'] = new
 sfWidgetFormDoctrineChoice(array('model' = 'SenditCustomer', 'add_empty' =
 true));
 $this-validatorSchema['sendit_customer'] = new
 sfValidatorDoctrineChoice(array('required' = false, 'model' =
 'SenditCustomer', 'column' = 'id'));
   }

   public function getFields()
   {
   $retour = array_merge(array('sendit_customer', 'SenditCustomer'),
 parent::getFields());
   return $retour;
   }

   public function addSenditCustomerColumnQuery(Doctrine_Query $q, $field,
 $value)
   {
 if ($value) {
   $a = $q-getRootAlias();
   $q-innerJoin($a . '.SenditUser su')
 -andWhere('su.sendit_customer_id = ?', $value);
 }
 return $q;
   }

 }


It doesn't work and I can't find anything usefull on google.
Any ideas ?

I think I can get the same result by creating a my_user module with the
admin generator. But I would like to know if I'm wrong anywhere or if it is
not possible (I doubt of it).

Thanks by advance,

-- 
Denis Fingonnet

--~--~-~--~~~---~--~~
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: Generate absolute URL for upload directory

2009-07-23 Thread Eno

On Thu, 23 Jul 2009, Mo Mughrabi wrote:

I was trying to generate an absolute URL inside my form classes using
 sfContext::getInstance()-getController()-genUrl(); but apparently genUrl
 only can be used when supplied a route or module/action but i cannot get it
 to return the absolute path of my uploads folder. Any idea how can i do
 that?

We never found a good solution for this (we run across a cluster where we 
need absolute and cross-domain links). Now we are using the 
sfDomainRoutePlugin to give us this functionality in url_for() and 
link_to().



-- 



--~--~-~--~~~---~--~~
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: Generate absolute URL for upload directory

2009-07-23 Thread Mo Mughrabi
Thanks Eno,

I found a way which helped me return the absolute url for any location i
need through the public_path helper.

First i had to include the helper through the getConfigurations

sfContext::getInstance()-getConfiguration()-loadHelpers(array('Url'));

and then just use the public_path('uploads/file.jpg');





On Thu, Jul 23, 2009 at 7:52 PM, Eno symb...@gmail.com wrote:


 On Thu, 23 Jul 2009, Mo Mughrabi wrote:

 I was trying to generate an absolute URL inside my form classes using
  sfContext::getInstance()-getController()-genUrl(); but apparently
 genUrl
  only can be used when supplied a route or module/action but i cannot get
 it
  to return the absolute path of my uploads folder. Any idea how can i do
  that?

 We never found a good solution for this (we run across a cluster where we
 need absolute and cross-domain links). Now we are using the
 sfDomainRoutePlugin to give us this functionality in url_for() and
 link_to().



 --



 


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

2009-07-23 Thread Richtermeister

something like this should work.

$this - widgetSchema - setLabel(from_date, From);

Daniel


On Jul 22, 8:08 pm, Germana Oliveira germanaolivei...@gmail.com
wrote:
 Hi!!

 Im trying to customize my  UserFormFilter, so i have this in my  setWidget:
 ...
  'created_at'                    = new
 sfWidgetFormFilterDate(array('from_date' = new sfWidgetFormDate(),
 'to_date' = new sfWidgetFormDate(), 'with_empty' = true)),
  ...

 How can i change the labels of: 'from_date' and 'to_date' ???

 Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] propel:data-load error

2009-07-23 Thread carllang

Hi

I've just installed Symfony, and I'm busy going through th
jobeet doumentation to setup the example app.
I've got to the point of issuing this
command:
php symfony propel:data-load

and that gives me the following errors:

C:\work\sf_project\jobeetphp symfony propel:data-load
 propelload data from C:/work/sf_project/jobeet/data/fixtures
PHP Fatal error:  Class 'JobeetJob' not found in C:\work\sf_project
\jobeet\lib\v
endor\symfony\lib\plugins\sfPropelPlugin\lib\addon
\sfPropelData.class.php on lin
e 253

Fatal error: Class 'JobeetJob' not found in C:\work\sf_project\jobeet
\lib\vendor
\symfony\lib\plugins\sfPropelPlugin\lib\addon\sfPropelData.class.php
on line 253

could anyone please help.


Thanks in advance
Carl


--~--~-~--~~~---~--~~
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] sfGuardUserFormFilter Customization

2009-07-23 Thread Germana Oliveira

I tried what you tell me but this error comes out:

Unable to set the label on an unexistant widget (from_date).




something like this should work.

$this - widgetSchema - setLabel(from_date, From);

Daniel


On Jul 22, 8:08 pm, Germana Oliveira germanaolivei...@gmail.com
wrote:
 Hi!!

 Im trying to customize my  UserFormFilter, so i have this in my  setWidget:
 ...
  'created_at'= new
 sfWidgetFormFilterDate(array('from_date' = new sfWidgetFormDate(),
 'to_date' = new sfWidgetFormDate(), 'with_empty' = true)),
  ...

 How can i change the labels of: 'from_date' and 'to_date' ???

 Thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to + parameter - my parameters get overridden

2009-07-23 Thread Eno

On Thu, 23 Jul 2009, mlu...@gmail.com wrote:

 showcategory:
   url:   /category/:slug/:page
   param: { module: gamelists, action: category, slug: action, page:
 1 }
 ...
 
 A corrresponding url look like
 /category/dress-up/1
 
 The call to link_top looks like this:
 link_to(dress-up,@showcategory?slug=dress-uppage=2)
 
 The problem is, the page parameter in the generated link is always 1.

Your routing rule has the default value for page if its not in the url.
May be better to set a default value in your action if it isn't supplied 
instead?



-- 





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

2009-07-23 Thread DEEPAK BHATIA

Hi,

I have a web page which is referenced by link_to_remote action.

This web page/template has yahoo user interface javascript api's.

When I call this page as normal form submission, I get the
functionality of yahoo user interface javascript api but not when it
is called as link_to_remote.

Please help me resolve this issue.

Regards

Deepak Bhatia

--~--~-~--~~~---~--~~
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] Not Found Error only in production envoirment.

2009-07-23 Thread Sid Ferreira
This error is happening almost in all my routes.
One example is this:

li?php echo link_to('Admin', '@admin')?/li

admin:
  url:   /admin
  param: { module: sfAdminDash, action: dashboard }


When you click on the link, it forwards to an error:
Empty module and/or action after parsing the URL /admin/ (/).

What may be the problem? In _dev envoirment it doesn't happens. Cleared the
cache all over already...

---
Sidney G B Ferreira
Desenvolvedor Web

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

2009-07-23 Thread BenjaM1

Hy,

I have a strange issue in my code.

I need to display fields of the sfGuardAdminUserForm in my template
switch user group:
- developers can edit permissions and groups so the complete form is
displayed in the view
- editors can't edit is_super_admin, permissions and groups.

So I test in the form class if the user has the Editor group and
then unset the fields:

class sfGuardUserAdminForm extends BasesfGuardUserAdminForm
{
  public function configure()
  {
parent::configure();

$this-setDefault('is_super_admin', false);

$user = sfContext::getInstance()-getUser()-getGuardUser();


if($user-hasGroup('Editor'))
{
  unset(
$this['is_super_admin'],
$this['groups_list'],
$this['permissions_list']
  );
}
...
  }
}

But this makes me a 500 error: Widget groups_list does not exist.

I really need help!

PS: I use the sfGuardUser module from the plugin

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

2009-07-23 Thread BenjaM1

Note that

if($user-hasGroup('Editor'))
{
   if($this-offsetExists('groups_list') die('toto');
}

works, it shows 'toto' !

On 23 juil, 20:55, BenjaM1 benjamin.grandf...@gmail.com wrote:
 Hy,

 I have a strange issue in my code.

 I need to display fields of the sfGuardAdminUserForm in my template
 switch user group:
 - developers can edit permissions and groups so the complete form is
 displayed in the view
 - editors can't edit is_super_admin, permissions and groups.

 So I test in the form class if the user has the Editor group and
 then unset the fields:

 class sfGuardUserAdminForm extends BasesfGuardUserAdminForm
 {
   public function configure()
   {
     parent::configure();

     $this-setDefault('is_super_admin', false);

     $user = sfContext::getInstance()-getUser()-getGuardUser();

     if($user-hasGroup('Editor'))
     {
       unset(
         $this['is_super_admin'],
         $this['groups_list'],
         $this['permissions_list']
       );
     }
 ...
   }

 }

 But this makes me a 500 error: Widget groups_list does not exist.

 I really need help!

 PS: I use the sfGuardUser module from the plugin
--~--~-~--~~~---~--~~
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: sfGuardUserAdminForm

2009-07-23 Thread BenjaM1

And also

if($user-hasGroup('Editor'))
{
  unset(
$this['is_super_admin']
  );
}

On 23 juil, 21:02, BenjaM1 benjamin.grandf...@gmail.com wrote:
 Note that

 if($user-hasGroup('Editor'))
 {
    if($this-offsetExists('groups_list') die('toto');

 }

 works, it shows 'toto' !

 On 23 juil, 20:55, BenjaM1 benjamin.grandf...@gmail.com wrote:

  Hy,

  I have a strange issue in my code.

  I need to display fields of the sfGuardAdminUserForm in my template
  switch user group:
  - developers can edit permissions and groups so the complete form is
  displayed in the view
  - editors can't edit is_super_admin, permissions and groups.

  So I test in the form class if the user has the Editor group and
  then unset the fields:

  class sfGuardUserAdminForm extends BasesfGuardUserAdminForm
  {
    public function configure()
    {
      parent::configure();

      $this-setDefault('is_super_admin', false);

      $user = sfContext::getInstance()-getUser()-getGuardUser();

      if($user-hasGroup('Editor'))
      {
        unset(
          $this['is_super_admin'],
          $this['groups_list'],
          $this['permissions_list']
        );
      }
  ...
    }

  }

  But this makes me a 500 error: Widget groups_list does not exist.

  I really need help!

  PS: I use the sfGuardUser module from the plugin
--~--~-~--~~~---~--~~
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] Access an Embedded form from Actions.class.php

2009-07-23 Thread Germana Oliveira
Hi!!

Im trying to access my embedded form from my actions class, so i can set 
a default value to a combo Box, i did this:

$this-form['embeded_form']-setDefault('combo', 'value');

But this comes:

*Fatal error*: Call to undefined method sfFormFieldSchema::setDefault() 
in 
*/home/germana/www/indepabis/apps/intranet/modules/denuncia/actions/actions.class.php*
 
on line *33

what can i do???

THNKSSS  :D
*

--~--~-~--~~~---~--~~
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: Not Found Error only in production envoirment.

2009-07-23 Thread Gábor Fási

Do you have your routes before the catch-all :module/:action one?

On Thu, Jul 23, 2009 at 20:49, Sid Ferreirasid@gmail.com wrote:
 This error is happening almost in all my routes.
 One example is this:
 li?php echo link_to('Admin', '@admin')?/li

 admin:
   url:   /admin
   param: { module: sfAdminDash, action: dashboard }

 When you click on the link, it forwards to an error:

 Empty module and/or action after parsing the URL /admin/ (/).

 What may be the problem? In _dev envoirment it doesn't happens. Cleared the
 cache all over already...
 ---
 Sidney G B Ferreira
 Desenvolvedor Web


 


--~--~-~--~~~---~--~~
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: Not Found Error only in production envoirment.

2009-07-23 Thread Sid Ferreira
Yes... ALL of them

I dunno what's happening but something is adding the slash in the end. the
html code is right: no slash.

---
Sidney G B Ferreira
Desenvolvedor Web



On Thu, Jul 23, 2009 at 16:20, Gábor Fási maerl...@gmail.com wrote:


 Do you have your routes before the catch-all :module/:action one?

 On Thu, Jul 23, 2009 at 20:49, Sid Ferreirasid@gmail.com wrote:
  This error is happening almost in all my routes.
  One example is this:
  li?php echo link_to('Admin', '@admin')?/li
 
  admin:
url:   /admin
param: { module: sfAdminDash, action: dashboard }
 
  When you click on the link, it forwards to an error:
 
  Empty module and/or action after parsing the URL /admin/ (/).
 
  What may be the problem? In _dev envoirment it doesn't happens. Cleared
 the
  cache all over already...
  ---
  Sidney G B Ferreira
  Desenvolvedor Web
 
 
  
 

 


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

2009-07-23 Thread Szabolcs Heilig
Hi,
I think your problem is based on the behavior of Symfony
in AJAX mode. When you load your action through
link_to_remote() it doesn't decorate that with your layout.
Without that it is possible to your ui-magic never initialized.

2009/7/23 DEEPAK BHATIA toreachdee...@gmail.com

 I have a web page which is referenced by link_to_remote action.

 This web page/template has yahoo user interface javascript api's.

 When I call this page as normal form submission, I get the
 functionality of yahoo user interface javascript api but not when it
 is called as link_to_remote.


--~--~-~--~~~---~--~~
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] solution for trailing slash problem

2009-07-23 Thread mlu...@gmail.com

Hi!

I was now looking for a solution for two days. And it's hard to find a
working one. Finally I found it and to make it easier for next one
looking for a solution, I will post it here:

  RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

This line added into the .htaccess removes the trailing slash from the
requested url and redirects the the browser with a http 301(permanenly
moved) to the new url. So it's even search engine friendly(no
dublicates).

My .htaccess looks now this:

Options +FollowSymLinks +ExecCGI

IfModule mod_rewrite.c
  RewriteEngine On

  # uncomment the following line, if you are having trouble
  # getting no_script_name to work
  #RewriteBase /

  # we skip all files with .something
  #RewriteCond %{REQUEST_URI} \..+$
  #RewriteCond %{REQUEST_URI} !\.html$
  #RewriteRule .* - [L]

  RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

  # we check if the .html version is here (caching)
  RewriteRule ^$ index.html [QSA]
  RewriteRule ^([^.]+)$ $1.html [QSA]
  RewriteCond %{REQUEST_FILENAME} !-f

  # no, so we redirect to our front web controller
  RewriteRule ^(.*)$ index.php [QSA,L]
/IfModule


Found here:
http://www.cakephp.nu/quick-tip-generic-nonwww-www-vice-versa-301-redirect-htaccess

best regards,

Michael

http://www.kineticarm.com
http://www.dikeytus.com
http://www.lueftenegger.at

--~--~-~--~~~---~--~~
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:data-load error

2009-07-23 Thread Gábor Fási

Did you clear your cache (php symfony cc) after doing a propel:build-all?

On Thu, Jul 23, 2009 at 18:07, carllangcarl.m.l...@gmail.com wrote:

 Hi

 I've just installed Symfony, and I'm busy going through th
 jobeet doumentation to setup the example app.
 I've got to the point of issuing this
 command:
 php symfony propel:data-load

 and that gives me the following errors:

 C:\work\sf_project\jobeetphp symfony propel:data-load
 propel    load data from C:/work/sf_project/jobeet/data/fixtures
 PHP Fatal error:  Class 'JobeetJob' not found in C:\work\sf_project
 \jobeet\lib\v
 endor\symfony\lib\plugins\sfPropelPlugin\lib\addon
 \sfPropelData.class.php on lin
 e 253

 Fatal error: Class 'JobeetJob' not found in C:\work\sf_project\jobeet
 \lib\vendor
 \symfony\lib\plugins\sfPropelPlugin\lib\addon\sfPropelData.class.php
 on line 253

 could anyone please help.


 Thanks in advance
 Carl


 


--~--~-~--~~~---~--~~
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: i18n in model::Peer method

2009-07-23 Thread Carlo

I think that i18n:extract task looks for __() only in /apps/
yourappname/*.
Is it correct?

Carlo

On Jul 15, 9:27 am, Mateusz Kaczmarek mateusz.kaczma...@gmail.com
wrote:
 Hello, I have some trouble with i18n system. How to translate strings
 in form items that are generated automaticaly for example radio
 buttons or select. I use pattern from Jobbet Tutorial and I have
 something like this:

 // lib/model/JobeetJobPeer.php
 class JobeetJobPeer extends BaseJobeetJobPeer
 {
   static public $types = array(
     'full-time' = 'Full time',
     'part-time' = 'Part time',
     'freelance' = 'Freelance',
   );

   // ...

 }

 and

 $this-widgetSchema['type'] = new sfWidgetFormChoice(array(
   'choices'  = JobeetJobPeer::$types,
   'expanded' = true,
 ));

 But when i use i18n:extract task, this string aren't included in
 result. How can I take advantages of great i18n in this case ? Thanx
 in advance for help
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] the default optiion works ???????

2009-07-23 Thread Germana Oliveira

Hi , i have this :

 $this-widgetSchema['estado_id'] = new sfWidgetFormPropelChoice(array(
'model'  = 'Estado',
'add_empty'  =  false,
'order_by'   =  array('Nombre', 'asc'),
'default'=  '$estado_id-getId()',
 ));

But it just does not work ... why???

i have use setDefault from my actions like this:

$this-form-setDefault('campo', 'value');

But i dont know how to do this with an embeded form...

THANKSS!!!


--~--~-~--~~~---~--~~
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] Override default error pages

2009-07-23 Thread Eno


I created an error/error.html.php file in my project's config directory as 
documented here:

http://www.symfony-project.org/book/1_2/19-Mastering-Symfony-s-Configuration-Files#chapter_19_sub_default_modules_and_actions

However, symfony doesn't use my custom error page. I have the default 
module *removed* from my settings.yml file for ALL my applications.

What I get instead is:

404 | Not Found | sfError404Exception
Empty module and/or action after parsing the URL /hi (/).

The documentation seems to imply that you can just create 
config/error/error.html.php and symfony will use it for all errors.

Is the documentation wrong or am I missing something?



-- 



--~--~-~--~~~---~--~~
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: Embedding forms / Objects

2009-07-23 Thread -gary-

Yes, my:

  public function getStatusObject($key)
  {
return (isset($this-status_objects[$key])) ? $this-
status_objects [$key] : null;
  }

is not returning an object and that why I'm having problems in the
template.

Anyone have any idea on this please?
I'd appreciate any help at all.

Thank you for reading.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Embedding forms / Objects

2009-07-23 Thread Gareth McCumskey
What is $this-status_objects? How is it defined? Do you use Propel or
Doctrine to get data from your database?

If Doctrine then I don't know, but if Propel and you had at some point
perhaps:

$this-status_objects = StatusObjectsClass::doSelect(new Criteria());

Then $this-status_objects would be an array as you defined above but
remember $key needs to be an integer as Propel will store the result objects
in a numeric indexed array.

Therefore make sure that the key that is passed or the actual creation of
$this-status_objects (possibly using a var_dump($this-status_objects) call
on it) was successful. It might get you one step closer to troubleshooting

On Fri, Jul 24, 2009 at 3:10 AM, -gary- gary.dun...@gmail.com wrote:


 Yes, my:

  public function getStatusObject($key)
  {
return (isset($this-status_objects[$key])) ? $this-
 status_objects [$key] : null;
  }

 is not returning an object and that why I'm having problems in the
 template.

 Anyone have any idea on this please?
 I'd appreciate any help at all.

 Thank you for reading.

 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

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

2009-07-23 Thread DEEPAK BHATIA

Hi,

The code in javascript section in test2Success.php is not executed.
Why is that when link_to_remote is called, the associated
action/module doesn't execute Javascript code ?

=
My main page has the following code

?php echo link_to_remote('Delete this post', array( 'update'   =
'feedback','url' = 'test/test2',)) ?

div id=feedback
/div



test2Success.php has the following code
===

body
h1TEST/h1

script type=text/javascript
alert(TEST);
/script
/body
===



On Fri, Jul 24, 2009 at 1:42 AM, Szabolcs
Heiligszabolcs.hei...@gmail.com wrote:
 Hi,
 I think your problem is based on the behavior of Symfony
 in AJAX mode. When you load your action through
 link_to_remote() it doesn't decorate that with your layout.
 Without that it is possible to your ui-magic never initialized.
 2009/7/23 DEEPAK BHATIA toreachdee...@gmail.com

 I have a web page which is referenced by link_to_remote action.

 This web page/template has yahoo user interface javascript api's.

 When I call this page as normal form submission, I get the
 functionality of yahoo user interface javascript api but not when it
 is called as link_to_remote.


 


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

2009-07-23 Thread Frank Stelzer

You need the script flag in your remote function call, otherwise you  
permit to execute javascript within ajax responses:
http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_11_sub_authorizing_script_execution


Am 24.07.2009 um 07:41 schrieb DEEPAK BHATIA:


 Hi,

 The code in javascript section in test2Success.php is not executed.
 Why is that when link_to_remote is called, the associated
 action/module doesn't execute Javascript code ?

 =
 My main page has the following code

 ?php echo link_to_remote('Delete this post', array( 'update'   =
 'feedback','url' = 'test/test2',)) ?

 div id=feedback
 /div

 

 test2Success.php has the following code
 ===

 body
 h1TEST/h1

 script type=text/javascript
 alert(TEST);
 /script
 /body
 ===



 On Fri, Jul 24, 2009 at 1:42 AM, Szabolcs
 Heiligszabolcs.hei...@gmail.com wrote:
 Hi,
 I think your problem is based on the behavior of Symfony
 in AJAX mode. When you load your action through
 link_to_remote() it doesn't decorate that with your layout.
 Without that it is possible to your ui-magic never initialized.
 2009/7/23 DEEPAK BHATIA toreachdee...@gmail.com

 I have a web page which is referenced by link_to_remote action.

 This web page/template has yahoo user interface javascript api's.

 When I call this page as normal form submission, I get the
 functionality of yahoo user interface javascript api but not when it
 is called as link_to_remote.





 


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