[symfony-users] A module with i18n, Nested Set and an ImageCollection. Is this ok?

2010-04-12 Thread Gustavo Adrian
Hi everyone. I want to create a module for Categories. Every category has 1 or more images. The i18n fields are: title and description. Basically, I have in CategoriesForm.class.php (I won't put the exact script, but the essencial things just to show you my point. It would be too long if I put the

[symfony-users] Re: A module with i18n, Nested Set and an ImageCollection. Is this ok?

2010-04-12 Thread Gustavo Adrian
I have another quick question about what I've posted. In the model of de record, let's say the model Image following my last post.. I need to override the save function to add the logic to generate thumbnails and to delete files if needed. Let's say that my function is the one that posted before:

[symfony-users] [SYMFONY 1.4] using embedRelation the item is saved twice. How could I avoid this?

2010-07-20 Thread Gustavo Adrian
After a little research on Google for this topic I've found certain posts that talk about situations like this (but not the same) so I thought on posting this. I have a typical relation between two models, Item and Attachment, making a One-to-Many relationship. On my Attachment model I tried to

Re: [symfony-users] Re: Symfony on Shared Hosting

2010-07-20 Thread Gustavo Adrian
mydomain.com is not a folder. You should have something like $this-setWebDir( $this-getRootDir() . DIRECTORY_SEPARATOR . 'myPublicFolder' ); And I would check with the check_configuration.php script. The directory structure should be something like this (I use what I did on Linux shared hostings

Re: [symfony-users] Re: Symfony2 or CakePHP ?

2010-07-20 Thread Gustavo Adrian
In my opinion, if you need the app almost ready for september.. use a lightweight framework like Codeigniter or ,as you said, with CakePHP (if you've worked with them). You can do a lot of things fast enough with the admin generator of Symfony and the development of the frontend with its template

Re: [symfony-users] Re: include_js/css VS partials

2010-07-20 Thread Gustavo Adrian
Are you using include_javascripts(); and include_stylesheets() functions on the head tag of the layout? On Tue, Jul 20, 2010 at 7:15 AM, comb sa...@gmx.net wrote: Symfony 1.4 + Doctrine 1.2 Any ideas? :-) On 20 Jul., 11:58, Tom Ptacnik to...@tomor.cz wrote: Which version of Symfony do you

Re: [symfony-users] Re: using embedRelation the item is saved twice. How could I avoid this?

2010-07-21 Thread Gustavo Adrian
too, not a beautiful solution, but it works. On 20 juil, 15:05, Gustavo Adrian comfortablynum...@gmail.com wrote: After a little research on Google for this topic I've found certain posts that talk about situations like this (but not the same) so I thought on posting this. I have

Re: [symfony-users] no_script_name and problems with URI

2010-07-21 Thread Gustavo Adrian
If I'm wrong, please, correct me, but didn't the routing framework take the action index by default, so you can avoid tu put it on the URL? BTW, Why do you think is not clean to put the rules on the routing.yml? On Wed, Jul 21, 2010 at 6:51 AM, snoop mehdi.ha...@gmail.com wrote: Hi all, I

Re: [symfony-users] How to style embedded forms

2010-07-22 Thread Gustavo Adrian
I managed to do whay you mention by changing some templates of the module autogenerated for the backend. In _form_fieldset.php you have the loop that iterates over the fields. You could then check the name of the field and, if it's the name of the embedded form, you could then surround it by a div

Re: [symfony-users] Re: caching problem in firefox

2010-07-22 Thread Gustavo Adrian
Hi, Did you try to disable local caching on the action with headers Cache-control and Pragma to see what happens? $this-getResponse()-setHttpHeader(Cache-Control, no-cache); $this-getResponse()-setHttpHeader(Pragma, no-cache); $this-getResponse()-setHttpHeader(Expires, 0); On Thu, Jul 22, 2010

[symfony-users] vjCommentPlugin and sfDoctrineGuardUser 5.0.0

2010-07-23 Thread Gustavo Adrian
I've recently upgraded sfDoctrineGuardUser from 4.0.1 to 5.0.0 but when doing the rebuild of the db, models, forms... etc, it throws this error: SQLSTATE[HY000]: General error: 1005 Can't create table 'estudio_development.#sql-29d0_228a' (errno: 150). Failing Query: ALTER TABLE comment ADD

Re: [symfony-users] CCBill or Epoch Plugins

2010-07-23 Thread Gustavo Adrian
I've just seen prestaPaypalPlugin ( http://www.symfony-project.org/plugins/prestaPaypalPlugin) but I didn't try it. I'd like to know about this topic too. Any comment about it will be much appreciated. On Wed, Jul 21, 2010 at 5:53 PM, f1gm3nt f1gm...@gmail.com wrote: Has anyone used any type

Re: [symfony-users] vjCommentPlugin and sfDoctrineGuardUser 5.0.0

2010-07-23 Thread Gustavo Adrian
mkkp...@gmail.com Hi, 2010/7/23 Gustavo Adrian comfortablynum...@gmail.com: I've recently upgraded sfDoctrineGuardUser from 4.0.1 to 5.0.0 but when doing the rebuild of the db, models, forms... etc, it throws this error: SQLSTATE[HY000]: General error: 1005 Can't create table

Re: [symfony-users] vjCommentPlugin and sfDoctrineGuardUser 5.0.0

2010-07-23 Thread Gustavo Adrian
Don't matter. I forgot to enable the plugin again in projectConfiguration.class.php Thanks! On Fri, Jul 23, 2010 at 5:44 PM, Gustavo Adrian comfortablynum...@gmail.com wrote: First of all, thanks for the quick response! I've just installed from trunk of the svn repository the plugin as you

Re: [symfony-users] vjCommentPlugin and sfDoctrineGuardUser 5.0.0

2010-07-24 Thread Gustavo Adrian
Look at the answer of Michal. You have to use the SVN trunk version On Sat, Jul 24, 2010 at 5:57 AM, Sela Yair tzi...@gmail.com wrote: anyone has tried to upgrade from 4.0.x to 5.0.0 of sfGuardDoctrine ? as i get an erro On 23 July 2010 21:47, Gustavo Adrian comfortablynum...@gmail.com wrote

Re: [symfony-users] Re: latest verion of sfForkedDoctrineApplyPlugin is broken

2010-07-26 Thread Gustavo Adrian
Check the path of that class to see if it exists. If that's so, try to remove the cache manually (not with ./symfony cc) On Mon, Jul 26, 2010 at 11:23 AM, Tristan tristan.bessou...@gmail.comwrote: When i rebuild my model, it outputs the same error at a different line. php symfony cc as many

Re: [symfony-users] Re: latest verion of sfForkedDoctrineApplyPlugin is broken

2010-07-26 Thread Gustavo Adrian
Also, double check that the plugin is enabled on ProjectConfiguration.class.php On Mon, Jul 26, 2010 at 11:33 AM, Gustavo Adrian comfortablynum...@gmail.com wrote: Check the path of that class to see if it exists. If that's so, try to remove the cache manually (not with ./symfony cc

[symfony-users] [SYMFONY 1.4] Better way of setting default i18n messages for validators?

2010-07-26 Thread Gustavo Adrian
Hi, I've found a way to do this in the BaseForm class. I just set the default message of each validator on the setup method, like: // I use the __() function because I enabled the I18N helper by default sfValidatorBase::setDefaultMessage( 'required', __( 'Required field' ) );

Re: [symfony-users] Re: Better way of setting default i18n messages for validators?

2010-07-28 Thread Gustavo Adrian
of sfDoctrineGuard. Do you know why does this happen? Thanks. On Wed, Jul 28, 2010 at 4:42 AM, Tom Ptacnik to...@tomor.cz wrote: I think that just sfValidatorBase::setDefaultMessage( 'required', 'Required field' ); is enough and the __() helper will be used automaticly. On 27 čnc, 04:23, Gustavo

Re: [symfony-users] Re: sfDoctrineGuardPlugin doesn't redirect to the referrer page

2010-07-28 Thread Gustavo Adrian
Did you set the signin redirect url in file app.yml? all: sf_guard_plugin: success_signin_url: @my_route?param=value # the plugin use the referer as default success_signout_url: module/action # the plugin use the referer as default On Wed, Jul 28, 2010 at 5:10 PM,

Re: [symfony-users] Adding CSS classes to body tag

2010-07-28 Thread Gustavo Adrian
What about including a slot and then, depending on the template, use the class accordingly? body ?php include_slot( 'body_attributes' ) ? And then in the template: !-- Full width template -- *?php slot( 'body_attributes', 'class=full-width-body-class' ) ?* and in other template: !-- Half

Re: [symfony-users] Avoid blank embed form to be saved

2010-07-28 Thread Gustavo Adrian
Maybe I'm wrong but.. isn't $comment set already on this line by 'getValue'? (saveEmbeddedForms of ExpenseForm) *$comment** **=** **$this**-**getValue**(**'**comment**'**);*So the line: *unset**(**$forms**[**'**comment**'**]);* doesn't execute never? On Wed, Jul 28, 2010 at 11:22 PM,

Re: [symfony-users] Avoid blank embed form to be saved

2010-07-28 Thread Gustavo Adrian
Sorry, the last line I was talking about is: *if** (**!**isset**(**$comment**)) { **unset**(**$forms**[**'**comment**'**]); } The if condition would be always false* On Wed, Jul 28, 2010 at 11:40 PM, Gustavo Adrian comfortablynum...@gmail.com wrote: Maybe I'm wrong but.. isn't $comment

Re: [symfony-users] Re: Avoid blank embed form to be saved

2010-07-29 Thread Gustavo Adrian
, remove the empty values if (!$values['comment']['body']) { unset($values['comment']); } return $values; } } Or perhaps I'm having a logic failure :( On Jul 28, 9:42 pm, Gustavo Adrian comfortablynum...@gmail.com wrote: Sorry, the last line I was talking about

Re: [symfony-users] Set value of a database field depending of another field

2010-07-29 Thread Gustavo Adrian
No, but you can do it on the model, on the preSave method (on your model inheriting Doctrine_Record class) On Thu, Jul 29, 2010 at 10:50 AM, Jérémie jeremie.symf...@gmail.com wrote: Hi all, Let me explain: I have a field isPublished in my table, and another publicationDate. When

[symfony-users] [SYMFONY 1.4] How to deploy on a subdirectory?

2010-07-30 Thread Gustavo Adrian
Hi all, This is a topic I've been avoiding for a long time but now I need to deploy my app on a subdirectory and there's no other option. IMPORTANTE: It's on a SHARED HOSTING. The app dir structure now is something like this: / /demos /myAppSymfonyFiles /app /cache /config

Re: [symfony-users] Re: Emails and multiple Applications

2010-08-02 Thread Gustavo Adrian
If it's just a text email, you could encapsulate the message in a message object so you don't have to use the template. But, as I said, this would be just for a text email, With HTML it would be a little cumbersome. On Mon, Aug 2, 2010 at 12:11 PM, Stephen Melrose step...@sekka.co.ukwrote: I

[symfony-users] Re: [SYMFONY 1.4] How to deploy on a subdirectory?

2010-08-02 Thread Gustavo Adrian
Anyone? On Fri, Jul 30, 2010 at 1:13 PM, Gustavo Adrian comfortablynum...@gmail.com wrote: Hi all, This is a topic I've been avoiding for a long time but now I need to deploy my app on a subdirectory and there's no other option. IMPORTANTE: It's on a SHARED HOSTING. The app dir structure

Re: [symfony-users] Re: [SYMFONY 1.4] How to deploy on a subdirectory?

2010-08-02 Thread Gustavo Adrian
Adrian comfortablynum...@gmail.com Anyone? On Fri, Jul 30, 2010 at 1:13 PM, Gustavo Adrian comfortablynum...@gmail.com wrote: Hi all, This is a topic I've been avoiding for a long time but now I need to deploy my app on a subdirectory and there's no other option. IMPORTANTE: It's

Re: [symfony-users] Re: Real purpose of admin generator

2010-08-02 Thread Gustavo Adrian
I think it depends on your requirements. If you need a backend with simple CRUD modules.. then you could use the generator to create them in just a few minutes. Maybe then customize the templates and there you go. You have a fully CRUD module ready to go in notime. You could of course extend the

Re: [symfony-users] Re: [SYMFONY 1.4] How to deploy on a subdirectory?

2010-08-02 Thread Gustavo Adrian
On Mon, 2010-08-02 at 19:00 -0300, Gustavo Adrian wrote: First of all, thanks for your reply! The problem of creating a symlink comes from the fact that I have a shared hosting. Is there a way of doing this on a shared hosting without ssh access?. Anyway, remember that my app is working

Re: [symfony-users] Re: Trying to redirect a user to a login page with ajax: 401 unauthorized

2010-08-02 Thread Gustavo Adrian
Or you could just check for the code of the response in your jQuery script that handles the AJAX form. If it's 401, then you redirect the user to the login page. On Sun, Aug 1, 2010 at 10:31 AM, Tristan tristan.bessou...@gmail.comwrote: mmhhh i'm not sure in understand everything here ='(

Re: [symfony-users] Re: [SYMFONY 1.4] How to deploy on a subdirectory?

2010-08-03 Thread Gustavo Adrian
://pastebin.com/cFQHfKwJ On Tue, Aug 3, 2010 at 11:39 AM, Anibal Sólon anibalso...@gmail.com wrote: You can paste (http://pastebin.com/) the .htaccess and projectConfiguration.class.php file? Dont think that is the .htaccess On Tue, 2010-08-03 at 00:24 -0300, Gustavo Adrian wrote: Finally I did

Re: [symfony-users] Re: Semgentation fault +Infinite loop... huh ?

2010-08-03 Thread Gustavo Adrian
Try to separate the logic of sending mails from the model. You should put it on the pertinent action. Something like: public function executeSetIsActivatedAndSendMail( $request ) { $this-myObject = $this-getRoute()-getObject(); $value= $request-getParameter( 'myValue' );

Re: [symfony-users] Re: [SYMFONY 1.4] How to deploy on a subdirectory?

2010-08-03 Thread Gustavo Adrian
a simple Alias shuld work out. Alias /css /demo/myDemoApp/css but you my not be able to set this on an htaccess file, a redirect my also work Redirect /css /demo/myDemoApp/css 2010/8/3 Gustavo Adrian comfortablynum...@gmail.com Hi, Here is ProjectConfiguration.class.php: http

Re: [symfony-users] Re: [SYMFONY 1.4] How to deploy on a subdirectory?

2010-08-03 Thread Gustavo Adrian
A. Andrade andrade.luci...@gmail.com wrote: The redirect Redirect /css /demo/myDemoApp/css on the htaccess shuld work if the configuration allow redirects on httacess. Also the relative form is with out the first /, if it begins with / is absolute (to the server) 2010/8/3 Gustavo Adrian

Re: [symfony-users] multiples INSERT

2010-08-03 Thread Gustavo Adrian
Could you paste your model schema and your form class? On Tue, Aug 3, 2010 at 5:05 PM, B.O.G germanaolivei...@gmail.com wrote: Hi!! I have a ComboBox like this, witch is a embeddedForm into a MainForm= 'Comunicacion': select name=comunicacion[destinatario][user_profile_id][]

Re: [symfony-users] a good IDE for Symfony

2010-08-03 Thread Gustavo Adrian
...@gmail.com wrote: Thanks and knows about open source IDE with the same characteristics *De:* symfony-users@googlegroups.com [mailto: symfony-us...@googlegroups.com] *En nombre de *Gustavo Adrian *Enviado el:* martes, 03 de agosto de 2010 18:31 *Para:* symfony-users@googlegroups.com *Asunto:* Re

[symfony-users] [SYMFONY 1.4] Session timeout problem

2010-08-04 Thread Gustavo Adrian
Hi, I'm using sfDoctrineGuardPlugin. My backend session always ends after 5 or 10 minutes if its idle. I've tried to change on factories.yml: *user:* *class: myUser* *param:* * timeout: 86400* And.. * storage:* *param:* * session_cookie_lifetime: 86400* But

Re: [symfony-users] slot component - sidebar form

2010-08-05 Thread Gustavo Adrian
You can't access from the outside to anything except an action. You have to check the validity of the form on the action and, optionally, pass the result to the component. Cheers. On Thu, Aug 5, 2010 at 3:58 AM, Christian Fazzini christian.fazz...@gmail.com wrote: I've got a sidebar on my

Re: [symfony-users] generating project error

2010-08-05 Thread Gustavo Adrian
Could you show us the exact command you are using for generating a project? include the real arguments too. On Thu, Aug 5, 2010 at 2:57 AM, yzhastik rigor152...@yandex.ru wrote: I am trying to generate new project (as in jobeet tutorial), but symfony says me that project already created in

Re: [symfony-users] Re: Session timeout problem

2010-08-05 Thread Gustavo Adrian
be other things to consider as well. gabriel On Aug 5, 4:31 am, Gustavo Adrian comfortablynum...@gmail.com wrote: Hi, I'm using sfDoctrineGuardPlugin. My backend session always ends after 5 or 10 minutes if its idle. I've tried to change on factories.yml: *user

[symfony-users] [SYMFONY 1.4] Dealing with application / business transactions and concurrency issues. Ideas?

2010-08-05 Thread Gustavo Adrian
Hi, I guess this is topic was touched a lot of times but It would be great to see your thoughts and experiences about this. I started to develop an application that really needs to take care about concurrency issues. So I was thinking about creating a Doctrine behaviour for this that puts a

Re: [symfony-users] Re: a good IDE for Symfony

2010-08-06 Thread Gustavo Adrian
I tried PHPEdit. It's amazing and FAST. Code suggestions out of the box after parsing your project files. Excellent. On Fri, Aug 6, 2010 at 8:01 AM, Tom Ptacnik to...@tomor.cz wrote: I'm using Eclipse too, and I'm happy with it. On 4 srp, 11:36, Gareth McCumskey gmccums...@gmail.com wrote:

Re: [symfony-users] Symfony Installation in Godaddy hosting

2010-08-06 Thread Gustavo Adrian
Check in the hosting panel. There has to be an option to choose between PHP version 4 and 5. On Fri, Aug 6, 2010 at 2:08 AM, Md Mostafizur Rahman milon cse...@gmail.com wrote: dear Symfony user i am new in Symfony framework. i have a hosting account in Godaddy Linux Hosting in PHP 5 . but

Re: [symfony-users] load L18N helper in form class : how to ?

2010-08-07 Thread Gustavo Adrian
use ProjectConfiguration::getActive() instead of sfProjectConfiguration. Although if you're going to use the i18n helper on many forms (like me), you could put that statement on yourAppnameConfiguration.class.php on the 'config' dir of the app: //

Re: [symfony-users] using admin generator on frontend; restricting to records for the current user

2010-08-08 Thread Gustavo Adrian
Maybe adding the username to a subdomain, like username.myDomain.com and create a new routing class that takes that username into account to filter items by user? On the More with Symfony book is a great example of this approach:

Re: [symfony-users] admin gen 1:m in one form

2010-08-08 Thread Gustavo Adrian
I saw a few plugins that seems to do what you're looking for, but I haven't tried any of them yet. This is one of them: http://www.symfony-project.org/plugins/ahDoctrineEasyEmbeddedRelationsPlugin Cheers. On Mon, Aug 9, 2010 at 12:30 AM, Christian Fazzini christian.fazz...@gmail.com wrote:

Re: [symfony-users] Re: using admin generator on frontend; restricting to records for the current user

2010-08-09 Thread Gustavo Adrian
for the suggestion Gustavo, but this seems like way too much complication for what seems like a pretty simple job; involving DNS into this potentially adds another whole area for complications and issues. can anyone shed some light? cheers On Aug 9, 2:36 pm, Gustavo Adrian comfortablynum...@gmail.com wrote

Re: [symfony-users] The requested URL was not found on this server. ERROR

2010-08-09 Thread Gustavo Adrian
Try to change this line: #RewriteBase / To: RewriteBase / Cheers. On Mon, Aug 9, 2010 at 5:41 PM, Alexandre Salomé alexandre.sal...@gmail.com wrote: Can be rewrite module that is not enabled in your project. To check it is the missing module, remove the IfModule opening and ending

Re: [symfony-users] Re: using admin generator on frontend; restricting to records for the current user

2010-08-09 Thread Gustavo Adrian
to filter out the listing of records to just the ones that have image.user_id = ?. In your idea, where would that be done? thanks for the help! On Aug 9, 10:39 pm, Gustavo Adrian comfortablynum...@gmail.com wrote: It depends on the options of your hosting I guess. If you have a panel like

Re: [symfony-users] Re: admin gen 1:m in one form

2010-08-10 Thread Gustavo Adrian
! Hence the code: $this-form = new UserBookmarksForm($user = Doctrine::getTable('User')-findOneByName('niko')); I just figured this out and spent a whole day, thinking this was a proper solution!! I need to do create the object from scratch! On Aug 9, 12:47 pm, Gustavo Adrian comfortablynum

Re: [symfony-users] Im playing with Tutorial, how can i debug blank (white) page ?

2010-08-10 Thread Gustavo Adrian
What OS are you developing on? Check permissions on the cache and log dirs. On Tue, Aug 10, 2010 at 5:11 PM, Alexandre Salomé alexandre.sal...@gmail.com wrote: The debug best code is : die('ok'); Move it toward until it disappear. Some good start points are : - First line of index.php

Re: [symfony-users] appending to flashes/multiple flashes

2010-08-11 Thread Gustavo Adrian
The setting of the notice takes place on the action, not on the form. And it's generated in every module you create with the admin generator. So, as Alexander said, you'd need to modify the skeleton of the generated actions to add your functionality. On the other hand, an easier way would be to

[symfony-users] [SYMFONY 1.4] Install plugins programmatically?

2010-08-11 Thread Gustavo Adrian
Hi! Quick question: Is there a way to install and enable a plugin from PHP? 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

Re: [symfony-users] Re: Install plugins programmatically?

2010-08-12 Thread Gustavo Adrian
ProjectConfiguration. On Aug 11, 8:49 pm, Gustavo Adrian comfortablynum...@gmail.com wrote: Hi! Quick question: Is there a way to install and enable a plugin from PHP? Thanks! -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You

Re: [symfony-users] Re: Install plugins programmatically?

2010-08-13 Thread Gustavo Adrian
'); $enabledPluginsXml = $xml-xpath(...); $this-enablePlugins($enabledPluginsXml); } } On 12 aug, 22:12, Gustavo Adrian comfortablynum...@gmail.com wrote: Hi, first of all, thank you both guys for your answers. @Damon: I couldn't try that yet but, as you said, the only problem I

Re: [symfony-users] Re: Install plugins programmatically?

2010-08-13 Thread Gustavo Adrian
posting your solution somewhere? A snippet would be nice – along with a quick explanation on how to do it. :) That'd be great (but is in no way mandatory, just a suggestion to give something back to the community)! Cheers, Daniel On 13.08.2010, at 17:14, Gustavo Adrian wrote: @Johannes: That's

Re: [symfony-users] Re: Install plugins programmatically?

2010-08-13 Thread Gustavo Adrian
() { if (file_exists('enablePlugins.xml')) { $xml = simplexml_load_file('enablePlugins.xml'); $enabledPluginsXml = $xml-xpath(...); $this-enablePlugins($enabledPluginsXml); } } On 12 aug, 22:12, Gustavo Adrian comfortablynum...@gmail.com wrote: Hi

Re: [symfony-users] Form choice from database based on hidden form element

2010-08-13 Thread Gustavo Adrian
Could you post the code from your form? On Fri, Aug 13, 2010 at 7:36 PM, Jonotron jonot...@gmail.com wrote: I have a form that uses a sfWidgetFormDoctrineChoice widget and I pass a query to it that selects my category records based on another hidden field. My query has a -where('a.id = ?',

[symfony-users] [SYMFONY 1.4] sfDoctrineGuardPlugin: get a 401 response code on non GET unauthorized request?

2010-08-14 Thread Gustavo Adrian
Hi, I use sfDoctrineGuardPlugin for securing my apps. In my backend I use AJAX heavily. With a GET request, if the user session is gone, I get a 401 (unauthorized) response, so using Javascript I redirect the user to the login page correctly. But when a POST request occurs, it gives me a 200 (OK)

Re: [symfony-users] Re: sfDoctrineGuardPlugin: get a 401 response code on non GET unauthorized request?

2010-08-15 Thread Gustavo Adrian
Thanks for your answer! I thought on using the way you suggest. I could use a custom action and then inherit from it on my module actions. In the preExecute do some check like the one you suggest and just set the response code to 401 (in my case I just need that). But I was thinking on just change

Re: [symfony-users] Re: sfDoctrineGuardPlugin: get a 401 response code on non GET unauthorized request?

2010-08-15 Thread Gustavo Adrian
{ public function preExecute() { parent::preExecute(); $this-getResponse()-setStatusCode( 401 ); } } And that's it. Cheers. On Sun, Aug 15, 2010 at 6:52 PM, Gustavo Adrian comfortablynum...@gmail.com wrote: Thanks for your answer! I

Re: [symfony-users] PHP related,Symfony unrelated

2010-08-17 Thread Gustavo Adrian
You can add the order type as another parameter to the link (ASC or DESC) too. Then, at the moment of link generation, you check for the column that is being used for ordering. In that link you then just change the order type to the opposite of the actual one (so, if the user is looking at a user

Re: [symfony-users] Re: How i can implement this with sfGuard plugin

2010-08-17 Thread Gustavo Adrian
In your fixtures check if you are indeed assigning a valid sfGuardUser to the user_id field of rank_domain objects On Tue, Aug 17, 2010 at 2:12 AM, RusAlex interpret...@gmail.com wrote: Can you explain please: I've tried to add relation to schema.yml RankDomain: columns: name: { type:

Re: [symfony-users] Country City problem

2010-08-18 Thread Gustavo Adrian
This could help: http://www.symfony-project.org/plugins/sfDependentSelectPlugin On Wed, Aug 18, 2010 at 7:18 AM, Andro Fumero fugitive...@yahoo.com wrote: Good day, Does any one tried to make a drop down Countries, and when its clicked, it will display the list of cities based on the

Re: [symfony-users] Re: trying to make a relation with sfGuardUser and got error

2010-08-18 Thread Gustavo Adrian
Could you paste your RankDomain fixtures? the problem may be there On Wed, Aug 18, 2010 at 3:12 AM, RusAlex interpret...@gmail.com wrote: IT's a standart fixtures: sfGuardUser: User_admin: first_name: John last_name: Doe email_address: john@gmail.com username:

Re: [symfony-users] How to remove the TH elements in embedded forms in admin generator

2010-08-18 Thread Gustavo Adrian
Overriding the view for that special case? or creating your own collection form, assigning a friendly name instead of the numeric ones. Or you could simply use jQuery or css, as you said. On Wed, Aug 18, 2010 at 1:47 PM, Christian Fazzini christian.fazz...@gmail.com wrote: At the following

Re: [symfony-users] How to set a field with the id of the doctrine object in the saving process

2010-08-19 Thread Gustavo Adrian
If you have unique = true and notnull = true then you have to assign a unique filename before you save the object, or you would have an exception. The better way would be to just assign a random name, as Georg says. If you really need the ID on the name, then first assign a random name and, after

Re: [symfony-users] How to set a field with the id of the doctrine object in the saving process

2010-08-19 Thread Gustavo Adrian
I forgot to mention: The exception would be thrown if you attempt to insert (or update) a second object with an empty filename (having a nullable field you could insert as many objects as you want with NULL assigned to that field) On Thu, Aug 19, 2010 at 7:08 PM, Gustavo Adrian comfortablynum

Re: [symfony-users] doSave on a standalone sfForm

2010-08-19 Thread Gustavo Adrian
I would create a custom form class that extends from sfForm (sfFormCRM for example) and put there all the saving logic of the form. Then it would be a nice idea to have a BaseFormCRM that inherits from your sfFormCRM to have a place to put common application logic between your CRM forms without

Re: [symfony-users] Introduction

2010-08-20 Thread Gustavo Adrian
Hi Jochen, Gareth has answered all your questions, so I just wanted to say: welcome to the Symfony community! As Gareth said, A gentle introduction to Symfony is a good start. And if you didn't use Doctrine or Propel before (I don't know which one you are using now with Symfony) try to start

Re: [symfony-users] Re: creation tables MySql avec doctrine (Jobeet)

2010-08-20 Thread Gustavo Adrian
Hi, Please, ask your questions in english so everyone of us can help. About your problem, are you having problems only on the CLI? if that's so, maybe you didn't modify the php.ini for the CLI. I don't know which OS you're using, so try to run phpinfo() on the CLI to check where is the php.ini

Re: [symfony-users] Send Mails

2010-08-23 Thread Gustavo Adrian
Did you try using the Swift Mailer that comes with Symfony? try sending with SMTP using the SMTP server of your gmail account (if you don't have your own email account, of course). Here says how: http://www.symfony-project.org/gentle-introduction/1_4/en/11-Emails

Re: [symfony-users] Please advice code structure for Google Maps auto-correct of address

2010-08-23 Thread Gustavo Adrian
You should create a widget and embed the JS needed there. Here is a nice tutorial about this: http://www.symfony-project.org/more-with-symfony/1_4/en/05-Custom-Widgets-and-Validators On Mon, Aug 23, 2010 at 8:49 PM, Jochen Daum jdau...@gmail.com wrote: Hi, for my application here I need to

Re: [symfony-users] Re: Send Mails

2010-08-24 Thread Gustavo Adrian
Use the port 465 instead of the 25 for gmail On Tue, Aug 24, 2010 at 9:48 AM, vero vegoi...@alumni.uv.es wrote: It's impossible. I don't know how send an email at all. I have tried everything but no email arrive to inbox. I will have to decided what to do in that part of my project. Thanks

[symfony-users] [Symfony 1.4] doSave never called on update?

2010-08-24 Thread Gustavo Adrian
Hi everyone, I have something like this for my schema: WebGenericElement: actAs: I18n: fields: [title] columns: title: type: string(255) notnull: true Product: inheritance: extends:WebGenericElement type:

Re: [symfony-users] Re: Trying to replace the default 'Required' message

2010-08-24 Thread Gustavo Adrian
Maybe because first it's the sfValidatorEmail that throws the required error? Although, if you want to change the required field message to every validator, you could do this: sfValidatorBase::setDefaultMessage( 'required', 'My required message' ); On Tue, Aug 24, 2010 at 1:53 PM, Javier Garcia

Re: [symfony-users] Re: Trying to replace the default 'Required' message

2010-08-24 Thread Gustavo Adrian
Or course, that line could be on the BaseForm or even in the application configuration class so every form could use that default message. The same applies to the 'invalid' message. On Tue, Aug 24, 2010 at 2:26 PM, Gustavo Adrian comfortablynum...@gmail.com wrote: Maybe because first it's

Re: [symfony-users] sfWidgetFormDoctrineChoice problem

2010-08-25 Thread Gustavo Adrian
The dropdown must show every available choice, regardless an option is already selected or not (What would you do if you need to update an item and you want to change that value?). If you need to show only the option selected, you could change the table method used by the widget to change the list

Re: [symfony-users] Re: Doctrine Pager max per page problem

2010-08-27 Thread Gustavo Adrian
Could you show us your action's code? On Fri, Aug 27, 2010 at 12:11 PM, ziclo lauren...@gmail.com wrote: More explanation about this issue : If the number of objects returned is 10 then objects are displayed. If number of objects returned 10 then nothing is displayed. I think there is a

Re: [symfony-users] memory error and question about data loading (newbie)

2010-08-27 Thread Gustavo Adrian
You need to extend your memory_limit for PHP. Check your php.ini (for CLI) and put 128MB as memory_limit (or something like that). On Fri, Aug 27, 2010 at 1:26 PM, mjhvc marcvancraesbe...@gmail.com wrote: first: about memory error: my command: ./symfony doctrine:data-dump symfony output:

[symfony-users] CSRF Token on AJAX batch form fails, why?

2010-08-30 Thread Gustavo Adrian
Hi, I'm creating my own admin generator with heavy use of AJAX. Every CRUD action works fine, except with the batch actions. I've tried to use the same code that is used on the original admin generator but it keeps throwing CSRF attack detected. I have a form that wraps a table, with each row

Re: [symfony-users] Re: IE8 and isXmlHttpRequest

2010-09-01 Thread Gustavo Adrian
I use Symfony with jQuery in my last app where I've made every functionality available via AJAX and it works perfectly on IE8. Can you give us more information abour your app so we can help you more? version of Symfony, jQuery and the code you're using to receive the AJAX request? On Wed, Sep 1,

Re: [symfony-users] Re: Session won't last

2010-09-03 Thread Gustavo Adrian
Check the value of the *session*.gc_maxlifetime config on your php.ini. On Fri, Sep 3, 2010 at 10:34 AM, pghoratiu pghora...@gmail.com wrote: Check the sessions settings in php.ini as well. What operating system do you use? For instance on Ubuntu there is a cron job that deletes the session

Re: [symfony-users] IDE

2010-09-03 Thread Gustavo Adrian
I tried PHPEdit and I must say is the best I used so far. It's FAST and it has a lot of features. It's not free, but is the best I tried. On Thu, Sep 2, 2010 at 9:45 PM, |-|@|\/|||) hamidrezaa...@gmail.com wrote: I need IDE for symfony. please introduce IDE for symfony. -- If you want to

[symfony-users] [Symfony 1.4] Code example showing the use of sfValidatorFromDescription?

2010-09-06 Thread Gustavo Adrian
Hi everyone, Could you tell me where can I get a code example of the validator sfValidatorFromDescription on the Symfony Framework, or show me a little example of its use? I'm reading the API description of this class but I'd like to know how can I use it (and see if it's in fact what I'm looking

[symfony-users] [Symfony 1.x] Basic question: Problems getting instances of Doctrine Table in production server

2010-09-08 Thread Gustavo Adrian
Hi, This is not a Symfony / Doctrine specific question but well.. I'm sure you can help me with this. I have to instantiate a doctrine table dynamically: *$table = 'MyDoctrineTable'; $instance= $table::getInstance();* In my dev server (PHP v5.3.2) it works fine. In my production

Re: [symfony-users] Re: mobile site strategy

2010-09-08 Thread Gustavo Adrian
You could create a custom layout for mobile sites. Then, in the action: $this-setLayout( 'myMobileLayout' ); You could create a custom base action that extends from sfActions, where you check for the sf_format value for the request in the preExecute method. Then, based on that value, set the

Re: [symfony-users] Re: mobile site strategy

2010-09-08 Thread Gustavo Adrian
) On Sep 8, 1:48 pm, Gustavo Adrian comfortablynum...@gmail.com wrote: You could create a custom layout for mobile sites. Then, in the action: $this-setLayout( 'myMobileLayout' ); You could create a custom base action that extends from sfActions, where you check for the sf_format value

Re: [symfony-users] sfguardauth // How to display a layout depending on user's group

2010-09-12 Thread Gustavo Adrian
Create a base action with a preExecute method. Check in that method for the user's group and change the layout accordingly. Then extend your actions from this base action. This would be a way of doing it. Another way would be maybe with a filter, but I like to have a baseAction and your

Re: [symfony-users] individual User layouts?

2010-09-17 Thread Gustavo Adrian
Create a baseAction with a preExecute method where you check which user is logged in, and change the layout accordingly. Then, extend your own actions from this baseAction: // myApp/lib/actions/baseAction.class.php class baseAction extends sfActions { public function preExecute() {

Re: [symfony-users] some questions about sf

2010-09-22 Thread Gustavo Adrian
Hi, I tried a few IDE's like Eclipse, netbeans and PHPEdit. Eclipse was good but a little slow for me. PHPEdit is the best in my opinion, but it's not free. About your second question, I'm running a couple of projects on shared hosting and it runs nice. You should run the check_configuration.php

Re: [symfony-users] problem with sfWidgetFormChoice

2010-09-23 Thread Gustavo Adrian
Could you show us your DB schema? how do you want to save your multiple extensions on the DB? if you want to save the extensions in only one field then you could override the doSave method on your form, take the array of extensions and make a string with pipe separated values ( like: JPG|GIF|PNG )

Re: [symfony-users] Re: problem with sfWidgetFormChoice

2010-09-23 Thread Gustavo Adrian
Hi, I thinkg you should override the doUpdateObject method on the form and change the value of the extension field there. Remember to put a pipe or comma to separate the values on the string.Try this (not tested) on the doUpdateObject method of your form: public function doUpdateObject( $values

Re: [symfony-users] Re: different css for layouts

2010-09-23 Thread Gustavo Adrian
I think that in your case would be faster to just hardcode the CSS/JS on every layout, but If you don't want to do this you could use the methods from the response addStylesheet and addJavascript to change the CSS/JS at the time you choose and set your layout.. but you'll need to do it

Re: [symfony-users] Um checbox em cada linha (A checbox in each row)

2010-09-23 Thread Gustavo Adrian
Hi, If I understand correctly, you want to put a checkbox on a table, like the one generated on the admin generator, where you select items to make a particular action? If that's so and you're not using the admin generator, just add your own checkbox to the table and create an action to receive

Re: [symfony-users] Re: problem with sfWidgetFormChoice

2010-09-23 Thread Gustavo Adrian
Selecting one or more elements, which is the value shown in $values[ 'extension' ] ? do a quick var_dump to see it, and call parent::doUpdateObject at the end of your method, passing to it your modified $values array. I didn't notice that you're using sfWidgetFormChoice. Use

[symfony-users] [Symfony 1.4] Column_aggregation + i18n. Base Translation forms inheritance problem

2010-09-24 Thread Gustavo Adrian
Hi, Suppose you have this schema: TextElement: actAs: I18n: fields: - title - short_description - content columns: title: type: string(255) notnull: true short_description: type: string(255) content:

Re: [symfony-users] Re: problem with sfWidgetFormChoice

2010-09-24 Thread Gustavo Adrian
I mean this: User: columns: username: type:string(255) relations: Filetype: class:Filetype local: user_id foreign: filetype_id refClass:UserFiletype Filetype: columns: extension: type: string(10)

  1   2   3   >