Re: [symfony-users] Open an Excel file

2010-01-15 Thread Gareth McCumskey
With just plain old PHP and even some Javascript built in this is actually very 
difficult if not impossible to do as PHP was never designed to interact with a 
users PC. Javascript was however designed to run client-side but does not have 
direct access to a users hard drive for obvious security reasons. The only way 
you may get past this is to use another plugin. I am not sure which plugin 
would be useful, perhaps Flash, but as far as I know even Java (not Javascript) 
cannot do this (but I stand to be corrected on that). You may also want to look 
into Google Gears (which I have not yet used). The problem with these scenarios 
is that you will need the user to download a plugin for their browser.

Essentially, the easiest way is to let them upload, the changes are made by 
PHP, then PHP prompts the user to re-download the changed file.

Regards

Gareth McCumskey

- Original Message -
From: "bibijosh" 
To: "symfony users" 
Sent: Thursday, January 14, 2010 7:02:43 PM GMT +02:00 Harare / Pretoria
Subject: [symfony-users] Open an Excel file

Hi, I'm quite new to Symfony, and not really good at php in the first
place. So if someone could give me a hand here.

Here is what my website does for now :
 - Open an explorer window so the user can upload an excel file
 - Modify that file
 - Save it on my server.

Here is what I would like to do :
 - Open an explorer window so the user can upload an excel file
 - Modify that file AND THEN open it in an Excel Window. (I can only
manage to display it in my webpage, whichdoesn't look good at all,
I heard it could be because of the mime type actions...)
AND/OR
 - Save it on the user's computer, where it was first uploaded from,
without the user having to do anything.

I'll welcome any advice.

I'm using php5, Symfony 1.0 and IE 6

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


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




Re: [symfony-users] Open an Excel file

2010-01-15 Thread Daniel Lohse
Why symfony 1.0? :( Why IE6? Don't get me wrong, this has nothing to  
do with your original question, just — why?


Now, your question. Just think about what you're asking. Your app  
inside the sandbox, namely your browser, shall save to the user's  
harddrive. What would you say if a website saved a fee pictures to  
your desktop?


This is only possible by using a Java applet and has nothing to do  
with symfony in any way. Just google for a Java upload applet and  
you'll see that it has access to read from the user's harddrive to  
select a file to upload but I don't think that write access is  
possible — and if it is, security will be pretty tight.


Just let the user upload the file, process it and then let the user  
download the processed file. With clear and concise descriptions on- 
screen this should be no problem for your users.


Cheers, Daniel

Sent from my iPhone

On Jan 15, 2010, at 9:15 AM, Gareth McCumskey   
wrote:


With just plain old PHP and even some Javascript built in this is  
actually very difficult if not impossible to do as PHP was never  
designed to interact with a users PC. Javascript was however  
designed to run client-side but does not have direct access to a  
users hard drive for obvious security reasons. The only way you may  
get past this is to use another plugin. I am not sure which plugin  
would be useful, perhaps Flash, but as far as I know even Java (not  
Javascript) cannot do this (but I stand to be corrected on that).  
You may also want to look into Google Gears (which I have not yet  
used). The problem with these scenarios is that you will need the  
user to download a plugin for their browser.


Essentially, the easiest way is to let them upload, the changes are  
made by PHP, then PHP prompts the user to re-download the changed  
file.


Regards

Gareth McCumskey

- Original Message -
From: "bibijosh" 
To: "symfony users" 
Sent: Thursday, January 14, 2010 7:02:43 PM GMT +02:00 Harare /  
Pretoria

Subject: [symfony-users] Open an Excel file

Hi, I'm quite new to Symfony, and not really good at php in the first
place. So if someone could give me a hand here.

Here is what my website does for now :
- Open an explorer window so the user can upload an excel file
- Modify that file
- Save it on my server.

Here is what I would like to do :
- Open an explorer window so the user can upload an excel file
- Modify that file AND THEN open it in an Excel Window. (I can only
manage to display it in my webpage, whichdoesn't look good at all,
I heard it could be because of the mime type actions...)
AND/OR
- Save it on the user's computer, where it was first uploaded from,
without the user having to do anything.

I'll welcome any advice.

I'm using php5, Symfony 1.0 and IE 6

--
You received this message because you are subscribed to the Google  
Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com 
.
For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en 
.



--
You received this message because you are subscribed to the Google  
Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com 
.
For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en 
.



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




Re: [symfony-users] Open an Excel file

2010-01-15 Thread DEEPAK BHATIA
Hi I used the

I used the sfPhpExcelPlugin-1.0.2.zip from the

http://www.symfony-project.org/plugins/sfPhpExcelPlugin/1_0_2


In this I used this both for creating an excel file and downloading the same
using PHP.

Also I used the same for uploading an excel file and then reading the
contents of the excel file.

Regards

Deepak Bhatia

On Fri, Jan 15, 2010 at 1:45 PM, Gareth McCumskey wrote:

> With just plain old PHP and even some Javascript built in this is actually
> very difficult if not impossible to do as PHP was never designed to interact
> with a users PC. Javascript was however designed to run client-side but does
> not have direct access to a users hard drive for obvious security reasons.
> The only way you may get past this is to use another plugin. I am not sure
> which plugin would be useful, perhaps Flash, but as far as I know even Java
> (not Javascript) cannot do this (but I stand to be corrected on that). You
> may also want to look into Google Gears (which I have not yet used). The
> problem with these scenarios is that you will need the user to download a
> plugin for their browser.
>
> Essentially, the easiest way is to let them upload, the changes are made by
> PHP, then PHP prompts the user to re-download the changed file.
>
> Regards
>
> Gareth McCumskey
>
> - Original Message -
> From: "bibijosh" 
> To: "symfony users" 
> Sent: Thursday, January 14, 2010 7:02:43 PM GMT +02:00 Harare / Pretoria
> Subject: [symfony-users] Open an Excel file
>
> Hi, I'm quite new to Symfony, and not really good at php in the first
> place. So if someone could give me a hand here.
>
> Here is what my website does for now :
>  - Open an explorer window so the user can upload an excel file
>  - Modify that file
>  - Save it on my server.
>
> Here is what I would like to do :
>  - Open an explorer window so the user can upload an excel file
>  - Modify that file AND THEN open it in an Excel Window. (I can only
> manage to display it in my webpage, whichdoesn't look good at all,
> I heard it could be because of the mime type actions...)
> AND/OR
>  - Save it on the user's computer, where it was first uploaded from,
> without the user having to do anything.
>
> I'll welcome any advice.
>
> I'm using php5, Symfony 1.0 and IE 6
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>
>
-- 

You received this message because you are subscribed to the Google Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Open an Excel file

2010-01-15 Thread Benoit Montuelle
Hi,

I think there may be at least 2 solutions :

1st)
- Make for form so user can upload one or more file
- Modify that file in php, this point may be though, as php excel writers
have generally limited support. You can try something like this
http://pear.php.net/package/Spreadsheet_Excel_Writer , or if possible use
xlsx which is XML data.
- Redirect the browser and force downloading the file, the user will have to
accept the download and choose place where to put it.

2nd) As your clients are IE6 you can use some kind of activeX to handle xls
files directly on user's computer, if you're not fluent in php but are in
C#, VB or C++ this can be a better solultion.
Somme dll's already exists to modify/generate excel files But the main
disadvantage is that it will never work on any other browser than IE. As far
as I know with activeX autorised by browser you can have access to full
computer ressources, as a regular windows program.
Once I saw an app that can : interact with scanner device on local computer,
process picture to pdf on local computer, then upload it back to the server.
The server was PHP5 (without OSS framework) and client were winXP+IE6

I Know generally PHP developers avoid solution like this because of its
compatibility problem, but it still exists and being used by many intranet
apps.

Last but not least, if you're starting a new app, don't use symfony 1.0,
you'll find more reliable ressources for symfony 1.4 now.

Regards

2010/1/14 bibijosh 

> Hi, I'm quite new to Symfony, and not really good at php in the first
> place. So if someone could give me a hand here.
>
> Here is what my website does for now :
>  - Open an explorer window so the user can upload an excel file
>  - Modify that file
>  - Save it on my server.
>
> Here is what I would like to do :
>  - Open an explorer window so the user can upload an excel file
>  - Modify that file AND THEN open it in an Excel Window. (I can only
> manage to display it in my webpage, whichdoesn't look good at all,
> I heard it could be because of the mime type actions...)
> AND/OR
>  - Save it on the user's computer, where it was first uploaded from,
> without the user having to do anything.
>
> I'll welcome any advice.
>
> I'm using php5, Symfony 1.0 and IE 6
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>
>
-- 

You received this message because you are subscribed to the Google Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: doctrine many to one one the same table

2010-01-15 Thread Tom Ptacnik
Yes, you are right. In this multiselect box can be all his children,
and also all folders without a parent. But there can't be a folders
which have another parent folder.


On 12 led, 19:33, smellycat37  wrote:
> if a folder has a parent with the reference on folder_id, he has
> children with the same reference...
> so it's a relation 1:n... so it could be possible to have in a form :
> 1- the parent (the folder who have as id the folder_id of the current
> item) in a select box
> 2- the children (all folders who have as folder_id , the id of the
> current folder) in a mutli select box
>
> On 12 jan, 19:22, Tom Ptacnik  wrote:
>
>
>
> > I think that if you want a multiselect box for the children you will
> > need a many to many relationship... think about how to store the
> > informations from this multiselect box...
>
> > Or if you don't want a M:N relationship then you have to not show (in
> > this multiselect box) a folders which already has a parent ... because
> > you can't store it's folder_id if it already has a parent...
>
> > I hope you will understand my ideas :)
>
> > On 12 led, 01:16, smellycat37  wrote:
>
> > > Hello,
>
> > > I have this schema structure
> > > Folder:
> > >   columns:
> > >     id:  { type: integer, primary: true }
> > >     name: { type: string(50), notnull: true }
> > >     folder_id: { type: integer, notnull: true }
> > >   relations:
> > >     Parent: {onDelete: CASCADE, local: folder_id, foreign: id,
> > > foreignAlias: children}
>
> > > the "symfony doctrine:build-form" commande build the
> > > BaseFolderForm.class.php with two widgets :
> > > 1 - the id widget
> > > 2 - folder_id a sfWidgetFormDoctrineChoice (select box) containing the
> > > parent
>
> > > But i need a third one:
> > > 3 - folders_list a sfWidgetFormDoctrineChoice (multi select box)
> > > containing all the children
>
> > > is it possible?
>
> > > If you have any idea, thanks for your 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Using same database for two projects

2010-01-15 Thread DEEPAK BHATIA
Hi,

If we want to use the same database for the two projects in Symfony 1.1, how
can we achieve that. I guess we just need to execute step1 and step 2 below.

=

1. php symfony propel:build-model
2. php symfony cc
3. php symfony configure:database "mysql://root:@localhost/rtdb2"
4. php symfony propel:build-sql
5. mysqladmin -u root -p create rtdb2
6. mysql -u root -p rtdb2 < data/sql/lib.model.schema.sql
7. php symfony propel:insert-sql
8. php symfony propel:build-schema
9. php symfony propel:build-schema --xml
-- 

You received this message because you are subscribed to the Google Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Base GeneratorConfiguration not found

2010-01-15 Thread HAUSa
When I go to my application, it says only this:
Fatal error: Class 'BasePageGeneratorConfiguration' not found in /srv/
www/vhosts/startersspecialist.nl/httpdocs/apps/controlpanel/modules/
page/lib/pageGeneratorConfiguration.class.php on line 11

I think it has something to do with the admin generator, but what? I
cannot recall the class and don't know where I should find it.
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: FormFilter - sfWidgetFormChoice 'multiple' => true ... error

2010-01-15 Thread Tom Ptacnik
Nobody filter a list by checkboxes or by a multiple selectbox?


On 11 led, 20:51, Tom Ptacnik  wrote:
> Hello,
>
> I have classic admin generated backend (Symfony 1.4). Today I've tried
> to customize the filter for the list view.
>
> The problem is that I want to filter by multiple select. So I've
> changed default widgets in configure method in my TicketFormFilter
> class from:
>
> 'tkstate'    => new sfWidgetFormChoice(array('choices' => array('' =>
> '', 'new' => 'new', 'waitingforuser' => 'waitingforuser',
> 'waitingforadmin' => 'waitingforadmin', 'closed' => 'closed',
> 'deleted' => 'deleted'))),
>
> 'tkstate'    => new sfValidatorChoice(array('required' => false,
> 'choices' => array('new' => 'new', 'waitingforuser' =>
> 'waitingforuser', 'waitingforadmin' => 'waitingforadmin', 'closed' =>
> 'closed', 'deleted' => 'deleted'))),
>
> to
>
> $this->widgetSchema['tkstate'] = new sfWidgetFormChoice(array
> ('choices' => array('' => '', 'new' => 'new', 'waitingforuser' =>
> 'waitingforuser', 'waitingforadmin' => 'waitingforadmin', 'closed' =>
> 'closed', 'deleted' => 'deleted'), 'multiple' => true));
>
>         $this->validatorSchema['tkstate'] = new sfValidatorChoice(array
> ('required' => false, 'choices' => array('new' => 'new',
> 'waitingforuser' => 'waitingforuser', 'waitingforadmin' =>
> 'waitingforadmin', 'closed' => 'closed', 'deleted' => 'deleted'),
> 'multiple' => true));
>
> ... only added the multiple parameter.
>
> But when i click on the "filter" submit (with two selected items: new,
> waitingforuser), I got this error:
>
> stack trace
> at ()
> in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib
> \vendor\doctrine\Doctrine\Connection.php line 1082 ...
>             $message .= sprintf('. Failing Query: "%s"', $query);
>         }
>         $exc  = new $name($message, (int) $e->getCode());
>
>         if ( ! isset($e->errorInfo) || ! is_array($e->errorInfo)) {
>             $e->errorInfo = array(null, null, null, null);
>         }
> 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 269 ...
> at Doctrine_Connection_Statement->execute(array('new',
> 'waitingforuser'))
> in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib
> \vendor\doctrine\Doctrine\Connection.php line 1006 ...
> at Doctrine_Connection->execute('SELECT COUNT(*) AS num_results FROM
> ticket t WHERE t.tkstate = ?', array('new', 'waitingforuser'))
> in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib
> \vendor\doctrine\Doctrine\Connection.php line 800 ...
> at Doctrine_Connection->fetchAll('SELECT COUNT(*) AS num_results FROM
> ticket t WHERE t.tkstate = ?', array('new', 'waitingforuser'))
> in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib
> \vendor\doctrine\Doctrine\Query.php line 2108 ...
>
> The problem seems to be in the generated query ... the should be OR
> statement (for this multiple choice), but it looks that it's generated
> classic simple WHERE, and as parameter is send whole array... and
> doctrine is confused of course
>
> Maybe the problem is only in my application.
>
> Did anybody of you ever tried to filter by multiple select?
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Having trouble modifying filters.

2010-01-15 Thread Tom Ptacnik
you can access to a user object via sfContext::getInstance()->getUser
() if you user standard user object and credentials system...


On 15 led, 00:41, Darren884  wrote:
> Yes but how do I call the sfFormFilter object? I had tried $this-
>
> >configuration->getFilterForm but it runs the class again.
>
> On Jan 14, 2:56 pm, Daniel Lohse  wrote:
>
>
>
> > sfFormFilter does have setOptions as it's only a subclass of BaseForm.
>
> > Daniel
>
> > On Jan 14, 2010, at 11:08 PM, Darren884 wrote:
>
> > > Actually that did not work. This is a flaw in Symfony itself, there is
> > > no way to pass values to the configre() method in the filters class.
> > > This needs to be fixed.
>
> > > On Jan 14, 12:11 pm, Darren884  wrote:
> > >> Hi guys, I had to actually add an argument to the original
> > >> ConfigurationModelGenerator file and mimick the getForm() function to
> > >> pass options. I have no idea why this wasn't implemented in the first
> > >> place but who knows.
>
> > >> On Jan 13, 3:04 pm, Darren884  wrote:
>
> > >>> In my form I use the setOptions to pass my user object so I can check
> > >>> the credentials in the form class if I want to display or hide fields,
> > >>> however in the FilterForm class there is no setOptions and class
> > >>> variables do not seem to be shared among functions. How am I to get
> > >>> the user object into my FormFilter class from the action in order to
> > >>> check credentials against it and hide or display fields? Is there a
> > >>> different method in Symfony other than the __construct to get
> > >>> variables?
>
> > >>> Thanks,
> > >>> Darren
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "symfony users" group.
> > > To post to this group, send email to symfony-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > symfony-users+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/symfony-users?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Have it so if a user doesnt fill in a field it stays as it was?

2010-01-15 Thread Tom Ptacnik
Left it unfilled, and then when saving the profile don't change the
password if the password field is blank..

Also you have to optimize a validation process for this behaviour.



On 14 led, 18:08, Darren884  wrote:
> HI basically I want to make it so as if a user is filling out their
> account options if they don't change their password it stays as it is.
> This is very common with profile sites and such.
>
> On Jan 14, 6:17 am, Alexandru-Emil Lupu  wrote:
>
>
>
> > what do you mean? if a user does not complete a field, and validation stop
> > the process to have the password field filled in with previous entry?
> > i yes, then i am not sure you can. also ... is not a good practice AFAIK.
> > Alecs
>
> > On Thu, Jan 14, 2010 at 1:44 AM, Darren884  wrote:
> > > I have a password field and I want it so if the user doesn't fill it
> > > in it stays the same value. How do I accomplish this? I also have a
> > > password confirmation field.
>
> > > 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-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > symfony-users+unsubscr...@googlegroups.com
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/symfony-users?hl=en.
>
> > --
> > 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] widget multiple option

2010-01-15 Thread Javier Garcia

On 01/14/2010 11:20 PM, Gabo wrote:

Help!!

I have this in schema:

documents_users:
   columns:
document_id: { type: integer }
user_id: { type: integer }
created_at:  { type: timestamp }

y en the form, i change the widget user_id for this:

'user_id' => new sfWidgetFormDoctrineChoice(array('model' => 
'sfGuardUser', 'add_empty' => true, *'multiple'=> true*)),


In the form the widget is multiple option... but i want to save the 
form, print error:



SQLSTATE[HY093]: Invalid parameter number: number of bound
variables does not match number of tokens

i net to save more inserts becouse i selected 2 users_id in the 
form...but symfony dont save??





--
You received this message because you are subscribed to the Google 
Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


Hi,

could you send the part that appears below the error message?

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-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: how can I check the name of module and action in layout ?

2010-01-15 Thread wissl
I believe $sf_request->getParameter('action') and $sf_request-
>getParameter('module') should also work.


On 14 Jan., 21:38, dziobacz  wrote:
> thx people !! :)
>
> On 14 Sty, 20:57, tirengarfio  wrote:
>
> > Well put "$" before both..
>
> > On Jan 14, 8:55 pm, Javier Garcia  wrote:
>
> > > On 01/14/2010 08:51 PM, dziobacz wrote:> How can I check on the layout 
> > > current module and action which use this
> > > > layout ?
>
> > > Hi  dziobac:
>
> > > sf_context->getModuleName() and sf_context-> getActionName()
>
> > > 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] sfForm clean bind

2010-01-15 Thread DoRiaN
Hello,

How to delete values after bind() ?
I want to clean my form.

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




Re: [symfony-users] Re: Deployed project does not load any javascript file

2010-01-15 Thread Gábor Fási
Do you call include_javascripts() in your layout? Did you clear your
cache after the deployment?

On Fri, Jan 15, 2010 at 08:47, domnuprofesor  wrote:
> yes, of course I cheked the html code...
> No 

[symfony-users] Why doesn't the mydomain.com -> www.mydomain rewrite rule work in this .htaccess file?

2010-01-15 Thread YTH

Dear all,

Hi, I would like to allow users getting redirected to www.mydomain.com if 
they enter mydomain.com in the browser. I added rewrite rule in the 
..htaccess that comes with symfony 1.2 but the rewrite rule does not seem to 
work. When users enter mydomain.com, their browser continues to use 
mydomain.com, being unaware of the rewrite rule that I added.


The .htaccess file is shown below:

Options +FollowSymLinks +ExecCGI


 RewriteEngine On

 # this is the rewrite rule that I added
 # it should redirect to www.mydomain.com if http_post variable does not 
start with www

 # but I have no idea why it does not work
 RewriteCond %{HTTP_HOST}   !^www\.mydomain\.com [NC]
 RewriteCond %{HTTP_HOST}   !^$
 RewriteRule ^/(.*) http://www.mydomain.com/$1 [L,R=301]

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

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

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

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



I suspected that mod_rewrite is either not installed on the server (it's a 
shared hosting server), or it prevents people from doing any override. After 
a second thought, I changed my mind because all routing rules such as 
/user/new, /product/show defined in routing.yml work perfectly. And for 
these routing rules to work, the following rewrite rule defined in .htaccess 
must have got executed:


RewriteRule ^(.*)$ index.php [QSA,L]

This means that this might be the problem of my rewrite rule.
Any ideas?

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




Re: [symfony-users] Why doesn't the mydomain.com -> www.mydomain rewrite rule work in this .htaccess file?

2010-01-15 Thread Sebastian Schulze
The second line after the RewriteCond is wrong.
It should be more like:

RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC]
RewriteRule ^(.*) http://www.mydomain.com$1 [QSA,L,R=301]

Bascht

On 15.01.10 14:16, YTH wrote:
> Dear all,
> 
> Hi, I would like to allow users getting redirected to www.mydomain.com
> if they enter mydomain.com in the browser. I added rewrite rule in the
> ..htaccess that comes with symfony 1.2 but the rewrite rule does not
> seem to work. When users enter mydomain.com, their browser continues to
> use mydomain.com, being unaware of the rewrite rule that I added.
> 
> The .htaccess file is shown below:
> 
> Options +FollowSymLinks +ExecCGI
> 
> 
>  RewriteEngine On
> 
>  # this is the rewrite rule that I added
>  # it should redirect to www.mydomain.com if http_post variable does not
> start with www
>  # but I have no idea why it does not work
>  RewriteCond %{HTTP_HOST}   !^www\.mydomain\.com [NC]
>  RewriteCond %{HTTP_HOST}   !^$
>  RewriteRule ^/(.*) http://www.mydomain.com/$1 [L,R=301]
> 
>  # uncomment the following line, if you are having trouble
>  # getting no_script_name to work
>  #RewriteBase /
> 
>  # we skip all files with .something
>  #RewriteCond %{REQUEST_URI} \..+$
>  #RewriteCond %{REQUEST_URI} !\.html$
>  #RewriteRule .* - [L]
> 
>  # we check if the .html version is here (caching)
>  RewriteRule ^$ index.html [QSA]
>  RewriteRule ^([^.]+)$ $1.html [QSA]
>  RewriteCond %{REQUEST_FILENAME} !-f
> 
>  # no, so we redirect to our front web controller
>  RewriteRule ^(.*)$ index.php [QSA,L]
> 
> 
> 
> I suspected that mod_rewrite is either not installed on the server (it's
> a shared hosting server), or it prevents people from doing any override.
> After a second thought, I changed my mind because all routing rules such
> as /user/new, /product/show defined in routing.yml work perfectly. And
> for these routing rules to work, the following rewrite rule defined in
> .htaccess must have got executed:
> 
> RewriteRule ^(.*)$ index.php [QSA,L]
> 
> This means that this might be the problem of my rewrite rule.
> Any ideas?
> 
> Many thanks to you all.
> 


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




[symfony-users] Re: doctrine many to one one the same table

2010-01-15 Thread Tom Ptacnik
I was thinking about it and I'm not right...

You can, of course, display all folders in multiselectbox (child
folders, free folders and folders with different parent folder) but,
when you select a folder which has another parent, and set it as a
child folder for actual folder, it will be child only for actual
folder (the original parent folder will be gone)

Hope you understand :)



On 15 led, 10:25, Tom Ptacnik  wrote:
> Yes, you are right. In this multiselect box can be all his children,
> and also all folders without a parent. But there can't be a folders
> which have another parent folder.
>
> On 12 led, 19:33, smellycat37  wrote:
>
>
>
> > if a folder has a parent with the reference on folder_id, he has
> > children with the same reference...
> > so it's a relation 1:n... so it could be possible to have in a form :
> > 1- the parent (the folder who have as id the folder_id of the current
> > item) in a select box
> > 2- the children (all folders who have as folder_id , the id of the
> > current folder) in a mutli select box
>
> > On 12 jan, 19:22, Tom Ptacnik  wrote:
>
> > > I think that if you want a multiselect box for the children you will
> > > need a many to many relationship... think about how to store the
> > > informations from this multiselect box...
>
> > > Or if you don't want a M:N relationship then you have to not show (in
> > > this multiselect box) a folders which already has a parent ... because
> > > you can't store it's folder_id if it already has a parent...
>
> > > I hope you will understand my ideas :)
>
> > > On 12 led, 01:16, smellycat37  wrote:
>
> > > > Hello,
>
> > > > I have this schema structure
> > > > Folder:
> > > >   columns:
> > > >     id:  { type: integer, primary: true }
> > > >     name: { type: string(50), notnull: true }
> > > >     folder_id: { type: integer, notnull: true }
> > > >   relations:
> > > >     Parent: {onDelete: CASCADE, local: folder_id, foreign: id,
> > > > foreignAlias: children}
>
> > > > the "symfony doctrine:build-form" commande build the
> > > > BaseFolderForm.class.php with two widgets :
> > > > 1 - the id widget
> > > > 2 - folder_id a sfWidgetFormDoctrineChoice (select box) containing the
> > > > parent
>
> > > > But i need a third one:
> > > > 3 - folders_list a sfWidgetFormDoctrineChoice (multi select box)
> > > > containing all the children
>
> > > > is it possible?
>
> > > > If you have any idea, thanks for your 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Using same database for two projects

2010-01-15 Thread Tom Ptacnik
Two different projects with different tables/models? Or some tables
will be shared? Or all tables will be shared?


On 15 led, 10:31, DEEPAK BHATIA  wrote:
> Hi,
>
> If we want to use the same database for the two projects in Symfony 1.1, how
> can we achieve that. I guess we just need to execute step1 and step 2 below.
>
> =
>
> 1. php symfony propel:build-model
> 2. php symfony cc
> 3. php symfony configure:database "mysql://root:@localhost/rtdb2"
> 4. php symfony propel:build-sql
> 5. mysqladmin -u root -p create rtdb2
> 6. mysql -u root -p rtdb2 < data/sql/lib.model.schema.sql
> 7. php symfony propel:insert-sql
> 8. php symfony propel:build-schema
> 9. php symfony propel:build-schema --xml
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: sfForm clean bind

2010-01-15 Thread ken
What's your purpose of clearing the form of its values?

On Jan 15, 7:23 pm, DoRiaN  wrote:
> Hello,
>
> How to delete values after bind() ?
> I want to clean my form.
>
> Thank,
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: sfForm clean bind

2010-01-15 Thread DoRiaN
When the form isValid(), i display again the same form empty to add a
new element.

I do new Form because i don't know how to clean values.


On 15 jan, 14:27, ken  wrote:
> What's your purpose of clearing the form of its values?
>
> On Jan 15, 7:23 pm, DoRiaN  wrote:
>
> > Hello,
>
> > How to delete values after bind() ?
> > I want to clean my form.
>
> > Thank,
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Why doesn't the mydomain.com -> www.mydomain rewrite rule work in this .htaccess file?

2010-01-15 Thread YTH

Dear Bascht,

Great! It works now.
By the way, the rewrite rule that I used (which does not work) is from this 
page, under the "URL Layout" section and after the "Canonical Hostnames" 
heading:


http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

I just don't quite understand what's the problem with the rule, making it 
failed to work.



- Original Message - 
From: "Sebastian Schulze" 

To: 
Sent: Friday, January 15, 2010 9:21 PM
Subject: Re: [symfony-users] Why doesn't the mydomain.com -> www.mydomain 
rewrite rule work in this .htaccess file?




The second line after the RewriteCond is wrong.
It should be more like:

RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC]
RewriteRule ^(.*) http://www.mydomain.com$1 [QSA,L,R=301]

Bascht

On 15.01.10 14:16, YTH wrote:

Dear all,

Hi, I would like to allow users getting redirected to www.mydomain.com
if they enter mydomain.com in the browser. I added rewrite rule in the
..htaccess that comes with symfony 1.2 but the rewrite rule does not
seem to work. When users enter mydomain.com, their browser continues to
use mydomain.com, being unaware of the rewrite rule that I added.

The .htaccess file is shown below:

Options +FollowSymLinks +ExecCGI


 RewriteEngine On

 # this is the rewrite rule that I added
 # it should redirect to www.mydomain.com if http_post variable does not
start with www
 # but I have no idea why it does not work
 RewriteCond %{HTTP_HOST}   !^www\.mydomain\.com [NC]
 RewriteCond %{HTTP_HOST}   !^$
 RewriteRule ^/(.*) http://www.mydomain.com/$1 [L,R=301]

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

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

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

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



I suspected that mod_rewrite is either not installed on the server (it's
a shared hosting server), or it prevents people from doing any override.
After a second thought, I changed my mind because all routing rules such
as /user/new, /product/show defined in routing.yml work perfectly. And
for these routing rules to work, the following rewrite rule defined in
.htaccess must have got executed:

RewriteRule ^(.*)$ index.php [QSA,L]

This means that this might be the problem of my rewrite rule.
Any ideas?

Many thanks to you all.







__ NOD32 4759 (20100110) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.






__ NOD32 4759 (20100110) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Have it so if a user doesnt fill in a field it stays as it was?

2010-01-15 Thread ken
You mean the form fills the field with the password as default value?
I don't think that is ever a good idea. If you want a change password
form, here is the class that I'm using.

http://gist.github.com/278064

On Jan 15, 6:38 pm, Tom Ptacnik  wrote:
> Left it unfilled, and then when saving the profile don't change the
> password if the password field is blank..
>
> Also you have to optimize a validation process for this behaviour.
>
> On 14 led, 18:08, Darren884  wrote:
>
>
>
> > HI basically I want to make it so as if a user is filling out their
> > account options if they don't change their password it stays as it is.
> > This is very common with profile sites and such.
>
> > On Jan 14, 6:17 am, Alexandru-Emil Lupu  wrote:
>
> > > what do you mean? if a user does not complete a field, and validation stop
> > > the process to have the password field filled in with previous entry?
> > > i yes, then i am not sure you can. also ... is not a good practice AFAIK.
> > > Alecs
>
> > > On Thu, Jan 14, 2010 at 1:44 AM, Darren884  wrote:
> > > > I have a password field and I want it so if the user doesn't fill it
> > > > in it stays the same value. How do I accomplish this? I also have a
> > > > password confirmation field.
>
> > > > 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-us...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > symfony-users+unsubscr...@googlegroups.com > > >  ­legroups.com>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/symfony-users?hl=en.
>
> > > --
> > > 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: sfForm clean bind

2010-01-15 Thread Tom Ptacnik
If you want to clear the form after it's proccessed, you can simply do
redirect to the same form (in the action)


On 15 led, 12:23, DoRiaN  wrote:
> Hello,
>
> How to delete values after bind() ?
> I want to clean my form.
>
> Thank,
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Re: Using same database for two projects

2010-01-15 Thread DEEPAK BHATIA
Thanks for all the scenarios. If possible, please send me the solution for
some tables as well as all tables.

Regards

Deepak Bhatia

On Fri, Jan 15, 2010 at 6:54 PM, Tom Ptacnik  wrote:

> Two different projects with different tables/models? Or some tables
> will be shared? Or all tables will be shared?
>
>
> On 15 led, 10:31, DEEPAK BHATIA  wrote:
> > Hi,
> >
> > If we want to use the same database for the two projects in Symfony 1.1,
> how
> > can we achieve that. I guess we just need to execute step1 and step 2
> below.
> >
> > =
> >
> > 1. php symfony propel:build-model
> > 2. php symfony cc
> > 3. php symfony configure:database "mysql://root:@localhost/rtdb2"
> > 4. php symfony propel:build-sql
> > 5. mysqladmin -u root -p create rtdb2
> > 6. mysql -u root -p rtdb2 < data/sql/lib.model.schema.sql
> > 7. php symfony propel:insert-sql
> > 8. php symfony propel:build-schema
> > 9. php symfony propel:build-schema --xml
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>
>
-- 

You received this message because you are subscribed to the Google Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Having trouble modifying filters.

2010-01-15 Thread ken
If you are using the admin generator, override apps//modules/
/lib/GeneratorConfiguration.php

public function getFilterOptions()
{
  return array('sf_user' => sfContext::getInstance()->getUser());
}

On Jan 15, 6:35 pm, Tom Ptacnik  wrote:
> you can access to a user object via sfContext::getInstance()->getUser
> () if you user standard user object and credentials system...
>
> On 15 led, 00:41, Darren884  wrote:
>
>
>
> > Yes but how do I call the sfFormFilter object? I had tried $this-
>
> > >configuration->getFilterForm but it runs the class again.
>
> > On Jan 14, 2:56 pm, Daniel Lohse  wrote:
>
> > > sfFormFilter does have setOptions as it's only a subclass of BaseForm.
>
> > > Daniel
>
> > > On Jan 14, 2010, at 11:08 PM, Darren884 wrote:
>
> > > > Actually that did not work. This is a flaw in Symfony itself, there is
> > > > no way to pass values to the configre() method in the filters class.
> > > > This needs to be fixed.
>
> > > > On Jan 14, 12:11 pm, Darren884  wrote:
> > > >> Hi guys, I had to actually add an argument to the original
> > > >> ConfigurationModelGenerator file and mimick the getForm() function to
> > > >> pass options. I have no idea why this wasn't implemented in the first
> > > >> place but who knows.
>
> > > >> On Jan 13, 3:04 pm, Darren884  wrote:
>
> > > >>> In my form I use the setOptions to pass my user object so I can check
> > > >>> the credentials in the form class if I want to display or hide fields,
> > > >>> however in the FilterForm class there is no setOptions and class
> > > >>> variables do not seem to be shared among functions. How am I to get
> > > >>> the user object into my FormFilter class from the action in order to
> > > >>> check credentials against it and hide or display fields? Is there a
> > > >>> different method in Symfony other than the __construct to get
> > > >>> variables?
>
> > > >>> Thanks,
> > > >>> Darren
> > > > --
> > > > You received this message because you are subscribed to the Google 
> > > > Groups "symfony users" group.
> > > > To post to this group, send email to symfony-us...@googlegroups.com.
> > > > To unsubscribe from this group, send email to 
> > > > symfony-users+unsubscr...@googlegroups.com.
> > > > For more options, visit this group 
> > > > athttp://groups.google.com/group/symfony-users?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Base GeneratorConfiguration not found

2010-01-15 Thread Tom Ptacnik
It should be located(generated) in
/cache/controlpanel/modules/page/lib/


On 15 led, 10:46, HAUSa 
wrote:
> When I go to my application, it says only this:
> Fatal error: Class 'BasePageGeneratorConfiguration' not found in /srv/
> www/vhosts/startersspecialist.nl/httpdocs/apps/controlpanel/modules/
> page/lib/pageGeneratorConfiguration.class.php on line 11
>
> I think it has something to do with the admin generator, but what? I
> cannot recall the class and don't know where I should find it.
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: FormFilter - sfWidgetFormChoice 'multiple' => true ... error

2010-01-15 Thread ken
You need to add a custom query method in your filter class.

  public function addTkskateColumnQuery($query, $field, $value)
  {
if (!empty($value))
{
  $query->addWhereIn('p. tkstate', $value);
}
  }


On Jan 15, 5:50 pm, Tom Ptacnik  wrote:
> Nobody filter a list by checkboxes or by a multiple selectbox?
>
> On 11 led, 20:51, Tom Ptacnik  wrote:
>
>
>
> > Hello,
>
> > I have classic admin generated backend (Symfony 1.4). Today I've tried
> > to customize the filter for the list view.
>
> > The problem is that I want to filter by multiple select. So I've
> > changed default widgets in configure method in my TicketFormFilter
> > class from:
>
> > 'tkstate'    => new sfWidgetFormChoice(array('choices' => array('' =>
> > '', 'new' => 'new', 'waitingforuser' => 'waitingforuser',
> > 'waitingforadmin' => 'waitingforadmin', 'closed' => 'closed',
> > 'deleted' => 'deleted'))),
>
> > 'tkstate'    => new sfValidatorChoice(array('required' => false,
> > 'choices' => array('new' => 'new', 'waitingforuser' =>
> > 'waitingforuser', 'waitingforadmin' => 'waitingforadmin', 'closed' =>
> > 'closed', 'deleted' => 'deleted'))),
>
> > to
>
> > $this->widgetSchema['tkstate'] = new sfWidgetFormChoice(array
> > ('choices' => array('' => '', 'new' => 'new', 'waitingforuser' =>
> > 'waitingforuser', 'waitingforadmin' => 'waitingforadmin', 'closed' =>
> > 'closed', 'deleted' => 'deleted'), 'multiple' => true));
>
> >         $this->validatorSchema['tkstate'] = new sfValidatorChoice(array
> > ('required' => false, 'choices' => array('new' => 'new',
> > 'waitingforuser' => 'waitingforuser', 'waitingforadmin' =>
> > 'waitingforadmin', 'closed' => 'closed', 'deleted' => 'deleted'),
> > 'multiple' => true));
>
> > ... only added the multiple parameter.
>
> > But when i click on the "filter" submit (with two selected items: new,
> > waitingforuser), I got this error:
>
> > stack trace
> > at ()
> > in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib
> > \vendor\doctrine\Doctrine\Connection.php line 1082 ...
> >             $message .= sprintf('. Failing Query: "%s"', $query);
> >         }
> >         $exc  = new $name($message, (int) $e->getCode());
>
> >         if ( ! isset($e->errorInfo) || ! is_array($e->errorInfo)) {
> >             $e->errorInfo = array(null, null, null, null);
> >         }
> > 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 269 ...
> > at Doctrine_Connection_Statement->execute(array('new',
> > 'waitingforuser'))
> > in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib
> > \vendor\doctrine\Doctrine\Connection.php line 1006 ...
> > at Doctrine_Connection->execute('SELECT COUNT(*) AS num_results FROM
> > ticket t WHERE t.tkstate = ?', array('new', 'waitingforuser'))
> > in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib
> > \vendor\doctrine\Doctrine\Connection.php line 800 ...
> > at Doctrine_Connection->fetchAll('SELECT COUNT(*) AS num_results FROM
> > ticket t WHERE t.tkstate = ?', array('new', 'waitingforuser'))
> > in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib
> > \vendor\doctrine\Doctrine\Query.php line 2108 ...
>
> > The problem seems to be in the generated query ... the should be OR
> > statement (for this multiple choice), but it looks that it's generated
> > classic simple WHERE, and as parameter is send whole array... and
> > doctrine is confused of course
>
> > Maybe the problem is only in my application.
>
> > Did anybody of you ever tried to filter by multiple select?
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: widget multiple option

2010-01-15 Thread ken
Have you defined the relation of documents_users to users in your
schema.yml? Are you trying to achieve the behavior of sfGuardUser to
sfGuardPermission via sfGuardUserPermission?

On Jan 15, 7:01 pm, Javier Garcia  wrote:
> On 01/14/2010 11:20 PM, Gabo wrote:
>
>
>
>
>
> > Help!!
>
> > I have this in schema:
>
> > documents_users:
> >    columns:
> >     document_id: { type: integer }
> >     user_id:     { type: integer }
> >     created_at:  { type: timestamp }
>
> > y en the form, i change the widget user_id for this:
>
> > 'user_id'     => new sfWidgetFormDoctrineChoice(array('model' =>
> > 'sfGuardUser', 'add_empty' => true, *'multiple'=> true*)),
>
> > In the form the widget is multiple option... but i want to save the
> > form, print error:
>
> >     SQLSTATE[HY093]: Invalid parameter number: number of bound
> >     variables does not match number of tokens
>
> > i net to save more inserts becouse i selected 2 users_id in the
> > form...but symfony dont save??
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en.
>
> Hi,
>
> could you send the part that appears below the error message?
>
> 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Base GeneratorConfiguration not found

2010-01-15 Thread ken
Are you trying to override a module in a plugin?

On Jan 15, 9:47 pm, Tom Ptacnik  wrote:
> It should be located(generated) in
> /cache/controlpanel/modules/page/lib/
>
> On 15 led, 10:46, HAUSa 
> wrote:
>
>
>
> > When I go to my application, it says only this:
> > Fatal error: Class 'BasePageGeneratorConfiguration' not found in /srv/
> > www/vhosts/startersspecialist.nl/httpdocs/apps/controlpanel/modules/
> > page/lib/pageGeneratorConfiguration.class.php on line 11
>
> > I think it has something to do with the admin generator, but what? I
> > cannot recall the class and don't know where I should find it.
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] doctrine migration fails

2010-01-15 Thread pulse00
hi all,

i've tried to use the doctrine:migrate task, but i'm getting the
following error:

php symfony doctrine:migrate

>> doctrine  Migrating from version 0 to 1

  The following errors
occurred:

   - SQLSTATE[23000]: Integrity constraint violation: 1217 Cannot
delete or update a parent row: a foreign key constraint fails. Failing
Query: "DROP TABLE taggable_tag"

The project uses the doctrine taggable extension (http://www.doctrine-
project.org/extension/Taggable/1_2-1_0).

Anyone got migrations working together with this extension? I'm using
symfony version 1.4 (svn)

thanks!

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




Re: [symfony-users] Re: Deployed project does not load any javascript file

2010-01-15 Thread Francisc Nopcea
I don't call any include_javascripts().
I rely on the view.yml of each module I have defined.

I tried clearing the cache but no success.

Any ideas?

On Fri, Jan 15, 2010 at 3:03 PM, Gábor Fási  wrote:

> Do you call include_javascripts() in your layout? Did you clear your
> cache after the deployment?
>
> On Fri, Jan 15, 2010 at 08:47, domnuprofesor 
> wrote:
> > yes, of course I cheked the html code...
> > No 

[symfony-users] Re: sfWidgetFormPropelChoice appears as

2010-01-15 Thread Doraemon
But in the documentation, it seems that it's supposed to be in a line
by default.

On Jan 15, 2:06 am, Alexandru-Emil Lupu  wrote:
> Maybe by adding some css?
> Alecs
>
> sent via htc magic
>
> On Jan 15, 2010 6:40 AM, "Doraemon"  wrote:
>
> In the 
> documentation:http://www.symfony-project.org/cookbook/1_2/en/make-a-choice
>
> It shows the checkbox in a line, however, when I try it, it appears in
> an unordered list.
>
> My code:
>
> $this->widgetSchema['category'] = new sfWidgetFormPropelChoice(array(
>                'model' => 'ItemCategoryList',
>                'key_method' => 'getPrimaryKey',
>                'order_by' => array('Name','asc'),
>                'expanded' => true,
>                'multiple' => true,
>        ));
>
> I simply use  in my view to display my form. But this
> is what appears in the browser.
>
> HTML:
>
>  type="checkbox" value="1" id="addItemForm_category_1" />  for="addItemForm_category_1">Books
> ...
>
> I want it to appear in a line just like the documentation, how do I 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-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group 
> athttp://groups.google.com/group/symfony-users?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Re: Deployed project does not load any javascript file

2010-01-15 Thread Gábor Fási
In view.yml you specify which js files should be included when you
call include_javascripts() in your layout. Put the call right before
your  tag and it should work.
sfCommonFilter did this for you, but it has been deprecated in
1.3/1.4. See 
http://www.symfony-project.org/tutorial/1_4/en/upgrade#chapter_161aacbf11b8cc24bbdc6951ba0fb57d_sub_removal_of_the_common_filter

On Fri, Jan 15, 2010 at 15:35, Francisc Nopcea  wrote:
> I don't call any include_javascripts().
> I rely on the view.yml of each module I have defined.
>
> I tried clearing the cache but no success.
>
> Any ideas?
>
> On Fri, Jan 15, 2010 at 3:03 PM, Gábor Fási  wrote:
>>
>> Do you call include_javascripts() in your layout? Did you clear your
>> cache after the deployment?
>>
>> On Fri, Jan 15, 2010 at 08:47, domnuprofesor 
>> wrote:
>> > yes, of course I cheked the html code...
>> > No 

Re: [symfony-users] widget multiple option

2010-01-15 Thread Gabo
Yes, I create the relation with the tables..

but the widget is multiple = true print this error, but is false no print
error:


THE ERROR:

*Notice*: Undefined offset: 2 in *
C:\development\sfprojects\bambu\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib\vendor\doctrine\Doctrine\Connection\Pgsql\Exception.php
* on line *101*
*
*
*SQLSTATE[HY093]: Invalid parameter number: number of bound variables does
not match number of tokens*



2010/1/15 Javier Garcia 

>  On 01/14/2010 11:20 PM, Gabo wrote:
>
> Help!!
>
>  I have this in schema:
>
>  documents_users:
>columns:
> document_id: { type: integer }
> user_id: { type: integer }
> created_at:  { type: timestamp }
>
>  y en the form, i change the widget user_id for this:
>
>  'user_id' => new sfWidgetFormDoctrineChoice(array('model' =>
> 'sfGuardUser', 'add_empty' => true, *'multiple'=> true*)),
>
>  In the form the widget is multiple option... but i want to save the form,
> print error:
>
>  SQLSTATE[HY093]: Invalid parameter number: number of bound variables does
> not match number of tokens
> i net to save more inserts becouse i selected 2 users_id in the form...but
> symfony dont save??
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
> Hi,
>
> could you send the part that appears below the error message?
>
> 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-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
-- 

You received this message because you are subscribed to the Google Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: Deployed project does not load any javascript file

2010-01-15 Thread Francisc Nopcea
Gábor, thank you for the hint.
I don't use symfony 1.3, I use symfony 1.2.9 so the problem should not be
there.

On Fri, Jan 15, 2010 at 5:08 PM, Gábor Fási  wrote:

> In view.yml you specify which js files should be included when you
> call include_javascripts() in your layout. Put the call right before
> your  tag and it should work.
> sfCommonFilter did this for you, but it has been deprecated in
> 1.3/1.4. See
> http://www.symfony-project.org/tutorial/1_4/en/upgrade#chapter_161aacbf11b8cc24bbdc6951ba0fb57d_sub_removal_of_the_common_filter
>
> On Fri, Jan 15, 2010 at 15:35, Francisc Nopcea 
> wrote:
> > I don't call any include_javascripts().
> > I rely on the view.yml of each module I have defined.
> >
> > I tried clearing the cache but no success.
> >
> > Any ideas?
> >
> > On Fri, Jan 15, 2010 at 3:03 PM, Gábor Fási  wrote:
> >>
> >> Do you call include_javascripts() in your layout? Did you clear your
> >> cache after the deployment?
> >>
> >> On Fri, Jan 15, 2010 at 08:47, domnuprofesor 
> >> wrote:
> >> > yes, of course I cheked the html code...
> >> > No 

[symfony-users] Get raw/unprocessed route in a Template

2010-01-15 Thread Donald
I am trying to better integrate a Javascript Datagrid that I'm using
with the symfony routing system. I want to pass the unprocessed route
for to view a particular entity type to the javascript class.

For example, I have the following route:

email_show
/email/:id.sf_format

When displaying a datagrid on the client that was built with
Javascript, I can't simply use url_for('email_show'), because I need
to generate the URL *after* PHP has finished processing (on the client
side).

1. When the Javascript requests the emails (via XMLHttpRequest) to
populate the datagrid with, use url_for to embed the URL for each
entity in the entity itself. (I don't like this, it sounds messy).

2. Pass the raw route above to the Javascript, and have it build the
URL for the entity whenever it needs it.

So if I was to use method 2 above, I would need a way to get the
unprocessed route via a template. (I would imagine some helper like
route_for('email_show'))
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] 2 layers of embedded forms

2010-01-15 Thread jondro
I'm trying to have 2 layers of embedded forms, meaning i have a
Product model that has many Series and the Series have many Documents.
I wanted to have the series form embedded in the product and the
documents embedded in series thus having two layers of embedding. I
followed the advanced techniques tutorial on Forms but the problem is
that in the Series form i cannot check if the newDocument form was
filled because the form is never bound so getValues returns an empty
array.
Is it possible to achieve the above easly?
Thanks,
Andrew
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Embed optional form

2010-01-15 Thread Palleas
Hi there !

I'm working on a simple Quiz plugin for my Symfony project, so I'm
heavily using the Symfony embedding form system to have one big form
to edit my whole quiz :
- Quiz title
- Quiz questions
- For each questions, a list of proposals

I want to be able to add a question and a proposal when I edit my
quiz, so here is what I do :
abstract class PluginNoeQuizQuestionForm extends
BaseNoeQuizQuestionForm
{
  public function configure()
  {
parent::configure();
$this->useFields(array('label', 'multiple'));

foreach ($this->getObject()->getProposals() as $id =>
$proposition)
{
  $pForm = new NoeQuizProposalForm($proposition);
  $this->embedForm(sprintf('proposal%d', $id), $pForm);
}

// new proposal
$newProposal = new NoeQuizProposal();
$newProposal->setQuestion($this->getObject());

$pForm = new NoeQuizProposalForm($newProposal);
$pForm->getValidator('value')->setOption('required', false);
$pForm->getValidator('is_valid')->setOption('required', false);

$this->embedForm('newproposal', $pForm);
  }
}

As you can see, my "$pForm" does not contain any mandatory fields
because I want the user to be able to add a proposal to one question
only if he wants to. So it works, I don't have any fatal error, but
every time I save my form, I have an empty proposal that is created.

Can you see where I went wrong and how to fix this ? ;)

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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Symfony PHP Developer in Pune, India

2010-01-15 Thread Aceadi
Hello friends,

I have a good job opening for symfony and thought it will better to
share it here.


Here's the description:


Position: Senior Software Engineer - PHP

Company Profile: Our firm is a product engineering company that builds
commercial grade software for its customers. Our customers are ISVs
that are building, implementing and maintaining cutting edge products,
focused on time to market, client satisfaction, brand recognition, and
technology advantage. We help our customers meet these objectives. Our
approach to software development is characterized by our refreshing
approach best articulated as ‘Fresh Thinking! New Ideas!’. We have the
right blend of experience and can-do attitude. We deploy high-end
infrastructure facilities, state-of-the-art technology and best-in-
class resources to meet and exceed customer expectations.

Job Description:

We have an opening for a SSE / SE - PHP in Pune, India.

Key responsibilities:

   * Part of development team.
   * Participate in project scope definition and requirements
definition.
   * Write/review requirements and design documents.
   * Periodically communicate with client and provide them project
status.
   * Code applications using PHP 5, MySQL 5, AJAX and JavaScript.
   * Configure Linux, Apache, PHP and MySQL for development, QA and
production environments.

Candidate Will Have:

   * Overall 3+ years of experience for SSE level with experience in
PHP, Symfony frameworks, JavaScript, Apache and Linux servers
(including Linux command line and SSH).
   * Strong SQL and data manipulation skills (joining tables,
calculating fields, writing complex sql queries, etc).
   * Good knowledge of HTML, DHTML and CSS.
   * Good verbal and written communication skills.
   * Hands on skills on LAMP technologies.
   * applications using LAMP technologies.
   * Candidate should be able to manage a team of developers or
complete projects alone.
   * BE /B.Tech/ MCA from reputed institute

To be considered for this post email your resume
to:shi...@apexglobal.co.in

Please feel free to pass on the opportunity to your friends.

Thanks,
Adi
http://www.appliedeye.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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Re: Deployed project does not load any javascript file

2010-01-15 Thread Alexandru-Emil Lupu
Are your files chowned to the apache group? Does symfony has access on your
ymls for parsing? Are you sure that you have the correct priviledges on your
cache folder?
Switch it to dev mode (i think you have to upload the dev file) and check
whatever your debug bar says.

I guess you are a romanian guy. If so, i think we could use a chat system to
try fixing your problem.
Alecs

sent via htc magic

On Jan 15, 2010 5:21 PM, "Francisc Nopcea"  wrote:

Gábor, thank you for the hint.
I don't use symfony 1.3, I use symfony 1.2.9 so the problem should not be
there.

On Fri, Jan 15, 2010 at 5:08 PM, Gábor Fási  wrote: > >
In view.yml you specif...

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

You received this message because you are subscribed to the Google Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Editing a embedded form | Alterando um "form embeddado"

2010-01-15 Thread Cainã
Hi ppl,

I'm trying to alter a formulary which is being embedded on another form, in
order to change from table to divs, but i'm getting stuck, since i don't
know which template should i change. I tried to create a _form.php on both
of the forms, but it only change the father form, not the children ones.

Any ideas?

===

Olá pessoal!

Eu estou tentando alterar um formulário que está "embeddado" em outro, de
maneira que eu possa mudar ele de tabelas para divs, mas eu estou preso, já
que não sei que template eu devo alterar. Eu tentei criar um _form.php em
ambos os formulários, mas isso alterou apenas o formulário pai, não os
filhos.

Alguma idéia?
-- 

You received this message because you are subscribed to the Google Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Identify the module in the referer URL.

2010-01-15 Thread Bruno Reis
Hi,

I have a referer url and I want to identify what is the module from that
url. So I will need to parse this url the same way symfony does it on it´s
routing or front controller. How can I parse a string containing a URL to
know what is the module in it considering the actual defined routing
configuration?

Thanks,
Bruno
-- 

You received this message because you are subscribed to the Google Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] sfDoctrineGuardPlugin in Project with multiple DB connections

2010-01-15 Thread Tiago Nunes

Hello,


I'm having some issues trying to use sfDoctrineGuardPlugin with a 
symfony project that uses 2 Doctrine connections.


I use 2 connections because I have a phpBB forum embedded in my project 
(using prestaForumConnectorPlugin), and I want to keep the forum and 
application specific databases separate.


What I want to know, is how to specify which connection should 
sfDoctrineGuardPlugin use to manage it's users, grups and permissions.


My current databases.yml reads as follows:

all:
  doctrine:
class: sfDoctrineDatabase
param:
  dsn: 
mysql:host=localhost;dbname=mydb;unix_socket=/var/run/mysqld/mysqld.sock

  username: mydb
  password: *

  forum:
class: sfDoctrineDatabase
param:
  dsn: 
mysql:host=localhost;dbname=forum;unix_socket=/var/run/mysqld/mysqld.sock

  username: forum
  password: *


and currently, sfDoctrineGuardPlugin is trying to create it's tables and 
manage it's users in the forum DB, which is not what I want.


What's the best way to tell the plugin to use the doctrine connection 
(instead of the forum one)?


The solutions that come to mind are:
1. Specify it in ProjectConfiguration::configureDoctrine() or 
ProjectConfiguration::setupPlugins() using the Doctrine Manager;
2. Change the plugin schema.yml to add the connection property to each 
model (bad and ugly, and not the preferred aproach);

3. Override some kind of plugin configuration and set it there? (how?)


What's the best way to do this?


Best Regards,
--
Tiago Nunes


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




[symfony-users] Trying to add prototype functions

2010-01-15 Thread Javier Garcia

Hi,

I have added this in a template:




   }

but when i load the template in the browser, the javascript alert is not 
showed.


Even in Netbeans i have a syntax error...

I added also the code above in a file where im using another prototype 
function (toggleClassName()) that works ok to be sure the problem is not 
caused because im not loading prototype.js. This is the code i say:


 'mensaje/cambiarEstadoLeido?id='.$m->getId(),

// Aqui se desplegará el resultado de la acción.
'update' => 'mensaje_'.$m,

"complete" => "$('$m').toggleClassName('mensaje_1');",

)); ?>

Any help?

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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users]

2010-01-15 Thread Chris LeBlanc
Chris LeBlanc
webPragmatist
(817) 988-9616
http://www.webPragmatist.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-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Trying to add prototype functions

2010-01-15 Thread Tiago Nunes
Hi,

Just lose the  tags and you're good to go. ;)

You're trying to run javascript code in the PHP interpreter, which
isn't going to work.
All you have to do is replace your code with:



if( $('mutsu').hasClassName("apple") ) {
   alert("div has CSS apple class.");
}

and then that code will be executed on the client.

You're confusing PHP code with Javascript code, and that's not good.

PHP is intended to be executed *on the server*, before sending a
response to the client, while Javascript is supposed to execute *on
the client browser* (although it's also possible to run javascript
server-side).

Perhaps you're confused because symfony has some javascript helpers
that should be placed inside  tags, but these javascript
helpers are actually PHP functions, hence the tags.
When you want to write "real javascript", you should write it outside
the  tags, or echo/print it from inside them.


Best Regards,
--
Tiago Nunes

On Jan 15, 8:09 pm, Javier Garcia  wrote:
> Hi,
>
> I have added this in a template:
>
> 
>
>         alert("div has CSS apple class."); ?>
>     }
>
> but when i load the template in the browser, the javascript alert is not
> showed.
>
> Even in Netbeans i have a syntax error...
>
> I added also the code above in a file where im using another prototype
> function (toggleClassName()) that works ok to be sure the problem is not
> caused because im not loading prototype.js. This is the code i say:
>
> 
>              'url' => 'mensaje/cambiarEstadoLeido?id='.$m->getId(),
>
>              // Aqui se desplegar el resultado de la acci n.
>              'update' => 'mensaje_'.$m,
>
>              "complete" => "$('$m').toggleClassName('mensaje_1');",
>
>              )); ?>
>
> Any help?
>
> 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Re: Trying to add prototype functions

2010-01-15 Thread Javier Garcia

On 01/15/2010 09:20 PM, Tiago Nunes wrote:

You're confusing PHP code with Javascript code, and that's not good.



Thanks Tiago, it's true..

Anywy im trying this:



And it doesn't work...

No problem with ordinary code:


   if($('mutsu').hasClassName("apple")) {
  alert("div has CSS apple class.");
   }


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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Re: Trying to add prototype functions

2010-01-15 Thread Rodrigo Ruiz Fuentes

El 15/01/2010 18:10, Javier Garcia escribió:

Thanks Tiago, it's true..

Anywy im trying this:



And it doesn't work...

No problem with ordinary code:


if($('mutsu').hasClassName("apple")) {
alert("div has CSS apple class.");
}


Javi




Javier, try just using (') into javascript_tag:

 '
alert('div has CSS apple class.');  //   " => '
}
") ?>


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




[symfony-users] is there a way to unsubscribe from this group?

2010-01-15 Thread Zeek
Was there any follow up regarding the bug that kept sending out email?
I recall Fabien looked into it and decided that Google was responsible
for the bug, but usually Google fixes such bugs in 24 or 48 hours.
This has been going on for 2 months or so. I've trouble believing that
Google would leave Google Groups broken for this long. I have
repeatedly tried to turn off the email from this group, but I keep
getting sent email.

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




Re: [symfony-users] is there a way to unsubscribe from this group?

2010-01-15 Thread Stéphane
No, it's forever or you die instantaneously ! :-)
"
You received this message because you are subscribed to the Google 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.
>
"

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


On Fri, Jan 15, 2010 at 11:13 PM, Zeek  wrote:

> Was there any follow up regarding the bug that kept sending out email?
> I recall Fabien looked into it and decided that Google was responsible
> for the bug, but usually Google fixes such bugs in 24 or 48 hours.
> This has been going on for 2 months or so. I've trouble believing that
> Google would leave Google Groups broken for this long. I have
> repeatedly tried to turn off the email from this group, but I keep
> getting sent email.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>
>
-- 

You received this message because you are subscribed to the Google Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Trying to add prototype functions

2010-01-15 Thread Tiago Nunes
In my last email I forgot the opening and closing  tags
(or the symfony helper), but Rodrigo already gave you the correct
answer.

Try:



--
Tiago Nunes


On Jan 15, 9:10 pm, Javier Garcia  wrote:
> On 01/15/2010 09:20 PM, Tiago Nunes wrote:
>
> > You're confusing PHP code with Javascript code, and that's not good.
>
> Thanks Tiago, it's true..
>
> Anywy im trying this:
>
>     if($('mutsu').hasClassName("apple")) {
>        alert("div has CSS apple class.");
>     }
> ") ?>
>
> And it doesn't work...
>
> No problem with ordinary code:
>
> 
>     if($('mutsu').hasClassName("apple")) {
>        alert("div has CSS apple class.");
>     }
> 
>
> 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] How to access form filter object from within action?

2010-01-15 Thread Darren884
Can someone please tell me or show me an example on how to access a
form filter object from within an action so I can pass objects and
variables to it? This is killing me that Symfony does not allow
instances to travel globally.
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: How to access form filter object from within action?

2010-01-15 Thread Darren884
Hi guys I finally found the solution. The setOptions does not work
with FilterForms.

You must edit /lib/generate/sfModelGeneratorConfiguration.php and make
getFilterForm resemble getForm so it can contain options.

The first instance of the getFilterForm will be called in the
protected buildQuery method which you can pass the options to.

I hope this helps anyone who had as much trouble as I did with this
issue.

Thanks,
Darren

On Jan 15, 2:51 pm, Darren884  wrote:
> Can someone please tell me or show me an example on how to access a
> form filter object from within an action so I can pass objects and
> variables to it? This is killing me that Symfony does not allow
> instances to travel globally.
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Installation on shared hosting

2010-01-15 Thread Maciek
There is an easier way which works when you have ssh access.
Remove public_html directory and create symbolic link to project/web

ln -s where/your/project/is/web public_html

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