[symfony-users] Re: < in javascript code is stripped

2009-11-16 Thread Paul Witschger
I'm going to assume you are building your javascript in the controller 
and putting it into a variable to be outputted in the view. If this is 
not the case, disregard my answer below.

I'm new to symfony, so I apologize if there is a better way, but from 
what I can determine, you basically have two options:

1. perform your loop in the view where you will be using it (this is the 
preferred way)

2. there is a php function called html_entity_decode(), which does the 
opposite of htmlentities() - it converts everything back ( < becomes 
< ). Use this in your view when outputting your var ( 
html_entity_decode($variable) )


darkpilg...@126.com wrote:
> Sorry, this is not symfony's problem.
>
> On Nov 17, 10:23 am, "darkpilg...@126.com" 
> wrote:
>   
>> When I write javascript code like: var str = '> option>'; in template, I find that  is gone.
>> Actually it's < that is stripped on rendering. I don't know which
>> piece of symfony code does this and whether I can disable this
>> feature.
>>
>> Anybody has any idea? I'm using symfony 1.0.
>>
>> 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: < in javascript code is stripped

2009-11-16 Thread darkpilg...@126.com

Sorry, this is not symfony's problem.

On Nov 17, 10:23 am, "darkpilg...@126.com" 
wrote:
> When I write javascript code like: var str = ' option>'; in template, I find that  is gone.
> Actually it's < that is stripped on rendering. I don't know which
> piece of symfony code does this and whether I can disable this
> feature.
>
> Anybody has any idea? I'm using symfony 1.0.
>
> 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] got strange issue in symfony sessions (urgent)

2009-11-16 Thread Dheeraj Kumar Aggarwal
i have got a strange issue in my symfony project

when the user navigate through the site, sometimes symfony forwards the user
to login page.
although the user is already logged in.
and when user refreshes the screen after reaching on login screen
it automatically goes into the site.

the occurrence of the bug is also not predictable.

we have to deploy this application on production server in 3-4 days.


Any help ...

thanks in advance

-- 
Regards,
Dheeraj

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



[symfony-users] Re: sfValidatorPropelUnique fails on updates - 1.2

2009-11-16 Thread Richtermeister

Hey Stefan,

The initial form knows whether it's new or an update, because you give
it a concrete object into the constructor, and most likely you have
retrieved this object by its primary key before, so it's fully
populated.

If sending the pk via hidden input rubs anybody wrong, you don't have
to do it this way, as long as you ensure that you have a different way
to provide the form with the appropriate object to update. Some people
use the session for this, but that can be tricky, because users can
have multiple interfaces open, and a central session wouldn't know
which interface was editing which object, unless the primary key is
submitted as part of the form.
So, in reality its easier to keep it in there.

Cheers,
Daniel



On Nov 12, 2:58 am, Stefan Paschke  wrote:
> Hi
>
> I just ran into the same problem, and while I found the solution in
> this discussion, I think it is not clear enough, so let me repeat
> briefly, in case anyone comes across this in the future:
>
> like Richtermeister says, the problem can be solved by adding a
> _uniques key to the schema, and using the auto-generated from. If you
> do not want to do this, for some reason, you need to add the primary
> key of the model to the from as a hidden field, if you are using it
> for update actions, like this:
>
>     $this->setWidgetSchema(
>       new sfWidgetFormSchema(
>         array(
>           "id" => new sfWidgetFormInputHidden(),
>           ...
>         )
>       )
>     );
>
> and:
>
>     $this->setValidators(
>       array(
>         "id" => new sfValidatorPropelChoice( array( "model" =>
> "Member", "column" => "id", "required" => false ) ),
>       )
>     );
>
> so basically you are passing the primary key as a hidden value. This
> seems odd, because the form will know the difference between insert
> and update and behave correctly without doing this, yet somehow the
> sfValidatorPropelUnique doesn't.
>
> best wishes
>
> Stefan
>
> > On Sep 12, 7:09 pm, Richtermeister  wrote:
>
> > > Hey Ben,
>
> > > no, your first version is right. You only need to pass model and
> > > column.
> > > The object that your form is updating needs to have a primary key set
> > > though, in order to be considered anupdate. otherwise it will be
> > > considered new and theupdatewill fail.
>
> > > In the most basic propel form setup none of this should be an issue,
> > > since auto-generated forms are doing this just fine by themselves. Try
> > > adding a _uniques: key to the schema and add your field there, this
> > > will build the post validator straight into your base form.
>
> > > Or post your entire configure/setup function if nothing else helps :)
>
> > > Have a great day,
> > > Daniel
> > > > > > On Mar 11, 3:50 am, Benjamin  wrote:
>
> > > > > > > The code is below.  I have been searching for hours.  This is 
> > > > > > > failing
> > > > > > > on updates, saying that the user name has already been taken.  
> > > > > > > It's
> > > > > > > being used as a post validator.
>
> > > > > > > newsfValidatorPropelUnique(
> > > > > > >     array(
> > > > > > >         'model'         => 'Members',
> > > > > > >         'column'        => array('user_name'),
> > > > > > >     ),
> > > > > > >     array(
> > > > > > >         'invalid'       => 'This user name has already been 
> > > > > > > taken',
> > > > > > >     )),
--~--~-~--~~~---~--~~
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, MySQL and Latin1. Symfony 1.3

2009-11-16 Thread David Ashwood

Use something along the line of the following in the top of your
schema.yml;

options:
  collate: utf8_unicode_ci
  charset: utf8

On Mon, 2009-11-16 at 15:34 -0800, MaEcTPo wrote: 
> Hi,
> I am new on doctrine, and I have a problem.
> 
> When I run task
> $: symfony doctrine:build-all
> I receive in MySQL database tables with latin1 charset.  Ok, I go to
> the phpmyadmin, and change default charset for the database to
> utf8_general_ci. But after runnig the task I have tables with latin1
> again.
> What can I do for fix it?
> With propel I didn't have the problem.
> 
> > 



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



[symfony-users] Doctrine, MySQL and Latin1. Symfony 1.3

2009-11-16 Thread MaEcTPo

Hi,
I am new on doctrine, and I have a problem.

When I run task
$: symfony doctrine:build-all
I receive in MySQL database tables with latin1 charset.  Ok, I go to
the phpmyadmin, and change default charset for the database to
utf8_general_ci. But after runnig the task I have tables with latin1
again.
What can I do for fix it?
With propel I didn't have the problem.

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



[symfony-users] Re: how to pass values to my custom form Widget (one widget for two model-properties). Symfony 1.2

2009-11-16 Thread Don_Busi

Thanx a lot! Works like a charm.

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



[symfony-users] Re: how to pass values to my custom form Widget (one widget for two model-properties). Symfony 1.2

2009-11-16 Thread Martin Ibarra Cervantes

you can setDefault

$form->setDefault('dateRange', 'value');


On Thu, Nov 12, 2009 at 1:14 PM, Don_Busi  wrote:
>
> Hi everybody,
>
> I have an entity that (among other properties) has a "startDate" and
> an "endDate" property. Now I created a form widget that graphically
> shows the date range specified by these two dates.
>
> In my Form class I added my new custom form widget.
>
>>   public function configure()
>>   {
>>    ...
>>     $this->setWidget('dateRange', new stgSeasonWidgetFormInput());
>>    ...
>>   }
>
> and in my Template (showSuccess.php) I display the widget.
>
>> ...
>> 
>> ...
>
> How can I pass the two values (myObject->startDate & myObject-
>>endDate) into my custom widgets "render(...)"-function?
>
> Thanx a lot for you help in advance.
>
> Don_Busi
>
> >
>

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

2009-11-16 Thread Simon

I found what was the problem.

php.ini

upload_max_filesize was at 20m but i never saw post_max_size. it was
at 8m.




On 16 nov, 16:22, Simon  wrote:
> I have a form where I can download a file to the server.
> When I create a new entry or when I change data
> in comics with the form everything works perfectly. I
> discovered an error this week. When I create a new
> entry with a file over 10MB I get an error that tells me
> I can not download the file because it is too big.
> Normal limits in php.ini is a 10mo.
> By cons, when I edit the data with the same file
> over 10mb I get the following error:
>
> 404 | Not Found | sfError404Exception
> Action "nouvelle/1" does not exist.
>
> stack trace
> at ()
> in SF_ROOT_DIR\symfony_lib_1_2\lib\controller\sfController.class.php
> line 202 ...
>         $this->dispatcher->notify(new sfEvent($this,
> 'application.log', array(sprintf('Action "%s/%s" does not exist',
> $moduleName, $actionName;
>
>       }
>
>       throw new sfError404Exception(sprintf('Action "%s/%s" does not
> exist.', $moduleName, $actionName));
>
>     }
>
>     // create an instance of the action
> at sfController->forward('nouvelle', '1')
> in SF_ROOT_DIR\symfony_lib_1_2\lib\controller
> \sfFrontWebController.class.php line 48 ...
> at sfFrontWebController->dispatch()
> in SF_ROOT_DIR\symfony_lib_1_2\lib\util\sfContext.class.php line
> 159 ...
> at sfContext->dispatch()
> in SF_ROOT_DIR\web\backend_dev.php line 13 ...
>
> Does anyone have any idea why. The action is, if I do
> not change the file or try a smaller file while
> working properly.
>
> When this error occurs I have no additions to the log of
> symfony.
>
> 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: Licensing Question / Code ownership

2009-11-16 Thread Alexandru-Emil Lupu
This is a php script. If you want to sell it, you might wanna considering
purchasing a Zend Compiler or whatever the name of that tool is.
You cannot be sure that the Client won't patch it or even sell it further
... but... you might wanna consider 2 things:


provide Sf Hosting for you products:
release the code as is under a BSD / MIT licence ...

Alecs



On Mon, Nov 16, 2009 at 10:39 PM, Richtermeister  wrote:

>
> Let's keep this on topic. Thanks.
>
>
> On Nov 16, 12:18 pm, Gábor Fási  wrote:
> > Quote from the bottom of *every* mail you get from this levlist:
> >
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> >
>


-- 
Have a nice day!
Alecs

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

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



[symfony-users] Does symfony 1.0.21/(propel) generate yml schema files (or only XML)?

2009-11-16 Thread Ari Army
Hey all,
Curious how 1.0 builds yml schema files... I tried running '$symfony
propel-build-schema' and it builds schema.xml by default. The 1.0 Definitive
Guide manual says by default it will generate the yml file (and specifying
'$symfony propel-build-schema xml' builds an xml file) but this seems not to
be the case...

Here is my output of running command

$ symfony10 propel-build-schema
Buildfile:
C:\dev\libs\symfony\symfony10\lib\vendor\propel-generator\build.xml
[resolvepath] Resolved C:\dev\symfony-workspace\myapp/config to
C:\dev\symfony-workspace\myapp\config

propel-project-builder > check-project-or-dir-set:
propel-project-builder > check-project-set:
propel-project-builder > set-project-dir:
propel-project-builder > check-buildprops-exists:
propel-project-builder > check-buildprops-for-propel-gen:
propel-project-builder > check-buildprops:

propel-project-builder > configure:
 [echo] Loading project-specific props from
C:\dev\symfony-workspace\myapp\config/propel.ini
 [property] Loading C:\dev\symfony-workspace\myapp\config\propel.ini

propel-project-builder > creole:
[phing] Calling Buildfile
'C:\dev\libs\symfony\symfony10\lib\vendor\propel-generator\build-propel.xml'
with target 'creole'
[property] Loading
C:\dev\libs\symfony\symfony10\lib\vendor\propel-generator\.\default.properties
propel > creole:
 [echo] +---+
 [echo] |   |
 [echo] | Generating XML from Creole connection !   |
 [echo] |   |
 [echo] +---+
[propel-creole-transform] Propel - CreoleToXMLSchema starting
[propel-creole-transform] Your DB settings are:
... ...
[propel-creole-transform] Writing XML to file:
C:\dev\symfony-workspace\myapp/config/schema.xml
[propel-creole-transform] Propel - CreoleToXMLSchema finished

--~--~-~--~~~---~--~~
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] Save embedded forms at diferent times

2009-11-16 Thread Germana Oliveira

Hi!!

I have to embedded Forms into a main Form, and i have to do this process:

1. Save the embedded  Form number1
2. Save the main Form (the main Form have some Foreing Key from Embedded 
Form number1)
3. Save embedded Form number2 (this embedded Form have some Foreign Key 
from Main Form)

How can i do this???

Can i do something like:  $this->saveEmbeddedForms($con, 
$form['number1']) , where $form is : $this->getEmbeddedForms()  

Thanks

-- 
Germana Oliveira

Correo-e:   germanaoliveirab_at_gmail.com
Blog:   http://slcarabobo.wordpress.com
Usuario Linux : #493487

Carabobo, Venezuela.


--~--~-~--~~~---~--~~
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: My first work with Twig template

2009-11-16 Thread ReynierPM

Davide Borsatto wrote:
> It's just my opinion but...
> Using the templating component in sf 1.X is not a great idea. It
> offers a few advantages, but as far as I've seen it's quite hard to
> implement (it replaces a whole layer of the MVC architecture, it IS a
> big deal) without strange hacks and keeping the code clean.
> 
> IMHO, templates the way we know them are just fine. At least for the
> 1.x releases. Sf 2 will be a MAJOR code rewrite, and it will include
> (I think) Twig and the templating component, for those who don't want
> to forced to use a template language. So just stick with the current
> system, it works just fine :)
> 

I agree with you but I need theming functionalities in my project for 
this I will like to use Twig or some other template library. As far as I 
know Symfony in 1.0.x and 1.2.x branch doesn't supported.

Can any say me if exists another way to do 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] fileUpload error

2009-11-16 Thread Simon

I have a form where I can download a file to the server.
When I create a new entry or when I change data
in comics with the form everything works perfectly. I
discovered an error this week. When I create a new
entry with a file over 10MB I get an error that tells me
I can not download the file because it is too big.
Normal limits in php.ini is a 10mo.
By cons, when I edit the data with the same file
over 10mb I get the following error:

404 | Not Found | sfError404Exception
Action "nouvelle/1" does not exist.

stack trace
at ()
in SF_ROOT_DIR\symfony_lib_1_2\lib\controller\sfController.class.php
line 202 ...
$this->dispatcher->notify(new sfEvent($this,
'application.log', array(sprintf('Action "%s/%s" does not exist',
$moduleName, $actionName;

  }



  throw new sfError404Exception(sprintf('Action "%s/%s" does not
exist.', $moduleName, $actionName));

}



// create an instance of the action
at sfController->forward('nouvelle', '1')
in SF_ROOT_DIR\symfony_lib_1_2\lib\controller
\sfFrontWebController.class.php line 48 ...
at sfFrontWebController->dispatch()
in SF_ROOT_DIR\symfony_lib_1_2\lib\util\sfContext.class.php line
159 ...
at sfContext->dispatch()
in SF_ROOT_DIR\web\backend_dev.php line 13 ...

Does anyone have any idea why. The action is, if I do
not change the file or try a smaller file while
working properly.

When this error occurs I have no additions to the log of
symfony.

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: My first work with Twig template

2009-11-16 Thread Davide Borsatto

It's just my opinion but...
Using the templating component in sf 1.X is not a great idea. It
offers a few advantages, but as far as I've seen it's quite hard to
implement (it replaces a whole layer of the MVC architecture, it IS a
big deal) without strange hacks and keeping the code clean.

IMHO, templates the way we know them are just fine. At least for the
1.x releases. Sf 2 will be a MAJOR code rewrite, and it will include
(I think) Twig and the templating component, for those who don't want
to forced to use a template language. So just stick with the current
system, it works just fine :)

On Nov 16, 2:28 pm, ReynierPM  wrote:
> Davide Borsatto wrote:
> > 1 - This is not Twig, you are using the templating component. Maybe
> > you are using both of them, but I actually don't see any reference to
> > twig in the code
>
> Yes, I have seen this yesterday but anyway it don't work for me maybe
> I'm doing something wrong
>
> > 2 - It's just a typo, but in english "founded" isn't the past for
> > "find". That is "found" :)
>
> Cheers on this too. I speak Spanish and have some little knowledge on
> Enlgish but sometimes I have some mistakes and the people who I'm trying
> to talk help me.
>
> Cheers
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: How to declare an array of input field with sfForm?

2009-11-16 Thread Sid Bachtiar

Hi,

Thanks for all the responses.

In the end I use embedForm :)

On Tue, Nov 17, 2009 at 7:45 AM, Jesse B. Hannah  wrote:
>
> One way to do this is with embedded forms. A good example is available
> at http://trac.symfony-project.org/ticket/4906#comment:13, but here's
> a quick rundown of it:
>
> $form = new sfForm();
> for ($i = 1; $i <= 5; $i++) {
>  $form->widgetSchema[$i] = new sfWidgetFormInputFile();
>  $form->widgetSchema->setLabel($i, 'File ' . $i);
> }
> $this->embedForm('upload', $form);
> $this->widgetSchema->setLabel('upload', 'Upload files');
>
> How this will look in the view (you can use the debug inspector in
> 1.3) is there'll be a field $form['upload'], and then each file widget
> will be $form['upload'][1] through $form['upload'][5]. You can also
> start with just one input widget and then use jQuery to add more input
> widgets to the embedded form (I can't give an example right now
> because I'm still figuring out how to do this).
>
> A couple more pages with some good discussion on embedded forms:
>
> http://blog.barros.ws/2009/01/01/using-embedformforeach-in-symfony-part-ii/
> (focuses on multiple embedded forms using embedFormForEach, but still
> a good overview of the concept)
> http://www.symfony-project.org/blog/2008/11/12/call-the-expert-customizing-sfdoctrineguardplugin
>
> --jbh
>
> Jesse B. Hannah
>
> On Nov 14, 1:02 pm, Sid Bachtiar  wrote:
>> Hi,
>>
>> How to declare an array of input field in sfForm? Is this where
>> embedded form come in?
>>
>> In this case I want to use jquery MultiUpload library but it works by
>> creating upload fields with the same field name, so when the form is
>> uploaded, it will be as array.
>>
>> Cheers,
>>
>> Sid
>> --
>> Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz
>
> >
>



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

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



[symfony-users] Re: Doctrine Query

2009-11-16 Thread Andre Fernandes

I have had the same problem.
The solution in my case was to use no alias in the selected values

example
I had something just as (column names are not those below):

Doctrine_Query::create()->select('c.id as code_value') 

but that give me the same problem.

To solve I had to do:

Doctrine_Query::create()->select('c.id') 

without alias


On 15 nov, 06:28, Murali Krishna B 
wrote:
> Hi all,
>
> Can any one please provide me the solution for this problem?
>
> I am not getting correct results from that query (may be I am doing in a
> wrong way).
>
> Pls help me,
>
> - Murali
>
> On Wed, Nov 11, 2009 at 2:21 PM, Murali Krishna B <
>
> muralikrishna.vi...@gmail.com> wrote:
> > Hi,
>
> > I am looking at a bit complex query.
>
> > From the query I need the following data:
>
> >    For a given Student, the total no of students in each course attended by
> > him. (Many to many relationship between student and course).
>
> >    MySQL query is doing the same. It is collecting course_id's of courses
> > attended by that student(in inner query). For those courses, it is giving
> > count of students.
>
> > Thanks,
>
> > Murali
>
> > On Wed, Nov 11, 2009 at 1:19 PM, Alexandru-Emil Lupu  > > wrote:
>
> >> Hi!
> >> First of all... i think you are doing it wrong ...
>
> >> i guess this " select(course_id as cid,count(*) from sample where
> >> course_id in (select s.course_id from sample s where s.student_id = 1) 
> >> group
> >> by(student_id); "
>
> >> could be written as
>
> >> select course_id as cid,count(*) from sample s where s.student_id = 1;
>
> >> And the dql would be:
>
> >> $rows = Doctrine_Query::create()
>
> >>              ->select('s.course_id as cid,count(*) as num')
> >>              ->from('Sample s')
> >>              ->where('s.student_id = ?', 1)
> >>              ->execute()
> >>              ->getData();
>
> >> what have you done is a little bit more complex (the sql thing)...
>
> >> On Wed, Nov 11, 2009 at 9:20 AM, Murali Krishna B <
> >> muralikrishna.vi...@gmail.com> wrote:
>
> >>> Hi all,
>
> >>> I have a table 'sample' with two columns: course_id and student_id.
>
> >>> It is a many-to-many relationship table between Course and Students.
>
> >>> Now I am facing a problem with Doctrine_Query. I am able to run this
> >>> query in mysql prompt.
>
> >>> select(course_id as cid,count(*) from sample where course_id in (select
> >>> s.course_id from sample s where s.student_id = 1) group by(student_id);
>
> >>> To convert in DQL,
>
> >>> $query = Doctrine_Query::create()
> >>>              ->select('s.course_id as cid,count(*) as num')
> >>>              ->from('Sample s')
> >>>              ->where('s.course_id IN (select t.course_id from Sample t
> >>> where t.student_id = ?)',1)
> >>>              ->groupBy('s.course_id');
>
> >>> $rows = $query->fetchArray();
>
> >>> This Query is always returning a single row, though I am getting many
> >>> rows from mysql query.
>
> >>> --
> >>> Thanks & Regards,
>
> >>> Murali Krishna.B,
>
> >> --
> >> Hawe a nice day!
> >> Alecs
>
> >> As programmers create bigger & better idiot proof programs, so the
> >> universe creates bigger & better idiots!
> >> I am on web:  http://www.alecslupu.ro/
> >> I am on twitter:http://twitter.com/alecslupu
> >> I am on linkedIn:http://www.linkedin.com/in/alecslupu
> >> Tel: (+4)0748.543.798

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



[symfony-users] Re: How to declare an array of input field with sfForm?

2009-11-16 Thread Jesse B. Hannah

One way to do this is with embedded forms. A good example is available
at http://trac.symfony-project.org/ticket/4906#comment:13, but here's
a quick rundown of it:

$form = new sfForm();
for ($i = 1; $i <= 5; $i++) {
 $form->widgetSchema[$i] = new sfWidgetFormInputFile();
 $form->widgetSchema->setLabel($i, 'File ' . $i);
}
$this->embedForm('upload', $form);
$this->widgetSchema->setLabel('upload', 'Upload files');

How this will look in the view (you can use the debug inspector in
1.3) is there'll be a field $form['upload'], and then each file widget
will be $form['upload'][1] through $form['upload'][5]. You can also
start with just one input widget and then use jQuery to add more input
widgets to the embedded form (I can't give an example right now
because I'm still figuring out how to do this).

A couple more pages with some good discussion on embedded forms:

http://blog.barros.ws/2009/01/01/using-embedformforeach-in-symfony-part-ii/
(focuses on multiple embedded forms using embedFormForEach, but still
a good overview of the concept)
http://www.symfony-project.org/blog/2008/11/12/call-the-expert-customizing-sfdoctrineguardplugin

--jbh

Jesse B. Hannah

On Nov 14, 1:02 pm, Sid Bachtiar  wrote:
> Hi,
>
> How to declare an array of input field in sfForm? Is this where
> embedded form come in?
>
> In this case I want to use jquery MultiUpload library but it works by
> creating upload fields with the same field name, so when the form is
> uploaded, it will be as array.
>
> Cheers,
>
> Sid
> --
> Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz

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



[symfony-users] RE: Licensing Question / Code ownership

2009-11-16 Thread Richtermeister

Let's keep this on topic. Thanks.


On Nov 16, 12:18 pm, Gábor Fási  wrote:
> Quote from the bottom of *every* mail you get from this levlist:
>
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.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 retrieve text direction from sfCultureInfo

2009-11-16 Thread Egretta Thula

I want to get the text direction from sfCultureInfo.
The only way I can think of is:

$text_direction = (sfCultureInfo::getInstance($culture)->findInfo
('layout/characters') == "right-to-left")? "rtl" : "ltr";

however, findInfo is protected.

Is there any other way?

Thanks in advance

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



[symfony-users] Re: Problems trying to add a filter to index.php

2009-11-16 Thread Mailo

What about admin generator?
http://www.symfony-project.org/jobeet/1_2/Doctrine/en/12

On Nov 12, 11:50 am, tirengarfio  wrote:
> Yes, its true, sorry...
>
> Here you have my post corrected:
>
> Hi,
>
> im trying to add a filter to the "job/index" action of my module
> "job".
>
> These are my steps:
>
> In the function executeIndex() I have added the line "$this->filtro =
> new
> JobeetJobFormFilter();". This is the final executeIndex() function:
>
>    $this->jobeet_job_list = Doctrine::getTable('JobeetJob')
>     $this->createQuery('a')
>     $this->execute();
>     $this->filtro = new JobeetJobFormFilter();
>
> I have also added these lines to the indexSuccess.php template:
>
> 
> 
>  
>    value="Filtrar" />
>  
> 
>
> And then i have created this method below:
>
> public function executeFilter(sfWebRequest $request)
> {
>   $this->filtro = new JobeetJobFormFilter();
>   $this->consulta = $this->filtro->buildQuery($request->getParameter
> ('jobeet_job_filters'));
>   $this->jobeet_job_list = $this->consulta->execute();
>   $this->setTemplate('index');
>
> }
>
> When i push filter i get this error message below.
>
> 500 | Internal Server Error | Doctrine_Connection_Mysql_Exception
> SQLSTATE[HY093]: Invalid parameter number: number of bound variables
> does not match number of tokens
> stack trace
>
>     * at ()
>       in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/
> lib/vendor/doctrine/Doctrine/Connection.php line 1086 ...
>             1083.
>             1084.         $name = 'Doctrine_Connection_' . $this-
>
> >driverName . '_Exception';
>
>             1085.
>             1086.         $exc  = new $name($e->getMessage(), (int)
> $e-
>
> >getCode());
>
>             1087.         if ( ! isset($e->errorInfo) || ! is_array
> ($e-
>
> >errorInfo)) {
>
>             1088.             $e->errorInfo = array(null, null, null,
> null);
>             1089.         }
>     * at Doctrine_Connection->rethrowException(object('PDOException'),
> object('Doctrine_Connection_Statement'))
>       in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/
> lib/vendor/doctrine/Doctrine/Connection/Statement.php line 253 ...
>              250.         } catch (Doctrine_Adapter_Exception $e) {
>              251.         }
>              252.
>              253.         $this->_conn->rethrowException($e, $this);
>              254.
>              255.         return false;
>              256.     }
>     * at Doctrine_Connection_Statement->execute(array('%fer%', 'month'
> => '', 'day' => '', 'year' => ''))
>       in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/
> lib/vendor/doctrine/Doctrine/Connection.php line 1014 ...
>             1011.         try {
>             1012.             if ( ! empty($params)) {
>             1013.                 $stmt = $this->prepare($query);
>             1014.                 $stmt->execute($params);
>             1015.
>             1016.                 return $stmt;
>             1017.             } else {
>     * at Doctrine_Connection->execute('SELECT p.id AS p__id,
> p.sf_guard_user_id AS p__sf_guard_user_id, p.nombre_apellidos AS
> p__nombre_apellidos, p.sexo AS p__sexo, p.fecha_nac AS p__fecha_nac,
> p.provincia AS p__provincia, p.localidad AS p__localidad, p.email AS
> p__email, p.fotografia AS p__fotografia FROM profile p WHERE
> p.nombre_apellidos LIKE ? AND p.fecha_nac >= ? AND p.fecha_nac <= ?',
> array('%fer%', 'month' => '', 'day' => '', 'year' => ''))
>       in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/
> lib/vendor/doctrine/Doctrine/Query/Abstract.php line 992 ...
>              989.             return $this->_conn->exec($query,
> $params);
>              990.         }
>              991.
>              992.         $stmt = $this->_conn->execute($query,
> $params);
>              993.         return $stmt;
>              994.     }
>  995.
>     * at Doctrine_Query_Abstract->_execute(array('%fer%', 'month' =>
> '', 'day' => '', 'year' => ''))
>       in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/
> lib/vendor/doctrine/Doctrine/Query/Abstract.php line 1036 ...
>             1033.                 $result = $this-
>
> >_constructQueryFromCache($cached);
>
>             1034.             }
>             1035.         } else {
>             1036.             $stmt = $this->_execute($params);
>             1037.
>             1038.             if (is_integer($stmt)) {
>             1039.                 $result = $stmt;
>     * at Doctrine_Query_Abstract->execute()
>       in SF_ROOT_DIR/apps/frontend/modules/profile/actions/
> actions.class.php line 76 ...
>               73. {
>               74.   $this->filtro = new ProfileFormFilter();
>               75.   $this->consulta = $this->filtro->buildQuery
> ($request->getParameter('profile_filters'));
>               76.   $this->profile_list = $this->consulta->execute();
>               77.   $this->setTemplate('index');
>               78. }
>   

[symfony-users] speed of $request->getParameter()

2009-11-16 Thread Michał Piotrowski

Hi,

I'm wondering how fast is $request->getParameter()?

In other words - will this

  public function executeDelete(sfWebRequest $request)
  {
$request->checkCSRFProtection();
$this->username = $request->getParameter('username');
$this->mod = $request->getParameter('mod');

$this->forward404Unless($comment =
Doctrine::getTable('Comment')->find($request->getParameter('id')),
sprintf('Object comment does not exist (%s).',
$request->getParameter('id')));
$comment->delete();

if ($this->mod == 'microblog') {
  $this->redirect('user_microblog_list', array('username' =>
$this->username, 'format' => 'long'));
} elseif ($this->mod == 'blog') {
  $this->redirect('user_blog_list', array('username' =>
$this->username, 'format' => 'long'));
}
  }

be faster than

  public function executeDelete(sfWebRequest $request)
  {
$request->checkCSRFProtection();

$this->forward404Unless($comment =
Doctrine::getTable('Comment')->find($request->getParameter('id')),
sprintf('Object comment does not exist (%s).',
$request->getParameter('id')));
$comment->delete();

if ($request->getParameter('mod') == 'microblog') {
  $this->redirect('user_microblog_list', array('username' =>
$request->getParameter('username'), 'format' => 'long'));
} elseif ($request->getParameter('mod') == 'blog') {
  $this->redirect('user_blog_list', array('username' =>
$request->getParameter('username'), 'format' => 'long'));
}
  }

?

Regards,
Michal

--~--~-~--~~~---~--~~
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 pass values to my custom form Widget (one widget for two model-properties). Symfony 1.2

2009-11-16 Thread Don_Busi

Hi everybody,

I have an entity that (among other properties) has a "startDate" and
an "endDate" property. Now I created a form widget that graphically
shows the date range specified by these two dates.

In my Form class I added my new custom form widget.

>   public function configure()
>   {
>...
> $this->setWidget('dateRange', new stgSeasonWidgetFormInput());
>...
>   }

and in my Template (showSuccess.php) I display the widget.

> ...
> 
> ...

How can I pass the two values (myObject->startDate & myObject-
>endDate) into my custom widgets "render(...)"-function?

Thanx a lot for you help in advance.

Don_Busi

--~--~-~--~~~---~--~~
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: sfValidatorPropelUnique fails on updates - 1.2

2009-11-16 Thread Stefan Paschke

Hi

I just ran into the same problem, and while I found the solution in
this discussion, I think it is not clear enough, so let me repeat
briefly, in case anyone comes across this in the future:

like Richtermeister says, the problem can be solved by adding a
_uniques key to the schema, and using the auto-generated from. If you
do not want to do this, for some reason, you need to add the primary
key of the model to the from as a hidden field, if you are using it
for update actions, like this:

$this->setWidgetSchema(
  new sfWidgetFormSchema(
array(
  "id" => new sfWidgetFormInputHidden(),
  ...
)
  )
);

and:

$this->setValidators(
  array(
"id" => new sfValidatorPropelChoice( array( "model" =>
"Member", "column" => "id", "required" => false ) ),
  )
);

so basically you are passing the primary key as a hidden value. This
seems odd, because the form will know the difference between insert
and update and behave correctly without doing this, yet somehow the
sfValidatorPropelUnique doesn't.

best wishes

Stefan


> On Sep 12, 7:09 pm, Richtermeister  wrote:
>
> > Hey Ben,
>
> > no, your first version is right. You only need to pass model and
> > column.
> > The object that your form is updating needs to have a primary key set
> > though, in order to be considered anupdate. otherwise it will be
> > considered new and theupdatewill fail.
>
> > In the most basic propel form setup none of this should be an issue,
> > since auto-generated forms are doing this just fine by themselves. Try
> > adding a _uniques: key to the schema and add your field there, this
> > will build the post validator straight into your base form.
>
> > Or post your entire configure/setup function if nothing else helps :)
>
> > Have a great day,
> > Daniel
> > > > > On Mar 11, 3:50 am, Benjamin  wrote:
>
> > > > > > The code is below.  I have been searching for hours.  This is 
> > > > > > failing
> > > > > > on updates, saying that the user name has already been taken.  It's
> > > > > > being used as a post validator.
>
> > > > > > newsfValidatorPropelUnique(
> > > > > >     array(
> > > > > >         'model'         => 'Members',
> > > > > >         'column'        => array('user_name'),
> > > > > >     ),
> > > > > >     array(
> > > > > >         'invalid'       => 'This user name has already been taken',
> > > > > >     )),

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



[symfony-users] Re: Problems trying to add a filter to index.php

2009-11-16 Thread Mailo

It seems to me like you try to do admin module without admin-
generator. Why?

Lets see admin generator if it could be what would you like to do( the
module )

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


On Nov 11, 8:48 pm, tirengarfio  wrote:
> Hi,
>
> im trying to add a filter to an index.php page of my module "job".
>
> These are my steps:
>
> In the index.php function I have added the line "$this->filtro = new
> JobeetJobFormFilter();". This is the final index.php file:
>
>    $this->jobeet_job_list = Doctrine::getTable('JobeetJob')
>     $this->createQuery('a')
>     $this->execute();
>     $this->filtro = new JobeetJobFormFilter();
>
> I have also added these lines to the indexSuccess.php template:
>
> 
> 
>  
>    value="Filtrar" />
>  
> 
>
> And then i have created this method below:
>
> public function executeFilter(sfWebRequest $request)
> {
>   $this->filtro = new JobeetJobFormFilter();
>   $this->consulta = $this->filtro->buildQuery($request->getParameter
> ('jobeet_job_filters'));
>   $this->jobeet_job_list = $this->consulta->execute();
>   $this->setTemplate('index');
>
> }
>
> When i push filter i get this error message below.
>
> 500 | Internal Server Error | Doctrine_Connection_Mysql_Exception
> SQLSTATE[HY093]: Invalid parameter number: number of bound variables
> does not match number of tokens
> stack trace
>
>     * at ()
>       in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/
> lib/vendor/doctrine/Doctrine/Connection.php line 1086 ...
>             1083.
>             1084.         $name = 'Doctrine_Connection_' . $this->driverName 
> . '_Exception';
>
>             1085.
>             1086.         $exc  = new $name($e->getMessage(), (int) 
> $e->getCode());
>
>             1087.         if ( ! isset($e->errorInfo) || ! 
> is_array($e->errorInfo)) {
>
>             1088.             $e->errorInfo = array(null, null, null,
> null);
>             1089.         }
>     * at Doctrine_Connection->rethrowException(object('PDOException'),
> object('Doctrine_Connection_Statement'))
>       in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/
> lib/vendor/doctrine/Doctrine/Connection/Statement.php line 253 ...
>              250.         } catch (Doctrine_Adapter_Exception $e) {
>              251.         }
>              252.
>              253.         $this->_conn->rethrowException($e, $this);
>              254.
>              255.         return false;
>              256.     }
>     * at Doctrine_Connection_Statement->execute(array('%fer%', 'month'
> => '', 'day' => '', 'year' => ''))
>       in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/
> lib/vendor/doctrine/Doctrine/Connection.php line 1014 ...
>             1011.         try {
>             1012.             if ( ! empty($params)) {
>             1013.                 $stmt = $this->prepare($query);
>             1014.                 $stmt->execute($params);
>             1015.
>             1016.                 return $stmt;
>             1017.             } else {
>     * at Doctrine_Connection->execute('SELECT p.id AS p__id,
> p.sf_guard_user_id AS p__sf_guard_user_id, p.nombre_apellidos AS
> p__nombre_apellidos, p.sexo AS p__sexo, p.fecha_nac AS p__fecha_nac,
> p.provincia AS p__provincia, p.localidad AS p__localidad, p.email AS
> p__email, p.fotografia AS p__fotografia FROM profile p WHERE
> p.nombre_apellidos LIKE ? AND p.fecha_nac >= ? AND p.fecha_nac <= ?',
> array('%fer%', 'month' => '', 'day' => '', 'year' => ''))
>       in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/
> lib/vendor/doctrine/Doctrine/Query/Abstract.php line 992 ...
>              989.             return $this->_conn->exec($query,
> $params);
>              990.         }
>              991.
>              992.         $stmt = $this->_conn->execute($query,
> $params);
>              993.         return $stmt;
>              994.     }
>  995.
>     * at Doctrine_Query_Abstract->_execute(array('%fer%', 'month' =>
> '', 'day' => '', 'year' => ''))
>       in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/
> lib/vendor/doctrine/Doctrine/Query/Abstract.php line 1036 ...
>             1033.                 $result = 
> $this->_constructQueryFromCache($cached);
>
>             1034.             }
>             1035.         } else {
>             1036.             $stmt = $this->_execute($params);
>             1037.
>             1038.             if (is_integer($stmt)) {
>             1039.                 $result = $stmt;
>     * at Doctrine_Query_Abstract->execute()
>       in SF_ROOT_DIR/apps/frontend/modules/profile/actions/
> actions.class.php line 76 ...
>               73. {
>               74.   $this->filtro = new ProfileFormFilter();
>               75.   $this->consulta = $this->filtro->buildQuery
> ($request->getParameter('profile_filters'));
>               76.   $this->profile_list = $this->consulta->execute();
>               77.   $t

[symfony-users] Re: Overwrite Security Actions Settings

2009-11-16 Thread XAH

My english is not good enough but i'll try to tell about some usefull
concepts in symfony (i'm symfony developer for the last almost 3
years).

Module in application is the thing that do some determinate work in
application (set of actions). For example, security module - do login
and logout stuff. Application - set of modules that provide
determinate context. IMHO in one context cannot be more than one
different ways to decide how to authorize users. So, the question that
must worry you is not "how to use different login modules" but "why do
you want to use different login modules"

On 12 ноя, 00:30, jp  wrote:
> Hi,
>
> security actions are defined in apps/myapp/settings.yml
> Is it possible to overwrite those settings for a module
> so I can have different login modules etc. ?
> I tried settings.yml and app.yml in mymodule/config
> containing
>
> all:
>    .actions:
>      login_module:           xyz
>      login_action:           xyz
>      secure_module:          xyz
>      secure_action:          xyz
>
> With no success. Do you have any ideas?
>
> Thank you!
> Jan

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



[symfony-users] sfguard automatic authentication

2009-11-16 Thread Hofferek Attila

Dear users,

If I have a user ID, how can I programatically make the user autheticated?
Thanks in advance
-- 
Hofferek Attila

--~--~-~--~~~---~--~~
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] Complex redirect with 301 status

2009-11-16 Thread domnuprofesor

Hi there!

I'm switching a website to symfony that has over 180k pages indexed by
google.
Each page need quite a bit of server logic to redirect to the new
pages.
My problem is that I'm not sure I'm doing things write (and fast) in
symfony.
Would you please let me know if this is ok?

this is how I do it (symfony 1.2.9)

sfContext::getInstance()->getConfiguration()->loadHelpers(array
('Url'));
$this->getResponse()->setStatusCode('301', 'Moved Permanently');

...logic: find the new route based on some parameters...

$this->getResponse()->setHttpheader('Location', url_for('@new_route');

return sfView::NONE;

I see that in the firebug reports the header 301, so I think this is
ok.
I look forward for your responses.

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] how to pass values to my custom form Widget (one widget for two model-properties). Symfony 1.2

2009-11-16 Thread Don_Busi

Hi,

I have an entity that (among other properties) has a "startDate" and
an "endDate" property. Now I created a form widget that graphically
shows the date range specified by these two dates.

In my Form class I added my new custom form widget.

  public function configure()
  {
   ...
$this->setWidget('dateRange', new stgSeasonWidgetFormInput());
   ...
  }

and in my Template (showSuccess.php) I display the widget.

...

...

How can I pass the two values (myObject->startDate & myObject-

>endDate) into my custom widgets "render(...)"-function?

Thanx a lot for you help in advance.
Don_Busi

--~--~-~--~~~---~--~~
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 disable the admin generator cache?

2009-11-16 Thread zven

Hi!
Does anybody know how to disable the admin generator cache? At the
moment I have to call the clear-cache command each time.

Thanks, Sven

--~--~-~--~~~---~--~~
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] sfDoctrinePlugin one2many admin generation

2009-11-16 Thread Gatos
Hello

I was downgrading symfony from 1.1(because it's deprecated) to 1.0 and I
found that doctrine-admin-generate doesn't work for some reason, one-to-many
replation ships are not shown.

What could be the cause of the problem?


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: should this be considered a Symfony bug?

2009-11-16 Thread theredled

Probably the result of a comparison between a string and true, which
returns true...

The cause of this is more PHP itself :D

On 10 nov, 20:20, larry  wrote:
> When forcing a return from an action method (usually to end execution)
> one has to write:
>
> return sfView::SUCCESS;
>
> But I stupidly wrote:
>
> return true;
>
> I then got a blank white screen with no error. Even when I was looking
> at the dev controller, I still got no error. If the problem is that
> Symfony goes off looking for a template that doesn't exist, shouldn't
> there be an error that says so?
>
> I wasted 10 minutes troubleshooting before I realized my mistake.

--~--~-~--~~~---~--~~
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: my solution for i18n forms

2009-11-16 Thread theredled

Why don't you just unset() unused fields in FirmForm and
FirmTranslationForm ?

On 9 nov, 10:42, dziobacz  wrote:
> Creating i18n forms with only some fields from table isn't possible so
> I give You my idea :)
>
> I have schema.yml:
> Firm:
>   actAs:
>     I18n:
>       fields: [description, address]
>   columns:
>     id_firm:
>       type: integer(1)
>       primary: true
>       autoincrement: true
>     email:
>       type: string(100)
>       notnull: true
>     description:
>       type: clob
>       notnull: true
>     address:
>       type: clob
>
> I would like to create first form with only fields 'email' from table
> Firm and 'address' from table Firm_translation (without field
> 'description') so we must create action for example for edit in which
> we get information about firm and pass it to the form, after submit we
> take values from the form and save it:
>   public function executeEdit_contact(sfWebRequest $request)
>   {
>         $firma = Doctrine::getTable('Firm')->find($this->id_firm);
>
>         $this->form = new ContactForm(null, array('firm' => $firm));
>         if ($request->isMethod('post'))
>        {
>             $this->form->bind($request->getParameter($this->form->getName
> ()));
>             if ($this->form->isValid())
>             {
>                 $email = $this->form->getValue('email');
>                 $contact_pl = $this->form->getValue('contact_pl');
>                 $contact_en = $this->form->getValue('contact_en');
>
>                 
> Doctrine::getTable('Firm')->actualizationContactFirm($this->id_firm,
> $email, $contact_pl, $contact_en);
>             }
>         }
>   }
>
> Next create 2 fields per one i18n field - example:
> class ContactForm extends sfForm
> {
>   public function configure()
>   {
>         $this->widgetSchema['email'] = new sfWidgetFormInput();
>         $this->widgetSchema['contact_pl'] = new sfWidgetFormTextarea();
>         $this->widgetSchema['contact_en'] = new sfWidgetFormTextarea();
>
>         $firma = $this->getOption("firm"); //get array from the action
>
>         $this->setDefault('email', $firm['email']);
>         $this->setDefault('contact_pl', $firm['Translation']['pl']
> ['contact']);
>         $this->setDefault('contact_en', $firm['Translation']['en']
> ['contact']);
>
>         $this->setValidators(array(
>           'email' => new sfValidatorEmail(array('max_length' => 100, 'trim'
> => true)),
>
>           'contact_pl' => new sfValidatorString(array('min_length' =>
> 5, 'max_length' => 100, 'trim' => true)),
>
>           'contact_en' => new sfValidatorString(array('min_length' => 5,
> 'max_length' => 100, 'trim' => true)),
>         ));
>
>         $this->widgetSchema['contactt_pl']->setAttribute('rows', 20);
>         $this->widgetSchema['contact_pl']->setAttribute('cols', 70);
>
>         $this->widgetSchema['contact_en']->setAttribute('rows', 20);
>         $this->widgetSchema['contact_en']->setAttribute('cols', 70);
>
>         $this->widgetSchema->setNameFormat('data[%s]');
>   }
>
> }
>
> And queries:
> class FirmTable extends Doctrine_Table
> {
>   public function actualizationContactFirm($id_firm, $email,
> $contact_pl, $contact_en)
>   {
>         Doctrine_Query::create()
>           ->update('Firm')
>           ->set('email', '?', $email)
>           ->where('id_firm = ?', $id_firm)
>           ->execute();
>
>         Doctrine_Query::create()
>           ->update('FirmTranslation')
>           ->set('contact', '?', $contact_pl)
>           ->where('lang = ?', 'pl')
>           ->andWhere('id_firm = ?', $id_firm)
>           ->execute();
>
>         Doctrine_Query::create()
>           ->update('FirmTranslation')
>           ->set('contact', '?', $contact_en)
>           ->where('lang = ?', 'en')
>           ->andWhere('id_firm = ?', $id_firm)
>           ->execute();
>   }
>
> }
>
> I think this is the best solution, unfortunately we have many repeat
> code but I think we can't write it easier:(

--~--~-~--~~~---~--~~
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] Picotea.com, new microblogging site developed with Symfony

2009-11-16 Thread Frontelo

Hi. I would like to talk to you about Picotea.com, a new microblogging
site that we have developed using Symfony Framework.
Picotea is a microblogging site with added value features like groups,
events, conversation threads and much more. We have also developed a
connection with Twitter.

Here you have some introduction videos (in Spanish):

Picotea introduction:
http://www.youtube.com/watch?v=_b4TsB8lROE
Posting with groups and events:
http://www.youtube.com/watch?v=FO2HFoHLLsU
Twitter sync:
http://www.youtube.com/watch?v=AMuSCudyRhY

Moreover, Picotea's Symfony group address:
http://picotea.com/es/grupos/symfony-project-e525

We would be pleased having you here.

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

2009-11-16 Thread Fabian Lange

Hi Sid,
there is no branch yet because there is still heavy development of 1.3 :)

the deprecations are listed here:
http://www.symfony-project.org/tutorial/1_3/en/deprecated

Fabian

On Tue, Nov 10, 2009 at 10:54 PM, Sid Bachtiar  wrote:
>
> Hi,
>
> I want to use 1.4 but I can not find the branch in the SVN? From
> reading around seems it is just 1.3 minus deprecated features, so
> where can I read the list of deprecated features?
>
> Cheers,
>
> Sid
> --
> Blue Horn Ltd - System Development
> http://bluehorn.co.nz
>
> >
>

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



[symfony-users] Create form manually, but add csrf-token?

2009-11-16 Thread Sebastian Göttschkes

Hello,

I'm a bit lost here as I try to create a form manually.

My goal is this: I want to add a login form to every page within the
project. So I added this form (written manually) to the layout.php,
which works ok! When I send the login-form, symfony handels the
request ok and uses the correct module and action, but struggles as
there is no csrf-token present (which is obvious, as I didn't add
one).

Can anybody help me out how to solve this problem?

Regards,
Sebastian

--~--~-~--~~~---~--~~
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] Performance : sfSuperCachePlugin, sfOptimizerPlugin - Where are they now ?

2009-11-16 Thread theredled

Hi,

I was reading "Performance" chapter of the "definitive guide" for
Symfony 1.2 ( http://www.symfony-project.org/book/1_2/18-Performance )

In opposition to what is said there, sfSuperCachePlugin,
sfOptimizerPlugin, sfErrorLoggerPlugin plugins, which seem very
important for that part, are not available anymore for Symfony 1.2.

Why ?

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] How to test cache in functional test

2009-11-16 Thread Alex Morales

Hi,
 I try test cache in a functional test, i follow instructions in the
symfony book, i actived the cache in test environment,
  but when i run the test, the cache is not generated, and the test
always fail.

--~--~-~--~~~---~--~~
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] Suggestion about template naming ".php"

2009-11-16 Thread Frosty

Hi,


I'm currently realizing that through my Symfony development
experience, I've nearly *never* used :

- 404 redirects ($this->redirect404Unless... etc) because 404 errors
seem too confusing for developers and users (I prefer to send the user
to its original action with a "gentle" message, than in a "dead end").

- return sfView::SUCCESS / sfView::ERROR : as well, "flashing" the
user about the problem is nearly always enough.

For that second point, it leads me to think that always adding
"...Success" at the end of templates names does not worths the effort.
Template names could simply be "index.php", "create.php", "list.php"
etc. like for partials...

Creating and reading actions filenames is not a difficult but quite
frequent task, and sometimes I find writing endlessly "...Success"
being a pure time loss.

Am I alone to only use the "success" templates ?
Could it be interesting that Symfony automatically checks for both an
".php" file and a ".php" file ?


Regards,
Maxime

--~--~-~--~~~---~--~~
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] probleme avec propel et initialisation

2009-11-16 Thread taha

j'arrive pas a comprendre ce type d'erreur:
500 | Internal Server Error | PDOException
SQLSTATE[42000]: Syntax error or access violation: 1115 Unknown
character set: 'utf-8'

stack trace
at ()
in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfPropelPlugin\lib\vendor
\propel\util\DebugPDO.php line 166 ...
at PDO->exec('SET NAMES 'utf-8'')
in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfPropelPlugin\lib\vendor
\propel\util\DebugPDO.php line 166 ...
at DebugPDO->exec('SET NAMES 'utf-8'')
in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfPropelPlugin\lib\vendor
\propel\adapter\DBAdapter.php line 123 ...
at DBAdapter->setCharset(object('DebugPDO'), 'utf-8')
in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfPropelPlugin\lib\vendor
\propel\adapter\DBAdapter.php line 100 ...
at DBAdapter->initConnection(object('DebugPDO'), array('charset' =>
array('value' => 'utf-8'), 'queries' => array()))
in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfPropelPlugin\lib\vendor
\propel\Propel.php line 629 ...
at Propel::initConnection(array('dsn' =>
'mysql:host=localhost;dbname=test_projet', 'user' => 'root',
'password' => 'iway', 'classname' => 'DebugPDO', 'options' => array
('ATTR_PERSISTENT' => 1), 'settings' => array('charset' => array
('value' => 'utf-8'), 'queries' => array())), 'propel')
in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfPropelPlugin\lib\vendor
\propel\Propel.php line 523 ...
at Propel::getConnection('propel', 'write')
in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfPropelPlugin\lib\vendor
\propel\Propel.php line 538 ...
at Propel::getConnection('propel', 'read')
in SF_ROOT_DIR\lib\model\om\BaseQuestionPeer.php line 290 ...
at BaseQuestionPeer::doSelectStmt(object('Criteria'), null)
in SF_ROOT_DIR\lib\model\om\BaseQuestionPeer.php line 265 ...
at BaseQuestionPeer::doSelect(object('Criteria'))
in SF_ROOT_DIR\apps\frontend\modules\question\actions
\actions.class.php line 15 ...
at questionActions->executeIndex(object('sfWebRequest'))
in SF_ROOT_DIR\lib\vendor\symfony\lib\action\sfActions.class.php line
60 ...
at sfActions->execute(object('sfWebRequest'))
in SF_ROOT_DIR\lib\vendor\symfony\lib\filter
\sfExecutionFilter.class.php line 90 ...
at sfExecutionFilter->executeAction(object('questionActions'))
in SF_ROOT_DIR\lib\vendor\symfony\lib\filter
\sfExecutionFilter.class.php line 76 ...
at sfExecutionFilter->handleAction(object('sfFilterChain'), object
('questionActions'))
in SF_ROOT_DIR\lib\vendor\symfony\lib\filter
\sfExecutionFilter.class.php line 42 ...
at sfExecutionFilter->execute(object('sfFilterChain'))
in SF_ROOT_DIR\lib\vendor\symfony\lib\filter\sfFilterChain.class.php
line 53 ...
at sfFilterChain->execute()
in SF_ROOT_DIR\lib\vendor\symfony\lib\filter\sfCommonFilter.class.php
line 29 ...
at sfCommonFilter->execute(object('sfFilterChain'))
in SF_ROOT_DIR\lib\vendor\symfony\lib\filter\sfFilterChain.class.php
line 53 ...
at sfFilterChain->execute()
in SF_ROOT_DIR\lib\vendor\symfony\lib\filter
\sfRenderingFilter.class.php line 33 ...
at sfRenderingFilter->execute(object('sfFilterChain'))
in SF_ROOT_DIR\lib\vendor\symfony\lib\filter\sfFilterChain.class.php
line 53 ...
at sfFilterChain->execute()
in SF_ROOT_DIR\lib\vendor\symfony\lib\controller
\sfController.class.php line 245 ...
at sfController->forward('Question', 'index')
in SF_ROOT_DIR\lib\vendor\symfony\lib\controller
\sfFrontWebController.class.php line 48 ...
at sfFrontWebController->dispatch()
in SF_ROOT_DIR\lib\vendor\symfony\lib\util\sfContext.class.php line
159 ...
at sfContext->dispatch()
in SF_ROOT_DIR\web\frontend_dev.php line 13 ...
symfony settings ...
request ...
response ...
user ...
global vars ...
symfony v.1.2.9 - php 5.2.6
for help resolving this issue, please visit http://www.symfony-project.org/.

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



[symfony-users] Enhancement suggestions for "flash messages"

2009-11-16 Thread Frosty

Hi,

Sometimes I feel limited by "flash messages", as I found developers to
write code such as :

(in action context)
$this->getUser()->setFlash('success', 'Update successful');
...
$this->getUser()->setFlash('error', 'An error has occured... ');
...
$this->getUser()->setFlash('info', $sn_results.'results found');

etc.

(in top of many templates)
hasFlash('success')): ?>
  getFlash('success') ?>

hasFlash('error')): ?>
  getFlash('error') ?>

hasFlash('info')): ?>
  getFlash('info') ?>


In the templates, there is obviously code repetition.

Even worse, imagine that you want to "flash" the user with two error
messages, you have to do some ugly tricks such as :
$this->getUser()->setFlash('error_xxx', 'An error XXX has occured...
');
$this->getUser()->setFlash('error_yyy', 'An error XXX has occured...
');

BTW, I've found the chosen word "flash" a bit confusing (clearly with
Adobe's Flash technology), especially for web searches.


So I've ended up by writing my own "custom" flash messaging, storing
messages in a simple array, allowing me to do things such as :

(action)
$this->getUser()->addNote('error', 'An error has occured');
...
$this->getUser()->addNote('success', 'Update successful');
...

(template)
use_helper('Notes');
get_user_notes();

=> get_user_notes() generates the HTML  for
each message, and empties the message array from the user session.

Could Symfony users / developers be interested by this approach ? Do
you think that this kind of behavior be available in future Symfony
versions ?

Regards,
Maxime

--~--~-~--~~~---~--~~
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] Clarifying the "module naming policy" for beginners

2009-11-16 Thread Frosty

Hello,

It's quite obvious that modules are most of the time the names of the
application "concepts" (as well as DB table names).

Simple examples :
- "ticket", "project", "user", ... for a ticket tracker
- "website", "page", "language", "user", ... for a CMS
- "product", "company", "customer", "order", ... for an ERP
etc.

This is clearly shown here : 
http://www.symfony-project.org/book/1_2/14-Generators
> symfony propel-generate-crud myapp article Article

or here : http://www.symfony-project.org/book/1_0/14-Generators
> php symfony propel:generate-admin backend BlogArticle --module=article

When you create a module with the CRUD or admin generator, the module
name is nearly always the DB object name.

I didn't see any "guideline" for the beginner on how to name modules
until chapter 14, but in my opinion this is quite important. Maybe we
should tell how modules should be named here (chapter 4) :
http://www.symfony-project.org/book/1_2/04-The-Basics-of-Page-Creation

Is "module naming" clear enough for you, especially when you began to
use Symfony ?

Regards,
Maxime

--~--~-~--~~~---~--~~
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: form->Render() when embedding?

2009-11-16 Thread kowal grzes
In view file:
foreach($form->getEmbeddedForms() as $formName => $embeddedForm)
{
 and here you just render it or use partial here.
}

--~--~-~--~~~---~--~~
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() - using ajax to delete posts

2009-11-16 Thread kowal grzes
>
>
> I added this helper in my partial. Still not working :(
>
> But what is happening?
Link is generated? Maybe put some code from page source here so we can see
what was generated by this tag.

--~--~-~--~~~---~--~~
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() - using ajax to delete posts

2009-11-16 Thread kowal grzes
If link is created then use FireBug to check where is problem.
You can check if request is sent and what came in response.

--~--~-~--~~~---~--~~
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: form->Render() when embedding?

2009-11-16 Thread Antoine S.

Hi,

I wrote a function that I use quiet often. It displays the php code to
decompose a form.
It might help with the embed form, the i18n and the hidden field :

class myTools{

  public static function getFormFields( $form )
  {
self::__getFormFields($form);
  }

  private static function __getFormFields( $form, $indent = 0, $embed
= '' ) {
if( get_class($form) == 'sfFormFieldSchema' ) {
  $schema = $form;
}else {
  $schema = $form->getFormFieldSchema();
}

foreach( $schema as $key=>$form_field ) {
  if( get_class($form_field) != 'sfFormFieldSchema' ) {
if( $form_field->isHidden() ) {
  echo htmlentities('render(); ?>').'';
}else {
  echo htmlentities('renderRow(); ?>').'';
}
  }else {
$key = ($key == sfContext::getInstance()->getUser()->getCulture
()) ?  '$sf_user->getCulture()' : "'".$key."'";
self::__getFormFields($form_field, $indent+1, $embed.'['.
$key.']');
  }
}
  }
}

and then
myTools::getFormFields($form);

Antoine
doubleclique.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: a menu for my project

2009-11-16 Thread Antoine S.

Hi,

I use the sfUnobstrusiveWidgetPlugin.
There is a config file : config/sfUoAdminMenu.yml
with the routes of the menu and the credentials for each one.

Once the plugin is installed :
$this->widget = new sfUoWidgetAdminMenu(array(
  'js_transformer' => 'drop_down'
));

Antoine
doubleclique


--~--~-~--~~~---~--~~
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 view.yml settings?

2009-11-16 Thread Sebastian Göttschkes

Hi,

I'm new to symfony, but it all looks very nice :-)

Now I got my first problem I cannot solve using google. I want to add
some configuration settings to the view.yml. This task itself is no
problem, but I cannot access this settings.

My goal ist to add a configuration, which navigation element should be
shown as active, and read this in the view to set the correct css-
class. So my idea was to add the view.yml to the config-folder within
every module to overrite the basic view.yml-settings regarding the
active navigation.

Maybe there is another way to do this or maybe there is standard way
to solve this problem?

Thanks for your help,

Sebastian

--~--~-~--~~~---~--~~
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] Performance : sfSuperCachePlugin, sfOptimizerPlugin - Where are they now ?

2009-11-16 Thread theredled

Hi,

I was reading "Performance" chapter of the "definitive guide" for
Symfony 1.2 ( http://www.symfony-project.org/book/1_2/18-Performance )

In opposition to what is said there, sfSuperCachePlugin and
sfOptimizerPlugin are not available anymore for Symfony 1.2.

So the question is : why ?

Is Symfony 1.2 not as keen on performance as 1.0 was ?
Are those plugins useless now and if yes, why ?

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

2009-11-16 Thread Nuno Santos
Hi,

I'm having trouble installing  sfAssetsLibraryPlugin. When I execute  
the following task:

symfony asset:create-root

Tells me that the task isn't defined!!

Its being very hard to install this plugin, either in 1.0 or 1.2

I checked out the svn 1.2 branch to the plugins directory and followed  
precisly every single instruction of installation present in the  
respective README. I end up with that error.

I have also tried the other "easier" way of installation but the  
server it contacts fails to get the dependencies list of the plugin.  
Wrong server? Server down? Don't know :S

Ayn tips would be wonderfull

Thanks,

With my best regards,

Nuno
--~--~-~--~~~---~--~~
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] sfAssetsLibraryPlugin installation problems

2009-11-16 Thread sinosoidal

Hi,

I'm having a problem executing the last task of the instalation
instructions of sfAssetsLibraryPlugin

symfony asset:create-root

Tells me that the task isn't defined!!

Its being very hard to install this plugin, either in 1.0 or 1.2

Is always something failing. The automatic install doesnt work. I had
to make a svn checkout. It says to publish the plugin and the final
listing of the command doesnt show the sfAssetsPlugin and when making
the last operation to create the assets roots tells the shown
above...

Does anybody has any idea of what is going on?

Thanks,

Nuno

--~--~-~--~~~---~--~~
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 1.3 and propel behaviors

2009-11-16 Thread Boo_boo

hello
are there any documentation about adding propel builder behaviors in 
propel1.4/symfony1.3?
i need to add a method to retrieve primary keys by criteria to all of the 
objPeer classes,
propel docs says that is possible with staticMethods() and there is 
SoftDeleteBehavior bundled with propel which does simslar thing.
the problem is that i dont know what is the standard way to add the custom 
propel behavior in symfony 1.3 application.

-- 
With best regards,
Boo-boo

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



[symfony-users] doctrine wrong request sfguard plugin

2009-11-16 Thread djey

Hi all,

I'm new in symfony developping and i've got a problem about sfguard
plugin doctrine.

I've tuned my login page but I think Doctrine makes a wrong request:

SELECT  a.* FROM (SELECT  s.id AS  s__id, s.username AS  s__username,
s.algorithm AS  s__algorithm, s.salt AS  s__salt, s.password AS
s__password, s.is_active AS  s__is_active, s.is_super_admin AS
s__is_super_admin, s.last_login AS  s__last_login, s.created_at AS
s__created_at, s.updated_at AS  s__updated_at FROM sf_guard_user s
WHERE s.username = ?) a WHERE ROWNUM <= 1 - (djey )

when I execute this request in toad, of course it doesn't 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] Paypal plugin configuration options

2009-11-16 Thread Mathieu Brethes

Hi,

I have to integrate the Paypal plugin into an existing Symfony
application, replacing a custom payment solution. The original
developer wrote three actions for managing payment success, failure,
and IPN validation.

At the moment the sfPaymentPayPal plugins calls /sfPaymentPayPal/
failure or other returns that are stored inside the /plugins/
sfPaymentPayPalPlugin/modules/sfPaymentPayPal/ directories.

So that means if I want to modify the return calls I need to change
the code inside this directory, which poses the problem of plugin
upgrades... I was thinking it could be nice to have configuration
options to redirect the returns to other actions. I'm imagining
something like this:

In /plugins/sfPaymentPayPalPlugin/config/app.yml there would be the
following:

default:
  sf_payment_paypal_plugin:
return_action: /sfPaymentPayPal/transactionCompleted

And this could be overriden in the project's app.yml file in /apps/
frontend/config/app.yml:

all:
  sf_payment_paypal_plugin:
return_action: /myOldPaymentSystem/paymentOK

Or something like that.

Any thoughts or comments on this would be very welcome :-).

Cheers,

mathieu

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

2009-11-16 Thread alexs

Does anybody know when Fabien is planning to release Request Handler
component? Is there a svn repository for this component?

--~--~-~--~~~---~--~~
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] Edit yaml files from a form

2009-11-16 Thread flopezlosada

Hello
I'm trying to modify .yml configuration files via  form in the
backend.
with the libraries sfYml yml file convert it into an array,
but then to turn it into a form for an administrator
change it I'm lost.
someone has done something similar?
thank you very much
greetings

--~--~-~--~~~---~--~~
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 BugHuntDay - Who 's coming?

2009-11-16 Thread Fabian Lange

I will be there.
And there are no flights London - Antwerp?
Fabian

On Thu, Nov 5, 2009 at 12:49 PM, Lee Bolding  wrote:
>
> I'd have come, had been at Sensio - Paris from London is fairly easy
> on the train, but Belgium isn't :-/
>
> Oh well... I'll probably see you all at Symfony Live though :)
>
> On 5 Nov 2009, at 11:03, Grubolsch wrote:
>
>> I will be coming, although my skill in Symfony isn't that good yet,
>> I hope to learn a lot from the masters. ;-)
>>
>> 2009/11/5 James Cauwelier 
>>
>> Dear colleagues,
>>
>>
>> I am writing this message to poll who 's coming to the Symfony
>> BugHuntDay.  This will be a good opportunity to give back to the
>> community and to meet the core dev team.  I 'll be there and hope to
>> see you there as well.
>>
>> Unfortunately, I am having neck and shoulders problems which limits my
>> computer time, however I 'll be there to help others to find their way
>> into Symfony.  So don 't be afraid to invite others that don 't know a
>> thing about Symfony.  I 'll personally see to it that they 'll grasp
>> the basics, while fixing some bugs on the way.
>>
>> Here is the announcement:
>>
>> http://www.symfony-project.org/blog/2009/10/25/announcing-symfony-bughuntday
>>
>>
>> I hope to see you all there.
>>
>>
>> James Cauwelier
>>
>>
>>
>>
>>
>>
>> --
>> Koen "Grubolsch" Eelen
>>
>> >
>
>
> >
>

--~--~-~--~~~---~--~~
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 with sfWidgetFormInputSWFUploadPlugin and admin generator

2009-11-16 Thread galthron

hello arnold.
can you give me a solution for redirecting to  "login page" becouse
i`ve got the same problem. And can you write some solutions for the
rest of the problems with sfWidgetFormInputSWFUploadPlugin.
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: sfThumbnailPlugin - maximum size image

2009-11-16 Thread Greg Quat
Hi,

Maybe you can use

$thumbnail = new sfThumbnail(150, 150,true, false);

The third parameter is for keeping the same proportions as the original
picture, and the fourth parameter is to allow or not the inflation.
I am not sure because I didn't test but it's what I understood reading the
plugin documentation.

Greg

2009/11/3   

>
> I want that image can has maximum size 150x150 px so I make:
> $thumbnail = new sfThumbnail(150, 150);
> and everything is ok when image is bigger than 150x150.
>
> But when image has size for example 20x20 px, it is converted to size
> 150x150 px !!! In that case image should have 20x20 px - how can I do
> that when image is smaller ??
>
> >
>

--~--~-~--~~~---~--~~
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 build-schema // Fatal error: Cannot instantiate interface Platform

2009-11-16 Thread YouGo

Bonjour ( ou bonsoir pour certains :-)

J'ai eu la désagréable surprise au moment de lancer un propel:build-
schema d'avoir l'erreur suivante :

Fatal error: Cannot instantiate interface Platform in /usr/local/src/
workspace-projects/test/lib/symfony/plugins/sfPropelPlugin/lib/vendor/
propel-generator/classes/propel/engine/GeneratorConfig.php on line 157

J'ai tenté un svn merge d'une version plus récente de propel ( je
travaille avec des externals ) ; marche pas
J'ai tenté de supprimer des plugins récemment installés ; marche pas
J'ai cherché sur google - forums et autres... des gens reportent des
problèmes avec le "Cannot instantiate interface Platform" mais pas
avec le fichier GeneratorConfig.php à la ligne 157 !!!
Je précise que tout fonctionnais quelques semaines plus tard.

Le pire que c'est que les build-model / filters / forms fonctionnent
normallement

Une idée les gens ?

Je suis sous Ubuntu + Symfony 1.2 + Propel 1.3.
( le problème se reproduit en environnement de preprod... avec un OS
différent et une base différente )

Merci d'avance.

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

2009-11-16 Thread Gábor Fási

Quote from the bottom of *every* mail you get from this levlist:

To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.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] unsubscribe

2009-11-16 Thread sofiane oumaouche


 please what can I do, so that I will not receive the messages of this users 
group any more 
  
_
Téléchargez Internet Explorer 8 et surfez sans laisser de trace !
http://clk.atdmt.com/FRM/go/182932252/direct/01/
--~--~-~--~~~---~--~~
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: Wrong Table Alias (Doctrine Admin Generator)

2009-11-16 Thread jukea

+1 !!

I also have problems with count queries not respecting the alias I set
for a table in join statements


On Nov 11, 7:52 am, mintao  wrote:
> Hi,
>
> Not sure if this or the doctrine newsgroup is the right place to post
> this question/bug.
>
> It's about the doctrine admin generator for the symfony backend.
> As described at page 157 of the Jobeet tutorial Symfony 1.3, Doctrine
> 1.2 I wanted to modify the list (of auctions).
>
> /apps/backend/auctions/config/generator.yml:
> [...]
> config:
>  [...]
>     list:
>         title: List of all auctions
>         display: [is_active, =product, ends, starts, min_price, user]
>         sort: [ends, desc]
>         object_actions:
>           _edit: ~
>         table_method: retrieveBackendAuctionList
>
> /lib/model/AuctionsTable.class.php:
> [...]
>   public function retrieveBackendAuctionList(Doctrine_Query $q)
>   {
>     $rootAlias = $q->getRootAlias();
>     $q  ->andWhere('(isnull('.$rootAlias.'.starts) OR ' . $rootAlias .
> '.starts         ->andWhere($rootAlias.'.ends>NOW()')
>     ;
>     return $q;
>   }
>
> The Error:
> SQLSTATE[42S22]: Column not found: 1054 Unknown column 'r.starts' in
> 'where clause'. Failing Query: "SELECT COUNT(*) AS `num_results` FROM
> `auctions` `a` WHERE (isnull(r.starts) OR `a`.`starts` < NOW()) AND
> `a`.`ends` > NOW()"
>
> As you can see, it's the same variable $rootAlias ... so it's replaced
> once by "r" and the other two times by "a" as table alias.
>
> Any ideas? Thanks :)
>
> Florian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Using var_dump: warnings about sfWebRequest

2009-11-16 Thread Gábor Fási

This is the order of processing, when you request a symfony page:

- the action is executed (this is where you put your var_dump)
- the actions template is rendered
- the output is decorated with the layout

I cannot think of any way you could execute your code after the last
step - as far as I understand you want to do this.
I recommend you put your var_dump in the template (second step above)
- it's not the bottom of the page, but it's good enough, it's only for
debugging anyway.

On Mon, Nov 16, 2009 at 20:12, tirengarfio  wrote:
>
> Thanks Gábor!, but...what should i do?   Im just trying to show the
> var_dump output below the web page content.
>
> On Nov 16, 2:07 pm, Gábor Fási  wrote:
>> You call var_dump while executing the action, *before* any output
>> (including the headers) is sent. It writes to the stand output, and
>> when symfony tries to send the http headers, it cannot - hence the
>> warnings.
>>
>> On Mon, Nov 16, 2009 at 19:55, tirengarfio  wrote:
>>
>> > Hi,
>>
>> > i have this code below:
>>
>> > class profileActions extends sfActions
>> > {
>> >  public function executeIndex(sfWebRequest $request)
>> >  {
>> >    // Extraemos todos los miembros de la red social.
>> >    $this->lista_miembros = Doctrine::getTable('Profile')
>> >      ->createQuery('a')
>> >      ->execute();
>>
>> >    // Extraemos los amigos del usuario de la sesion.
>> >    $this->lista_amigos = Doctrine::getTable('FriendReference')
>> >      ->createQuery('a')
>> >      ->select('a.user2')
>> >      ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
>> > ())
>> >      ->execute();
>>
>> >    // Datos es el array que contiene los id de los amigos del usuario
>> > de la sesion.
>> >    $this->datos = $this->lista_amigos->toArray();
>>
>> >    var_dump($this->datos);
>>
>> >  }
>>
>> > When i try to use a var_dump as you can see in the code i get this
>> > warnings:
>>
>> > Warning: Cannot modify header information - headers already sent by
>> > (output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/
>> > actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/
>> > lib/response/sfWebResponse.class.php on line 335
>>
>> > Warning: Cannot modify header information - headers already sent by
>> > (output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/
>> > actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/
>> > lib/response/sfWebResponse.class.php on line 349
>>
>> > Any idea?
>>
>> > Bye
>>
>> > Javi
> >
>

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



[symfony-users] Re: Using var_dump: warnings about sfWebRequest

2009-11-16 Thread tirengarfio

Thanks Gábor!, but...what should i do?   Im just trying to show the
var_dump output below the web page content.

On Nov 16, 2:07 pm, Gábor Fási  wrote:
> You call var_dump while executing the action, *before* any output
> (including the headers) is sent. It writes to the stand output, and
> when symfony tries to send the http headers, it cannot - hence the
> warnings.
>
> On Mon, Nov 16, 2009 at 19:55, tirengarfio  wrote:
>
> > Hi,
>
> > i have this code below:
>
> > class profileActions extends sfActions
> > {
> >  public function executeIndex(sfWebRequest $request)
> >  {
> >    // Extraemos todos los miembros de la red social.
> >    $this->lista_miembros = Doctrine::getTable('Profile')
> >      ->createQuery('a')
> >      ->execute();
>
> >    // Extraemos los amigos del usuario de la sesion.
> >    $this->lista_amigos = Doctrine::getTable('FriendReference')
> >      ->createQuery('a')
> >      ->select('a.user2')
> >      ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
> > ())
> >      ->execute();
>
> >    // Datos es el array que contiene los id de los amigos del usuario
> > de la sesion.
> >    $this->datos = $this->lista_amigos->toArray();
>
> >    var_dump($this->datos);
>
> >  }
>
> > When i try to use a var_dump as you can see in the code i get this
> > warnings:
>
> > Warning: Cannot modify header information - headers already sent by
> > (output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/
> > actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/
> > lib/response/sfWebResponse.class.php on line 335
>
> > Warning: Cannot modify header information - headers already sent by
> > (output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/
> > actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/
> > lib/response/sfWebResponse.class.php on line 349
>
> > Any idea?
>
> > Bye
>
> > Javi
--~--~-~--~~~---~--~~
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 - force NOT NULL into generated SQL

2009-11-16 Thread Gábor Fási

Not null and required is pretty much the same thing.

On Mon, Nov 16, 2009 at 20:09, Richtermeister  wrote:
>
> Hey Gábor,
>
> hey, that works. Thanks. Is that the only way though, since required:
> true also makes the validator in the generated form required?
> Not a big deal if not, since I can just override that requirement..
> just curious.
>
> Thanks again,
> Daniel
>
>
> On Nov 16, 11:04 am, Gábor Fási  wrote:
>> required: true
>>
>> On Mon, Nov 16, 2009 at 19:55, Richtermeister  wrote:
>>
>> > Hi all,
>>
>> > I have a model with a field "absolute_url", which is a varchar(255),
>> > non-required. When generating the SQL for the tables, propel does not
>> > add NOT NULL, but I would like it to.
>> > Is there any way to affect this behavior? I've tried "notnull: true"
>> > and "null: false", but that didn't work.
>>
>> > Thanks,
>> > Daniel
> >
>

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



[symfony-users] Re: Using var_dump: warnings about sfWebRequest

2009-11-16 Thread tirengarfio

Thanks Gábor!, but...what should i do?   Im just trying to show the
var_dump output below the web page content.

On Nov 16, 2:07 pm, Gábor Fási  wrote:
> You call var_dump while executing the action, *before* any output
> (including the headers) is sent. It writes to the stand output, and
> when symfony tries to send the http headers, it cannot - hence the
> warnings.
>
> On Mon, Nov 16, 2009 at 19:55, tirengarfio  wrote:
>
> > Hi,
>
> > i have this code below:
>
> > class profileActions extends sfActions
> > {
> >  public function executeIndex(sfWebRequest $request)
> >  {
> >    // Extraemos todos los miembros de la red social.
> >    $this->lista_miembros = Doctrine::getTable('Profile')
> >      ->createQuery('a')
> >      ->execute();
>
> >    // Extraemos los amigos del usuario de la sesion.
> >    $this->lista_amigos = Doctrine::getTable('FriendReference')
> >      ->createQuery('a')
> >      ->select('a.user2')
> >      ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
> > ())
> >      ->execute();
>
> >    // Datos es el array que contiene los id de los amigos del usuario
> > de la sesion.
> >    $this->datos = $this->lista_amigos->toArray();
>
> >    var_dump($this->datos);
>
> >  }
>
> > When i try to use a var_dump as you can see in the code i get this
> > warnings:
>
> > Warning: Cannot modify header information - headers already sent by
> > (output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/
> > actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/
> > lib/response/sfWebResponse.class.php on line 335
>
> > Warning: Cannot modify header information - headers already sent by
> > (output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/
> > actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/
> > lib/response/sfWebResponse.class.php on line 349
>
> > Any idea?
>
> > Bye
>
> > Javi
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Using var_dump: warnings about sfWebRequest

2009-11-16 Thread tirengarfio

Thanks Gábor!, but...what should i do?   Im just trying to show the
var_dump output below the web page content.

On Nov 16, 2:07 pm, Gábor Fási  wrote:
> You call var_dump while executing the action, *before* any output
> (including the headers) is sent. It writes to the stand output, and
> when symfony tries to send the http headers, it cannot - hence the
> warnings.
>
> On Mon, Nov 16, 2009 at 19:55, tirengarfio  wrote:
>
> > Hi,
>
> > i have this code below:
>
> > class profileActions extends sfActions
> > {
> >  public function executeIndex(sfWebRequest $request)
> >  {
> >    // Extraemos todos los miembros de la red social.
> >    $this->lista_miembros = Doctrine::getTable('Profile')
> >      ->createQuery('a')
> >      ->execute();
>
> >    // Extraemos los amigos del usuario de la sesion.
> >    $this->lista_amigos = Doctrine::getTable('FriendReference')
> >      ->createQuery('a')
> >      ->select('a.user2')
> >      ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
> > ())
> >      ->execute();
>
> >    // Datos es el array que contiene los id de los amigos del usuario
> > de la sesion.
> >    $this->datos = $this->lista_amigos->toArray();
>
> >    var_dump($this->datos);
>
> >  }
>
> > When i try to use a var_dump as you can see in the code i get this
> > warnings:
>
> > Warning: Cannot modify header information - headers already sent by
> > (output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/
> > actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/
> > lib/response/sfWebResponse.class.php on line 335
>
> > Warning: Cannot modify header information - headers already sent by
> > (output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/
> > actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/
> > lib/response/sfWebResponse.class.php on line 349
>
> > Any idea?
>
> > Bye
>
> > Javi
--~--~-~--~~~---~--~~
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 - force NOT NULL into generated SQL

2009-11-16 Thread Richtermeister

Hey Gábor,

hey, that works. Thanks. Is that the only way though, since required:
true also makes the validator in the generated form required?
Not a big deal if not, since I can just override that requirement..
just curious.

Thanks again,
Daniel


On Nov 16, 11:04 am, Gábor Fási  wrote:
> required: true
>
> On Mon, Nov 16, 2009 at 19:55, Richtermeister  wrote:
>
> > Hi all,
>
> > I have a model with a field "absolute_url", which is a varchar(255),
> > non-required. When generating the SQL for the tables, propel does not
> > add NOT NULL, but I would like it to.
> > Is there any way to affect this behavior? I've tried "notnull: true"
> > and "null: false", but that didn't work.
>
> > Thanks,
> > Daniel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Using var_dump: warnings about sfWebRequest

2009-11-16 Thread Gábor Fási

You call var_dump while executing the action, *before* any output
(including the headers) is sent. It writes to the stand output, and
when symfony tries to send the http headers, it cannot - hence the
warnings.

On Mon, Nov 16, 2009 at 19:55, tirengarfio  wrote:
>
> Hi,
>
> i have this code below:
>
> class profileActions extends sfActions
> {
>  public function executeIndex(sfWebRequest $request)
>  {
>    // Extraemos todos los miembros de la red social.
>    $this->lista_miembros = Doctrine::getTable('Profile')
>      ->createQuery('a')
>      ->execute();
>
>    // Extraemos los amigos del usuario de la sesion.
>    $this->lista_amigos = Doctrine::getTable('FriendReference')
>      ->createQuery('a')
>      ->select('a.user2')
>      ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
> ())
>      ->execute();
>
>    // Datos es el array que contiene los id de los amigos del usuario
> de la sesion.
>    $this->datos = $this->lista_amigos->toArray();
>
>
>    var_dump($this->datos);
>
>
>  }
>
>
> When i try to use a var_dump as you can see in the code i get this
> warnings:
>
> Warning: Cannot modify header information - headers already sent by
> (output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/
> actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/
> lib/response/sfWebResponse.class.php on line 335
>
> Warning: Cannot modify header information - headers already sent by
> (output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/
> actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/
> lib/response/sfWebResponse.class.php on line 349
>
> Any idea?
>
> Bye
>
> Javi
>
> >
>

--~--~-~--~~~---~--~~
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 - force NOT NULL into generated SQL

2009-11-16 Thread Gábor Fási

required: true

On Mon, Nov 16, 2009 at 19:55, Richtermeister  wrote:
>
> Hi all,
>
> I have a model with a field "absolute_url", which is a varchar(255),
> non-required. When generating the SQL for the tables, propel does not
> add NOT NULL, but I would like it to.
> Is there any way to affect this behavior? I've tried "notnull: true"
> and "null: false", but that didn't work.
>
> Thanks,
> Daniel
>
> >
>

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



[symfony-users] Using var_dump: warnings about sfWebRequest

2009-11-16 Thread tirengarfio

Hi,

i have this code below:

class profileActions extends sfActions
{
  public function executeIndex(sfWebRequest $request)
  {
// Extraemos todos los miembros de la red social.
$this->lista_miembros = Doctrine::getTable('Profile')
  ->createQuery('a')
  ->execute();

// Extraemos los amigos del usuario de la sesion.
$this->lista_amigos = Doctrine::getTable('FriendReference')
  ->createQuery('a')
  ->select('a.user2')
  ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
())
  ->execute();

// Datos es el array que contiene los id de los amigos del usuario
de la sesion.
$this->datos = $this->lista_amigos->toArray();


var_dump($this->datos);


  }


When i try to use a var_dump as you can see in the code i get this
warnings:

Warning: Cannot modify header information - headers already sent by
(output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/
actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/
lib/response/sfWebResponse.class.php on line 335

Warning: Cannot modify header information - headers already sent by
(output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/
actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/
lib/response/sfWebResponse.class.php on line 349

Any idea?

Bye

Javi

--~--~-~--~~~---~--~~
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 - force NOT NULL into generated SQL

2009-11-16 Thread Richtermeister

Hi all,

I have a model with a field "absolute_url", which is a varchar(255),
non-required. When generating the SQL for the tables, propel does not
add NOT NULL, but I would like it to.
Is there any way to affect this behavior? I've tried "notnull: true"
and "null: false", but that didn't work.

Thanks,
Daniel

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



[symfony-users] Licensing Question / Code ownership

2009-11-16 Thread Richtermeister

Hi all,

our company is slowly shifting from selling "all custom" websites to
websites built on symfony + our own set of CMS plugins, and the
question of code ownership is starting to come up.

Traditionally we simply said that the client buys the entire site
including code and is free to do whatever with it. That was usually no
issue, because each sites was different and there were no "company
assets" included.

With the new approach this obviously changes a big, and we were
wondering how / if other companies out there handle this issue. For
example, we're not concerned what our immediate client do with the
delivered code, but we're wondering what happens when they change to a
different web company, and that company decides to build sites with
"our" cms.

Thanks for feedback,
Daniel

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



[symfony-users] [internships/jobs] Looking for symfony developers

2009-11-16 Thread chane...@gmail.com

Hi,

Regioneo, a France based start-up, is looking for symfony developers.
Our business is to sell directly products from local artisans.

Our architecture is based on Symfony 1.2 and Mysql. Lots of
developments are coming : API, new sections, semantic search,  We
are looking for enthousiastic people to join the project. The
collaboration could be a job or an internship. Remote working is
possible.

If you're interested, don't hesitate to contact me directly

Regards,
Jean-Tristan Chanegue
http://www.regioneo.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: My first work with Twig template

2009-11-16 Thread ReynierPM

Davide Borsatto wrote:
> 1 - This is not Twig, you are using the templating component. Maybe
> you are using both of them, but I actually don't see any reference to
> twig in the code

Yes, I have seen this yesterday but anyway it don't work for me maybe 
I'm doing something wrong

> 2 - It's just a typo, but in english "founded" isn't the past for
> "find". That is "found" :)

Cheers on this too. I speak Spanish and have some little knowledge on 
Enlgish but sometimes I have some mistakes and the people who I'm trying 
to talk help me.

Cheers


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



[symfony-users] Re: plugin with form build-form

2009-11-16 Thread smellycat37

It's because the class in my plugins/myPlugin/lib/model/doctrine/
#MyModelClass#.class.php was not abstract

On 25 sep, 17:49, smellycat37  wrote:
> Hello,
>
> I want to create a plugin with forms classes
> When I execute the task ./symfony doctrine:build-form, symfony creates
> forms class files with names as '#MyModelClass#Form.class.php' in
> /lib/
>   form/
>     doctrine/
>       myPlugin/
> & base forms class files with names as
> 'Base#MyModelClass#Form.class.php' in
> /lib/
>   form/
>     doctrine/
>       myPlugin/
>          base/
>
> The problem is that ./symfony doctrine:build-form generates also forms
> class files with names as 'Plugin#MyModelClass#Form.class.php' in
> /lib/
>   form/
>     doctrine/
> And I wouldn't... That's weird, no?
> do you know why these classes are created? do you know how to do for
> not generate them?
--~--~-~--~~~---~--~~
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: My first work with Twig template

2009-11-16 Thread Davide Borsatto

2 things:

1 - This is not Twig, you are using the templating component. Maybe
you are using both of them, but I actually don't see any reference to
twig in the code
2 - It's just a typo, but in english "founded" isn't the past for
"find". That is "found" :)

On Nov 16, 2:03 am, ReynierPM  wrote:
> ReynierPM wrote:
> > sfTemplateLoaderFilesystem(sfConfig::get('sf_web_dir').'/themes/%name%.php');
>
> Well my apologies, I founded the error. The correct path to themes is:
> sfConfig::get('sf_web_dir').'/themes/default/%name%.php
>
> Cheers
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: How to declare an array of input field with sfForm?

2009-11-16 Thread Gareth McCumskey
Make your widget name "name_of_field[]".

When symfony recieves a post variable like that
$request->getPostParameter('name_of_field') returns an array

On Sat, Nov 14, 2009 at 10:02 PM, Sid Bachtiar wrote:

>
> Hi,
>
> How to declare an array of input field in sfForm? Is this where
> embedded form come in?
>
> In this case I want to use jquery MultiUpload library but it works by
> creating upload fields with the same field name, so when the form is
> uploaded, it will be as array.
>
> Cheers,
>
> Sid
> --
> Blue Horn Ltd - System Development
> http://bluehorn.co.nz
>
> >
>


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