[symfony-users] Re: mergeForm id issue

2011-04-20 Thread dagger
any one?

-- 
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 post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] mergeForm id issue

2011-04-20 Thread dagger
Hi people,

I have 2 tables Account (id, email, password), and profile(id, account_id, 
name, dob, status).

I thought to use mergeForm and make them as one form and keep things simple 
and clean. 

I followed this tutorial 
http://www.devexp.eu/2009/03/19/symfony-forms-framework-merge-2-forms/

The difference i see is that in this tutorial the mergedForm does not have 
an id column/field, but mine does, which is giving me problem on edit.

When i create a new account every thing works fine, and all data is saved 
with proper linking. But when i edit the and save the form - i get id: 
invalid profile id error on renderGlobalErrors() 

As i understand it, the id of the main form is also being set in the id 
field of the profile which ofcourse is not correct and thus would throw 
invalid error

can any one please help me out ... 

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 post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] how can i get "mysql result resource" in symfony after making a call to doSelectXX to use in mysql_num_rows() ?

2010-09-03 Thread dagger
Hi all,

I heard that mysql_num_rows returns the total number of records of a
given criteria faster then doCount() - but mysql_num_rows requires a
Mysql result resource parameter - how can i get it from ResultSet
returned by doSelectStmt or any other function?

or is there another way to execute a count query on a given criteria
which performs better then doCount()


any help will be highly appreciated.

-- 
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 post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: autocomplete does not work when loaded in response to an ajax call

2010-09-02 Thread dagger
thanks alot rob... all functional!

On Sep 2, 7:40 pm, rob  wrote:
> By default, content loaded via Ajax calls does not execute scripts.
> Try adding the parameter 'script' => true to the list of arguments of
> link_to_remote.

-- 
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 post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] autocomplete does not work when loaded in response to an ajax call

2010-09-02 Thread dagger
Hi,

I am trying to implement input_auto_complete_tag - its a copy of
http://www.symfony-project.org/book/1_0/11-Ajax-Integration#chapter_11_sub_autocompletion

when i load the page normally - like a normal get request - no ajax
involved - the auto complete field works

but when i load the same form through an ajax call - link_to_remote -
the form loads in the designated div - but the auto complete field
does not work

after doing a little digging - i found that when the page is loaded
independently - there is a javascript printed right below the auto
complete input field

//


and when i load the form through an ajax call - the above javascript
is not present under the field or any where else on the page;

i've been looking into this for a while now - and can't understand
what is it i'm missing ... any help is appreciated.

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 post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] implementing PHP soapclient in action

2010-02-09 Thread dagger
Hi All,

I don't know if this group is the right place to discuss this - but
since i'm using symfony and i need help with php soap extension i am
posting for your views.

Goal: connecting with a SOAP based webservice and performing multiple
operations

First i searched for a symfony plugin to do the above, i came across 1
- ckWebServicePlugin - but when i studied its read me - i found that
its mainly focused on creating a Web service server (Soap server) and
not a client - there is a client also ckTestSoapClient - but that is
only for testing purposes - i guess.

So i continued my search and stumbled on PHP SOAP extension -
soapclient.

there is but very little information available on the net with regards
to how to use soapclient when the webservice i want to connect to does
not publish its WSDL file ...

so i only have an endpoint url, I have the wsdl file the webservice is
based on. but i don't know how to specify the path to wsdl file while
creating the soapclient.

the code example is given below

$client = new SoapClient(NULL,
array(
"location" => "http://endpoint.url.com";,
"uri"  => "urn:the_name_space",
"style"=> SOAP_RPC,
"use"  => SOAP_ENCODED
   ));

after initialization i try to access one of the operations provided by
the webservice

 print($client->__call(
/* SOAP Method Name */
"exampleOperation", // this is as it is mentioned in
the wsdl file
/* Parameters */
array(
new SoapParam(
/* Parameter Value */
"test application",
/* Parameter Name */
"applicationTitle"
), new SoapParam(
/* Parameter Value */
"test vendor",
/* Parameter Name */
"vendor"
)),
/* Options */
array(
/* SOAP Method Namespace */
"uri" => "urn:the_name_space",
/* SOAPAction HTTP Header for SOAP Method */
"soapaction" =>
"urn:the_name_space#exampleOperation"
)));

but i keep getting the error - Not Found

This is my first time working with SOAP so any help will be highly
appreciated.

thanks

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: many to many relationships at admin not working

2009-10-17 Thread dagger

Ok it started working some how

I made 2 changes

1) i renamed the table role_permission to role_permission_ref
and
2) I changed the generator.yml file to
 edit:
  fields:
role_permission: { type: admin_double_list, params:
through_class=RolePermissionRef }
  display: [name, role_permission]

and its working now :)

On Sep 16, 9:06 pm, Abraham Montilla  wrote:
> weird :s ... i'm using sf1.2 too
>
> 2009/9/16 Farrukh Abbas 
>
>
>
> > tried that too ... does not work ... r u using sf 1.2 ?
> > can u plz give it a try for experiment sake ... coz i picked the
> > implementation of many to many relationship from a thread which was based on
> > 1.0http://groups.google.com/group/symfony-users/msg/627be2a11e61990e
>
> > <http://groups.google.com/group/symfony-users/msg/627be2a11e61990e>
>
> > On Wed, Sep 16, 2009 at 8:14 PM, Abraham Montilla 
> > wrote:
>
> >> oh, try deleting the module and generate it again, i think that's the
> >> problem then...
>
> >> 2009/9/16 Farrukh Abbas 
>
> >> yes i did, build-model, form, sql, and insert-sql ... then cache:clear ...
> >>> but no difference ...
>
> >>> On Wed, Sep 16, 2009 at 3:45 AM, Abraham Montilla 
> >>> wrote:
>
> >>>> i think you actually did it, but... did you make the build-all-load
> >>>> command? and clear the cache only to see if helps.
>
> >>>> 2009/9/15 Farrukh Abbas 
>
> >>>>> changed the schema to the following (propel), but still no luck ...
>
> >>>>>   permission:
> >>>>>     id:
> >>>>>     method_name:      { type: VARCHAR, size: 50, required: true }
> >>>>>     action_name:      { type: VARCHAR, size: 50, required: true }
> >>>>>   role:
> >>>>>     id:
> >>>>>     name:             { type: VARCHAR, size: 100, required: true }
> >>>>>   role_permission:
> >>>>>     role_id:          { type: INTEGER, required: true, foreignTable:
> >>>>> role, foreignReference: id}
> >>>>>     permission_id:    { type: INTEGER, required: true, foreignTable:
> >>>>> permission, foreignReference: id}
>
> >>>>> On Tue, Sep 15, 2009 at 10:28 PM, Abraham Montilla <
> >>>>> amontil...@gmail.com> wrote:
>
> >>>>>> Hello dagger, in the schema you have to add foreign keys to the third
> >>>>>> table, in Doctrine would be something like
>
> >>>>>> Permission:
> >>>>>>   columns:
> >>>>>>     id:
> >>>>>>       type: integer(4)
> >>>>>>       primary: true
> >>>>>>       notnull: true
> >>>>>>     method_name:
> >>>>>>       type: string(50)
> >>>>>>       notnull: true
> >>>>>>     action_name:
> >>>>>>       type: string(50)
> >>>>>>       notnull: true
> >>>>>>   options:
> >>>>>>     type: InnoDB
>
> >>>>>> Role:
> >>>>>>   columns:
> >>>>>>     id:
> >>>>>>       type: integer(4)
> >>>>>>       primary: true
> >>>>>>       notnull: true
> >>>>>>     name:
> >>>>>>       type: string(100)
> >>>>>>       notnull: true
> >>>>>>   options:
> >>>>>>     type: InnoDB
>
> >>>>>> RolePermission:
> >>>>>>   tableName: Role_Permission
> >>>>>>   columns:
> >>>>>>     Role_id:
> >>>>>>       type: integer(4)
> >>>>>>       primary: true
> >>>>>>       notnull: true
> >>>>>>     Permission_id:
> >>>>>>       type: integer(4)
> >>>>>>       primary: true
> >>>>>>       notnull: true
> >>>>>>   relations:
> >>>>>>     Role:
> >>>>>>       local: Role_id
> >>>>>>       foreign: id
> >>>>>>       foreignAlias: RolePermissions
> >>>>>>     Permission:
> >>>>>>       local: Permission_id
> >>>>>>       foreign: id
> >>>>>>       foreignAlias: RolePermissions
> >>>>>>   option

[symfony-users] Re: How to execute a stored procedure on a remote db server throught symfony?

2009-09-30 Thread dagger

any suggests?

On Sep 28, 11:22 am, Farrukh Abbas 
wrote:
> I'm using propel as orm
>
> --
> Kind regards
> Farrukh Abbas
>
> On 28 Sep 2009, at 09:20, Gareth McCumskey  wrote:
>
>
>
> > Are you using Propel or Doctrine as your ORM?
>
> > On Mon, Sep 28, 2009 at 2:42 AM, dagger  
> >  wrote:
>
> > Hi,
>
> > in my current project I have to connect to a remote system and execute
> > some stored procedures then get the returned data and save it on to
> > the local database... Is there a way I can achieve this through
> > symfony or would I have to bank on plain php?
>
> > Your time n help is highly appreciated... Thx
>
> > --
> > Gareth McCumskey
> >http://garethmccumskey.blogspot.com
> > twitter: @garethmcc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] How to execute a stored procedure on a remote db server throught symfony?

2009-09-27 Thread dagger

Hi,

in my current project I have to connect to a remote system and execute
some stored procedures then get the returned data and save it on to
the local database... Is there a way I can achieve this through
symfony or would I have to bank on plain php?

Your time n help is highly appreciated... Thx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] how to create a download link to a file in uploads directory?

2009-09-27 Thread dagger

Hi,

A simple question... How can i create a download link to a file
uploaded to uploads directory under web of symfony?

something like - 

thanks for the reply
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] is creating subdomains on the fly possible - username.mysite.com ?? instead of mysite.com/username from controller

2009-09-21 Thread dagger

Hi

I wanted to know if generating subdomains on the fly is possible ?
e.g. a user specifies a username and submits the form and on the
server side the controller creates the subdomain based on the username
- dagger.mysite.com ?

and if dagger.mysite.com is any better then mysite.com/dagger ?

thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] many to many relationships at admin not working

2009-09-15 Thread dagger

Hi,

I'm trying to implement the many to many relation between Role and
Permission ... but the admin_check_list is not appearing ... i am
using symfony 1.2 ... the structure follows

schema.yml
permission:
id:
method_name:  { type: VARCHAR, size: 50, required: true }
action_name:  { type: VARCHAR, size: 50, required: true }
  role:
id:
name: { type: VARCHAR, size: 100, required: true }
  role_permission:
role_id:
permission_id:

generated 2 modules at backend through - init-admin task

permission and role

The generator.yml of role module looks like this

generator:
  class:  sfPropelAdminGenerator
  param:
model_class:  Role
theme:default

list:
  object_actions:
_edit: ~
edit:
  fields:
role_permission: { type: admin_check_list, params:
through_class=RolePermission }

and i don't see the check list on the edit page of role... can any one
help me find the mistake i'm making?

highly appreciate your help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] how can i customize field error format?

2009-09-09 Thread dagger

Hi,

How can i achieve the following?

make errors appear like this

Required

or like

 Username 
Required


instead of the standard formatting in an un-ordered list


   Required


without having to change any core framework files?

any help is appreciated.

thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] how to send e-mail independent of an action?

2009-09-08 Thread dagger

How can i send an e-mail from within an action, but the action shall
not wait for the method to return in order to send the response to the
browser/user...

for example the standard subscription confirmation e-mail ... at the
time of signup the action invokes a method to send e-mail but does not
wait for it to return?

your help n time is much appreciated. thanx


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Flash attribute of sfUser not working in test and production environment

2009-08-26 Thread dagger

yeah thanks, can u also provide me with some links?

also - any one face a similar issue with session and test/production
environment?

On Aug 26, 6:08 am, Eno  wrote:
> On Tue, 25 Aug 2009, dagger wrote:
> > I would also like to know if there are any systems developed in
> > symfony in production at this time - live system examples? (is that a
> > good idea - or is symfony only for prototyping?)
>
> Are you asking if symfony is used in real production sites?
>
> (The answer is yes of course).
>
> --
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Flash attribute of sfUser not working in test and production environment

2009-08-25 Thread dagger

Hi,

I have a simple application of posting a review on an article, and
when a user posts the review (the user is set to be authenticated,
review is invserted in db, and the user is redirected back to the
article detail page) on the subsequent page he/she should be able to
see a confirmation message which in symfony is done through getFlash
and setFlash - the works flowless in dev env ... but when i switch
from frontend_dev.php to frontend_test.php it stops working and also
the session appears to be broken ... i am using symfony 1.2.7 ... any
and all help will be highly appreciated.

I would also like to know if there are any systems developed in
symfony in production at this time - live system examples? (is that a
good idea - or is symfony only for prototyping?)

thanks alot
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: implementing one to many relation between User and Images at backend

2009-07-29 Thread dagger

I guess it will be better if I define a template for image editing ...
as i also create 2 scaled versions at the time the user is uploading
the images - thumb, and large. So i would highly appreciate if one can
tell me how to delete a file/image from the /uploads/ dir of symfony
the rest will be simple and straight forward. thanks

On Jul 29, 1:21 pm, dagger  wrote:
> How can i change the admin user form to be able to add the 4 or less
> images edit form? and how can i manipulate the forms used by admin
> generator ? please help
>
> On Jul 28, 9:36 pm, dagger  wrote:
>
>
>
> > Hi,
>
> > I am trying to implement the edit page of User object which can have
> > many images;
>
> > How can i make a very user friendly edit image section in User edit
> > form on backend?
>
> > have no idea... please help, this is a big show stopper in my project.
>
> > Requirement - User at sign-up uploads 4 images - now when admin is
> > editing the user - then the admin should be able to delete an existing
> > image, and upload a new image in its stead...
>
> > waiting for a prompt response.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: implementing one to many relation between User and Images at backend

2009-07-29 Thread dagger

How can i change the admin user form to be able to add the 4 or less
images edit form? and how can i manipulate the forms used by admin
generator ? please help

On Jul 28, 9:36 pm, dagger  wrote:
> Hi,
>
> I am trying to implement the edit page of User object which can have
> many images;
>
> How can i make a very user friendly edit image section in User edit
> form on backend?
>
> have no idea... please help, this is a big show stopper in my project.
>
> Requirement - User at sign-up uploads 4 images - now when admin is
> editing the user - then the admin should be able to delete an existing
> image, and upload a new image in its stead...
>
> waiting for a prompt response.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] implementing one to many relation between User and Images at backend

2009-07-28 Thread dagger

Hi,

I am trying to implement the edit page of User object which can have
many images;

How can i make a very user friendly edit image section in User edit
form on backend?

have no idea... please help, this is a big show stopper in my project.

Requirement - User at sign-up uploads 4 images - now when admin is
editing the user - then the admin should be able to delete an existing
image, and upload a new image in its stead...

waiting for a prompt response.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: File field looses content if other fields of form contain error

2009-07-17 Thread dagger

please help me out here to find what m i doing wrong

On Jul 17, 2:58 pm, dagger  wrote:
> I have a form user and i have embedded another form for images upload
> in it.
>
> Now when i select a picture to be uploaded, and make a mistake in any
> other field of the user form, then the validation fails and the user
> is shown the error messages ... but when the form reloads for the
> users ... the image that i had specified before disappears and i have
> to reselect the image...
>
> now what i want is that when the form reloads due to some error ...
> the image path should also be there so that user does not have to re-
> set it
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] File field looses content if other fields of form contain error

2009-07-17 Thread dagger

I have a form user and i have embedded another form for images upload
in it.

Now when i select a picture to be uploaded, and make a mistake in any
other field of the user form, then the validation fails and the user
is shown the error messages ... but when the form reloads for the
users ... the image that i had specified before disappears and i have
to reselect the image...

now what i want is that when the form reloads due to some error ...
the image path should also be there so that user does not have to re-
set it
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] File Upload not working in symfony 1.2.7 when 2 forms are embadded in one view

2009-06-12 Thread dagger

Hi,

Concept: I have made 2 tables - images and resort - each resort has a
logo and can have many pictures - but for this application  idecided
that each resort would have 4 images.

Problem: in the earlier version of symfony all was well. But then i
upgraded to symfony 1.2.7 - and after that it stopped working - the
code is given below - i tried 2 solutions - one was to make 2 form
objects - ResortForm and UploadForm - UploadForm is the form
containing the 4 image fields and in the update action of the resort
controller i populate the image table. it didn't work - u can see as i
have commented it out - then i simply used input_file_tag which u can
see below as well... but no matter wat the $file just remains to be
NULL - Note that the logo of resort is uploaded properly coz its part
of ResorfForm but not the other files :(

$this->form->bind($request->getParameter('resort'), $this->getRequest
()->getFiles('resort'));

if($this->getRequest()->getParameter('refresh') != 'Y')
{

if ($this->form->isValid())
{
$resort = $this->form->save();

$file = $this->form->getValue('logo');

if($file){
$filename = 
'upload_'.sha1($file->getOriginalName());
$extension = 
$file->getExtension($file->getOriginalExtension
());

$file->save(sfConfig::get('sf_upload_dir').'/'.$filename.
$extension);

$resort->setLogo($filename.$extension);
 $this->createLogo($filename.$extension, 
sfConfig::get
('sf_upload_dir').'/');
 $this->createThumbnail($filename.$extension, 
sfConfig::get
('sf_upload_dir').'/');
}
  $resort->save();

  //$this->imgFile = new UploadForm();

  //$this->imgFile->bind($this->getRequest()->getParameter
('upload'), $this->getRequest()->getFiles('upload'));

  for($i = 1; $i <= 4; $i++)
  {
$file = 
$this->getRequest()->getFiles('image_'.$i);//$this-
>form->getValue('image_'.$i);

if($file){
echo 'uploading image ';
$filename = 
'upload_'.sha1($file->getOriginalName());
$extension = 
$file->getExtension($file->getOriginalExtension());

$file->save(sfConfig::get('sf_upload_dir').'/'.$filename.
$extension);

$image = new Image();

$image->setResortId($resort->getId());
$image->setPath($filename.$extension);

$image->save();
$this->createLargeImage($image->getPath(), 
sfConfig::get
('sf_upload_dir').'/');
}
  }

  $this->setTemplate('testimage');
  return;
}
} else {
return $this->renderPartial('countrycity', array('form' => $this-
>form));
}

//$this->imgFile = new UploadForm();
$this->setTemplate('edit');

i understand that this is not the proper way of implementing it and as
i am new to symfony i would appreciate if you people can help me get
this to work. Thanks.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---