[symfony-users] Re: Re : Symfony2 Object Route like in Symfony 1

2011-05-23 Thread Richtermeister
We can't have a custom route class that is smart enough to convert objects to params and vice versa? Daniel On May 23, 6:41 am, Christophe Willemsen wrote: > Hi Ben, > > I know it is pitty that the previous feature is away ! > > You could however, add a getRoutingArray() to your object, which r

[symfony-users] Re: Design question - sharing forms between apps

2011-05-06 Thread Richtermeister
otherwise I > wouldn't be able to make one editable and one create-only... > > On May 6, 4:45 am, Richtermeister wrote: > > > Just create a plugin (I usually call it "AppSharedPlugin" or so), put > > a module with your template inside and enable it in whatever apps you

[symfony-users] Re: Design question - sharing forms between apps

2011-05-05 Thread Richtermeister
Just create a plugin (I usually call it "AppSharedPlugin" or so), put a module with your template inside and enable it in whatever apps you want to share it in. Daniel On May 5, 6:30 am, OnDistantShores wrote: > Yep, Symfony 1 :-) > > On May 5, 11:27 pm, OnDistantShores wrote: > > > Thanks for

[symfony-users] Re: Forms escaping quotes on input

2011-04-11 Thread Richtermeister
Could this be related to the php setting "magic quotes"? Daniel On Apr 10, 11:47 am, Simon Cast wrote: > I recently upgraded to 1.4.12 and this has produced the odd error > where form input is escaping quotes on entry to the system. By this I > mean I echoed the clean & bound form and the text f

[symfony-users] Re: cli memory problem...

2011-03-22 Thread Richtermeister
You can also try explicitly setting the memory limit in your project configuration via: ini_set("memory_limit", "60M"); or whichever is appropriate. Expecially long-running tasks can be hogs. Daniel On Mar 22, 8:35 am, Jonathan Franks wrote: > Hi, I know this issue has been discussed before but

[symfony-users] Re: Question about sfFormObject::saveEmbeddedForms()

2011-03-18 Thread Richtermeister
I think the silence is your answer.. we're all suffering from this, and I believe the SF2 form system won't have this issue any more. Daniel On Mar 15, 8:47 pm, bkuberek wrote: > symfony 1.4.10-DEV > sfFormObject.class.php : line ~ 229 > > I have pasted an excerpt here > > http://pastebin.com/d

[symfony-users] Re: Problem with Sending an email with a task

2011-03-17 Thread Richtermeister
You need to call the task with a specific application (either by adding --application=whatever to the calling code, or by specifying the default application in the respective parameter). Without that, you get a project config, with it, you get an application config. The reason is that many factorie

[symfony-users] Re: Complex web application development at low cost. Visit http://www.symfonyindia.com

2011-03-15 Thread Richtermeister
This brings up a question I've had, are there any restrictions on using the symfony name in domains/products that are commercial in nature and aren't affiliated with Sensio? I know Drupal made a move to restrict usage of their name under such circumstances (from what I read, not 100% sure how that

[symfony-users] Re: dynamically extending classes

2011-02-26 Thread Richtermeister
Hi Himanshu, this seems overly complicated. Since you're getting the same fields from the database regardless of which user is logged in, you should be fine using the same class to access those fields. The model shouldn't change depending on which user uses it, only different data should be access

[symfony-users] Re: [Symfony2] Bundles and Entities

2011-02-16 Thread Richtermeister
It's really the same as in symfony1 where a blog plugin would contain a "front module" and one or more "admin modules", as well as the entire blog model and blog specific assets. The only thing I'm unsure about is how to group said files within the bundle.. I mean, most bundles I see have one contr

[symfony-users] Re: Admin generator preferences panel

2011-02-15 Thread Richtermeister
Hey Felds, In the past I have dealt with this by just putting a "SettingsForm" into the admin area (styling it to look the same as an admin module), and writing the settings to a yml file. During runtime I then load the file and merge it with the settings in sfConfig. This way I can allow admins t

[symfony-users] Re: Introducing Vespolina - the new sf2 based e-commerce platform

2011-01-26 Thread Richtermeister
Hey guys, I share your frustration with Magento, having tried to customize what I feel are trivial things, and having struggled with keeping the checkout process as slim as possible (I only had one shipping option, why do I force the customer through the extra step of selecting it? etc...) So, my

[symfony-users] Re: symfony cache doubt

2011-01-24 Thread Richtermeister
t; > Can you tell me how can I do that? Do u have any reference links? I am > not much familiar. > > Can you tell me with one example. I am really thankful to you. > > regards > Shihab > > On Jan 23, 12:01 am, Richtermeister wrote: > > > I believe you can make the cac

[symfony-users] Re: symfony cache doubt

2011-01-22 Thread Richtermeister
I believe you can make the cache key whatever you want... so in your case just module/action and whatever neccessary parameter, but not user id. I've used this in reverse, where I had the same url for everybody, but depending on the login status and session id I'd generate a unique cache key, since

[symfony-users] Re: Is it possible to pass more than 1 object to the route ?

2011-01-20 Thread Richtermeister
You can create a custom route class that understands how to retrieve your objects from whatever url pattern you come up with. Have a look here: http://www.symfony-project.org/more-with-symfony/1_4/en/02-Advanced-Routing Daniel On Jan 20, 9:07 am, ma89a2 wrote: > Hello to everyone. > > I need

[symfony-users] Re: Best practice to allow for Action reuse?

2011-01-02 Thread Richtermeister
You can do that. Just Pass an extra "Redirect" Parameter to the route and Pick it up in the Action. On Jan 3, 5:47 am, Eric B wrote: > On Sun, Jan 2, 2011 at 9:08 AM, Svetoslav Shterev wrote: > > On Sat, 2011-01-01 at 23:36 -0800, benze wrote: > > > Hi, > > > > I'm trying to figure out the be

[symfony-users] Re: displaying collection/s in templates

2010-12-25 Thread Richtermeister
Hey introvert, you're on the right track. You definitely want to avoid putting view- specific code into your model, so, yes, rendering this content is up to helper methods or classes. For example, to render trees, I have a class that takes a nested set (something that implements IteratorAggregate)

[symfony-users] Re: sfPropel15Plugin

2010-12-04 Thread Richtermeister
Hey Tomasz, this is normal - you have to tell Propel to also hydrate the I18N classes via: (example) CategoryQuery::create() -> joinWith('CategoryI18N') -> find(); I usually create a "withI18N" method on the internationalized query classes for convenience. Works like a charm and reduces everythin

[symfony-users] Re: Manage the credentials of the actions and modules through a form

2010-11-26 Thread Richtermeister
Hey Javi, first, the credentials are in the security.yml, not view.yml, and secondly, the proper approach is to manage what credentials a user has rather than managing what credentials an action/module requires. So, the current approach of coding credentials into the system files and assigning/man

[symfony-users] Re: On $form->save() and knowing if anything has changed

2010-11-12 Thread Richtermeister
Hey there, your first insight is right, you're holding 2 references to the same object, so it'll always be the same. In your second case I could only imagine that the updated_at field is being updated (maybe). To find out, why don't you look at the serialized strings and see where they differ...

[symfony-users] Re: SFPropelPager

2010-10-26 Thread Richtermeister
hod call you mentioned fits in here. what exactly is > the $page variable supposed to hold. or is that a pre defined variable ??? > Also it isn't a member function of sfPropelPager, so what exactly is $query > that you are mentioning here > > Thanks again > > Parijat

[symfony-users] Re: SFPropelPager

2010-10-25 Thread Richtermeister
Hey there, without knowing exactly what your issue is, if you're using Propel15 (as you could and should ;) you can just use $query -> paginate($page, $per_page); and that works guaranteed. Daniel On Oct 24, 11:05 pm, Parijat Kalia wrote: > Hey guys, running into a cheesy error with sf propel

[symfony-users] Re: regarding symfony 1.4

2010-10-24 Thread Richtermeister
Hey Madhur, - what gabriel said, perfect description. I just wanted to add that the whole process is usually very smooth can can be done within an hour. The only manual update I had to do after the upgrade was to rework use of the flash variable, as it was moved from the action to the user.. but s

[symfony-users] Re: front end product gallery

2010-10-18 Thread Richtermeister
I'm using the sfImageTransformPlugin in conjunction with the helpers below: /** * Get the path of a generated thumbnail for any given image * * @param string $source * @param int $width * @param int $height * @param boolean $absolute * @return string */ function thumbnail_path($source, $w

[symfony-users] Re: How to pass single instance of an Object to view

2010-10-12 Thread Richtermeister
Might just be a typo, but you're calling "getInstance" while the method you show is called "createInstance".. Daniel On Oct 11, 1:43 pm, wickass wrote: > Im trying to pass a single instance of a helper object to the view by > making use of "template.filter_parameters" event. However it seems >

[symfony-users] Re: A simple private messaging system plugin [does it exists ?]

2010-10-11 Thread Richtermeister
Hey rekarnar, I'd be interested in the propel version as well. :) Daniel On Oct 10, 2:36 pm, rekarnar wrote: > Yer I have a simple solution that I was going to convert into a plugin > for you... but then I realized it is propel.. sorry. I could still do > so if you wanted to use it as a base f

[symfony-users] Re: generelize the parameter verification of routing file

2010-10-08 Thread Richtermeister
You could use the requirements of the route to verify that a valid version is supplied. Of course that would be limited to a regex, but if that's enough, that's where it would go. Next best option is to create your own route class and customize things there. Daniel On Oct 8, 4:21 am, Shihab KB w

[symfony-users] Re: Having a "web" layer for the "model"

2010-10-06 Thread Richtermeister
Hey Sebastien, your intuition is right, those things don't belong in the model, as they differ from application to application. There are easy ways to have the best of both worlds though. First, links to, say, a product I find pretty simple: link_to($product, "product_show", $product); However, i

[symfony-users] Re: Propel route: new object with foreign key (sf 1.3.7)

2010-10-04 Thread Richtermeister
In the new action for the related object, just stick that ID into the object or set it as default for the form. $object = new Whatever(); $object -> setRelatedId($request -> getParameter("offer_id")); $form = new WhateverForm($object); //OR $form = new WhateverForm(new Whatever()); $form -> setD

[symfony-users] Problem with Mailer (autoload?)

2010-09-27 Thread Richtermeister
Hey everybody, I'm running into a new error when I use the mailer. Just $this -> getMailer() alone triggers it. Catchable fatal error: Argument 1 passed to Swift_Transport_AbstractSmtpTransport::registerPlugin() must be an instance of Swift_Events_EventListener, instance of sfMailerMessageLoggerP

[symfony-users] Re: How to use the admin filter on the frontend

2010-09-24 Thread Richtermeister
t;customers")); ?> That help? Daniel On Sep 23, 7:36 pm, Tristan wrote: > Do you have an example please ? > Cause as i never see it from my eyes, it does not make sense. > > Thanks ;) > > On 22 sep, 19:32, Richtermeister wrote: > > > This is very si

[symfony-users] Re: different css for layouts

2010-09-23 Thread Richtermeister
Hey Vikos, yes, that is relatively easy, but obviously you can't just use the view.yml for that. However, from within the layout you can just call: use_stylesheet('whatever'); use_javascript('blah'); That way you can customize the layouts to use different assets. Daniel On Sep 23, 5:25 am, Vi

[symfony-users] Re: How to use the admin filter on the frontend

2010-09-22 Thread Richtermeister
This is very simple. You have those FilterForm classes for each model.. just use those to render the forms on the front-end, and validate the data when they are submitted, just like with a regular form. The only difference is, you also have a method $filter -> getCriteria(), which returns a criteri

[symfony-users] Re: sfWidgetFormChoice with custom query slower than sfWidgetFormPropelChoice generated by default

2010-09-06 Thread Richtermeister
What happens if you run the query manually against the database? Could be that you're doing a non-optimized join or so... Daniel On Sep 6, 4:13 am, Hugo Chinchilla wrote: > Hi, > > for my app's backend I have written a custom method to draw a select > widget which was consuming a lot of memory

[symfony-users] Re: symfony application doubt

2010-09-06 Thread Richtermeister
Under normal conditions, only one application can have no script in the url, since all requests without a script would be directed to that app via .htaccess setting. One way around that is described here: http://symfony-check.org/permalink/delete-backend-php-from-your-uri Daniel On Sep 6, 4:33 a

[symfony-users] Re: too many queries with embedded forms

2010-08-18 Thread Richtermeister
I've come across this as well, and the reason is that many of the choice widgets fire off a query to populate themselves. if you have 4 relationships per object that gives you 4 queries, and by embedding that many times, it multiplies quickly. I don't think there's anything you can do about this ot

[symfony-users] Re: Overriding files from a plugin within another plugin

2010-08-18 Thread Richtermeister
Yes, and yes. :) On Aug 17, 12:11 pm, "Daniel Kucharski" wrote: > Hi, > > Is it possible to create a plugin which overrides various settings / classes > from other symfony plugins (routing, schema, model classes)? > > If so, does the order how plugins are loaded (in the project configuration) > m

[symfony-users] Re: propel version of apostrophe?

2010-08-12 Thread Richtermeister
I would imagine that at this point you can do everything that Doctrine can do equally easily with Propel, and the port should be fairly straight forward. I would be very interested in such a development as well, and very available to help out. Daniel On Aug 12, 3:02 am, Tofuwarrior wrote: > Hi,

[symfony-users] Re: Disable proxy caching/global headers

2010-08-10 Thread Richtermeister
Headers go into the view.yml file under http_metas. For example: http_metas: content-type: text/html Expires: 0 Alternatively, you can put those into the .htaccess file and have Apache dish them out instead. Daniel On Aug 10, 3:54 am, gunnarlium wrote: > Hi! > > I have an issue where

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

2010-08-02 Thread Richtermeister
say makes sense. Thanks for the perspective. Daniel On Aug 2, 6:24 pm, Christian Fazzini wrote: > Yes but I think you are missing the point Richtermeister. All this > extending makes it more difficult with the admin generator involved. > Not difficult perse'. But just extra effort

[symfony-users] Re: Emails and multiple Applications

2010-08-02 Thread Richtermeister
Hey Stephen, while there's nothing wrong with creating a plugin, even to just share one template, for emails I prefer to wrap them in classes. As Gustavo says, it sucks a bit if there's complex HTML involved, and I'm currently looking at integrating the templating standalone component to be able t

[symfony-users] Re: Timestampable

2010-08-01 Thread Richtermeister
You can override the isModified() method on the object to introduce that custom logic. Currently it returns whether any field has been modified. You can change it to return false if only the view field has been modified. Daniel On Jul 31, 6:13 pm, comb wrote: > Well I need the updated_at field

[symfony-users] Re: possible to use smarty & symfony templates in same system?

2010-07-28 Thread Richtermeister
Oh, and needless to say longterm it would make sense to look into Twig instead of Smarty. That way you'll roll with highly symfony friendly tools. Daniel On Jul 28, 9:06 am, Richtermeister wrote: > Hey Paul, > > well, for one, there's this plugin > here:http://www.symfo

[symfony-users] Re: possible to use smarty & symfony templates in same system?

2010-07-28 Thread Richtermeister
Hey Paul, well, for one, there's this plugin here: http://www.symfony-project.org/plugins/sfSmartyPlugin This comes with a bunch of symfony specific smarty plugins and should give you plenty of ideas about how to integrate the two. With regards to Doctrine vs. Propel, I would take a close look at

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

2010-07-26 Thread Richtermeister
Hey there, I use the admin generator exclusively for my admin backends. I find that it gives a quick yet solid foundation for all my admin needs, and if I run into situations like you describe (make the same changes to different modules) I can simply extend the generator itself and the changes tak

[symfony-users] Re: Facebook style multi-select widget

2010-07-23 Thread Richtermeister
t; is the jquery autocomleter in the form extra plugin. You could modify that > widget to do this. I have done something like this, but it just extends the > widget and adds a delete icon to it. > > On Jul 21, 2010 9:20 PM, "Richtermeister" wrote: > > Hi all, > >

[symfony-users] Re: Conditional based redirects

2010-07-23 Thread Richtermeister
Since most/all of the form handling happens inside the form, you could have 2 separate actions that redirect to different areas. Also, you could have one form submit via ajax. Lastly, there's always the referrer variable. Daniel On Jul 23, 7:24 am, "Daniel Kucharski" wrote: > Yes, that is inde

[symfony-users] Facebook style multi-select widget

2010-07-21 Thread Richtermeister
Hi all, I could use a widget that works just like the "to" field in facebook messages, where you start typing a name, get an autocomplete list, pick an item, and said items goes into the field, gets a remove icon, and you can repeat this process as often as you want. Does that already exist? Dan

[symfony-users] Re: admin generator: filtered result

2010-07-20 Thread Richtermeister
What I usually do is add a custom column like "Number of Comments", and I link that number to a custom filtered list of comments that belong to this post. Are you using Propel or Doctrine? Daniel On Jul 20, 9:27 am, Martin Henits wrote: > I have 2 tables named blog_post and blog_post_comment.

[symfony-users] Re: Admin generator : Select items on different pages and run a batch action on this items

2010-07-16 Thread Richtermeister
You could also add a new collection action "Add To List", and use that to add selected rows to a list on the server. Then you have another action "Process List", and that runs on the list.. Daniel On Jul 16, 7:54 am, Winnie wrote: > Hello all, > > Is it possible to select items on different pag

[symfony-users] Re: Routing problem for generate-admin with id: type string (128)...

2010-07-13 Thread Richtermeister
Take a look here: http://www.codemassacre.com/2009/04/27/symfony-12-admin-with-custom-primary-key/ Daniel On Jul 12, 9:06 am, PePe_el_Romano wrote: > Good dear group: > I am writing to see if someone has this same error occurred and has > solved, or if they are aware of it. > > Problem descrip

[symfony-users] Re: Question about set/get methods of model classes

2010-07-05 Thread Richtermeister
I'm not aware of an advantage, and from what I know Doctrine2 does away with that. Daniel On Jul 4, 9:37 am, Javier Garcia wrote: > On 07/04/2010 11:44 AM, G bor F si wrote: > > > > > The question is doctrine-related, not propel. Doctrine indeed uses > > magic methods instead of generating the

[symfony-users] Re: Custom Column Sort

2010-07-02 Thread Richtermeister
Hey there, if you're using Propel, you're in luck, the option to sort on custom columns has just been added and works great. http://trac.symfony-project.org/browser/plugins/sfPropel15Plugin/trunk/doc/admin_generator.txt Daniel On Jul 2, 3:37 am, Aanchal Gera wrote: > Hi > > I am using Admin

[symfony-users] Re: Sending mail from a Form class.

2010-07-01 Thread Richtermeister
Hey there, overall this is a perfect case for using the eventdispatcher. That way you can keep the form focused on what it's good at (validation), and handle notifications outside. The form already has access to the eventdispatcher, so all it takes is firing an event that carries the post object t

[symfony-users] Re: Migration of Symfony 1.0 to 1.4 Help and Hints please

2010-07-01 Thread Richtermeister
Hey Juerg, fear not, I've done exactly that 1.0 -> 1.4 a number of times recently, and it's not all bad. But yes, I would recommend stepping through each new version, just in order to run the project:upgradeXX tasks.. The first step is the hardest, since you need to manually update the symfony ex

[symfony-users] Re: $form->bind() should return the form object...

2010-07-01 Thread Richtermeister
+1 I second that. Chaining rules and there should be more of it. Daniel On Jul 1, 7:30 am, Georg wrote: > Hello, > > I think that the bind() method of the Form object should return the > object to make it possible to chain methods, for my personal use of > forms, this would make sense: > > if (

[symfony-users] Re: Different Cache for different user groups

2010-07-01 Thread Richtermeister
wrote: > On Wed, 30 Jun 2010, Richtermeister wrote: > > I have an app with 2 usergroups  (admins and dealers), and dealers can > > fall into 3 brands. Those two factors affect the content of certain > > lists. Now, I'd like to cache certain sections, but of course I need &g

[symfony-users] Different Cache for different user groups

2010-06-30 Thread Richtermeister
Hi all, I have an app with 2 usergroups (admins and dealers), and dealers can fall into 3 brands. Those two factors affect the content of certain lists. Now, I'd like to cache certain sections, but of course I need to still worry about who sees what, and I'm thinking that in theory this should be

[symfony-users] Re: Object as array

2010-06-30 Thread Richtermeister
$object -> toArray(BasePeer::TYPE_FIELDNAME) returns the array you're looking for. For more reference, check this: http://propel.posterous.com/getting-to-know-propel-15-when-you-really-nee On Jun 30, 6:14 am, HAUSa wrote: > Is there a way in Symfony / Propel to get an object as array? > > User:

[symfony-users] Re: Age validation using date widget

2010-06-24 Thread Richtermeister
Can you show us how the widgets are set and configured in the form? Outside of adding a date widget and a date validator you shouldn't have to do anything. Daniel On Jun 24, 1:49 pm, metaphist wrote: > Actually, two issues: > > 1) My date widget isn't saving the date in the database. I get all

[symfony-users] Re: routing question?

2010-06-22 Thread Richtermeister
I would not put this on the routing system. It sounds like all you need is one route that maps your urls to your product catalog action, and figure out which product to show from there. For example, the route could be: product: url: /:manufacturer-:type param: { module: catalog, action: sh

Re: Yan: [symfony-users] Translation in form class

2010-06-21 Thread Richtermeister
Ideally you pass the I18N instance into the form. That way you don't couple your forms to the context (makes forms hard to test). For example, from within an action you can say: $form = new WhateverForm(array(), array("i18n" => $this -> getContext() -> getI18n())); and inside the form: $i18n =

[symfony-users] Re: Change the maxperpage value for the pager

2010-06-21 Thread Richtermeister
Look at the configuration class, I believe it contains a method which has the final say on the max pager value. I haven't tried this myself, but that's what I would try first. Daniel On Jun 21, 12:54 am, Winnie wrote: > Hello, > > I'm working on a module made with the admin generator and i want

[symfony-users] Re: [symfony users] FCKEditor/CKEditor symfony 1.4

2010-06-21 Thread Richtermeister
Simple, just use this plugin: http://www.symfony-project.org/plugins/sfFCKEditorPlugin, which gives you a simple widget to render the editor. You'll still have to download the fck editor library and put it in the right spot (/js/fckeditor I believe), but that's it. Easy as pie. Daniel On Jun 21

[symfony-users] Re: PHP related, but on a symfony site

2010-06-10 Thread Richtermeister
Hey Parijat, actually, it just changes the order the results are displayed in. The original query stays the same except for the ORDER BY clause. The symfony admin generator behaves the same way. Daniel On Jun 9, 10:12 pm, Parijat Kalia wrote: > hello everyone, here's my 2nd doubt of the day. >

[symfony-users] Re: sfEasyGMapPlugin

2010-06-09 Thread Richtermeister
Hey Omar, something like this? http://www.skinmedica.com/find-a-medical-practice?submitted=1&zip=92109 If so, I can share how that's done. Daniel On Jun 9, 6:28 am, Omar El Mazny wrote: > hello > > I have results in a list & on the map is it possible when i click on > the result it zooms on t

[symfony-users] Re: How to paginate search-results?

2010-06-06 Thread Richtermeister
Hey there, another solution that hasn't been mentioned yet is to simply cache the search result for that particular query / user (make query and userid part of the cache key). That way, it doesn't matter if somebody's flooding, as this won't bog down the server. Daniel On Jun 5, 10:30 am, comb

[symfony-users] Re: sfPropel15Plugin and sfGuardPlugin problem

2010-06-05 Thread Richtermeister
Hey there, this is the standard behavior. Most plugins define the package directory similar to this: _attributes: { package: plugins.sfGuardPlugin.lib.model } This makes the model live in the plugin directory. Daniel On Jun 3, 8:06 am, AgusQuiroga wrote: > Hi, > I just started a new pro

[symfony-users] Re: strip_tags validator

2010-05-25 Thread Richtermeister
The model class works as well, but some people prefer to leave the data cleansing to the forms and use the model layer purely for storage/ retrieval. Matter of preference. Daniel On May 25, 6:27 am, Tom Haskins-Vaughan wrote: > > Using setDescription on model level probably doesn't work for the

[symfony-users] Re: How to make Ajax urls environment aware?

2010-05-25 Thread Richtermeister
directly.. $form = new WhateverForm($defaults, array("url" => $this -> generateUrl(...))); Daniel On May 25, 6:07 pm, Richtermeister wrote: > Hey Kay, > > the clean way is to pass the routing class to the form. > > //from inside controller > $form = new Whateve

[symfony-users] Re: How to make Ajax urls environment aware?

2010-05-25 Thread Richtermeister
Hey Kay, the clean way is to pass the routing class to the form. //from inside controller $form = new WhateverForm($defaults, array("routing" => $this -> getRouting()); //from inside form $routing = $this -> getOption("routing"); $url = $routing -> generate(...); ideally, you also ensure that y

[symfony-users] Re: edit id in admin

2010-05-24 Thread Richtermeister
Hey Oleg, the tag to product argument makes no sense to me... What are you attaching tags to if not the product's ID's? In your version, you want to edit product ids.. so what happens to the references in the product_to_tags table? You have to update them accordingly? If you just went with autoin

[symfony-users] Re: edit id in admin

2010-05-23 Thread Richtermeister
Hey Oleg, gabriel is right. Using database ids with outside systems (your accounting system) is a bad idea and a database design no-no for all sorts of reasons.. One issue is that you're coding only for your current situation, but what happens when your accounting system changes? Or when you need

[symfony-users] Re: embedForm problem in edit view

2010-05-22 Thread Richtermeister
I think if you embed the form under a different name (not contact_details_id, try just contact details), that might fix it. Right now what's happening is that the widgetschema "contact_details_id" is being rendered with a value of 1, which makes no sense, since it''s expecting an array as values.

[symfony-users] Re: Generated methods in peer class'

2010-05-21 Thread Richtermeister
http://www.propelorm.org/wiki/Documentation/1.5/Behaviors#WritingaBehavior It applied to 1.4/1.5, and if you're not there, do yourself a favor and try it out... it'll rock your world. Daniel On May 21, 7:03 am, rekarnar wrote: > Hi, > > Thats what I was hoping for, can you link me to some docu

[symfony-users] Re: How to got the last id from a table, usinf criteria

2010-05-21 Thread Richtermeister
Hi there, in theory there's not often a need for this kind of query.. For example, if you save an object, you get the new ID immediately.. $object = new Whatever(); $object -> save(); $latest_id = $object -> getId(); Daniel On May 21, 5:47 am, kadia dia wrote: > Thank you for u help, It's o

[symfony-users] Re: MVC vs module in Symfony

2010-05-18 Thread Richtermeister
Also, to answer your filters question - assuming you mean request filters (cache, security, etc.), I believe the answer is no, you can only configure them for the whole application, and the reason is simple - they execute before you even know which module was requested. They're "universal". Howeve

[symfony-users] Re: any progress on ecommerce packages using Symfony?

2010-05-17 Thread Richtermeister
I second that - if the goal is a fully fledged e-commerce app, Magento would be my first choice. On the symfony side you'll find some payment integration packages, but nothing that amounts to a full store. Closest thing I know of is here: http://groups.google.com/group/symfony-ecommerce but I don't

[symfony-users] Re: Upgrading from symfony 1.1 to symfony 1.3, admin generator problems

2010-05-17 Thread Richtermeister
Hey Yyaga, while there's been quite a few changes in propel as well as the admin generator, most of them were introduced with backwards compatibility in mind, so you shouldn't have to undertake major rewrites at all. I've upgraded 1.2 to 1.4 / p1.5 without problems, as most of the generator.yml ca

[symfony-users] Re: Templates in a single directory

2010-05-17 Thread Richtermeister
There's also this plugin: http://github.com/weaverryan/sfThemePlugin/blob/master/README.markdown Haven't tried it yet, but seems to take care of theming, except the image directory as far as I can see, but that seems to make sense to me, as some images could be shared between themes. Daniel On

[symfony-users] 1000 Plugins!

2010-05-12 Thread Richtermeister
Yay! Congratulations, symfony! More than once have I heard the phrase "why don't we use Drupal, it's got thousands of plugins", prompting me to bring up the quality vs. quantity argument. But it's good to see we're also strong on quantity. Rock on! Daniel -- If you want to report a vulnerabilit

[symfony-users] Re: sfErrorHandlerPlugin doesn't catch "call to a member function on a non-object" errors

2010-05-10 Thread Richtermeister
This is because the php engine shuts down completely when a fatal error is encountered. Symfony doesn't get to do anything after that point. What the error handler really handles are Exceptions, not fatal errors. Daniel On May 10, 10:14 am, nurikabe wrote: > e.g.:  sfErrorHandlerPlugin can't se

[symfony-users] Re: excel

2010-05-10 Thread Richtermeister
Not sure if that's the same lib, but I've been using http://phpexcel.codeplex.com . Very mature & easy to use & well documented. Daniel On May 10, 6:06 pm, ReynierPM wrote: > There is a SF extension called sfPHPExcel wich is a wrapper for PHP Excel > give a try and tell us back how going > Chee

[symfony-users] Re: How overwrite addFiltersCriteria in symfony 1.4?

2010-05-06 Thread Richtermeister
Hey there, assuming you're using doctrine or propel, the autogenerated forms would be in /lib/forms/base Daniel On May 6, 10:48 am, fRAnKEnSTEin wrote: > Hi there, > > Thank you very much for your help: > > >"...that is why some filter inputs (like the date filter field for example) > >have

[symfony-users] Re: How overwrite addFiltersCriteria in symfony 1.4?

2010-05-04 Thread Richtermeister
Hey there, that is why some filter inputs (like the date filter field for example) have 2 fields with the same name, that way they get submitted as an array and you have access to both values in the addXXXColumnQuery method. Please look at the auto-generated forms. It's all there. Daniel On Ma

[symfony-users] Re: How overwrite addFiltersCriteria in symfony 1.4?

2010-05-01 Thread Richtermeister
uponPeer::CODE, $value); } Daniel On May 1, 5:03 pm, Richtermeister wrote: > Hey there, > > ok, I think I'm following you. > Here's how to go about it: > > First, if you're trying to filter on a real date or timestamp column, > then all the work is already done

[symfony-users] Re: How overwrite addFiltersCriteria in symfony 1.4?

2010-05-01 Thread Richtermeister
Hey there, ok, I think I'm following you. Here's how to go about it: First, if you're trying to filter on a real date or timestamp column, then all the work is already done for you. For example, the created_at/updated_at columns would automatically cause the filter field that you describe to be c

[symfony-users] Re: How overwrite addFiltersCriteria in symfony 1.4?

2010-04-30 Thread Richtermeister
Hey there, in sf1.2+, the admin filtering is handled via filter form classes, so all customization and filter logic should go in there. The form is not only responsible for displaying and validating the widgets, but since it extends sfFilterForm it also contains methods that build a query / criter

[symfony-users] Re: TIP: FOR USERS UPDATING DATABASE IN PROPEL

2010-04-27 Thread Richtermeister
Alternatively, you can just skip the insert task, and selectively grab tables from the generated sql definitions in /data/sql/.. Paste those into mysql, and you got a new table as well. As for "modifying" existing tables, that would truly fall under migration, and unfortunately it involves some man

[symfony-users] Re: How to access generator.yml variables in view ?

2010-04-23 Thread Richtermeister
If you're already inside the generated module, you should have access to the configuration class. that should contain all the info from the generator.yml. Daniel On Apr 23, 3:04 am, John wrote: > Hi Pabz, > > Thanks for your answer. > > Apparently I'm not clear : What I'd like to do is to show

[symfony-users] Where to store class files (project level vs. app level, vs. module level)

2010-04-23 Thread Richtermeister
Hi all, This is more of an aesthetic question.. In most tutorials/examples/apps I see written in symfony, all class files are stored in the project/lib data. For the model layer I see that that's a good central spot, however, I often have forms or filters that are really only applicable to one ap

[symfony-users] Re: Handle form error in the action

2010-04-20 Thread Richtermeister
Just throw a custom extension that doesn't extend sfValidatorError. After all, you are trying to break outside the form, so it's legitimate to use exceptions that transcend the form framework. Daniel On Apr 20, 7:52 am, WallTearer wrote: > But how can I check if the needed error happened? > Loo

[symfony-users] Re: sfWidgetFormSelectDoubleList order of items?

2010-04-14 Thread Richtermeister
Yeah, this is a pretty common requirement, and I've used a double list before that had up/down arrows. I'll see if I can find the code somewhere.. I've been meaning to package that into a widget anyways. Daniel On Apr 14, 8:28 am, comb wrote: > Thanks for answering. > User-View: > The Band-Memb

[symfony-users] Re: Handle form error in the action

2010-04-13 Thread Richtermeister
Hey there, ah, ok. In that case I think throwing custom exceptions that extend the sfValidatorError would be in order. Just catch those in the actions, and depending on their type you'll know which error occurred. I'm doing something similar where in my setup the credit card validator can throw a

[symfony-users] Re: Handle form error in the action

2010-04-12 Thread Richtermeister
Hey man, I know what you mean, for example - I have a checkout form that uses authorize.net to validate a credit card, but I don't want to trigger the validation until the basic for validation passes. The way I go about it is override the doBind method to first call the parent::doBind method, and

[symfony-users] Re: Multiple sfActions to solve scalability problems. It's Possible?

2010-04-07 Thread Richtermeister
Ideally you end up with one module per entity (customer, task, whatever it is) and use the routing to compose the visible structure of the app. Every other hack would be much harder to scale or change if you need to change your visible structure at some point. Daniel On Apr 7, 8:00 am, Jacob Cob

[symfony-users] Re: One Product to Many Categories

2010-04-07 Thread Richtermeister
And, to be fair and balanced, the propel version: http://www.propelorm.org/wiki/Documentation/1.5/Relationships And yes, you'll an intermediate table that links products and categories together. both columns (product_id, category_id) should be set to primaryKey: true. Both ORM's make it pretty eas

[symfony-users] Re: Custom generator

2010-04-02 Thread Richtermeister
Hey David, a better starting point to look at would probably be the module generators (there's one in propel). This generates more of a solid scaffolding, not something tied to a generator.yml, but it should give you an idea of what you're looking for. Daniel On Apr 2, 8:14 am, David wrote: >

[symfony-users] Re: OO conceptual advice

2010-03-30 Thread Richtermeister
were the logic takes place, are they also > > model classes or are they separate classes? > > > Thanks again. > > > Tom > > > On Tue, Mar 30, 2010 at 2:00 AM, Richtermeister wrote: > > > Hey Tom, > > > > I wrote the ecommerce part ofwww.skinmedi

[symfony-users] Re: OO conceptual advice

2010-03-30 Thread Richtermeister
er of help! :)  In the meantime, I have a couple of follow on > questions: > > 1. What do you see the benefits of having a separate cart and order objects? > > 2. The Promotion classes were the logic takes place, are they also > model classes or are they separate classes? > >

  1   2   3   4   >