[symfony-users] Re: shopping cart?

2010-05-28 Thread bretth
I agree that it's easy to get a basic shopping cart going; the issue
really is all the "extra" things; the main one being advanced sales
reporting. I also don't have limitless time to invest; if there was
something solid to build off then it would be ideal.

On May 26, 11:05 pm, Eno  wrote:
> On Wed, 26 May 2010, bretth wrote:
> > Thankyou both for those; unfortunately neither are definitive
> > solutions at the moment :)
>
> Its pretty easy to write ashoppingcartin symfony - one of the (many)
> books has an example you can build upon.
>
> --

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] symfony criteri

2010-05-28 Thread Parijat Kalia
Howdy !!!

I am building queries...the query I am trying to do is
SELECT question FROM questions where username like 'ali'

now the result of this is clearly all the data in the question column of my
questions table, right?
 so to translate this into symfony, I do this

$c= new Criteria()
$c->add(QuestionsPeer::USERNAME,'ali');
$results = QuestionsPeer::doSelect($c);

Now $results contains all the data of the questions table, where I am
looking only for the question column, what do I need to add to the above
query to make it work,

I tried this $c->addSelectColumn(QuestionsPeer::QUESTION);
but that does not work!!!

So any leads anyone?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: how to prevent save in preInsert?

2010-05-28 Thread comb
Hey & Thanks! Yeah it's more clean like you describe to do it in
processForm or the isValid for the form classes, but then I have to
add this validation to each model-actions-class/model-form, that I
want to be flood-protected. Isn't there a way to prevent code-
duplication by using the preInsert hooks or something else? (DRY-
principle)
(That's maybe what the thread is about... best practice regarding DRY
or not DRY).

On 28 Mai, 14:24, Tom Ptacnik  wrote:
> If you want to redirect back to the filled form when user don't wait
> enough, then I think the best solution would be to do this validation
> in the moment as classic validation of the form fields.
>
> I suggest to create some class for this validation ...
> FloodProtector.class.php
> then create some method testFlood() maybe static maybe not :)
>
> And I see two options:
>
> Option 1)
>  Do this validation in the form object. For example in the method
> isValid()
> .. overwrite it ..
>
> public function isValid()
> {
>   if (FloodProtector::testFlood())
>   {
>    .. set error message somehow
>   return false;
>   }
>
>   return parent::isValid();
>
> }
>
> Option 2)
>  Check for this in the action next to the $form->isValid();
>
> protected function processForm(sfWebRequest $request, sfForm $form)
> {
>   $form->bind($request->getParameter($form->getName()), $request-
>
> >getFiles($form->getName()));
>
>   if ($form->isValid())
>   {
>     if (FloodProtector::testFlood())
>     {
>       $this->getUser()->setFlash('error', 'The item has not been saved
> due to flood protection.');
>     }
>     else
>     {
>      ... classic process if form is valid
> ...
>
> On 27 kvě, 22:04, comb  wrote:
>
> > that works! =) It prevent's the insert itself and I know, how to
> > redirect back to the form, but I cannot figure out, how to display the
> > given form values from the invoker again. My form is always empty :-/
>
> > class FloodCheckListener extends Doctrine_Record_Listener
> > {
> >         //...
> >         public function preInsert(Doctrine_Event $event)
> >         {
> >                 if (sfContext::hasInstance())
> >                 {
> >                         if (true) // check user attributes and DB for 
> > flooding
> >                         {
> >                                 $event->skipOperation(); // do not insert
> >                                 
> > sfContext::getInstance()->getUser()->setFlash('error', 'You have
> > to wait some time before you can post again!');
> >                                 $ref = 
> > sfContext::getInstance()->getRequest()->getReferer();
> >                                 if (empty($ref))
> >                                 {
> >                                         $ref = '@homepage';
> >                                 }
> >                                 
> > sfContext::getInstance()->getController()->redirect($ref);
> >                                 // TODO how to submit the invoker-values to 
> > the form??
> >                                 die(); // cancel current route-execution
> >                         }
> >                 }
> >         }
>
> > }
>
> > This is very dirty and I don't know how to write this behavior in a
> > better / cleaner way.
>
> > Any help would be appreciated.
>
> > Comb
>
> > On 27 Mai, 16:46, Daniel Lohse  wrote:
>
> > >http://www.doctrine-project.org/projects/orm/1.2/docs/manual/event-li...
>
> > > scroll down a little bit to the line: $event->skipOperation();
>
> > > This should do what you want?
>
> > > Daniel
>
> > > On 27.05.2010, at 16:41, comb wrote:
>
> > > > Hey thanks, but it does not work :-(
> > > > class FloodCheckListener extends Doctrine_Record_Listener
> > > > {
> > > >    //...
> > > >    public function preInsert(Doctrine_Event $event)
> > > >    {
> > > >            return false;
> > > >    }
> > > > }
> > > > The record is saved anyway.
>
> > > > On 27 Mai, 16:26, Robert Schoenthal  wrote:
> > > >> he,
>
> > > >> try to "return false" in your preInsert Method, it think it should
> > > >> work
>
> > > >> On May 27, 12:39 am, comb  wrote:
>
> > > >>> Hi,
>
> > > >>> i'm writing a CheckFloodable-Behavior.
> > > >>> Before a new record is saved, I would like to prevent the insertion of
> > > >>> the new record if the user did not wait long enough.
> > > >>> It's very dirty since I use the sfContext::getInstance() quite much,
> > > >>> but my question is, how would one prevent the insertion? is it ever
> > > >>> possible`to prevent it within a listener or do I have to write a check
> > > >>> in every new/create action if the model??
> > > >>> I tried a redirection within the listener, but the record is inserted
> > > >>> anyway...
>
> > > > --
> > > > If you want to report a vulnerability issue on symfony, please send it 
> > > > to security at symfony-project.com
>
> > > > You received this message because you are subscribed to the Google
> > > > Groups "symfony users" group.
> > > > To post to this group, send email to symfony-users@googlegr

Re: [symfony-users] Re: How to remove index.php and backend.php from the url ?

2010-05-28 Thread Eno
On Fri, 28 May 2010, John wrote:

> Here is the solution for rewriting website/backend.php  to website/
> admin and makes the admin area to work.


Since mod_rewrite directs all routes to index.php, there can be only one 
controller per folder, and this solution *is* documented in the symfony 
book. You could also just rename backend.php to index.php and not need to 
change the rewrite rule to use backend.php.



-- 




-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] another ajax doubt

2010-05-28 Thread Donald Tyler
This isn't really Ajax related, it's just JavaScript related.

You can easily accomplish this by triggering some JavaScript in the
onchange event of the drop down, then having that JavaScript create
the text inputs programatically.

On Thursday, May 27, 2010, Parijat Kalia  wrote:
> So guys,
>
> sorry for deviating this off topic, but it is ajax based and web based, so I 
> suppose it is an integral part of the development. anyways, I have a drop 
> down, consisting of a set of numbers, depending on the number the user 
> chooses, I want to replicate that many textfields on my page. Currently, this 
> requires two pages, one where the dropdown with nos exist, and the other 
> where the textfields exist.
>
> I was wondering how I can make this possible via ajax, I suppose that is how 
> you do it. Or can I do it via javascript. Do let me know your secrets!
>
> thanks
>
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Affordable managed hosting for use with symfony

2010-05-28 Thread Alexandru-Emil Lupu
VPS
or:
Shared :
http://alecslupu.ro/blog/Installing-a-symfony-project-on-a-shared-host


On Fri, May 28, 2010 at 11:46 PM, Eno  wrote:

> On Fri, 28 May 2010, Daniel Lohse wrote:
>
> > Take a look at what Servergrove has to offer. All their VPS instances
> > are alright and they come pre-configured with symfony. Shared hosting
> > is not an option, obviously (don't even consider it). :)
>
> Ive been happily using Linode (linode.com) for virtual servers. The only
> thing is that most VPS setups are not "managed" in the traditional sense.
> You are expected to maintain the server yourself.
>
>
>
> --
>
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Have a nice day!

Alecs
Certified ScrumMaster

P.S. If you are on a list, please don't contact me privatelly, unless i have
allowed to. Further messages will be ignored.

There are no cannibals alive! I have ate the last one yesterday ...
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)0722 621 280

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Affordable managed hosting for use with symfony

2010-05-28 Thread Eno
On Fri, 28 May 2010, Daniel Lohse wrote:

> Take a look at what Servergrove has to offer. All their VPS instances  
> are alright and they come pre-configured with symfony. Shared hosting  
> is not an option, obviously (don't even consider it). :)

Ive been happily using Linode (linode.com) for virtual servers. The only 
thing is that most VPS setups are not "managed" in the traditional sense. 
You are expected to maintain the server yourself.



-- 


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: inject user information

2010-05-28 Thread Eno
On Fri, 28 May 2010, f1gm3nt wrote:

> I found a way to do it, here's the code
> 
> sfContext::createInstance($this->configuration);
> $this->logSection('user', 'logging user in');
> $user = sfContext::getInstance()->getUser();
> $user->setAttribute('user_id', '1', 'sfGuardSecurityUser');
> $user->setAuthenticated(true);
> $user->clearCredentials();
> $user->addCredentials($user->getAllPermissionNames());
> $user->setAttribute('workingClient', $options['workingClient']);
> $this->logSection('user', 'User has been logged in');


i.e. you faked it with a mock object.



-- 


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Affordable managed hosting for use with symfony

2010-05-28 Thread Daniel Lohse
Take a look at what Servergrove has to offer. All their VPS instances  
are alright and they come pre-configured with symfony. Shared hosting  
is not an option, obviously (don't even consider it). :)


Sent from my iPhone

On May 28, 2010, at 10:23 PM, Yair Silbermintz   
wrote:


I'm about to embark on a project for a new client. They are a small  
business that does not have the resources to manage their own server.


Anyone have a recommendation for a managed hosting solution that  
works well with symfony? Cost will play a big factor, so the cheaper  
it is the better.


-Yair

--
If you want to report a vulnerability issue on symfony, please send  
it to security at symfony-project.com


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


--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Affordable managed hosting for use with symfony

2010-05-28 Thread Eno
On Fri, 28 May 2010, Yair Silbermintz wrote:

> I'm about to embark on a project for a new client. They are a small business
> that does not have the resources to manage their own server.
> 
> Anyone have a recommendation for a managed hosting solution that works well
> with symfony? Cost will play a big factor, so the cheaper it is the better.

"Managed hosting" to me implies either a shared server (not very flexible) 
or a dedicated server managed by somebody (not cheap).



-- 


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Affordable managed hosting for use with symfony

2010-05-28 Thread Yair Silbermintz
I'm about to embark on a project for a new client. They are a small business
that does not have the resources to manage their own server.

Anyone have a recommendation for a managed hosting solution that works well
with symfony? Cost will play a big factor, so the cheaper it is the better.

-Yair

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: multiple problems with Symfony 1.4 installation

2010-05-28 Thread pghoratiu
You should check the logs for both symfony and apache.

   gabriel


On May 28, 2:33 pm, sdwdd  wrote:
> Hi, All.
>
> Having a couple of problems with Symfony 1.4 installation:
> 1. While I'm using development environment sometime an error
> "application frontend not found" occurs, in a random way. It can
> resume the normal functionality after page reload, or sometimes it
> persists until apache2 reload.
> 2. A problem with sfGuard plugin.
> It works okay in the development environment, however in test
> environment after the user is logged in it looses the session. User
> gets logged in, but after a page reload the authentication session is
> lost.
>
> The installation is core Symfony 1.4 with sfGuardPlugin and some
> custom templating.
>
> Any ideas on those? I'm feeling like there's a problem with server
> config, however don't know what could be wrong(raised the memory_limit
> to 512Mb).
>
> Thanks,
> Serg

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: Routing based on environment

2010-05-28 Thread pghoratiu
As far as i know there is no support out of the box for this.

I think that in this case the flexibility does not make too much sense
because
you want each your environments dev, staging, prod to be configured
exactly the same so you can replicate bugs consistently across
environments.

   gabriel

On May 28, 12:16 pm, PHP Developers  wrote:
> Hi There,
>
> Need to know if there is support for environment based routing. e.g.
> different routing for Prod and different for Dev and different for any
> other custom environment?
>
> Thanks
> Zaid

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: Add form widgets dynamically from javascript

2010-05-28 Thread fRAnKEnSTEin
Hi,

Luc thanks for your fast reply!. OK as i understand i do not need to
embed forms, because i do not need to "... input of data (edition or
adding new data) into multiple related objects.". What i need to do is
much simpler(i think) than that:

**Just think,  for example, that i want to create a "todo" site, so
everytime the user clicks over the "add another" link the app will
render a new textbox that will be part of the "todoForm", so you can
click the "add" link as many times you wish to create any amount of
todo's(new textboxes ), and then submit the form and save them.**

So back to my problem, I have created one form called "stepOneForm" in
wich i have created 2 widgets( and validators form them too ) as
follows:

class StepOneForm extends BaseForm
{
public function configure() {
$this->setWidgets(array(
'txt_check_in'  => ,
'txt_check_out'=> ,
));

$this->setValidators(array(
'txt_check_in'  => ...,
'txt_check_out'=> ...,
} // end configure
}

Then i have created a module called "reserve" wich has a template
called "StepOneSuccess"(and it's related action called
"executeStepOne"), that renders the widgets of the "StepOneForm" as
follows:





 renderError() ?>
 render() ?>


 renderError() ?>
 render() ?>




+Add another room



renderError() ?>



Now, the above template and form("StepOneForm") does not have all the
inputs that i need to complete the process, i still need to add
"rooms", so the user can select a checkin-checkout date and then add
rooms as he/she needs to reserve. For this i have created the "add"
link, so everytime the user clicks on it, it fires an AJAX javascript
method that asks the server to create the widgets needed for entry the
room data (Note, this "room data" is not another form, they are just
widgets like  "adult quantity" input, "children quantity" input and
"bed type" input, that i need to add to "steOneForm" dynamically when
the user clicks the "add" link)...

And here is my problem:

a) Do i need to embedForm? (the link you gave me used embedform..but i
am not sure if i need to use this)
b) How can i add dynamically new widgets to the "stepOneForm" when the
user clicks over the "add" link
c) How can i render this new widgets dynamically created into the
template

any idea?

Cheers,

Shirkavand

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: inject user information

2010-05-28 Thread f1gm3nt
I found a way to do it, here's the code

sfContext::createInstance($this->configuration);
$this->logSection('user', 'logging user in');
$user = sfContext::getInstance()->getUser();
$user->setAttribute('user_id', '1', 'sfGuardSecurityUser');
$user->setAuthenticated(true);
$user->clearCredentials();
$user->addCredentials($user->getAllPermissionNames());
$user->setAttribute('workingClient', $options['workingClient']);
$this->logSection('user', 'User has been logged in');

Now when you call sfContext::getInstance()->getUser()->getId() it does
not break, that code will "signin" a user, seems to work but maybe
someone has a better solution?

-f1g


On May 28, 2:08 pm, Eno  wrote:
> On Fri, 28 May 2010, f1gm3nt wrote:
> > I'm writing a symfony task that needs a user to run some of the
> > functions. Is it possible to inject user information so that when I
> > call sfContext::getInstance()->getUser()->getId() it will not break?
>
> I could be wrong, but I dont think you have a user when you're running PHP
> on the command-line since there's no server and hence no session.
>
> --

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] inject user information

2010-05-28 Thread Eno
On Fri, 28 May 2010, f1gm3nt wrote:

> I'm writing a symfony task that needs a user to run some of the
> functions. Is it possible to inject user information so that when I
> call sfContext::getInstance()->getUser()->getId() it will not break?

I could be wrong, but I dont think you have a user when you're running PHP 
on the command-line since there's no server and hence no session.



-- 


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Multipart-data ajax form

2010-05-28 Thread Vikos
Hi Guys!

The problem:
I need to upload a file width some parameters from a modalbox.

I read som articles and tutorials how to do it.
JQuery has some ajax file upload plugin. but! They can upload only a
file, not a complete form.
(...every uses ifame to submit a multipart form...)

The question: Has anyone a great javascript sniplet, that can upload a
complete multipart form, and works width several browsers

The plan:
I want to put the whole form from a modalbox into an iframe... submit
it and put back the answer to the modalbox.

I have an solution but I'm not sure it works wll width all (most
of...) browsers.

THANKS

Vikos

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] ahDoctrineEasyEmbeddedRelations plugin is fail to get father's alias and suggest a patch for it

2010-05-28 Thread Daniel Lohse
Hmmm this sounds like a problem someone else had. *looks into Mail archive* 
Yes, definitely. Hmm, it looks a bit hackish (sorry), don't you think? Why did 
you add it as an option to the embedRelations() method?

I'll have to think about it but in the meantime, could you fork my plugin on 
GitHub, apply the patch and send a fork request? That'd be awesome because then 
all the others could apply this, too — without me needing to do it right away. 
I'm in the middle of my diploma thesis at the moment. :)

And thanks for catching, debugging and fixing this bug! :)

Cheers, Daniel

Sent from my iPad

On May 28, 2010, at 1:13 PM, "SNake!"  wrote:

> Hi guys,
> 
> I think Daniel Lohse did a great job on
> ahDoctrineEasyEmbeddedRelations plugin:
> http://www.symfony-project.org/plugins/ahDoctrineEasyEmbeddedRelationsPlugin/1_3_4
> 
> But I encounter some problems. When I do the same, I have got
> exception like:
> 
> 
> 
> I think the plugin is fail to get father's alias
> 
> This is an example, in one to many relationship, let's say:
> 
> FileFolder:
>  actAs: ...
>  columns: ...
> 
> File:
>  actAs: ...
>  columns: ...
>  relations:
>Folder:
>  class:   FileFolder
>  foreignAlias:  Papers
>  type: one
>  foreignType:  many
>  onDelete:  CASCADE
> 
> $file = new File();
> $file->Folder; // work!
> $file->FileFolder; // fail, since we have a custom alias name in
> schema
> 
> I traced down this problem in ahBaseFormDoctrine class:
> 
>  private function embeddedFormObjectFactory($relationName,
> Doctrine_Relation $relation)
>  {
>if (Doctrine_Relation::MANY === $relation->getType())
>{
>  $newFormObjectClass = $relation->getClass();
>  $newFormObject = new $newFormObjectClass();
>  $newFormObject[get_class($this->getObject())] = $this-
>> getObject(); // get father's alias by using get_class($this-
>> getObject()), then we get FileFolder but not Folder !
>} else
>{
>  $newFormObject = $this->getObject()->$relationName;
>}
> 
>return $newFormObject;
>  }
> 
> Because I cannot see there is a setting I could pass in embedRations
> method, soI have created a patch for it:
> http://gist.github.com/417043
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Como convertir un formulario embebido en un objeto del modelo?

2010-05-28 Thread Maria Torres
Hola Mauricio, gracias por la informacion lo que pasa es que me confundi de
grupo y lo envie donde no debia.

Disculpen :(

Sorry, I'm wrong group :S

2010/5/27 Mauricio Rivera Schneider 

> María, me gustaría poder ayudar con tu problema pero la verdad es que
> también soy nuevo en symfony.
> De todas maneras, quizás deberías intentar el grupo en español, pues este
> grupo es principalmente de usuarios que hablan inglés.
>
> Acá te dejo el link para el grupo en español:
> http://groups.google.com/group/symfony-es/
>
> Saludos,
> Mauricio Rivera.
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Eclipse+Aptana Pluging routing?

2010-05-28 Thread vax
Eclipse+Aptana Pluging don't understand 
http://127.0.0.1:8080/project/frontend_dev.php/modele/action
I think need make url like 
http://127.0.0.1:8080/project/frontend_dev.php?/modele/action
How I can do this?
May be has another decision?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Error Auditable Fixtures

2010-05-28 Thread Iraklis
Buenas tardes,

Recientemente hallé un snippet (http://snippets.symfony-project.org/
snippet/405) que me facilita el poder auditar las
tablas de mi base de datos.

El problema lo tengo con los fixtures... al hacer una tabla
auditable,
me genera el siguiente error:

Unknown record property / related component "system_user" on 

He intentado meter "system_user" como un usuario más de la tabla
sf_guard_user, pero no ha funcionado.

¿Alguien ha usado este snippet y ha intentado meter fixtures?

---

Hi all,

Recently I discover a code snippet (http://snippets.symfony-
project.org/snippet/405) that makes my auditable tables easier.

When I want to run a fixture in an auditable table, symfony shows me
the next error:

Unknown record property / related component "system_user" on


I tried to fill "system_user" as user in sf_guard_user, but the error
doesn't dissappear.

Anyone has used this snippet and tried to run fixtures?

Thanks all...

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] inject user information

2010-05-28 Thread f1gm3nt
I'm writing a symfony task that needs a user to run some of the
functions. Is it possible to inject user information so that when I
call sfContext::getInstance()->getUser()->getId() it will not break?

Thanks

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] multiple problems with Symfony 1.4 installation

2010-05-28 Thread sdwdd
Hi, All.

Having a couple of problems with Symfony 1.4 installation:
1. While I'm using development environment sometime an error
"application frontend not found" occurs, in a random way. It can
resume the normal functionality after page reload, or sometimes it
persists until apache2 reload.
2. A problem with sfGuard plugin.
It works okay in the development environment, however in test
environment after the user is logged in it looses the session. User
gets logged in, but after a page reload the authentication session is
lost.

The installation is core Symfony 1.4 with sfGuardPlugin and some
custom templating.

Any ideas on those? I'm feeling like there's a problem with server
config, however don't know what could be wrong(raised the memory_limit
to 512Mb).


Thanks,
Serg

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Routing based on environment

2010-05-28 Thread PHP Developers
Hi There,

Need to know if there is support for environment based routing. e.g.
different routing for Prod and different for Dev and different for any
other custom environment?


Thanks
Zaid

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Como convertir un formulario embebido en un objeto del modelo?

2010-05-28 Thread Mauricio Rivera Schneider
María, me gustaría poder ayudar con tu problema pero la verdad es que 
también soy nuevo en symfony.
De todas maneras, quizás deberías intentar el grupo en español, pues 
este grupo es principalmente de usuarios que hablan inglés.


Acá te dejo el link para el grupo en español: 
http://groups.google.com/group/symfony-es/


Saludos,
Mauricio Rivera.

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: How to remove index.php and backend.php from the url ?

2010-05-28 Thread John
Ok I found the perfect solution :

http://kannapiran1986.blogspot.com/2009/03/symfony-websitebackendphp-to.html


Here is the solution for rewriting website/backend.php  to website/
admin and makes the admin area to work.

1. Create a folder "admin" inside "web" folder. Copy here the
same .htaccess file and change this line:

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

to:

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

2. Then go to routing file for backend (app/backend/config/
routing.yml) and add folder name to all your routes defined there. Ex:

# default rules
homepage:
url: /admin/
param: { module: default, action: index }
.
.
.

3. Set no_script_name to "on" in your backend settings (app/backend/
config/settings.yml) file:

prod:
.settings:
no_script_name: on

4. Clear Cache and now you should be able to get to your backend
using: http://mydomian.com/admin/ without problems

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: How to remove index.php and backend.php from the url ?

2010-05-28 Thread John
Thanks for your answer Eno. It works perfectly for the frontend.

For the backend tough, it seems quite more complicated.

For those interested, I've seen several solutions :
- http://symfony-check.org/permalink/delete-backend-php-from-your-uri
- http://forum.symfony-project.org/index.php/m/23976/5598/0///#msg_23976

On 28 mai, 16:33, Eno  wrote:
> On Fri, 28 May 2010, John wrote:
>
> > I'm trying to remove index.php and backend.php from my urls, so that I
> > can have :
> > -www.example.com/index.php->www.example.com
> > -www.example.com/index.php/api/events.xml->www.example.com/api/events.xml
> > -www.example.com/backend.php/admin->www.example.com/admin
>
> > I've uncommented "LoadModule rewrite_module modules/mod_rewrite.so" in
> > httpconf and I've got an .htaccess file in the web folder :
>
> You also need to switch on no_script_name in your app 
> settings:http://www.symfony-project.org/gentle-introduction/1_4/en/09-Links-an...
>
> --

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] change database server in action

2010-05-28 Thread Eno
On Fri, 28 May 2010, Mohammad Ali Safari wrote:

> I want to be able to change the database server base on some info from
> users, e.g. their IP address. Has anybody implemented such a thing, or has
> an idea on how to do that?
> 
> I tried creating a filter class to be executed at the beginning of filter
> chain with some logic like this:
> 
> $database = new sfPropelDatabase($params);
> $database->initialize(array (
>   'phptype' => 'mysql',
>   'hostspec' => --server--
>   'database' =>--db_name--
>   'username' => --db_pass--,
>   'password' => --db_password--,
> ), 'propel');
> sfContext::getInstance()->databases['propel'] = $database;

Which version of symfony? Which version of Propel?

e.g. might be possible to extend sfDatabase and create your own database 
class (similar to sfPDODatabase) and then you can create your own database 
connections.

(I haven't done this myself but looking through the database classes, I 
saw how sfPDODatabase creates connections and thought it might be 
possible).

Or you might be able to create a connection in your model by passing in 
suitable parameters from the action.


-- 


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] prob routing whene i use ajax with symfony in edit action

2010-05-28 Thread yongSymfo
helle ,
 i use ajax in Module form that it work good in create action but
whene i in edit action i have error and in firebug i the request url
is not correctly
if Some one have any information to resolve this.



thanks

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] How to remove index.php and backend.php from the url ?

2010-05-28 Thread Eno
On Fri, 28 May 2010, John wrote:

> 
> I'm trying to remove index.php and backend.php from my urls, so that I
> can have :
> - www.example.com/index.php -> www.example.com
> - www.example.com/index.php/api/events.xml -> www.example.com/api/events.xml
> - www.example.com/backend.php/admin -> www.example.com/admin
> 
> I've uncommented "LoadModule rewrite_module modules/mod_rewrite.so" in
> httpconf and I've got an .htaccess file in the web folder :

You also need to switch on no_script_name in your app settings:
http://www.symfony-project.org/gentle-introduction/1_4/en/09-Links-and-the-Routing-System#chapter_09_url_rewriting



-- 


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] change database server in action

2010-05-28 Thread Mohammad Ali Safari
Hi

I want to be able to change the database server base on some info from
users, e.g. their IP address. Has anybody implemented such a thing, or has
an idea on how to do that?

I tried creating a filter class to be executed at the beginning of filter
chain with some logic like this:


$database = new sfPropelDatabase($params);
$database->initialize(array (
  'phptype' => 'mysql',
  'hostspec' => --server--
  'database' =>--db_name--
  'username' => --db_pass--,
  'password' => --db_password--,
), 'propel');
sfContext::getInstance()->databases['propel'] = $database;


but this does not work.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: template:no value

2010-05-28 Thread safa boubekri
it's select  sorry

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: template:no value

2010-05-28 Thread Jérémie
Le vendredi 28 mai 2010 à 11:49 -0200, safa boubekri a écrit :
> no  it's white and i  have this msg in the title of  my page:
> 
> Doctrine_table_exception: unknown  method  table::selecte
> 

"selecte" is french.
Try "select", in english ;)

Jérémie

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: template:no value

2010-05-28 Thread safa boubekri
no  it's white and i  have this msg in the title of  my page:

Doctrine_table_exception: unknown  method  table::selecte

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: template:no value

2010-05-28 Thread safa boubekri
ok  thank you

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: template:no value

2010-05-28 Thread Eno
On Fri, 28 May 2010, safa boubekri wrote:

> i have all  page  is white

WHen you view source, there's no HTML?



-- 


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: template:no value

2010-05-28 Thread John
So the problem the query in your getTotals() method.

You should check the Doctrine doc since I'm not very comfortable with
that :-)

Good luck with it !

On 28 mai, 15:35, safa boubekri  wrote:
> it  return me
>
> 3 4
>
> the ID of he montants    which  i want  to  have  the sum

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: template:no value

2010-05-28 Thread safa boubekri
it  return me

3 4


the ID of he montantswhich  i want  to  have  the sum

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: template:no value

2010-05-28 Thread John
Sorry for this. So :
public function executeIndex(sfWebRequest $request)
 {
 $this->test = Doctrine_core::getTable('Cotisation')->createQuery('a')-
>execute();
}

On 28 mai, 15:31, John  wrote:
> try :
>
> public function executeIndex(sfWebRequest $request)
>  {
>  $this->test = Doctrine_core::getTable('Cotisation')->-
>
> >createQuery('a')->execute();
> }
>
> if it still doesn't work, maybe you should check if your template is
> correctly displayed ?
>
> On 28 mai, 15:25, safa boubekri  wrote:
>
> >    getTotals:
>
> > public function getTotals()
> > {
>
> >  return $this->createQuery('c')-> SELECT('SUM(c.Montant) FROM 
> > c')->execute();
>
> > }

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: template:no value

2010-05-28 Thread John
try :

public function executeIndex(sfWebRequest $request)
 {
 $this->test = Doctrine_core::getTable('Cotisation')->-
>createQuery('a')->execute();
}

if it still doesn't work, maybe you should check if your template is
correctly displayed ?

On 28 mai, 15:25, safa boubekri  wrote:
>    getTotals:
>
> public function getTotals()
> {
>
>  return $this->createQuery('c')-> SELECT('SUM(c.Montant) FROM c')->execute();
>
> }

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: template:no value

2010-05-28 Thread safa boubekri
i think  probleme with doctrine  conexion because i have  this msg

SET NAMES 'UTF8'

0.00s, "doctrine" connection

when i debug

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: template:no value

2010-05-28 Thread safa boubekri
   getTotals:


public function getTotals()
{


 return $this->createQuery('c')-> SELECT('SUM(c.Montant) FROM c')->execute();




}

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: template:no value

2010-05-28 Thread safa boubekri
i  put
 
  
 


i have all  page  is white

:(

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: template:no value

2010-05-28 Thread John
Oh yeah, and did you try something like :


 getId() ?>


you can also try :

 


On 28 mai, 15:10, John  wrote:
> Hi,
>
> can you show the "getTotals()" method ?
>
> On 28 mai, 15:07, safa boubekri  wrote:
>
> > hello
>
> > i put in action
>
> > public function executeIndex(sfWebRequest $request)
> >  {
>
> >  $this->test = Doctrine_core::getTable('Cotisation')->getTotals();  }
>
> > in template i  call  value test as:
> > 
> >  
> > 
>
> > but no result
>
> > thank you

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: template:no value

2010-05-28 Thread John
Hi,

can you show the "getTotals()" method ?

On 28 mai, 15:07, safa boubekri  wrote:
> hello
>
> i put in action
>
> public function executeIndex(sfWebRequest $request)
>  {
>
>  $this->test = Doctrine_core::getTable('Cotisation')->getTotals();  }
>
> in template i  call  value test as:
> 
>  
> 
>
> but no result
>
> thank you

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] template:no value

2010-05-28 Thread safa boubekri
hello

i put in action

public function executeIndex(sfWebRequest $request)
 {

 $this->test = Doctrine_core::getTable('Cotisation')->getTotals();  }


in template i  call  value test as:

 



but no result

thank you

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] How to remove index.php and backend.php from the url ?

2010-05-28 Thread John
Hi,

I'm trying to remove index.php and backend.php from my urls, so that I
can have :
- www.example.com/index.php -> www.example.com
- www.example.com/index.php/api/events.xml -> www.example.com/api/events.xml
- www.example.com/backend.php/admin -> www.example.com/admin

I've uncommented "LoadModule rewrite_module modules/mod_rewrite.so" in
httpconf and I've got an .htaccess file in the web folder :

Options +FollowSymLinks +ExecCGI


RewriteEngine On

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

# we skip all files with .something
# comment the following 3 lines to allow periods in routes

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]




With this rule, www.example.com works, but nothing else.

Do you have any idea how I can do this ?

Thanks,
John

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: configure getListBatchActions() in backend

2010-05-28 Thread Eno
On Fri, 28 May 2010, Ricardo wrote:

> thanks for the response but I don't understand what I have to do.

You said that the page you see doesn't change unless you clear the cache 
right? That's your clue. This means you must be looking at a cached page 
which in turn means you are (incorrectly) caching a page that depends on 
session data. Therefore to 'fix' this you can:

1) If you are caching the whole page then you must make the cache key 
depend on the state (i.e. if logged in, maybe use userid in cache key 
otherwise use a general 'not logged in' key)

2) OR if you are caching fragments of the page, then make sure you dont 
cache fragments that change depending on session data.

3) OR if this page is not public and mot used very often you could choose 
to switch off caching for that page.

You should read up on caching in symfony:
http://www.symfony-project.org/gentle-introduction/1_4/en/12-Caching



-- 


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: method_backned

2010-05-28 Thread safa boubekri
sir please

i put in action

public function executeIndex(sfWebRequest $request)
  {

  $this->test = Doctrine_core::getTable('Cotisation')->getTotals();  }


in template i  call  value test as:

  



but no result

thank you

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: method_backned

2010-05-28 Thread Tom Ptacnik
You can't. Action is connected with the routing - url. So if you want
to execute some action, you can do redirect, forward or something like
that.

If you want to call some function/method over the whole app, you
should have it in some class - some App/Bussines/Tools class or in the
model object.



On 27 kvě, 13:42, safa boubekri  wrote:
> how  can i call  methode   in the  indexSuccess.php  this method is
> delared in the  action of module in  backend

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: how to prevent save in preInsert?

2010-05-28 Thread Tom Ptacnik
If you want to redirect back to the filled form when user don't wait
enough, then I think the best solution would be to do this validation
in the moment as classic validation of the form fields.

I suggest to create some class for this validation ...
FloodProtector.class.php
then create some method testFlood() maybe static maybe not :)

And I see two options:

Option 1)
 Do this validation in the form object. For example in the method
isValid()
.. overwrite it ..

public function isValid()
{
  if (FloodProtector::testFlood())
  {
   .. set error message somehow
  return false;
  }

  return parent::isValid();
}


Option 2)
 Check for this in the action next to the $form->isValid();

protected function processForm(sfWebRequest $request, sfForm $form)
{
  $form->bind($request->getParameter($form->getName()), $request-
>getFiles($form->getName()));

  if ($form->isValid())
  {
if (FloodProtector::testFlood())
{
  $this->getUser()->setFlash('error', 'The item has not been saved
due to flood protection.');
}
else
{
 ... classic process if form is valid
...



On 27 kvě, 22:04, comb  wrote:
> that works! =) It prevent's the insert itself and I know, how to
> redirect back to the form, but I cannot figure out, how to display the
> given form values from the invoker again. My form is always empty :-/
>
> class FloodCheckListener extends Doctrine_Record_Listener
> {
>         //...
>         public function preInsert(Doctrine_Event $event)
>         {
>                 if (sfContext::hasInstance())
>                 {
>                         if (true) // check user attributes and DB for flooding
>                         {
>                                 $event->skipOperation(); // do not insert
>                                 
> sfContext::getInstance()->getUser()->setFlash('error', 'You have
> to wait some time before you can post again!');
>                                 $ref = 
> sfContext::getInstance()->getRequest()->getReferer();
>                                 if (empty($ref))
>                                 {
>                                         $ref = '@homepage';
>                                 }
>                                 
> sfContext::getInstance()->getController()->redirect($ref);
>                                 // TODO how to submit the invoker-values to 
> the form??
>                                 die(); // cancel current route-execution
>                         }
>                 }
>         }
>
> }
>
> This is very dirty and I don't know how to write this behavior in a
> better / cleaner way.
>
> Any help would be appreciated.
>
> Comb
>
> On 27 Mai, 16:46, Daniel Lohse  wrote:
>
>
>
> >http://www.doctrine-project.org/projects/orm/1.2/docs/manual/event-li...
>
> > scroll down a little bit to the line: $event->skipOperation();
>
> > This should do what you want?
>
> > Daniel
>
> > On 27.05.2010, at 16:41, comb wrote:
>
> > > Hey thanks, but it does not work :-(
> > > class FloodCheckListener extends Doctrine_Record_Listener
> > > {
> > >    //...
> > >    public function preInsert(Doctrine_Event $event)
> > >    {
> > >            return false;
> > >    }
> > > }
> > > The record is saved anyway.
>
> > > On 27 Mai, 16:26, Robert Schoenthal  wrote:
> > >> he,
>
> > >> try to "return false" in your preInsert Method, it think it should
> > >> work
>
> > >> On May 27, 12:39 am, comb  wrote:
>
> > >>> Hi,
>
> > >>> i'm writing a CheckFloodable-Behavior.
> > >>> Before a new record is saved, I would like to prevent the insertion of
> > >>> the new record if the user did not wait long enough.
> > >>> It's very dirty since I use the sfContext::getInstance() quite much,
> > >>> but my question is, how would one prevent the insertion? is it ever
> > >>> possible`to prevent it within a listener or do I have to write a check
> > >>> in every new/create action if the model??
> > >>> I tried a redirection within the listener, but the record is inserted
> > >>> anyway...
>
> > > --
> > > If you want to report a vulnerability issue on symfony, please send it to 
> > > security at symfony-project.com
>
> > > You received this message because you are subscribed to the Google
> > > Groups "symfony users" group.
> > > To post to this group, send email to symfony-users@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > symfony-users+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: Creating an "array" element with sfForm

2010-05-28 Thread Tom Ptacnik
Look here ( 
http://www.mail-archive.com/symfony-users@googlegroups.com/msg10673.html
 ) I think it may help you.

Or try to find some solution on 
http://snippets.symfony-project.org/snippets/order_by/date/1
(beware there are many pages ;)


On 26 kvě, 21:13, Avi Block  wrote:
> How can I create an element which outputs its name as an array (eg.,
> picture[]). I would like to dynamically create fields (let's say a
> file input field), and I would dynamically add in a validator for each
> element that was added with the javascript.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] ahDoctrineEasyEmbeddedRelations plugin is fail to get father's alias and suggest a patch for it

2010-05-28 Thread SNake!
Hi guys,

I think Daniel Lohse did a great job on
ahDoctrineEasyEmbeddedRelations plugin:
http://www.symfony-project.org/plugins/ahDoctrineEasyEmbeddedRelationsPlugin/1_3_4

But I encounter some problems. When I do the same, I have got
exception like:



I think the plugin is fail to get father's alias

This is an example, in one to many relationship, let's say:

FileFolder:
  actAs: ...
  columns: ...

File:
  actAs: ...
  columns: ...
  relations:
Folder:
  class:   FileFolder
  foreignAlias:  Papers
  type: one
  foreignType:  many
  onDelete:  CASCADE

$file = new File();
$file->Folder; // work!
$file->FileFolder; // fail, since we have a custom alias name in
schema

I traced down this problem in ahBaseFormDoctrine class:

  private function embeddedFormObjectFactory($relationName,
Doctrine_Relation $relation)
  {
if (Doctrine_Relation::MANY === $relation->getType())
{
  $newFormObjectClass = $relation->getClass();
  $newFormObject = new $newFormObjectClass();
  $newFormObject[get_class($this->getObject())] = $this-
>getObject(); // get father's alias by using get_class($this-
>getObject()), then we get FileFolder but not Folder !
} else
{
  $newFormObject = $this->getObject()->$relationName;
}

return $newFormObject;
  }

Because I cannot see there is a setting I could pass in embedRations
method, soI have created a patch for it:
http://gist.github.com/417043

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] how to change text label attached to new link in embedRelation form

2010-05-28 Thread Paul Burdon
Hi Stephane

Unfortunately, for some reason that isn't working.

I can access $this->widgetSchema['UglyName'] but setLabel doesn't
change the name of the 'newLink'. I think it affects the main name of
it but not the label of the new Link.

When I inspect the widget it has a positions array that I can access
with ['UglyName']->getPositions() and the last position is
'newUglyName'
getFields()  yields an array of widgets the last one beingis
referenced by 'aNewUglyName' but I can't work out how to get at it to
try setLabel on it.


Any ideas?

Thanks,

Paul

On 28 May 2010 09:23, Paul Burdon  wrote:
> HI Stephane,
>
> Just the ticket.
>
> Thanks!
>
> Paul
>
> On 28 May 2010 00:24, Stéphane  wrote:
>> Hi,
>>
>> $this->getWidget($uglyName)->setLabel('my smart label');
>>
>> Cheers,
>>
>>
>> Before Printing, Think about Your Environmental Responsibility!
>> Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>>
>>
>> On Fri, May 28, 2010 at 12:25 AM, Tofuwarrior 
>> wrote:
>>>
>>> I have successfully use embedRelation to embed a relation in my form
>>> BUT the new link at the bottom has a label next to it that says
>>> NewUglyLongPropelObjectName  .
>>>
>>> How can I change this, I haven't set any new link anywhere so I'm not
>>> sure how to change this.
>>>
>>> Is it a widget set somewhere.
>>>
>>> Anyone?
>>> Deadline tonight, really rather not have this ugly mess spoiling
>>> things.
>>>
>>> embedRelation -> Very cool!
>>>
>>> --
>>> If you want to report a vulnerability issue on symfony, please send it to
>>> security at symfony-project.com
>>>
>>> You received this message because you are subscribed to the Google
>>> Groups "symfony users" group.
>>> To post to this group, send email to symfony-users@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> symfony-users+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/symfony-users?hl=en
>>
>> --
>> If you want to report a vulnerability issue on symfony, please send it to
>> security at symfony-project.com
>>
>> You received this message because you are subscribed to the Google
>> Groups "symfony users" group.
>> To post to this group, send email to symfony-users@googlegroups.com
>> To unsubscribe from this group, send email to
>> symfony-users+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/symfony-users?hl=en
>>
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Jobeet Tutorial | Day 17 with sf1.4.4

2010-05-28 Thread Vincent UNG
Hi !
I'm trying to include a search engine in my project with
Zend_Search_Lucene according to the day 17 of the jobeet tutorial.
I just copy/paste the code (http://www.symfony-project.org/jobeet/1_4/
Doctrine/en/17) and replace by my model name.

When I do this task symfony doctrine:data-load
I have an error

PHP Strict Standards: Non-static method
Doctrine_Table::getConnection() should not be called statically,
assuming $this from incompatible context in [path_to_my_file] on line
46
Strict Standards: Non-static method Doctrine_Table::getConnection()
should not be called statically, assuming $this from incompatible
context in [path_to_my_file] on line 46

In fact, I use this in modelName.class.php :
"public function save(Doctrine_Connection $conn = null)
{
$conn = $conn ? $conn : SEOTable::getConnection(); [<-- this is
the 46th line]
$conn->beginTransaction();
try
{
$ret = parent::save($conn);
$this->updateLuceneIndex();
$conn->commit();
return $ret;
}
catch (Exception $e)
{
$conn->rollBack();
throw $e;
}
}"

Did I doing this wrong ?
I guess I don't have to modify Doctrine_Table model... So what can I
do ?

Thanks for helping
Bye~~

Vincent

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] how to change text label attached to new link in embedRelation form

2010-05-28 Thread Paul Burdon
HI Stephane,

Just the ticket.

Thanks!

Paul

On 28 May 2010 00:24, Stéphane  wrote:
> Hi,
>
> $this->getWidget($uglyName)->setLabel('my smart label');
>
> Cheers,
>
>
> Before Printing, Think about Your Environmental Responsibility!
> Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
>
> On Fri, May 28, 2010 at 12:25 AM, Tofuwarrior 
> wrote:
>>
>> I have successfully use embedRelation to embed a relation in my form
>> BUT the new link at the bottom has a label next to it that says
>> NewUglyLongPropelObjectName  .
>>
>> How can I change this, I haven't set any new link anywhere so I'm not
>> sure how to change this.
>>
>> Is it a widget set somewhere.
>>
>> Anyone?
>> Deadline tonight, really rather not have this ugly mess spoiling
>> things.
>>
>> embedRelation -> Very cool!
>>
>> --
>> If you want to report a vulnerability issue on symfony, please send it to
>> security at symfony-project.com
>>
>> You received this message because you are subscribed to the Google
>> Groups "symfony users" group.
>> To post to this group, send email to symfony-users@googlegroups.com
>> To unsubscribe from this group, send email to
>> symfony-users+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/symfony-users?hl=en
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: configure getListBatchActions() in backend

2010-05-28 Thread Ricardo
Hi thanks for the answers. But I don't know how to do that.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: configure getListBatchActions() in backend

2010-05-28 Thread Ricardo
Hi,
thanks for the response but I don't understand what I have to do.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Add form widgets dynamically from javascript

2010-05-28 Thread Luc Didry
Hello,

I'm not sure to understand : this template with the ''add" link, is it
already a form and you want to embed others forms ?
If it's the case, you should take a look at
http://tech.cibul.org/embedded-forms-with-symfony-1-4-and-jquery/

If not, can you give us more details please ? (which module the
template are belong to, which action is called, etc.)

Cheers.

Luc

2010/5/28 fRAnKEnSTEin :
> Hi,
>
> Curret work:
>
> I have created a regular form class called "stepOne" using form
> framework, so it have some widgets and validators.Now in one of my
> frontend templates i have created a link called "add", when the user
> click over this link, it fires a javascript AJAX method called
> "addrow" that creates a new html table row that has inside some inputs
> and combos
>
> The problem:
>
> How can i add to "stepOne" form class all this inputs that have been
> created in the clients side using javascript AJAX call and render them
> into the view, so when the users submits the form...validators and all
> of the form's framework stuff worked properly?
>
> Any idea?
>
> Cheers
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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