[symfony-users] Re: Symfony1 + Doctrine2?

2011-06-06 Thread rooster (Russ)
On Jun 6, 8:54 pm, PaulK paulka...@gmail.com wrote: Hi all, I was wondering if anyone has experience with using Doctrine2 in combination with Symfony1. The company I work for has build an SF1D1-based back end application, which I took part in. We have, in the meantime, started on a front

[symfony-users] Re: Doctrine2 symfony 1.4

2010-08-29 Thread rooster (Russ)
Have you even tried to contribute to the original plugin first? On Aug 29, 6:16 pm, Maxim Oleinik maxim.olei...@gmail.com wrote: Does anybody use subj? I found sfDoctrine2Plugin but it seems to be outdated. So i've forked it, fix some tasks and etc. If anybody interested my

[symfony-users] Re: Custom directory structure

2010-06-06 Thread rooster (Russ)
On Jun 6, 9:21 am, Ragnis ragnis.ar...@gmail.com wrote: I can't learn it if I can't get it to work. Theese framework guys never think about those who are using shared hosting. The way restrictive shared hosts set up their environments causes problems for any kind of decent sized web

[symfony-users] Re: render widget as label

2010-06-06 Thread rooster (Russ)
Sounds like you are trying to do something that breaks standards... Why would you want a label tag that does not link to a form element? Maybe you want to use an li or span or some other element? Which part of the widget would be the label? The value? How about li?php echo

[symfony-users] Re: why not host symfony1.4 on shared-hosting?

2010-05-29 Thread rooster (Russ)
The biggest issue is security... You have a cache folder with 777 permissions which anyone else on the same host can write to and execute arbitrary PHP code. Some shared hosting providers get round this by using chroot jails and a number of other tricks, but you need to make sure the one you are

[symfony-users] Re: insert sfguard user into a form

2010-05-09 Thread rooster (Russ)
Please remember that sfContext::getInstance() is evil and kills kittens... http://eatmymonkeydust.com/2009/08/symfony-forms-flexible-widgets-based-on-user-credentials/ On May 8, 9:49 pm, Billy Paradise billyparad...@gmail.com wrote: Thanks for such quick responses!  

[symfony-users] Re: i18n with technical names instead of text

2010-04-30 Thread rooster (Russ)
On Apr 30, 7:37 pm, Tom Haskins-Vaughan t...@templestreetmedia.com wrote: I've been thinking about using 'keys' instead of full sentences:   echo __('layout.greeting'); But is this an acceptable/symfony way to do it? Symfony won't tell you off if you do, it's up to you. There are pros

[symfony-users] Re: Form not processing upon submit

2010-04-26 Thread rooster (Russ)
Just a quick note The Form helper is Deprecated, so if you are thinking of moving to Symfony 1.3/1.4 any time - I'd advise against using the form_tag() function. It's really the only thing you are using the helper for, since all the other widgets etc. are provided by the forms framework.

[symfony-users] Re: Difference between sfFormDoctrine methods: doSave(), save(), updateObject()

2010-04-16 Thread rooster (Russ)
A quick check of the source code will tell you all you need to know... save() is a wrapper function, that runs doSave() inside a transaction doSave() first calls updateObject() then calls save() on the object itself. updateObject() is a method called just before the object is actually saved,

[symfony-users] Re: doctrine 2+ symfony 1.4

2010-04-15 Thread rooster (Russ)
On Apr 14, 10:13 pm, Peter Petrik zil...@gmail.com wrote: hi, i am wondering , it is possible to use doctrine2 with symfony 1.4 (is there any plugin that supports it?) tnx. peter Also this more recent blog post:

[symfony-users] Re: Whats the deal with the ignored Trac tickets?

2010-03-26 Thread rooster (Russ)
Hi, You should probably bring this up on the symfony-devs mailing list. regards, Russ. On Mar 26, 3:28 am, Donald chekot...@gmail.com wrote: I assume the right people will see this message... I've been submitting tickets for symfony since about Sept 2008, and I used to have a very good

[symfony-users] Re: about i18n for template

2010-03-19 Thread rooster (Russ)
The i18n helper is quite simple in what it does. If it does not find a target translation it will simply return what was passed. You have a few of ways to get round this: 1. Write your own (override the) __() function So it checks if the string returned is identical, if it is - then you can

[symfony-users] Re: Dynamic default values in forms ?

2010-03-16 Thread rooster (Russ)
I suggest you have a quick read through the form book (1.2 is still pretty much valid for sf1.4) because all this is pretty much covered there. To set a default value for a date widget to today, you could do something like this in your form configure() method: $this-setDefault(my_date_widget,

[symfony-users] Re: enormous sf

2010-03-14 Thread rooster (Russ)
On Mar 14, 7:24 pm, vero vegoi...@alumni.uv.es wrote: my main.css is: *{ width:800px; } Seriously? You are setting the width of the first found element to 800px - which in your case is the sf logo. http://www.w3.org/TR/CSS2/selector.html#universal-selector I imagine this works in the

[symfony-users] Re: enormous sf

2010-03-14 Thread rooster (Russ)
Oh, and install Firebug... You would have spotted the problem straight away by selecting the element and looking to see which css rules were applying to it, and where they were coming from. Russ. On Mar 14, 8:15 pm, rooster (Russ) russmon...@gmail.com wrote: On Mar 14, 7:24 pm, vero vegoi

[symfony-users] Re: Symfony 2 + Doctrine 2 : what about behaviours ?

2010-03-09 Thread rooster (Russ)
Hi, Despite the fact there won't be behaviours as such, there will almost certainly be Doctrine extensions which emulate what you would expect from behaviours, and I think for those symfony-specific cases there will be Bundles for sure. We have already implemented a changelog behaviour in

[symfony-users] Re: Forms howto symfony 1.4

2010-02-22 Thread rooster (Russ)
The definitive guide will be released (under a different name) some point soon, in the meantime - the forms docs for 1.2 are pretty much the same so give those a whirl! Check out Appendix A and B (widgets and validators) any you can't go far wrong. Russ. On Feb 22, 2:49 pm, Diego Bello

[symfony-users] Re: Array over a Form

2010-02-22 Thread rooster (Russ)
Symfony forms by default use arrays, you've maybe just never noticed? input type=text name=user[email] / input type=text name=user[comment] / when posted this is an array... post array: array(user = array(email = something, comment = somethingelse)); It helps when binding the form, because then

[symfony-users] Re: How to get user object on libs to not get the erro The default context does not exist.

2010-02-19 Thread rooster (Russ)
This is not a good solution as your libs will be referencing the context you create, and not the singleton that is running your app. It may seem to work, since the configuration will be identical - but it's really not a good solution. You have 2 options in my opinion. 1. Dirty: Create an

[symfony-users] Re: appropriate way to insert form value before validation?

2010-02-05 Thread rooster (Russ)
I would pass the id as an option to the form (if the id is decided in the action, and cannot be derived from the object itself) then add the value using the updateObject() method. Since the value never enters userland, there is no real need to run it through the validators in this case, so I'd

[symfony-users] Re: appropriate way to insert form value before validation?

2010-02-05 Thread rooster (Russ)
You could also of course (instead of using a form option) populate the object before passing it to the form, or after you have bound the form, before calling save. (if you want to keep the account_id logic completely out of the form class). Russ. On Feb 5, 10:30 pm, rooster (Russ) russmon

[symfony-users] Re: Complex redirect with 301 status

2009-12-09 Thread rooster (Russ)
On Nov 11, 10:27 pm, domnuprofesor domnuprofe...@gmail.com wrote: Hi there! I'm switching a website to symfony that has over 180k pages indexed by google. Each page need quite a bit of server logic to redirect to the new pages. My problem is that I'm not sure I'm doing things write (and

[symfony-users] Re: ow to find out why is form not valid?

2009-12-01 Thread rooster (Russ)
On Dec 1, 2:10 pm, Gareth McCumskey gmccums...@gmail.com wrote: I stand open to correction but I believe that ALL fields need to have a validator applied, even if that validatoion is nothing. Just check that you have a validator applied to each form widget. On Tue, Dec 1, 2009 at 1:56 PM,

[symfony-users] Re: doctrine

2009-12-01 Thread rooster (Russ)
Antoine S. wrote: I used a lot with propel the possibilty to add a criteria to a generated function. Example : a product has categories, it will generate : public function getProductCategories($criteria = null, $con = null) { } and then I could easily refined with a criteria. But

[symfony-users] Re: Trying to fetch one column

2009-11-25 Thread rooster (Russ)
Is user1 the primary key, or part of the primary key for this table? Doctrine always includes the primary keys in it's hydration since it needs them to organise things. You could try: $this-friend_list = Doctrine::getTable('FriendReference') -createQuery(') -from(FriendReference a

[symfony-users] Re: Changing the character used to replace spaces in url_for

2009-11-23 Thread rooster (Russ)
Probably the easiest way to solve this would be to ensure your urls don't contain spaces in the first place. If you are generating urls based on user generated input (user name, article name etc) then look into creating slugs for this purpose. I'm pretty sure the symfony routing simply makes use

[symfony-users] Re: how can I pass ARRAY to the form ?

2009-11-08 Thread rooster (Russ)
Options are passed as an array to the second argument. $this-form = new ContactForm(array(), array(firm = $firm)); Then in your form class: $this-getOption(firm); Although in your case - if you are just trying to set defaults you can use the first array for that. On Nov 8, 10:10 pm, dziobacz

[symfony-users] Re: getId() not working on newly saved object

2009-10-07 Thread rooster (Russ)
On Oct 6, 9:41 pm, Josh joshlaro...@gmail.com wrote: Hi all: I'm still pretty fresh to Symfony so bear with my newbie questions and confusions. Here's the deal: $this-product = new Product; // from BaseProduct::Product $obj = $this-product-save(); As far as I can tell - saving a

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

2009-09-15 Thread rooster (Russ)
On Sep 15, 6:34 am, Casey casey.cam...@gmail.com wrote: 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? That's pretty much what I was getting at! The problem is still that you'd have to set it before calling one of the

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

2009-09-14 Thread rooster (Russ)
it isn't already, which why I wonder if I've overlooked something... Russ. On Sep 14, 11:34 am, Lee Bolding l...@leesbian.net wrote: 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

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

2009-09-13 Thread rooster (Russ)
On Sep 13, 9:05 am, pcummins patwcumm...@gmail.com wrote: How do I get the message from a call to $this-forward404() into a customized error404Success.php template? Your custom template should have a variable called $exception, which is the sfError404Exception object... The message is the

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

2009-09-13 Thread rooster (Russ)
the way that sample code in documentation is )} [code] Any thoughts? Using latest symfony 1.2.8 On Sun, Sep 13, 2009 at 7:49 AM, rooster (Russ) russmon...@gmail.comwrote: On Sep 13, 9:05 am, pcummins patwcumm...@gmail.com wrote: How do I get the message from a call to $this-forward404

[symfony-users] Re: about session handling

2009-08-15 Thread rooster (Russ)
Can i use some thing like $_SESSION['name']=asim; in symfony That's pretty much exactly what this explains: http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer#chapter_06_sub_session_management --~--~-~--~~~---~--~~ You received this

[symfony-users] Re: symfony forms

2009-08-11 Thread rooster (Russ)
I think Asim has misunderstood... You are trying to get the values posted with the form right? In the form class you can use $this-getValues() or $this-getValue (name) for example. If you are (for some reason) not using the form class to process the results, and you are trying to access the

[symfony-users] Re: $object-name Vs $object-getName()

2009-08-10 Thread rooster (Russ)
Hi, it's mainly down to preference as $product-Category-name utimately invokes $product()-getCategory()-getName() anyway, as would $product [Category][Name] Check http://www.symfony-project.org/doctrine/1_2/en/06-Working-With-Data#chapter_06_altering_data And

[symfony-users] Re: symfony database

2009-08-10 Thread rooster (Russ)
Hi, save() is functionality that requires an object form, so your form needs to extend a BaseFormDoctrine or Propel equivalent, normally via a BaseMyClassForm. Since your form has no reference to an object, there is nothing to save. I'd suggest having a quick blast through the docs

[symfony-users] Re: $object-name Vs $object-getName()

2009-08-10 Thread rooster (Russ)
Well, since the functions will be called anyway, there is a very marginal overhead when using property access (since they invoke the php magic __get() method) - it's not something you should worry about though. In most cases using array access is the way to go, because it means you can switch

[symfony-users] Re: Expiring page when back button is pressed

2009-08-07 Thread rooster (Russ)
This is normal behaviour on pretty much any website. Your browser has cached the page, not the server - and when you click back it simply shows you the page you were just looking at, without any request to the server at all. Try it on a few other web sites that have login forms - you'll find

[symfony-users] Re: 2 symfony on one server

2009-07-08 Thread rooster (Russ)
You need virtual hosts... it depends on your system regarding the setup, but if you google for apache virtual host you should get a ton of stuff. Shout back if you have any problems with it. On Jul 8, 3:04 pm, JPL jeanphilippe.langl...@gmail.com wrote: Hi I try to use two symfony on the same

[symfony-users] Re: Page specific javascript question

2009-06-02 Thread rooster (Russ)
There are several decisions to make here really: Adding it to a global js file is a good way to go, especially if you have a far-future expires header because then the extra bloat is not an issue. However if you have lots of template specific code there then it may be a bit out of place, for