[symfony-users] Re: Outputing dynamic image fail

2009-10-18 Thread Ahmed
Hi, I have now a probleme in refreshing image; After displaying image in the form i have a little icon whene i click it call an ajax request to the same action (home/showCaptcha) for the goal to reload the captch with new caractere but the captcha refresh fail(in firebug i see the response it's a

[symfony-users] Re: link_to() for a file in /web dir (symfony install in a web server subfolder)

2009-10-18 Thread Gareth McCumskey
link_to("Download File", sfConfig::get('sf_web_dir')."/".$this->getFileName()); On Mon, Oct 19, 2009 at 4:11 AM, Arian Hojat wrote: > Hey Ant, > > I thought though this may be considered an asset, and therefore this > applies, (but i don't see an asset_include() to look for assets in the web > di

[symfony-users] Re: Page state

2009-10-18 Thread Eno
On Fri, 16 Oct 2009, Mark Smith wrote: > However it all breaks the moment a user has more than one page open: > If while that second screen is open a new customer is selected in > another window the action will pick up the new id from session but > when the user submits the form he/she will see t

[symfony-users] Re: Connect to Sybase ASE

2009-10-18 Thread Eno
On Fri, 16 Oct 2009, Rodrigo Ruiz Fuentes wrote: > Yes... I'm over a NT plataform. Wow, that's old... -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email

[symfony-users] Re: link_to() for a file in /web dir (symfony install in a web server subfolder)

2009-10-18 Thread Arian Hojat
Hey Ant, I thought though this may be considered an asset, and therefore this applies, (but i don't see an asset_include() to look for assets in the web dir, and form urls to them... although that would be nice): "Asset helpers Chapter 7 introduced the asset helpers image_tag(), stylesheet_tag()

[symfony-users] Re: Doctrine - datetime - default value

2009-10-18 Thread Eno
On Sun, 18 Oct 2009, mini_alexander wrote: > I make something like that: > > $record = new Photo(); > $record->data_photo = new Doctrine_Expression('NOW()'); > $record->save(); > > And I have error: > > Validation failed in class Photo > 1 field had validation error: > * 1 validator failed on

[symfony-users] Re: embed forms and use_fields

2009-10-18 Thread mintao
if there's a field called "last_name" in the embedded form called "profile", how can I access this? On 18 Okt., 11:15, geoffroy wrote: > Hie, > > I think you have ti unset() fields like : > > class signForm extends PluginsfGuardUserForm > { >   public function configure() >   { >     $form = ne

[symfony-users] Re: Custom Propel Unique error message

2009-10-18 Thread Gábor Fási
http://trac.symfony-project.org/browser/branches/1.2/lib/plugins/sfPropelPlugin/lib/validator/sfValidatorPropelUnique.class.php#L110 sfValidatorPropelUnique throws an "invalid" error, customize that in your form, in the second parameter of the constructor. On Sun, Oct 18, 2009 at 23:26, Adrien M

[symfony-users] Custom Propel Unique error message

2009-10-18 Thread Adrien Mogenet
Hi, My field "login" has been set as unique. So when I try to register as an existing user, Propel is warning me correctly with an error message (an object with the same _ _ _ _ already exists), but I would like to use a custom message. How can I do that ? Btw, I created a custom UniqueValida

[symfony-users] Re: Re-open Doctrine Connection was Re: Server has gone away

2009-10-18 Thread Tom Haskins-Vaughan
OK, guys. Sorry for not getting back to you earlier but I had to put this project on the back burner for a while while I worked on a another project (Code Igniter -- eurgh!). Anyway, I managed to reconnect to the database after I downloaded the file by adding the following: $conn =

[symfony-users] Re: Error creating database on ALTER TABLE..

2009-10-18 Thread cosmy
No, on doctrine it's SET NULL separated. On 17 Ott, 18:06, Gábor Fási wrote: > Never used doctrine, but in propel it is "setnull", so without the space. > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony us

[symfony-users] Doctrine - datetime - default value

2009-10-18 Thread mini_alexander
I make something like that: $record = new Photo(); $record->data_photo = new Doctrine_Expression('NOW()'); $record->save(); And I have error: Validation failed in class Photo 1 field had validation error: * 1 validator failed on data_photo (notnull) why ?? --~--~-~--~~~

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread mini_alexander
thx wissl - it works: $raw_person = $sf_data->getRaw('person'); echo $raw_person['description']; On 18 Paź, 16:23, wissl wrote: > what class is the instance $person of? for doctrine somethine like > this should work: > > echo $person->getRawValue()->description; > > if it is a simple array you

[symfony-users] Re: One Application, Several Domains, Shared session

2009-10-18 Thread Fabrice Bernhard
If you want to avoid putting the session id in links that the user might copy paste, use an iframe-based exchange of session ids, with iframes hidden in your page. This does not solve the "Session fixation" problem, but it can helps making cross-domain authentification a bit more transparent. Fa

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread wissl
what class is the instance $person of? for doctrine somethine like this should work: echo $person->getRawValue()->description; if it is a simple array you could do something like this: $raw_person = $sf_data->getRaw('person'); echo $raw_person['description']; Best way is to var_dump the objec

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread mini_alexander
$sf_data->getRaw("person[description]"); also doesn't work - strange... Do You use symfony 1.2.9 ?? On 18 Paź, 15:41, Gábor Fási wrote: > Just a hinch: have you tried `$sf_data->getRaw("person[description]");` ? > Also, you may try to var_dump $sf_data, might give you some more info > about ac

[symfony-users] Re: expose instance variable to a template

2009-10-18 Thread mbernasocchi
Hi, thanks for the expaination, just one more question, how come then that adding $this->mName=$this->modelName; to a function does correctly assign the $modelName var to $mName? is there a difference between reading and setting $this-> ? thanks Marco On Oct 17, 11:52 pm, Ant Cunningham wrote:

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread Gábor Fási
Just a hinch: have you tried `$sf_data->getRaw("person[description]");` ? Also, you may try to var_dump $sf_data, might give you some more info about accessing the variables, if my hinch doesn't work out. Never used getRaw(), I alway echo data from propel, and use something like `$object->getBody(

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread mini_alexander
I have tried: echo $sf_data->getRaw('description'); and echo $sf_data->getRaw($person['description']); and still the same error - maybe this is some bug in symfony 1.2.9 ? On 18 Paź, 14:04, Tom Boutell wrote: > Mini, Gabor used "test" as an example, use your field name (description). > > As Min

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread Tom Boutell
Mini, Gabor used "test" as an example, use your field name (description). As Mini pointed out you need to filter the content to remove JavaScript, XSS attacks, bad CSS that trashes the layout of the page, etc. (unless the only person entering it is trusted, and maybe even then to cut down on tedi

[symfony-users] dynamically alter @hompage after routes initialization

2009-10-18 Thread ken
I've been scouring the net for the best way how to change the @hompage route after it is matched. I've tried to create my own custom route (HomepageRoute) but it is not feasible because I'm basing the output on user's credential. I know for sure that route registration happens before basicsecurit

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread mini_alexander
Are You sure ? After wrote: echo $sf_data->getRaw('test'); I have an error: Notice: Undefined index: test in C:\Program Files\WebServ\httpd \symfony-1.2.9\lib\view\escaper \sfOutputEscaperArrayDecorator.class.php on line 162 On 18 Paź, 11:12, Gábor Fási wrote: > http://www.symfony-project.org/b

[symfony-users] Re: embed forms and use_fields

2009-10-18 Thread geoffroy
Hie, I think you have ti unset() fields like : class signForm extends PluginsfGuardUserForm { public function configure() { $form = new sfGuardUserProfileForm(); $this->embedForm('profile', $form); unset( $this['filed_u_dont_want1], $this['filed_u_dont_want2'], )

[symfony-users] Re: how can I show html as html ?

2009-10-18 Thread Gábor Fási
http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer#chapter_07_sub_activating_output_escaping echo $sf_data->getRaw('test'); Make sure you cleanse the content to avoid html injection and xss. On Sun, Oct 18, 2009 at 09:42, mini_alexander wrote: > > I use rich text editor - tin

[symfony-users] Doctrine and postgresql: "unknown database attribute type: _bpchar"

2009-10-18 Thread ColinFine
I want to start a new symfony (1.2) project, building on an existing Postgresql database. Since I've never tried Doctrine and it seems to be the way things are going, I thought I'd give Doctrine a go; but I've fallen at the first hurdle. In my databases.yml I added an extra environment that poi

[symfony-users] how can I show html as html ?

2009-10-18 Thread mini_alexander
I use rich text editor - tinyMCE to format text but after used it, it shows html in next page in view as a text - how can I show html as a html ? Now I have in view: echo $object['description']; Should I use function html_entity_decode() ? --~--~-~--~~~---~--~~ Yo