[symfony-users] Re: Assign value to form fields

2009-09-14 Thread Sid Bachtiar
Try: $this->form->setValue('first_name', 'Michael'); or use this instead to set default value $this->form->setDefault('first_name', 'Michael'); On Tue, Sep 15, 2009 at 6:51 PM, mirfan wrote: > > Hi, > I have a form and i want to assign value to its field from my > action.class.php like > >  

[symfony-users] Assign value to form fields

2009-09-14 Thread mirfan
Hi, I have a form and i want to assign value to its field from my action.class.php like $this->form['first_name'] = 'Micheal'; but its give me error how i will handle it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

[symfony-users] Re: sfGuard backend/admin module for managing users

2009-09-14 Thread Alexandru-Emil Lupu
comment at the bottom On Tue, Sep 15, 2009 at 8:53 AM, Alexandru-Emil Lupu wrote: > HI! > yes ... is possible but, you'll need to make some modifications to > sfGuardPluigin. > > Add something like: > public function executeEdit(sfWebRequest $request) > { > $this->form1 = new FooForm(); > >

[symfony-users] Re: sfGuard backend/admin module for managing users

2009-09-14 Thread Alexandru-Emil Lupu
HI! yes ... is possible but, you'll need to make some modifications to sfGuardPluigin. Add something like: public function executeEdit(sfWebRequest $request) { $this->form1 = new FooForm(); parent::executeEdit($request); } On Tue, Sep 15, 2009 at 1:23 AM, Mihai RUSOAIE wrote: > Hel

[symfony-users] Re: Put message from forward404() into template

2009-09-14 Thread Casey
I haven't tried this, but since it is a forward, can you set a request attribute that can be accessed by the 404 action? On Sep 14, 5:49 am, "rooster (Russ)" wrote: > Well, since the request is forwarded and not redirected it is possible > to set any number of different variables that can be ret

[symfony-users] how to get current login user id in my commonclass??

2009-09-14 Thread Avani
Hello Everyone, I have one common class for my own functions and I have stored it in lib/common.class.php My problem is, how to get current login userid from that class? I tried 1. $this->getUser()->getProfile()->getUserId(); 2. $sf_user->getProfile()->getUserId(); Both not working. Wht to d

[symfony-users] Re: Issue with url_for()

2009-09-14 Thread MrGlass
SOLVED Sorry, I've been at this for awhile, this is def the most annoying debug I have ever done (what with the invisible characters and all). The link has a slug at the end. The slugify function is part of a different class, which has a different file and location. I had missed this file whe

[symfony-users] Re: Serious problems with foreign keys using PostgreSQL

2009-09-14 Thread Dennis
The Symfony seems pretty mysql centric. You might try the Doctrine group, I bet it's a problem in that library anyway, not symfony. Doctrine seems to have wierd behaviors with Postgres. What I do is create the database design that I want using Dezign for databases. Then I use the create table scr

[symfony-users] sfGuard backend/admin module for managing users

2009-09-14 Thread Mihai RUSOAIE
Hello! (Thanks to Alecs for the prompt reply to my previous question regarding sfGuard) I have followed the instructions at http://trac.symfony-project.org/wiki/sfGuardPluginExtraDocumentation Is there any way to keep all the information in the same form/module: user, password, group and profi

[symfony-users] Re: shouldn't a lack of an id in a form get some kind of error?

2009-09-14 Thread Jake Barnes
On Aug 26, 12:13 am, Eno wrote: > On Mon, 24 Aug 2009, JakeBarneswrote: > > Then I thought, "I guess all the times I tried to save before, without > > an id, I was creating a new record in the database." But I looked in > > the database, and there were no new records. So now I'm thinking that >

[symfony-users] Re: Day 1 - Jobeet tutorial

2009-09-14 Thread Alexandru-Emil Lupu
if i remember right, rm -rf cache/* would delete the file as well however if you are trying to solve something, do something as follow: make sure you have cache and log dirs & also make sure that apache / php is able to write in the folder - run ./symfony cc - run ./symfony project:permissions or

[symfony-users] Re: pkToolkitPlugin gems: a lightweight HTML filter, and a handy way to ssh to your staging and production servers

2009-09-14 Thread Sid Bachtiar
Great plugin! Thank you ... I am using it on my project :D On Tue, Sep 15, 2009 at 1:59 AM, Tom Boutell wrote: > > Unlike most of our plugins, pkToolkitPlugin is a bit of a kitchen > sink. It contains a lot of utility classes, some more experimental > things, and not a lot of documentation. So i

[symfony-users] Re: sfGuardUser restrict access only to certain modules

2009-09-14 Thread Alexandru-Emil Lupu
Message at the end On Mon, Sep 14, 2009 at 5:41 PM, Mihai RUSOAIE wrote: > Hello! > > I am trying to restrict access based on user login to the modules 'clients' > and 'contracts' and allow free access to 'static' module which has action > 'index' and content 'about' and 'clients'. > > From the

[symfony-users] Re: Admin generator td classname list

2009-09-14 Thread Macdom
Yes possible! if you only few module where you want to have that CSS, you only to override the _list_td_tabular.php partial built by the admin generator (if you use the tabular layout !). You look in the cache directory: /cache//modules//templates/ and you copy the _list_td_tabular.php partial to

[symfony-users] sfGuardUser restrict access only to certain modules

2009-09-14 Thread Mihai RUSOAIE
Hello! I am trying to restrict access based on user login to the modules 'clients' and 'contracts' and allow free access to 'static' module which has action 'index' and content 'about' and 'clients'. >From the documentation of sfGuard I can see that I can restrict acces to an >action with cred

[symfony-users] Day 1 - Jobeet tutorial

2009-09-14 Thread armyofda12monkeys
I was trying the jobeet tutorial. and thought it would be nice to learn a little svn. but I wanted to setup a local svn directory instead of online google one. and kinda mixed the instructions at end and my app is just a blank page now since I'm pretty sure did something wrong (pretty sure what i

[symfony-users] Re: Symfony DocumentRoot

2009-09-14 Thread MiloszeS
Mea culpa :) Symfony generates the following links: htttp://mydomain.com/app/web/module I would like to have the following links: http://mydomain.com/module The problem is (i think so) that the DocumentRoot points the /home/a/ htdocs/ folder but the symfony web folder is located at /home/a/ht

[symfony-users] Strange behaviour with sfJqueryFormValidationPlugin and cache

2009-09-14 Thread Tom Haskins-Vaughan
Hi, I have recently started using sfJqueryFormValidationPlugin and am pretty happy with it so far, except that when I try to cache the page with or without the layout, the js validation file is not included. Am I right in thinking that this could be to do with the js file being added by a fil

[symfony-users] Re: Deployment Scenarios (DB Specific)

2009-09-14 Thread ColinFine
On Sep 13, 8:34 pm, Fotis Paraskevopoulos wrote: > Hello All, > > I would like to ask the group the different deployment scenarios that > have been setup. I am specifically looking for some information on how > you manage your database deployment when some changes need to be made. > > For examp

[symfony-users] Re: pkToolkitPlugin gems: a lightweight HTML filter, and a handy way to ssh to your staging and production servers

2009-09-14 Thread Pablo Godel
Hi Tom, These are great, thanks for sharing! Pablo On Mon, Sep 14, 2009 at 9:59 AM, Tom Boutell wrote: > > Unlike most of our plugins, pkToolkitPlugin is a bit of a kitchen > sink. It contains a lot of utility classes, some more experimental > things, and not a lot of documentation. So it's e

[symfony-users] pkToolkitPlugin gems: a lightweight HTML filter, and a handy way to ssh to your staging and production servers

2009-09-14 Thread Tom Boutell
Unlike most of our plugins, pkToolkitPlugin is a bit of a kitchen sink. It contains a lot of utility classes, some more experimental things, and not a lot of documentation. So it's easy to miss the great stuff that lives there. Better documentation is coming as various items in that plugin mature

[symfony-users] Re: Put message from forward404() into template

2009-09-14 Thread rooster (Russ)
Well, since the request is forwarded and not redirected it is possible to set any number of different variables that can be retrieved later, even something like sfConfig::set("404_message", "something"); would be sufficient. The problem is that you'd have to do that prior to calling 404 function,

[symfony-users] Re: Fast query on all records

2009-09-14 Thread HAUSa
Ofcourse. As I said here above: When I create a new record, the last piece of code ($this->setRank(1)) is executed, all new records have '1' as rank value. That makes it strange that the query is not executed, at it is in the same if statement... Anyone who knows a solution for this? How is it

[symfony-users] Re: Fast query on all records

2009-09-14 Thread Sid Bachtiar
You realized that your update code only get executed upon saving new record? It's because of: "if($this->isNew())" On Mon, Sep 14, 2009 at 10:10 PM, HAUSa wrote: > > My thought as well, but however it should be executed! > When I create a new record, the last piece of code ($this->setRank(1)) >

[symfony-users] Re: Fast query on all records

2009-09-14 Thread HAUSa
My thought as well, but however it should be executed! When I create a new record, the last piece of code ($this->setRank(1)) is executed, all new records have '1' as rank value. On 14 sep, 01:00, Sid Bachtiar wrote: > If it doesn't show up and there's no error, it is possible that the > piece

[symfony-users] Re: Running out of memory when creating the cache

2009-09-14 Thread CaffeineInc
I get this error a lot as well (we've a large website with alot of traffic). But it always seems that the cache gets corrupted and clearing it will work for another couple of hours. We're running on 1.1 and are in the process of updating it, I was hoping that would fix the problem. I might give t

[symfony-users] Re: Put message from forward404() into template

2009-09-14 Thread Lee Bolding
On 13 Sep 2009, at 18:12, rooster (Russ) wrote: > In the meantime, unless anyone else can think of something, the only > thing I can suggest is that you override the sf404Exception class to > store the message for you. I haven't tried this before, but you could try using my sfRequestPlugin (h

[symfony-users] sfOptimiser for sf 1.2 and usability

2009-09-14 Thread CyrilQ
Hi guys, I have a few questions : 1 - Is sfOptimiser usable for sf 1.2 2 - Is sfOptimiser really usefull if an Opcode optimiser is used ? Details : There is a paragraph about it in the book "The definitive guide to symfony " for sf 1.2. but in the plugin's page, it seems the plugin isn't suppo

[symfony-users] Unique field that is not required

2009-09-14 Thread heilage
Hello, i'm a beginner in symfony, but now i'm working on the website, and still cannot figure out how to make it working. What i need to do is a plain structure with one unique index (for ordering), but some of the records are allowed to have NULL in that field. So, when i create a form, it works

[symfony-users] Re: static pages module

2009-09-14 Thread Andrei Dziahel
hi. symfony generate:module Actually, you'd find it much faster, if you'd examined output of ./symfonycommand line by line. 2009/9/14 Mihai RUSOAIE > > Hello! > > Thanks for the quick reply. How can I generate a module without a model? > > -bash-3.2$ ./symfony propel:generate-module frontend s

[symfony-users] Re: static pages module

2009-09-14 Thread Mihai RUSOAIE
Hello! Thanks for the quick reply. How can I generate a module without a model? -bash-3.2$ ./symfony propel:generate-module frontend static The execution of task "propel:generate-module" failed. - Not enough arguments. symfony propel:generate-module [--theme="..."] [--generate-in-cache]

[symfony-users] Admin-generator and Sales

2009-09-14 Thread Adrián Corujo
Hi, I'm using symfony 1.2, I generated modules admin-generator and want to create an application to generate and control sales. Sampling of the schema.yml propel: _attributes: package: lib.model defaultIdMethod: native articulos: _attributes: { phpName: Articulos } id_articul