[symfony-users] Re: symfony 1.3.3 doctrine inheritance custom primary key and formfilters

2010-03-16 Thread Tom Ptacnik
When does this error appears? When you execute the filter? By which
param are you trying to filter?


On 12 bře, 09:43, lxtechie lxtec...@gmail.com wrote:
 No one?

 On Mar 10, 10:52 pm, lxtechie lxtec...@gmail.com wrote:



  Hi

  If been trying to use doctrine's inheritance feature . I add my own
  primary key in the child table (in this case my_id) but if I try and
  use a filter in the backend I get the following error :
  SQLSTATE[HY093]: Invalid parameter number: parameter was not defined

  my schema.yml file:

  SysRoot:
    columns:
     reason:
       type: string(255)

  Article:
    inheritance:
      type:             concrete
      extends:       SysRoot
    columns:
      my_id:
        type: integer(8)
        primary: true
        autoincrement: true
      author_id: integer
      title:
        type: string(255)
        notnull: true

  I think the formfiltergenerator is not using the correct primary key
  since the parent table has a auto generated pk (id) . Am I doing
  something wrong or is there perhaps a workaround?

  Thanx
  Best Regards
  lxtechie

-- 
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] Re: sfObjectRouteCollection with method_for_query

2010-03-16 Thread Tom Ptacnik
What are you trying to do? Maybe there is another way how to do that
and thats why method_for_query isn't in sfObjectRouteCollection


On 11 bře, 15:32, Don Pinkster d...@pinkster.eu wrote:
 Is it me or am I missing the option to specify a method_for_query in
 an sfObjectRouteCollection? There is a model_methods option but this
 acts in a different way (not passing the Doctrine_Query).
 For now I created my own sfObjectRouteCollection
 (http://gist.github.com/329159, not completed yet) which enables you
 to set the methods_for_query option with an object and list parameter.

-- 
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] Re: Paginate the result of two queries

2010-03-16 Thread Tom Ptacnik
I think better solution would be to make a one query from this two and
then paginate as in admin generator.


On 11 bře, 21:07, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 to get the friends of a user i have a table like this:

 AmigoUsuario:
    columns:
      user1_id:
        type: integer(4)
      user2_id:
        type: integer(4)
      estado:
        type: integer
        default: 0
    relations:
      User1:
        class: Usuario
        local: user1_id
        foreignAlias: AmigosUsuario
        onDelete: CASCADE
      User2:
        class: Usuario
        local: user2_id
        foreignAlias: AmigosUsuario
        onDelete: CASCADE

 I have also these queries below to get friends of a user (I have two
 queries because the id of the user can be stored as User1 or User2).
 These are the queries:

          // hemos tenido que hacer dos querys porque la amistad puede
 estar definida
          // en cualquiera de la dos direcciones (as X-Y o as Y-X)
          $q1 = Doctrine_Query::create()
          -from('Usuario u')
          -leftJoin('u.AmigoUsuario a ON u.id = a.user2_id')
          -where(a.user1_id = ?, $id)
          -andWhere(a.estado LIKE ?, 1);

          $q2 = Doctrine_Query::create()
          -from('Usuario u')
          -leftJoin('u.AmigoUsuario a ON u.id = a.user1_id')
          -where(a.user2_id = ?, $id)
          -andWhere(a.estado LIKE ?, 1);

 Now i want to paginate the results. What is your advice?

 Regards

 Javi

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


Re: [symfony-users] Re: Starting with symfony on Debian

2010-03-16 Thread Johann Spies
On 15 March 2010 22:21, rekarnar rekar...@gmail.com wrote:
 This looks like an issue with your php setup, not symfony. Can you
 check this by trying: 'php -v' and see if it executes without the
 error.

Thanks!  You were correct.  There was a bug in one package on my
system and an old library that was not cleanly removed.

I have corrected it and php-v now shows no errors.

My next question will hopefully be symfony related!

Regards.
Johann
-- 
Blessed are the poor in spirit: for theirs is the
  kingdom of heaven...Blessed are they which do hunger
  and thirst after righteousness: for they shall be
  filled...Blessed are the pure in heart: for they shall
  see God.   Matthew 5:3,6,8

-- 
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] Re: best practice change web directory

2010-03-16 Thread Tom Ptacnik
$this-setWebDir($this-getRootDir().'/../www');


On 11 bře, 19:09, Kevin kevinb...@gmail.com wrote:
 Hello, just wondering if the following is considered the best practice
 for changing the web directory from the default www to html?

 class ProjectConfiguration extends sfProjectConfiguration
 {
   public function setup()
   {
     /* change web dir to html */
     $this-setWebDir($this-getRootDir().DIRECTORY_SEPARATOR.'html');
   }

 }

 Thanks,
 Kevin

-- 
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] Re: Doctrine Admin Generator Problem

2010-03-16 Thread Tom Ptacnik
Why your setup function doesn't specify a relation?


On 11 bře, 22:39, Jim Krehl jim...@harmonixmusic.com wrote:
 I'm having some problems with using relations and
 doctrine:generate-admin.  I have two tables, call them Users and
 Umbrellas.  There is a one-to-many relation between Users and Umbrellas,
 specifically ...

 class Umbrella extends sfDoctrineRecord {
      public function setUp ()
      {
          $this-hasOne ('User as owner', array ('local' = 'owner_id',
 'foreign' = 'id'));
      }

 }

 The User::setUp function does not specify a relation with Umbrella.

 I want to make an admin interface that allows admins to create Umbrella
 objects.  The first issue is that the widget created to input the
 owner_id is an sfWidgetFormDoctrineChoice which makes a select-type
 input with every possible user id.  This is undesirable for 2 reasons,
 first there are far too many users ( 100,000) to populate a select-type
 input.  Secondly, it is much more intuitive to specify a user by
 username instead of by numeric id.

 I took care of this first issue by overriding the auto-generated
 widget/validator, i.e. ...

 class UmbrellaForm extends BaseUmbrellaForm {
      public function configure ()
      {
          parent::configure ();

          $this-setWidget    ('owner_id', new sfWidgetFormInput ());
          $this-setValidator ('owner_id', new UserValidator ());
      }

      public function updateDefaultsFromObject ()
      {
          parent::updateDefaultsFromObject ();

          $this-setDefault ('owner_id', $this-getObject
 ()-owner-username;
      }

 }

 class UserValidator extends sfValidatorString {
      public function doClean ($value)
      {
          $value = parent::doClean ($value);

          $user = UserTable::getByUsername ($value);

          /* check if a valid user, check if user is allowed to own an
 umbrella, etc. */

          return $user-id;
      }

 }

 The above works pretty handily for associating an existing user with an
 umbrella.  I'm including it in this post in case I'm doing something
 improperly or if it's complicating my unresolved issue, which is ... I
 am not able to properly create _new_ Umbrella objects with the admin
 interface.

 One of the first things that the admin interface does after receiving a
 new umbrella form submission is to create a new, empty Umbrella object
 _and_ a new, empty User object.  When the admin inputs a username for
 the owner_id, instead of just inserting a new umbrella row with the
 owner_id set, it also tries to insert an entirely new user row into the
 database with an already extant username.

 So, my question is ... How can I convince the admin interface not to
 create a new instance of a foreign relation?

 Thanks,
 Jim Krehl

-- 
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] Re: Help required for generating custom templates (Symfony 1.4.3 with Doctrine)

2010-03-16 Thread Tom Ptacnik
Are you creating backend with admin generator? Or how do you want to
generate it.. by which command?


On 11 bře, 08:05, Parijatha Kumar parijathaku...@gmail.com wrote:
 Hi,

 I am a new comer to Symfony world. I am building a web application for
 our organisation with Symfony 1.4.3+Doctrine. I came across a problem.
 The default templates generated from Symfony CLI display the 'ID'
 column as a link to showSuccess template by default. But i don't want
 that. Instead I have manually modified some of my templates to include
 one more column called 'Actions' which displays 'View' and 'Edit' as
 links to showSuccess and editSuccess templates respectively. Moreover
 I have removed the 'ID' column completely from the templates and
 instead added a general 'Serial Number' column without any link. I
 feel this would be more user friendly than the usual template.
 Now how can I generate the templates automatically, by default, with
 my customisations from the Symfony CLI ? Do I have to modify any
 source files or do I have to include any configuration files ? I can't
 modify all my templates manually one by one, it will consume a lot of
 time. Please help.

 -- Parijatha Kumar

-- 
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] Re: custom rendering of sfWidgetFormDoctrineChoice?

2010-03-16 Thread Tom Ptacnik
Maybe this..

sfWidgetFormSchemaDecorator
http://www.symfony-project.org/forms/1_4/en/A-Widgets


On 11 bře, 12:02, axel at axel.zu...@gmail.com wrote:
 hello,

 the render method of
 new sfWidgetFormDoctrineChoice(array(
                                         'multiple' = true,
                                         'expanded' = true,
                                        

 renders the choices as unordered list. what's the easiest way to
 customize this, eg. rendering divs or table structures etc.

-- 
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] Re: Routing problem with sfGuardUserProfile

2010-03-16 Thread Tom Ptacnik
How is possible that if you list a utilisateus the url is /
utilisateurs/:id . It should be only /utilisateurs , right?



On 10 bře, 09:33, NOOVEO - Christophe Brun c.b...@nooveo.fr wrote:
 I'm trying to use sfDoctrineApplyPlugin, I have been asked to display 2
 backend pages : one to handle administrators, the other one to handle
 other users.
 I have generated 2 modules on the backend side.

 In routing.yml, the 2 routes are identical :
 utilisateurs:
   class: sfDoctrineRouteCollection
   options:
     model:                sfGuardUserProfile
     module:               utilisateurs
     prefix_path:          /utilisateurs
     column:               id
     with_wildcard_routes: true

 administrateurs:
   class: sfDoctrineRouteCollection
   options:
     model:                sfGuardUser
     module:               administrateurs
     prefix_path:          /administrateurs
     column:               id
     with_wildcard_routes: true

 In both config/generator.yml, the params are also identical :
 (utilisateurs)
   class: sfDoctrineGenerator
   param:
     model_class:           sfGuardUserProfile
     theme:                 admin
     non_verbose_templates: true
     with_show:             false
     singular:              ~
     plural:                ~
     route_prefix:          utilisateurs
     with_doctrine_route:   true
     actions_base_class:    sfActions

 (administrateurs)
   class: sfDoctrineGenerator
   param:
     model_class:           sfGuardUser
     theme:                 admin
     non_verbose_templates: true
     with_show:             false
     singular:              ~
     plural:                ~
     route_prefix:          administrateurs
     with_doctrine_route:   true
     actions_base_class:    sfActions

 But the behaviour of the application is not the same : if I try to list
 the 'utilisateurs' backend page, symfony throws a routing error :
 The /utilisateurs/:id.:sf_format route has some missing mandatory
 parameters

 An url like backend_dev.php/utilisateurs/6/edit throws the same error.
 Any idea of what I am missing here ?

-- 
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] Re: Login form database authentication

2010-03-16 Thread Tom Ptacnik
If I want to create authentication, at first I would use Symfony 1.4
(not 1.0) and then look into the sfGuard how to do that.


On 10 bře, 12:24, Trung Huynh forrestgu...@gmail.com wrote:
 Hi

 I'm trying to get a login form working with database authentication
 and the right symfony way of achieving this without using sfGuard.
 Overall, I'm trying to comprehend the way of doing things in
 symfony, hopefully you guys can pinpoint me in the right direction.

 action.class.php has a working executeLogin which makes use of lib/
 form/LoginForm.class.php. I can login with a hardcoded dummy code, so
 that works well.

 However I'm struggling about how to go with the database
 authentication. I've seen examples (symfony 1.0 example) that do the
 authentication in the action.class.php/executeLogin(). However. I
 don't think that is good since it's isn't the place to do the logic
 things, right?

 So I got this in:

 lib/model/doctrine/MemberTable.class.php:
 -
   public function getMemberByEmailAndPassword($email,$password)
   {
       $q = $this-createQuery('m')
         -where('m.email = ?', $email)
         -andWhere('m.password = ?', $password);

       return $q-execute();
   }
 -

 action.class.php: in my public function executeLogin():
 -
 $this-result = 
 Doctrine_Core::getTable('member')-getMemberByEmailAndPassword($tabform['email'],$tabform['password']);

 -

 Now I got doctrinecollection member object in $this-result[0].
 I can do $this-result[0]getNickname(); but I think i'm not doing
 this correctly, there must be a better way.

 In this Symfony 1.0 cookbook example they use   $user =
 UserPeer::doSelectOne($c); and eventually have:
 $user-getPassword.

 This Symfony 1.0  Cookbook example makes use of a class UserPeer and
 doSelectOne. But it doesn't exist in Symfont 1.4. What are their
 equivalents nowadays?

 This example below is pretty much how I want it too but I shall put my
 logic code into lib/model/doctrine to conform the MVC pattern.

 Also it makes use of $request-setError('email', 'this user does not
 exist'); Is it possible to do this in Symfony 1.4 as well.

 public function executeLogin()
 {
   // check if the user exists
   $c = new Criteria();
   $c-add(UserPeer::LOGIN, $this-getRequestParameter('login'));
   $user = UserPeer::doSelectOne($c);
   if ($user)
   {
     // check if the password is correct
     if ($this-getRequestParameter('password') == $user-getPassword())

     {
       // sign in
       $this-getContext()-getUser()-signIn();
       // proceed to home page
       return $this-redirect('main/index');
     }
     else
     {
       $this-getRequest()-setError('password', 'wrong password');
     }
   }
   else
   {
     $this-getRequest()-setError('email', 'this user does not
 exist');
   }

   // an error was found
   return $this-forward('security', 'index');

 }

 Thanks in advance :)

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


Re: [symfony-users] Symfony 2.0 - Cookies

2010-03-16 Thread Jérémie

Symfony wrote:

Hi all,

I'm trying to use Symfony 2.0, and I was wondering if someone knew how
to set/get cookies with this version?
I found a setcookie method in the Response class, but I can't figure
out how to use it :/

Thanks a lot!
Jérémie

  

Finally I understood that I have to use getUser()-get/setAttributes.
Does anyone know how to use it in the layout, or do I have to use it 
only in a controller?

Thanks
Jérémie

--
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] Symfony Doctrine Migration - Cancel mandatory from a field

2010-03-16 Thread ruigoncalves
Hi there!

I would like to cancel the mandatory of a field of my current schema,
that is, change the value of the property notnull from true to false.
How can I accomplish that with a symfony migration?

Thanks in advance, Best regards!

-- 
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] Re: enormous sf

2010-03-16 Thread vero
It was so stupid that I am so ashamed.
I don't pretend to use * at all. It was a big error, and I'm really
grateful to you for your help.

I have change it and now the sf has disappear, thank you very much and
thanks for all people who try to help others in that group. It's very
important for me because I was a beginner in all the things about css,
php, or, of course, symfony.


On 14 mar, 20:15, rooster (Russ) russmon...@gmail.com wrote:
 On Mar 14, 7:24 pm, vero vegoi...@alumni.uv.es wrote:


  my main.css is:

  *{
  width:800px;

  }

 Seriously?

 You are setting the width of the first found element to 800px - which
 in your case is the sf logo.

 http://www.w3.org/TR/CSS2/selector.html#universal-selector

 I imagine this works in the frontend because by coincidence it matches
 the element you actually want to be 800px wide...

 Russ.

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


Re: [symfony-users] Re: enormous sf

2010-03-16 Thread Gareth McCumskey
As a new user to symfony I would highly recommend reading through the
Definitive Guide to symfony:
http://www.symfony-project.org/book/1_2/

I know its for the 1.2 version but the Definitive Guide for 1.3/1.4 is
not fully ported yet and there really are not as many differences
between the books. Just reading through that will give you a good
grounding in symfony essentials and in understanding how all the
various parts fit together

On Tue, Mar 16, 2010 at 1:28 PM, vero vegoi...@alumni.uv.es wrote:
 It was so stupid that I am so ashamed.
 I don't pretend to use * at all. It was a big error, and I'm really
 grateful to you for your help.

 I have change it and now the sf has disappear, thank you very much and
 thanks for all people who try to help others in that group. It's very
 important for me because I was a beginner in all the things about css,
 php, or, of course, symfony.


 On 14 mar, 20:15, rooster (Russ) russmon...@gmail.com wrote:
 On Mar 14, 7:24 pm, vero vegoi...@alumni.uv.es wrote:


  my main.css is:

  *{
  width:800px;

  }

 Seriously?

 You are setting the width of the first found element to 800px - which
 in your case is the sf logo.

 http://www.w3.org/TR/CSS2/selector.html#universal-selector

 I imagine this works in the frontend because by coincidence it matches
 the element you actually want to be 800px wide...

 Russ.

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




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

-- 
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] How can i see the content of Auto* classes of backend ?

2010-03-16 Thread Javier Garcia

Hi,

i have created a backend and an admin module.

In apps/backend/modules/actions/actions.class.php I have this :

class cocheActions extends autoCocheActions
{
}

Is there any way to see the content of autoCocheActions ?

My proposal is find out how the pagination in backend works, concretely 
how the values of the forms are kept while browsing pages.


Javi

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


Re: [symfony-users] How can i see the content of Auto* classes of backend ?

2010-03-16 Thread Stéphane
Hi,

These classes are in the $project/cache/$env/$app dir

They are deleted when you symfony cc

Cheers,


Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Tue, Mar 16, 2010 at 1:43 PM, Javier Garcia tirengar...@gmail.comwrote:

 Hi,

 i have created a backend and an admin module.

 In apps/backend/modules/actions/actions.class.php I have this :

 class cocheActions extends autoCocheActions
 {
 }

 Is there any way to see the content of autoCocheActions ?

 My proposal is find out how the pagination in backend works, concretely how
 the values of the forms are kept while browsing pages.

 Javi

 --
 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.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


-- 
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] Re: Question about an AJAX link and the dev and prod enviroments

2010-03-16 Thread Massimiliano Arione
What if client has javascript disabled?

On 15 Mar, 18:38, Javier Garcia tirengar...@gmail.com wrote:
 Ok, this is the solution:

                 a href=# onclick=new Ajax.Updater('lista_miembros', 
 '?php echo
 url_for(miembros/filtrar?page=2); ?')next/a

 Javi

 On Mar 15, 5:59 pm, Javier Garcia tirengar...@gmail.com wrote:

  Hi,

  i have this line below that shows a link to go the next page of a list.

  a href=# onclick=new Ajax.Updater('lista_miembros',
  '/frontend_dev.php/miembros/filtrar?page=2')Next page/a

  The problem: as expected, it only works in the development enviroment of
  the frontend (frontend_dev.php).

  My question: what should i to get it work on both enviroments
  (production and development)? Using if's and getting the environment
  being used is the only way, or is there any cooler way?

  Javi

-- 
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] Re: Propel extend Criteria different functions

2010-03-16 Thread Massimiliano Arione
Did you try Propel criteria builder? http://propel.jondh.me.uk/criteria/analyse
Also, you can use sfPropel15plugin and benefit from new Query syntax.

On 15 Mar, 14:43, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com
wrote:
 If you want to make OR term in Propel, you need to make a Criterion
 object that adds the OR terms to the Criteria object.

 Now I build my Criteria by use of several functions. This is the
 first:

         public static function getAttentionCriteria(Criteria $oCriteria =
 NULL){
                 if($oCriteria == NULL) $oCriteria = new Criteria();
                 else $oCriteria = clone $oCriteria;

                 $oCriteria-setDistinct(self::ID);
                 $oCriterion = $oCriteria-getNewCriterion(self::ADDRESS, '',
 Criteria::EQUAL);
                 $oCriterion-addOr($oCriteria-getNewCriterion(self::CITY,    
 '',
 Criteria::EQUAL));
                 $oCriteria-add($oCriterion);

                 return $oCriteria;
         }

 Another function needs to use the very same Criteria, but with an
 extra OR term added. This is the function:

         public static function getExtendedAttentionCriteria(Criteria
 $oCriteria = NULL){
                 if($oCriteria == NULL) $oCriteria = new Criteria();
                 else $oCriteria = clone $oCriteria;

                 $oCriteria = self::getAttentionCriteria($oCriteria);

                 $oCriterion = $oCriteria -getNewCriterion(self::IMAGE_ID, 
 NULL,
 Criteria::EQUAL);
                 $oCriteria-addOr($oCriterion);

                 return $oCriteria;
         }

 But the last extra OR term (self::IMAGE_ID is equal to NULL) is always
 only added in an AND term.
 How can I extend the first Criteria from getAttentionCriteria and add
 the self::IMAGE_ID is equal to NULL as an OR term?

-- 
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] Re: How can i see the content of Auto* classes of backend ?

2010-03-16 Thread Javier Garcia
Thanks Stephane, inside my cache I only have the folders backend,,
frontend, tmp and i file called project_autoload.cache.

To be sure about it, before check it, i have created a new backend
project, a new admin module Coche and i visited 
http://rs.localhost/backend_dev.php/coche.

Any way, why are you adding the $ before env and app in the path you
gave me? Because the permissions of the folders?

I have symfony 1.2 (i know it's deprecated but my project is almost
done).

Javi

On Mar 16, 1:56 pm, Stéphane stephane.er...@gmail.com wrote:
 Hi,

 These classes are in the $project/cache/$env/$app dir

 They are deleted when you symfony cc

 Cheers,

 Before Printing, Think about Your Environmental Responsibility!
 Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!

 On Tue, Mar 16, 2010 at 1:43 PM, Javier Garcia tirengar...@gmail.comwrote:

  Hi,

  i have created a backend and an admin module.

  In apps/backend/modules/actions/actions.class.php I have this :

  class cocheActions extends autoCocheActions
  {
  }

  Is there any way to see the content of autoCocheActions ?

  My proposal is find out how the pagination in backend works, concretely how
  the values of the forms are kept while browsing pages.

  Javi

  --
  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.comsymfony-users%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

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


Re: [symfony-users] Re: How can i see the content of Auto* classes of backend ?

2010-03-16 Thread Eno
On Tue, 16 Mar 2010, Javier Garcia wrote:

 Any way, why are you adding the $ before env and app in the path you
 gave me? Because the permissions of the folders?

Because they're like variables, you need to substitute in the values for 
your application and env.



-- 
A

-- 
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] Symfony routing and _

2010-03-16 Thread DarrenMr
Does symfony routing allow _? My routing config is below, it works
with / but not _

product_view:
  url: /product_:brand/:name
  param: { module: products, action: view }
  requirements: { brand: \d+, name: .+ }

name when I call it does not have any _

Does anyone know how to fix this?

Thanks,
Darren

-- 
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] request parameters in sfOrmBreadcrumbsPlugin

2010-03-16 Thread Mike Serendra
hi everyone, for those who use this plugin i have a quick question,
what do you put in breadcrumbs.yml to retrieve request parameters?
sample breadcrumbs.yml (in the readme):

sf_orm_breadcrumbs:
  main:
index:
  - { name: Home, route: homepage }
  blog:
index:
  - { name: Blog, route: blog }
showPost:
  - { name: Blog, route: blog }
  - { name: %title%, route: post_show, model: true }
permalink:
  - { name: 'Archive' }
  - { name: %Post%, route: post_show, model: true, subobject:
Post }

but %title% here is a model attribute. i tried %myrequestparameter%
and removed the route and model parameters but it doesnt work. it just
outputs %myrequestparameter% as a string

thanks

-- 
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] setPostValidator and mergePostValidator - conflitcs

2010-03-16 Thread Augusto Flavio
Hi,



i have a form that i need to check whether 2 strings is equal and i'm using
a setPostvalidator to check duplicated fields in my DB. The 2 codes works
fine. But only one for time. not the both together.


here is the code:

class UsersForm extends BaseUsersForm {

(...)

public function configure()

(...)

$this-validatorSchema['password_again'] = clone
$this-validatorSchema['password'];
$this-mergePostValidator(new sfValidatorSchemaCompare('senha',
sfValidatorSchemaCompare::EQUAL, 'password_again',
array('throw_global_error' = true),
array('invalid' = 'The passwords need be equal')
  )
);


$this-validatorSchema-setPostValidator(
  new sfValidatorCallback(array('callback' = array($this,
'checkSOCIALSECURITY')))
);

}

public function checkSOCIALSECURITY($validator, $values)
{
if
(UsersPeer::checkSOCIALSECURITYDuplicated($values['socialsecurity'])) {
  throw new sfValidatorError($validator, 'Your social security was
already registered.');
}
}
}


What can i do to the both validators works fine?



thanks




Augusto Morais

-- 
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] How to read databases.yml propely by sfConfig::get()

2010-03-16 Thread Dong YANG
Hi everyone,


  I want to get some infos of the file '*config/databases.yml*' from
another file (action file for example). I tried the function sfConfig::get()
but I failed to find the correct syntaxe, because there are only three
prefix for getting config file by default (app_, sf_ and mod_).

  I tried to use the method *sfYaml::load* like in my file:

   $databaseConf = sfYaml::load(sfConfig::get('sf_config_dir') .
'/databases.yml');
   $userName = $databaseConf ['all']['propel']['param']['username';

  But I think that this way is not proper, is that anybody has more
proper way to read the config file?

  Any suggestion is welcome.

  Regards,

JoJo

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


Re: [symfony-users] Symfony routing and _

2010-03-16 Thread Syam

Hi,

In your factories.yml application config file, you can use the 
segment_separators option on routing section :


all:
 routing:
   class: sfPatternRouting
   param:
 generate_shortest_url: true
 extra_parameters_as_query_string: true
 segment_separators: ['.','/','_']

Hope this help.

DarrenMr wrote:

Does symfony routing allow _? My routing config is below, it works
with / but not _

product_view:
  url: /product_:brand/:name
  param: { module: products, action: view }
  requirements: { brand: \d+, name: .+ }

name when I call it does not have any _

Does anyone know how to fix this?

Thanks,
Darren

  


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


Re: [symfony-users] How to read databases.yml propely by sfConfig::get()

2010-03-16 Thread Alvaro Videla
Try using the API of the sfDatabaseManager class


On Mar 16, 2010, at 10:11 PM, Dong YANG wrote:

 Hi everyone,
 
 
   I want to get some infos of the file 'config/databases.yml' from 
 another file (action file for example). I tried the function sfConfig::get() 
 but I failed to find the correct syntaxe, because there are only three prefix 
 for getting config file by default (app_, sf_ and mod_).
 
   I tried to use the method sfYaml::load like in my file: 
 
$databaseConf = sfYaml::load(sfConfig::get('sf_config_dir') . 
 '/databases.yml');
$userName = $databaseConf ['all']['propel']['param']['username';
 
   But I think that this way is not proper, is that anybody has more 
 proper way to read the config file?
 
   Any suggestion is welcome.
 
   Regards,
 
 JoJo
 
 
 -- 
 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

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


Re: [symfony-users] setPostValidator and mergePostValidator - conflitcs

2010-03-16 Thread Lea Hänsenberger
Hi,
use an sfValidatorAnd to combine the two post validators:

$this-mergePostValidator(new sfValidatorAnd(array(
new sfValidatorCallback(array('callback' = array($this, 
'checkSOCIALSECURITY'))),
new sfValidatorSchemaCompare('senha', sfValidatorSchemaCompare::EQUAL, 
'password_again', 
  array('throw_global_error' = true),
  array('invalid' = 'The passwords need be equal')
)
)));

Cheers,
Lea

On Mar 16, 2010, at 14:53 , Augusto Flavio wrote:

 Hi,
 
 
 
 i have a form that i need to check whether 2 strings is equal and i'm using a 
 setPostvalidator to check duplicated fields in my DB. The 2 codes works fine. 
 But only one for time. not the both together. 
 
 
 here is the code:
 
 class UsersForm extends BaseUsersForm {
 
 (...)
 
 public function configure()
 
 (...)
 
 $this-validatorSchema['password_again'] = clone 
 $this-validatorSchema['password'];
 $this-mergePostValidator(new sfValidatorSchemaCompare('senha', 
 sfValidatorSchemaCompare::EQUAL, 'password_again', 
 array('throw_global_error' = true),
 array('invalid' = 'The passwords need be equal')
   )
 );
 
 
 $this-validatorSchema-setPostValidator(
   new sfValidatorCallback(array('callback' = array($this, 
 'checkSOCIALSECURITY')))
 );
 
 }
 
 public function checkSOCIALSECURITY($validator, $values)
 {
 if 
 (UsersPeer::checkSOCIALSECURITYDuplicated($values['socialsecurity'])) {
   throw new sfValidatorError($validator, 'Your social security was 
 already registered.');
 }
 }
 }
 
 
 What can i do to the both validators works fine?
 
 
 
 thanks
 
 
 
 
 Augusto Morais
 
 -- 
 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

-- 
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] Accessing user session from a custom routing class

2010-03-16 Thread HiDDeN
Is there some way to acces the user object from a custom routing
class?

I'd like to add a parameter when generating a url, and that parameter
is inside the user session, so I need to access it.

The only way I found to access is using the sfContext::getInstance()-
getUser(), but it's known to be inefficient.

Thanks!

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


Re: [symfony-users] Accessing user session from a custom routing class

2010-03-16 Thread Jose Antonio Pio Gil
I have the same question about it!


2010/3/16 HiDDeN davidmoralesmoj...@gmail.com

 Is there some way to acces the user object from a custom routing
 class?

 I'd like to add a parameter when generating a url, and that parameter
 is inside the user session, so I need to access it.

 The only way I found to access is using the sfContext::getInstance()-
 getUser(), but it's known to be inefficient.

 Thanks!

 --
 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.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


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


Re: [symfony-users] setPostValidator and mergePostValidator - conflitcs

2010-03-16 Thread Augusto Flavio
Thanks


works fine!



Augusto Morais

2010/3/16 Lea Hänsenberger baerne...@gmail.com

 Hi,
 use an sfValidatorAnd to combine the two post validators:

 $this-mergePostValidator(new sfValidatorAnd(array(
new sfValidatorCallback(array('callback' = array($this,
 'checkSOCIALSECURITY'))),
 new sfValidatorSchemaCompare('senha',
 sfValidatorSchemaCompare::EQUAL, 'password_again',
  array('throw_global_error' = true),
  array('invalid' = 'The passwords need be equal')
)
 )));

 Cheers,
 Lea

 On Mar 16, 2010, at 14:53 , Augusto Flavio wrote:

  Hi,
 
 
 
  i have a form that i need to check whether 2 strings is equal and i'm
 using a setPostvalidator to check duplicated fields in my DB. The 2 codes
 works fine. But only one for time. not the both together.
 
 
  here is the code:
 
  class UsersForm extends BaseUsersForm {
 
  (...)
 
  public function configure()
 
  (...)
 
  $this-validatorSchema['password_again'] = clone
 $this-validatorSchema['password'];
  $this-mergePostValidator(new sfValidatorSchemaCompare('senha',
 sfValidatorSchemaCompare::EQUAL, 'password_again',
  array('throw_global_error' = true),
  array('invalid' = 'The passwords need be equal')
)
  );
 
 
  $this-validatorSchema-setPostValidator(
new sfValidatorCallback(array('callback' = array($this,
 'checkSOCIALSECURITY')))
  );
 
  }
 
  public function checkSOCIALSECURITY($validator, $values)
  {
  if
 (UsersPeer::checkSOCIALSECURITYDuplicated($values['socialsecurity'])) {
throw new sfValidatorError($validator, 'Your social security
 was already registered.');
  }
  }
  }
 
 
  What can i do to the both validators works fine?
 
 
 
  thanks
 
 
 
 
  Augusto Morais
 
  --
  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.comsymfony-users%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/symfony-users?hl=en

 --
 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.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


-- 
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] Re: Symfony routing and _

2010-03-16 Thread DarrenMr
Is there any way to do it as I described above? Shouldn't this be able
to do?

On Mar 16, 7:17 am, Syam s...@nexen.org wrote:
 Hi,

 In your factories.yml application config file, you can use the
 segment_separators option on routing section :

 all:
   routing:
     class: sfPatternRouting
     param:
       generate_shortest_url: true
       extra_parameters_as_query_string: true
       segment_separators: ['.','/','_']

 Hope this help.

 DarrenMr wrote:
  Does symfony routing allow _? My routing config is below, it works
  with / but not _

  product_view:
    url: /product_:brand/:name
    param: { module: products, action: view }
    requirements: { brand: \d+, name: .+ }

  name when I call it does not have any _

  Does anyone know how to fix this?

  Thanks,
  Darren

-- 
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] plugin versions

2010-03-16 Thread Yura Rodchyn
Hi,

I'm lead developer of sfUserOnlinePlugin.
I add some versions of plugins as pear package using strict mode (I
think package i good) but in allreleases.xml no versions displayed
check here 
http://plugins.symfony-project.org/REST/r/sfuseronlineplugin/allreleases.xml

Why?

-- 
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] Re: Admin generator ymfony 1.4 i18n question

2010-03-16 Thread Tim Richter
Hi,

I've got the same problem but your solution doesn't seem to work for
me:

/:sf_culture is in the routes and works, if I put

fields: [feldname , ...]

in generator.yml, the resp. column does not show up in the list (thats
ok I guess).  But if I put

list: [feldname, ...]

(with or without the fields:... line above) there's an error message
Your generator configuration contains some errors for the list
context. The following configuration cannot be parsed: array( 0 =
'feldname',).

What am I missing?
Tim

-- 
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] Re: Admin generator ymfony 1.4 i18n question

2010-03-16 Thread Tim Richter
Hi,

have the same problem, your solution doesn't seem to work for me:
I have /:sf_culture in my route and localization works.

When I put

fields: [ ... , somei18nfield, ...]

in generator.yml, it doesn't show the field in the list. However,
putting it in

list: [..., somei18nfield, ...]

the list view fails. Do you have an idea what could be wrong?

Tim


On Feb 22, 12:15 pm, Alexander Deruwe alexan...@mobicomsystems.net
wrote:
 Ugh, thank you very much.

 I tried this before I added /:sf_culture to my routes and it gave an error - 
 and I assumed it was unrelated to the /:sf_culture thing.
 Assumption is the mother of all screw ups, never more true.

 Thanks again,

 Alexander

 -Original Message-
 From: symfony-users@googlegroups.com on behalf of Dimitar
 Sent: Mon 2/22/2010 11:46 AM
 To: symfony users
 Subject: [symfony-users] Re: Admin generator ymfony 1.4 i18n question

 you can setup the fields in the generator.yml ... for example:

 fields: [title]



  winmail.dat
 3KViewDownload

-- 
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] Dynamic default values in forms ?

2010-03-16 Thread Paul Bernard
Hello,

I've been developping a new application with Symfony 1.4 for a few
weeks and I'm trying to improve it.

How can I set dynamic default values for a field in a form ?

For instance, how can I set the default value for a date to today ?

And how can I create a form with

Thanks for your answers,

Paul

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


Re: [symfony-users] Symfony 2.0 - Cookies

2010-03-16 Thread Rénald Casagraude

Hi,

In all cases do not try to set inside view layer…

Regards,
Rénald

On 16 mars 2010, at 12:08, Jérémie jeremie.symf...@gmail.com wrote:


Symfony wrote:

Hi all,

I'm trying to use Symfony 2.0, and I was wondering if someone knew  
how

to set/get cookies with this version?
I found a setcookie method in the Response class, but I can't  
figure

out how to use it :/

Thanks a lot!
Jérémie



Finally I understood that I have to use getUser()-get/setAttributes.
Does anyone know how to use it in the layout, or do I have to use it  
only in a controller?

Thanks
Jérémie

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


--
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] Re: Symfony 2.0 - Cookies

2010-03-16 Thread Jérémie


On Mar 16, 8:32 pm, Rénald Casagraude rcasagra...@interfaces.fr
wrote:
 Hi,

 In all cases do not try to set inside view layer…

 Regards,
 Rénald


Yes, I do all the work in the Controller. I set in it, and get it
there too. And then, I send it to the template, as an argument of the
render method.

Thanks
Jérémie
 On 16 mars 2010, at 12:08, Jérémie jeremie.symf...@gmail.com wrote:



  Symfony wrote:
  Hi all,

  I'm trying to use Symfony 2.0, and I was wondering if someone knew  
  how
  to set/get cookies with this version?
  I found a setcookie method in the Response class, but I can't  
  figure
  out how to use it :/

  Thanks a lot!
  Jérémie

  Finally I understood that I have to use getUser()-get/setAttributes.
  Does anyone know how to use it in the layout, or do I have to use it  
  only in a controller?
  Thanks
  Jérémie

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

-- 
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] Re: Dynamic default values in forms ?

2010-03-16 Thread rooster (Russ)
I suggest you have a quick read through the form book (1.2 is still
pretty much valid for sf1.4) because all this is pretty much covered
there.

To set a default value for a date widget to today, you could do
something like this in your form configure() method:

$this-setDefault(my_date_widget, now);

Date widgets take a value that is compatable with strtotime() so there
is no need to generate an actual date, although you could if you
wanted to...

Russ.

On Mar 16, 3:29 pm, Paul Bernard paul.bern...@synfia.com wrote:
 Hello,

 I've been developping a new application with Symfony 1.4 for a few
 weeks and I'm trying to improve it.

 How can I set dynamic default values for a field in a form ?

 For instance, how can I set the default value for a date to today ?

 And how can I create a form with

 Thanks for your answers,

 Paul

-- 
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] Re: Admin generator ymfony 1.4 i18n question

2010-03-16 Thread Tim Richter
I have

list:
  title:  ...
  display: [feldname,...]

now and it works.

Sorry
Tim

On Mar 16, 9:43 pm, Tim Richter t...@nobodycares.de wrote:
 Hi,

 I've got the same problem but your solution doesn't seem to work for
 me:

 /:sf_culture is in the routes and works, if I put

 fields: [feldname , ...]

 in generator.yml, the resp. column does not show up in the list (thats
 ok I guess).  But if I put

 list: [feldname, ...]

 (with or without the fields:... line above) there's an error message
 Your generator configuration contains some errors for the list
 context. The following configuration cannot be parsed: array( 0 =
 'feldname',).

 What am I missing?
 Tim

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


Re: [symfony-users] Re: Question about an AJAX link and the dev and prod enviroments

2010-03-16 Thread Tom Haskins-Vaughan
 What if client has javascript disabled?

Then you should create a normal link first

  a href=?php echo url_for(miembros/filtrar?page=2); ?Next/a

And then use javascript to change it if it is available.

On Tue, Mar 16, 2010 at 9:06 AM, Massimiliano Arione garak...@gmail.com wrote:
 What if client has javascript disabled?

 On 15 Mar, 18:38, Javier Garcia tirengar...@gmail.com wrote:
 Ok, this is the solution:

                 a href=# onclick=new Ajax.Updater('lista_miembros', 
 '?php echo
 url_for(miembros/filtrar?page=2); ?')next/a

 Javi

 On Mar 15, 5:59 pm, Javier Garcia tirengar...@gmail.com wrote:

  Hi,

  i have this line below that shows a link to go the next page of a list.

  a href=# onclick=new Ajax.Updater('lista_miembros',
  '/frontend_dev.php/miembros/filtrar?page=2')Next page/a

  The problem: as expected, it only works in the development enviroment of
  the frontend (frontend_dev.php).

  My question: what should i to get it work on both enviroments
  (production and development)? Using if's and getting the environment
  being used is the only way, or is there any cooler way?

  Javi

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


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


Re: [symfony-users] Re: Symfony routing and _

2010-03-16 Thread Gareth McCumskey
As Syam said, add the '_' to the factories.yml segment_seperators
parameter and you can

On Tue, Mar 16, 2010 at 7:33 PM, DarrenMr mrdla...@gmail.com wrote:
 Is there any way to do it as I described above? Shouldn't this be able
 to do?

 On Mar 16, 7:17 am, Syam s...@nexen.org wrote:
 Hi,

 In your factories.yml application config file, you can use the
 segment_separators option on routing section :

 all:
   routing:
     class: sfPatternRouting
     param:
       generate_shortest_url: true
       extra_parameters_as_query_string: true
       segment_separators: ['.','/','_']

 Hope this help.

 DarrenMr wrote:
  Does symfony routing allow _? My routing config is below, it works
  with / but not _

  product_view:
    url: /product_:brand/:name
    param: { module: products, action: view }
    requirements: { brand: \d+, name: .+ }

  name when I call it does not have any _

  Does anyone know how to fix this?

  Thanks,
  Darren

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




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

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