[symfony-users] Calender Plugin

2009-03-18 Thread DeepakBhatia

Hi,

We are making a scheduler and are looking for a plugin to give us the
calender etc.

http://forum.symfony-project.org/index.php/t/7331/

http://www.dhtmlgoodies.com/scripts/dhtmlgoodies-week-planner/dhtmlgoodies-week-planner.html

Please help me in this regard.

Thanks

Deepak Bhatia
--~--~-~--~~~---~--~~
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] class file not found while executing the batch file

2009-03-18 Thread haritha

Hi,

I had a problem in executing the batch file-using(symfony1.0.20 in
redhat )
PHP Fatal error:  Class 'CategoryPeer' not found in /home/test/
public_html/test1/batch/mytest.php on line 43
I came to know that the lib folder where all the model classes present
are not getting included  in the file.

Did I miss anything?

Thanks in advance!!



--~--~-~--~~~---~--~~
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: About admin generator again, set filters dynamically?

2009-03-18 Thread Alan Bem
Look at *your_module*/lib/*your_module*GeneratorConfiguration.class.php.
You can change there almost any AG configuration at runtime.

Cheers, Alan Gabriel Bem

On Wed, Mar 18, 2009 at 2:49 AM, xhe hexuf...@gmail.com wrote:


 This is still about admin  generator. Are there anyway to set filters
 dynamically?
 I want to use same backend for admin and sales, but obviously admin
 and sales should have different filters. e.g admin can have list of
 sales as filters, while sales should only access his own clients.
 But in generator.yml, the filters setting is fixed, so are there
 anyway to set filters dynamically. Otherwise I have to set two apps
 and duplicate a lot of codes.
 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] Re: One module, many forms

2009-03-18 Thread Lawrence Krubner



On Mar 17, 7:23 pm, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
 Hi

 I have a module called Documents. In this modul I use few kinds of
 documents. They use the same table in db but different fields. So that
 I created few Forms for them.

 I overridden executeNew() in order to call proper form class. And it
 works well. Proper form object is created, template displayed,
 document saved.

 I overridden executeEdit() in order to call proper form class. And it
 works well. Proper form object is created, template displayed with
 data. But after saving Symfony still uses the DocumentForm class
 instead of for example DocumentMyVerForm class. I overriden
 executeUpdate action in order to use proper form class but it still
 uses main DocumentForm. Any ideas how to set it up?

Can we see what the code is for your update method? Are you sure you
are explicitly calling your new child class in the update method?


--~--~-~--~~~---~--~~
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] Default values sfWidgetFormPropelChoiceMany

2009-03-18 Thread HAUSa

How can I set default values in a sfWidgetFormPropelChoiceMany form
widget? For some reason, setDefaults() doesn't work. I don't get an
error message, the default values are just nog checked.
--~--~-~--~~~---~--~~
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] Pre-set filter in admin generator

2009-03-18 Thread HAUSa

I refer to the Symfony documentation:
http://www.symfony-project.org/book/1_2/14-Generators#chapte
r_14_sub_creating_a_custom_header_and_footer
A bit down is a gray block telling me something about presetting a
filter by use of the URL.

Now, in Symfony 1.2 this doesn't work any more. If my admin module is
called content, I can't just use this URL any more:
content?filter=filterfilters[page_id]=1

I saw that since Symfony 1.2 filters have been submitted to this URL
prefix:
content/filter/action

So, I put my filter values behind that URL:
content/filter/action?filter=filterfilters[page_id]=1

But now I get an error message, telling me that the _csrf_token field
is required. I keep receiving that message, even if I use this URL:
content/filter/action?filter=filterfilters[page_id]=1a
mp;_csrf_token=118fc4b7df48fc1a4ad056343f17c22f

And now I'm desperate Razz
Does anyone know how to pre-set admin filters in Symfony 1.2?
--~--~-~--~~~---~--~~
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] getFileExtension bad behavior

2009-03-18 Thread Med Rhamnia
Hi,
I use $this-getRequest()-getFileExtension to verif a file extension for
xml file.
I send a xml file but getFileExtension retrun .exe
$this-getRequest()-getFileName return file.xml
[image: Confused]
what's the problem?

-- 
http://we-love-prophet-muhammad.blogspot.com/


Take a wish...

--~--~-~--~~~---~--~~
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] Ajax updates entire page

2009-03-18 Thread Gareth McCumskey
Hi there all,

I was wondering if anyone knows how I can use an Ajax function that instead
of updating a div updates the entire page with a response. To take the
example from the book...

div id=notification/div
?php echo periodically_call_remote(array(
'frequency' = 60,
'update'= 'notification',
'url'   = '@watch',
'with'  = 'param=' + \$F('mycontent'),
)) ?

I actually want to change the 'update' = 'notification' to update the whole
page and not just that div with the return. Any help would be appreciated.

Gareth

--~--~-~--~~~---~--~~
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: Saving request? (ajax)

2009-03-18 Thread Gareth McCumskey
$request and $this-getRequest() and even
sfContext::getInstance()-getRequest() are all the same thing within the
action. Outside the action you won't be able to use $request, thats why all
the other access methods exist. $request in an action is just a convenience.

Gareth

On Tue, Mar 17, 2009 at 7:51 PM, Liran Tal liran@gmail.com wrote:



 On Mar 17, 4:22 pm, Gareth McCumskey gmccums...@gmail.com wrote:
  $talkback_obj = new Talkback();
 
  $talkback_obj-setAuthor($author);
  $talkback_obj-setBody($talkback);
  $talkback_obj-save();Thanks,
 

 Thanks,
 If you don't mind me asking also regarding the foThanks,llowing line
 of code
  $isAjax = $this-getRequest()-isXmlHttpRequest();
 It seems to me that it's possible to use $request-isXmlHttpRequest()
 instead of $this?
 it makes sense that $this-getRequest() actually referes to the
 $request object in the function.




  On Tue, Mar 17, 2009 at 4:10 PM, Liran Tal liran@gmail.com wrote:
 
   Hey,
 
   In my template for showSuccess.php I've added the ability to submit a
   form via Ajax
   as follows:
  div id=talkback_list/div
  ?php echo form_remote_tag(array(
  'update'   = 'talkback_list',
  'url'  =
 'talkback/addNewTalkbackAjax',
  ))
  ?
  label for=AuthorAuthor:/label
  ?php echo input_tag('author') ?
  label for=TalkbackTalkback:/label
  ?php echo input_tag('talkback') ?
  ?php echo submit_tag('Post') ?
  /form
 
   And in the talkback module's actions I've added an execution handler
   for it, such as:
 
public function executeAddNewTalkbackAjax($request)
{
$isAjax = $this-getRequest()-isXmlHttpRequest();
if ($isAjax) {
$author = $request-getParameter('author');
$talkback = $request-getParameter('talkback');
 
    save(); ...
 
}
}
 
   My question is how to save this data (author and talkback) in the
   table from this execution
   handler?
 
   Reference: related schema:
talkback:
  _attributes:  { phpName: Talkback }
  id:   ~
  blog_id:   ~
  author:   varchar(250)
  body: longvarchar
  created_at:   ~
 


--~--~-~--~~~---~--~~
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: Symfony and Oracle

2009-03-18 Thread Lee Bolding

Probably best to create a simple page like so :

?php phpInfo(); ?

Scroll down to the PDO section, it will be listed with PDO drivers

There should also be a section named something like pdo_oracle

Also, you may need some native PHP Oracle driver. It's been a while  
since I last used Oracle, so can't remember - Google is your friend :)

On 18 Mar 2009, at 09:25, Ghizlane Zinbi wrote:

 How can i confirm that?

 2009/3/17 Lee Bolding l...@leesbian.net

 Do you have the Oracle PDO driver installed?


 On 17 Mar 2009, at 16:32, Ghizlane Zinbi wrote:

  Hi,
 
  I m developping with Symfony1.0 and Oracle9i but i have a big
  problem, i cant make connection to the database!!any help?
 
  Ghizlane,
 
  





 


--~--~-~--~~~---~--~~
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: Symfony and Oracle

2009-03-18 Thread Ghizlane Zinbi
How can i confirm that?

2009/3/17 Lee Bolding l...@leesbian.net


 Do you have the Oracle PDO driver installed?


 On 17 Mar 2009, at 16:32, Ghizlane Zinbi wrote:

  Hi,
 
  I m developping with Symfony1.0 and Oracle9i but i have a big
  problem, i cant make connection to the database!!any help?
 
  Ghizlane,
 
  


 


--~--~-~--~~~---~--~~
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] Forcing Ajax return views to break out of DIV

2009-03-18 Thread Gareth McCumskey
Let me clarify the rather odd title of this message using an example. Lets
say you have created an application that uses AJAX to load content into
div's using the link_to_remote function as well as a number of others. A
user log's into the application (i.e. is authenticated) and uses the system
with no problem. This user then does not log out explicitly and steps away
for a while, lets say to lunch, leaving his browser open. When he returns he
clicks on a link in the app created by link_to_remote and instead of getting
what he expects to load into the div, he gets a login form. Ideally what
should have happened was that when the authentication filter detected that
his session timed out (i.e. not authenticated anymore), it loads the login
form over the entire page and not just the div that was supposed to be
logged into.

My question is, does anyone know anyway to set an action (like our
users/login) to break out of all div's they may be in and to reload the
entire page?

Gareth

--~--~-~--~~~---~--~~
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] db user

2009-03-18 Thread nicola defilippo
Hi,
i want one db user for any sfguardplugin user; how do i can
change propel connection from general connection to own
connection?
N.

--~--~-~--~~~---~--~~
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: print content in different language

2009-03-18 Thread Lee Bolding

I don't understand... you want to print in a different language to  
that currently being displayed?

That sounds SO wrong from a usability/UX point of view... am I  
misunderstanding?

A print style sheet shouldn't care what language you are displaying  
(unless it's a language that reads right-left or vertically).

On 18 Mar 2009, at 10:38, Tomasz Ignatiuk wrote:


 Hi

 I want to have a functionality to print invoice in few languages. I
 use css for print media so that the printed document looks well. Any
 ideas how to make it multilingual? Maybe reload the show action in
 different action and the print? But how to reload only a show action
 template in different language while other parts of page (menu,
 header, footer etc) stay in english?
 


--~--~-~--~~~---~--~~
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: print content in different language

2009-03-18 Thread Tomasz Ignatiuk
Imagine that you have a billing system in english. You have Invoice module.
And you want to print this invoice to pdf for example. So  you make a css
for print media that hides menu divs etc. Then you print.

But what you should do in order to print invoice in french, polish, spanish
etc? You have to change: 'Seller' in EN to 'Sprzedawca' in PL, 'Buyer' in EN
to 'Nabywca' in PL, 'Invoice number' in EN to 'Numer faktury' in PL etc.

2009/3/18 Lee Bolding l...@leesbian.net


 I don't understand... you want to print in a different language to
 that currently being displayed?

 That sounds SO wrong from a usability/UX point of view... am I
 misunderstanding?

 A print style sheet shouldn't care what language you are displaying
 (unless it's a language that reads right-left or vertically).

 On 18 Mar 2009, at 10:38, Tomasz Ignatiuk wrote:

 
  Hi
 
  I want to have a functionality to print invoice in few languages. I
  use css for print media so that the printed document looks well. Any
  ideas how to make it multilingual? Maybe reload the show action in
  different action and the print? But how to reload only a show action
  template in different language while other parts of page (menu,
  header, footer etc) stay in english?
  


 


--~--~-~--~~~---~--~~
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: print content in different language

2009-03-18 Thread Lee Bolding

err... use the I18N helper?

There's a nice snippet in the snippets repository for specifying  
language in routing rules, which works nicely as a language selector  
in your application :)

On 18 Mar 2009, at 10:51, Tomasz Ignatiuk wrote:

 Imagine that you have a billing system in english. You have Invoice  
 module. And you want to print this invoice to pdf for example. So   
 you make a css for print media that hides menu divs etc. Then you  
 print.

 But what you should do in order to print invoice in french, polish,  
 spanish etc? You have to change: 'Seller' in EN to 'Sprzedawca' in  
 PL, 'Buyer' in EN to 'Nabywca' in PL, 'Invoice number' in EN to  
 'Numer faktury' in PL etc.

 2009/3/18 Lee Bolding l...@leesbian.net

 I don't understand... you want to print in a different language to
 that currently being displayed?

 That sounds SO wrong from a usability/UX point of view... am I
 misunderstanding?

 A print style sheet shouldn't care what language you are displaying
 (unless it's a language that reads right-left or vertically).

 On 18 Mar 2009, at 10:38, Tomasz Ignatiuk wrote:

 
  Hi
 
  I want to have a functionality to print invoice in few languages. I
  use css for print media so that the printed document looks well. Any
  ideas how to make it multilingual? Maybe reload the show action in
  different action and the print? But how to reload only a show action
  template in different language while other parts of page (menu,
  header, footer etc) stay in english?
  





 


--~--~-~--~~~---~--~~
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: print content in different language

2009-03-18 Thread Tomasz Ignatiuk
But I don't want to change language for whole application just in order to
print an invoice in different language. If I change a language (culture) for
application, all menus and other stuff will also change. But I want to
change only a content of a show template for invoice module

--~--~-~--~~~---~--~~
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: Forcing Ajax return views to break out of DIV

2009-03-18 Thread Gareth McCumskey
If I might just add. My thinking has been looking at finding someway either
in the AJAX helper itself to pass some kind of setting to make the result
load over the current page or some way in the action that the url
parameter references to force it reload the view and break out of the div
tag. I have used $this-redirect , $this-forward and no luck.

Would love to hear someone else take and I can't see that this is a unique
problem.

Gareth

On Wed, Mar 18, 2009 at 12:39 PM, Gareth McCumskey gmccums...@gmail.comwrote:

 Let me clarify the rather odd title of this message using an example. Lets
 say you have created an application that uses AJAX to load content into
 div's using the link_to_remote function as well as a number of others. A
 user log's into the application (i.e. is authenticated) and uses the system
 with no problem. This user then does not log out explicitly and steps away
 for a while, lets say to lunch, leaving his browser open. When he returns he
 clicks on a link in the app created by link_to_remote and instead of getting
 what he expects to load into the div, he gets a login form. Ideally what
 should have happened was that when the authentication filter detected that
 his session timed out (i.e. not authenticated anymore), it loads the login
 form over the entire page and not just the div that was supposed to be
 logged into.

 My question is, does anyone know anyway to set an action (like our
 users/login) to break out of all div's they may be in and to reload the
 entire page?

 Gareth


--~--~-~--~~~---~--~~
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: print content in different language

2009-03-18 Thread Tomasz Ignatiuk
Thank you I will try it :)

2009/3/18 Lee Bolding l...@leesbian.net


 Yup, you can do that using the I18N helper - for you invoice action,
 if the language parameter exists, use it in the template for the main
 body, otherwise use culture from the users session. For all your menu,
 footers etc use the culture from the users session.

 You can also use helpers within actions if you need to.

 On 18 Mar 2009, at 11:03, Tomasz Ignatiuk wrote:

  But I don't want to change language for whole application just in
  order to print an invoice in different language. If I change a
  language (culture) for application, all menus and other stuff will
  also change. But I want to change only a content of a show template
  for invoice module
 
  


 


--~--~-~--~~~---~--~~
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: Forcing Ajax return views to break out of DIV

2009-03-18 Thread Carsten Schumann
Hi Gareth,

The normal -forward or -redirect methods will not work because they are
sent within the HTTP header of the response and prototype will not follow
such a redirect. But threre are other possibilities to break out of a div.
You can use javascript to do a redirect for example. In your remote
function, you have to enable scripts and within your response you can write
something like

?= javascript_tag('window.location = '.url_for('@page').';' ?

which should work in most browsers. In some browsers it won't work. In that
case, you can put your JS redirect in a function:

?= javascript_tag('
myredirectfunction = function(){
  window.location = '.url_for('@page').';
}
' ?

and call that function in the onComplete handler of your remote function (in
the options: 'complete'='myredirectfunction()'). If you do not want to
redirect (i.e. wrong login data), just leave the function empty.

Carsten


On Wed, Mar 18, 2009 at 12:06 PM, Gareth McCumskey gmccums...@gmail.comwrote:

 If I might just add. My thinking has been looking at finding someway either
 in the AJAX helper itself to pass some kind of setting to make the result
 load over the current page or some way in the action that the url
 parameter references to force it reload the view and break out of the div
 tag. I have used $this-redirect , $this-forward and no luck.

 Would love to hear someone else take and I can't see that this is a unique
 problem.

 Gareth


 On Wed, Mar 18, 2009 at 12:39 PM, Gareth McCumskey 
 gmccums...@gmail.comwrote:

 Let me clarify the rather odd title of this message using an example. Lets
 say you have created an application that uses AJAX to load content into
 div's using the link_to_remote function as well as a number of others. A
 user log's into the application (i.e. is authenticated) and uses the system
 with no problem. This user then does not log out explicitly and steps away
 for a while, lets say to lunch, leaving his browser open. When he returns he
 clicks on a link in the app created by link_to_remote and instead of getting
 what he expects to load into the div, he gets a login form. Ideally what
 should have happened was that when the authentication filter detected that
 his session timed out (i.e. not authenticated anymore), it loads the login
 form over the entire page and not just the div that was supposed to be
 logged into.

 My question is, does anyone know anyway to set an action (like our
 users/login) to break out of all div's they may be in and to reload the
 entire page?

 Gareth



 


--~--~-~--~~~---~--~~
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: print content in different language

2009-03-18 Thread dsb

may this of any help to you

http://www.codemassacre.com/2008/03/10/symfony-default-language-fallback/

Ds

On Mar 18, 10:51 am, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
 Imagine that you have a billing system in english. You have Invoice module.
 And you want to print this invoice to pdf for example. So  you make a css
 for print media that hides menu divs etc. Then you print.

 But what you should do in order to print invoice in french, polish, spanish
 etc? You have to change: 'Seller' in EN to 'Sprzedawca' in PL, 'Buyer' in EN
 to 'Nabywca' in PL, 'Invoice number' in EN to 'Numer faktury' in PL etc.

 2009/3/18 Lee Bolding l...@leesbian.net



  I don't understand... you want to print in a different language to
  that currently being displayed?

  That sounds SO wrong from a usability/UX point of view... am I
  misunderstanding?

  A print style sheet shouldn't care what language you are displaying
  (unless it's a language that reads right-left or vertically).

  On 18 Mar 2009, at 10:38, Tomasz Ignatiuk wrote:

   Hi

   I want to have a functionality to print invoice in few languages. I
   use css for print media so that the printed document looks well. Any
   ideas how to make it multilingual? Maybe reload the show action in
   different action and the print? But how to reload only a show action
   template in different language while other parts of page (menu,
   header, footer etc) stay in english?

--~--~-~--~~~---~--~~
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: print content in different language

2009-03-18 Thread dsb

you could have already checked followings?? if not, this'll give you
an idea -

http://www.codemassacre.com/2008/03/10/symfony-default-language-fallback/
http://www.symfony-project.org/book/1_0/13-I18n-and-L10n
http://www.symfony-project.org/book/forms/1_2/en/08-Internationalisation-and-Localisation

Good luck,
Ds


On Mar 18, 10:38 am, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
 Hi

 I want to have a functionality to print invoice in few languages. I
 use css for print media so that the printed document looks well. Any
 ideas how to make it multilingual? Maybe reload the show action in
 different action and the print? But how to reload only a show action
 template in different language while other parts of page (menu,
 header, footer etc) stay in english?

--~--~-~--~~~---~--~~
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: print content in different language

2009-03-18 Thread Lee Bolding

Yup, you can do that using the I18N helper - for you invoice action,  
if the language parameter exists, use it in the template for the main  
body, otherwise use culture from the users session. For all your menu,  
footers etc use the culture from the users session.

You can also use helpers within actions if you need to.

On 18 Mar 2009, at 11:03, Tomasz Ignatiuk wrote:

 But I don't want to change language for whole application just in  
 order to print an invoice in different language. If I change a  
 language (culture) for application, all menus and other stuff will  
 also change. But I want to change only a content of a show template  
 for invoice module

 


--~--~-~--~~~---~--~~
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: Plugin sfUnobstrusiveWidgetPlugin unable to unpack

2009-03-18 Thread Joan Teixidó
hi,

maybe someproblems with permissions???

anyway, you can download the package and copy it to plugins dir, and if it's
necesary, copy the web plugin dir into your web dir.

good luck

Joan

2009/3/17 Paolo Mainardi paolomaina...@gmail.com

 Installation of sfUnobstrusiveWidgetPlugin plugin failed: unable to
 unpack /path_to_symfony/cache/.pear/sfUnobstrusiveWidgetPlugin-1.0.2.tgz

 Someone have a solution for this ?

 Thanks

 --
 Paolo Mainardi

 


--~--~-~--~~~---~--~~
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: Retrieving id from popup

2009-03-18 Thread Tomasz Ignatiuk

I think there is somthing i Javascript like refferer in DOM. Look also
for something like this in jQuery.
--~--~-~--~~~---~--~~
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: One module, many forms

2009-03-18 Thread Tomasz Ignatiuk

  public function executeUpdate(sfWebRequest $request)
  {
$this-document = $this-getRoute()-getObject();
$this-wystawca = PartnerPeer::getPartnerByLogo($this-document-
getLogoPartneraSprzedajacy());
$this-termin_platnosci = $this-wystawca-getTerminPlatnosci();
switch ($this-document-getDocumentTypy()-getLogo())
{
   case FV:
$this-form = new DocumentEdycjaFvForm($this-document);
$this-document_type = FV;
$this-stawkivat = StawkiVatPeer::doSelect(new Criteria());
   break;
   case FI:
$this-form = new DocumentEdycjaFvForm($this-document);
$this-document_type = FI;
$this-stawkivat = StawkiVatPeer::doSelect(new Criteria());
   break;
   case FZ:
$this-form = new DocumentEdycjaFzForm($this-document);
$this-document_type = FZ;
$this-stawkivat = StawkiVatPeer::doSelect(new Criteria());
   break;
   case RUD:
$this-form = new DocumentEdycjaRudForm($this-document);
$this-document_type = RUD;
   break;
   case RUDA:
$this-form = new DocumentEdycjaRudForm($this-document);
$this-document_type = RUDA;
   break;
}

$this-processForm($request, $this-form);

$this-setTemplate('dane');
  }
--~--~-~--~~~---~--~~
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] Retrieving id from popup

2009-03-18 Thread pierrix

On an edit page, some fields are related to other tables, in wich the
user may have to create or edit the content.

The select fields are'nt suitable when there is too much rows and when
the user would edit the content.

So I want to open a popup in which the user search, sort, select, or
edit the content, and retrieve the id and data of the row he
selected...

Is it possible ?

Thank's for your informations.

Pierre.
--~--~-~--~~~---~--~~
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] [1.0] The object XX from class YY is not defined in your data file.

2009-03-18 Thread Stephen Melrose

Hey,

I'm just creating a load test data function for my Symfony project.

I have 3 YML files of data,

* Constant data global to any environment, e.g. content states, etc.
* Test data used in development
* Live data used in production

My load test data function runs,

$data = new sfPropelData();
$data-loadData(sfConfig::get('sf_data_dir')./model/
constant_data.yml, con);
$data-loadData(sfConfig::get('sf_data_dir')./model/test_data.yml,
con);

The problem I'm having is that data in test_data references objects
created in constant_data, and it seems you can't do this, hence my
error,

The object active from class AdminUserState is not defined in
your data file.

I even tried loading test_data only and at the top of that file
doing a PHP include for the constant_data, but I got the same error.

Does anyone know how to fix my problem or am I doomed to having 1 YML
file and duplicated data?

Thanks,

Steve
--~--~-~--~~~---~--~~
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] translation data table

2009-03-18 Thread Ghizlane Zinbi
Hi,
I create 2 tables for translation:
  nationalite:
_attributes: { phpName: Nationalite }
id:
code: varchar(255)
intitule: varchar(255)
blacklist:boolean
created_at:
  nationalite_i18n:
_attributes: { phpName: NationaliteI18n }
name:varchar(50)


The problem is that i cant retreive Nationalite Object translations. The
solution i found is: je suis obligée de passer par l'objet NationaliteI18n :

$n = NationaliteI18nPeer::retrieveByPk(1,'fr');

But this is not what i need, the objective is retreive Nationalite Object
through the user culture. How can i do it?

Thanks for help.


Ghizlane,

--~--~-~--~~~---~--~~
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: translation data table

2009-03-18 Thread Fási Gábor

Check this, taken from jobeet part 19:

# config/schema.yml
jobeet_category:
  _attributes:  { isI18N: true, i18nTable: jobeet_category_i18n }
  id:   ~

jobeet_category_i18n:
  id:   { type: integer, required: true, primaryKey: true,
foreignTable: jobeet_category, foreignReference: id }
  culture:  { isCulture: true, type: varchar, size: 7, required:
true, primaryKey: true }
  name: { type: varchar(255), required: true }
  slug: { type: varchar(255), required: true }

You'll need those `isI18N` and `i18nTable` attributes.

On Wed, Mar 18, 2009 at 12:59, Ghizlane Zinbi ghizlane.zi...@gmail.com wrote:
 Hi,
 I create 2 tables for translation:
   nationalite:
     _attributes: { phpName: Nationalite }
     id:
     code: varchar(255)
     intitule: varchar(255)
     blacklist:    boolean
     created_at:
   nationalite_i18n:
     _attributes: { phpName: NationaliteI18n }
     name:    varchar(50)


 The problem is that i cant retreive Nationalite Object translations. The
 solution i found is: je suis obligée de passer par l'objet NationaliteI18n :

     $n = NationaliteI18nPeer::retrieveByPk(1,'fr');

 But this is not what i need, the objective is retreive Nationalite Object
 through the user culture. How can i do it?

 Thanks for help.


 Ghizlane,
 


--~--~-~--~~~---~--~~
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: Few simple questions about symfony 1.0

2009-03-18 Thread torso

Thanks for answer!

Is it possible to do new table with propel, with out loosing data.
Should I save the data first, then generating tables.
How I can load the data to the database after saving it by propel-dump-
data?

Pete

On 17 maalis, 14:39, Ghizlane Zinbi ghizlane.zi...@gmail.com wrote:
 Hi,
 You can use propel-dump-data frontend data.yml, it save all data in the
 data\fixtures\data.yml

 2009/3/17 torso petteri.torsso...@gmail.com



  Hi!

  I have to do new Table to database. Is it possible to do it with out
  loosing any data on other tables with propel?
  How  I can make a backup copy of  database with propel, is it possible?
--~--~-~--~~~---~--~~
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: The object XX from class YY is not defined in your data file.

2009-03-18 Thread Stephen Melrose

I solved my own problem.

For anyone who cares, I wrote a quick function that combines a set of
YML files and caches it as one file.

Here is the use,

$data_yml = combineYMLFiles(
sfConfig::get('sf_data_dir')./model/constant_data.yml,
sfConfig::get('sf_data_dir')./model/test_data.yml
);

$data = new sfPropelData();
$data-loadData($data_yml, con);

@unlink($data_yml);

And the function,

function combineYMLFiles()
{
$ymlfiles = func_get_args();
$combineddata = ;

foreach ($ymlfiles as $ymlfile)
{
if (file_exists($ymlfile)  !is_dir($ymlfile))
{
if ($combineddata != )
{
$combineddata .= \n\n;
}

$combineddata .= file_get_contents($ymlfile);
}
}

if ($combineddata == )
{
return;
}

$filename = sfConfig::get('sf_data_dir') . / . uniqid
(combined_yml_) . .yml;
$return = @file_put_contents($filename, $combineddata);

if ($return === false)
{
return;
}

return $filename;
}

Thanks anyway!

Steve



On 18 Mar, 10:46, Stephen Melrose step...@sekka.co.uk wrote:
 Hey,

 I'm just creating a load test data function for my Symfony project.

 I have 3 YML files of data,

 * Constant data global to any environment, e.g. content states, etc.
 * Test data used in development
 * Live data used in production

 My load test data function runs,

 $data = new sfPropelData();
 $data-loadData(sfConfig::get('sf_data_dir')./model/
 constant_data.yml, con);
 $data-loadData(sfConfig::get('sf_data_dir')./model/test_data.yml,
 con);

 The problem I'm having is that data in test_data references objects
 created in constant_data, and it seems you can't do this, hence my
 error,

 The object active from class AdminUserState is not defined in
 your data file.

 I even tried loading test_data only and at the top of that file
 doing a PHP include for the constant_data, but I got the same error.

 Does anyone know how to fix my problem or am I doomed to having 1 YML
 file and duplicated data?

 Thanks,

 Steve
--~--~-~--~~~---~--~~
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: Saving request? (ajax)

2009-03-18 Thread Liran Tal


Hey Gareth,

On Mar 18, 11:34 am, Gareth McCumskey gmccums...@gmail.com wrote:
 $request and $this-getRequest() and even
 sfContext::getInstance()-getRequest() are all the same thing within the
 action. Outside the action you won't be able to use $request, thats why all
 the other access methods exist. $request in an action is just a convenience.

Thanks for that reference, good to be on the right track.
Regarding the $talkback_obj-save() method for saving the data, it
doesn't seem
to save the data. It doesn't give any error too, just shows me the
ajax success page.

More than that, I've also added this after the -save() method:
  $results = array('author' = $author, 'body' = $body);
  $this-results = $results;
And in the addNewTalkbackAjaxSuccess.php page I did this:
?php
var_dump($results);
?
(Because I know that it's possible to pass like that variables from
the actions to the view
so I wanted to check the values)
but it gives me an error for undefined variable $results.

This still doesn't explain why the talkback object save() method isn't
saving the information
(and it doesn't give any error if I don't use the $results variable on
the view page so I'm clueless).

I mentioned I'm using 1.2?


Thanks.


 Gareth

 On Tue, Mar 17, 2009 at 7:51 PM, Liran Tal liran@gmail.com wrote:

  On Mar 17, 4:22 pm, Gareth McCumskey gmccums...@gmail.com wrote:
   $talkback_obj = new Talkback();

   $talkback_obj-setAuthor($author);
   $talkback_obj-setBody($talkback);
   $talkback_obj-save();Thanks,

  Thanks,
  If you don't mind me asking also regarding the foThanks,llowing line
  of code
           $isAjax = $this-getRequest()-isXmlHttpRequest();
  It seems to me that it's possible to use $request-isXmlHttpRequest()
  instead of $this?
  it makes sense that $this-getRequest() actually referes to the
  $request object in the function.

   On Tue, Mar 17, 2009 at 4:10 PM, Liran Tal liran@gmail.com wrote:

Hey,

In my template for showSuccess.php I've added the ability to submit a
form via Ajax
as follows:
               div id=talkback_list/div
               ?php echo form_remote_tag(array(
                               'update'   = 'talkback_list',
                               'url'      =
  'talkback/addNewTalkbackAjax',
                               ))
               ?
               label for=AuthorAuthor:/label
               ?php echo input_tag('author') ?
               label for=TalkbackTalkback:/label
               ?php echo input_tag('talkback') ?
               ?php echo submit_tag('Post') ?
               /form

And in the talkback module's actions I've added an execution handler
for it, such as:

 public function executeAddNewTalkbackAjax($request)
 {
         $isAjax = $this-getRequest()-isXmlHttpRequest();
         if ($isAjax) {
                 $author = $request-getParameter('author');
                 $talkback = $request-getParameter('talkback');

                 save(); ...

         }
 }

My question is how to save this data (author and talkback) in the
table from this execution
handler?

Reference: related schema:
 talkback:
   _attributes:  { phpName: Talkback }
   id:           ~
   blog_id:   ~
   author:       varchar(250)
   body:         longvarchar
   created_at:   ~


--~--~-~--~~~---~--~~
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: db user

2009-03-18 Thread hsteckylf

As far as I am aware, the only way to do so would be to create a
filter (or build some functionality into the controller) that checks
for the user that is logged in and then switch the environment based
on that user. You can setup several different environments in the
database.yml file and would just need to make sure there is a listing
for each user and a listing for all: that would be used as the
default.

If you are using the symfony 1.2, you could also build this
functionality as a factory.

Good Luck!
--~--~-~--~~~---~--~~
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] sfTitleMakerPlugin

2009-03-18 Thread Tom Haskins-Vaughan

Hi,

I wrote a plugin a little while ago called sfTitleMakerPlugin[1] that 
allows you to compose a 'modular' title and then use it in the title tag.

Currently though I have to add a preExecute and postExecute in each 
action to initiate then send the title. I'm sure there must be a way of 
doing it so that this is done automatically, maybe with filters or 
events. Is anyone willing to give me some pointers on this plugin? I did 
try filters but had no success.

Cheers,

Tom

[1] http://trac.symfony-project.org/browser/plugins/sfTitleMakerPlugin
-- 
Tom Haskins-Vaughan
Temple Street Media: Design and Development for the Web
t...@templestreetmedia.com | www.templestreetmedia.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: Saving request? (ajax)

2009-03-18 Thread Liran Tal

I've also just noticed that while I use the ajax form submit method of
form_remote_tag()
then the output of the url (success page) isn't being placed in the
div id part but rather
it seems like it's just redirecting to that success page output...




On Mar 18, 4:07 pm, Liran Tal liran@gmail.com wrote:
 Hey Gareth,

 On Mar 18, 11:34 am, Gareth McCumskey gmccums...@gmail.com wrote:

  $request and $this-getRequest() and even
  sfContext::getInstance()-getRequest() are all the same thing within the
  action. Outside the action you won't be able to use $request, thats why all
  the other access methods exist. $request in an action is just a convenience.

 Thanks for that reference, good to be on the right track.
 Regarding the $talkback_obj-save() method for saving the data, it
 doesn't seem
 to save the data. It doesn't give any error too, just shows me the
 ajax success page.

 More than that, I've also added this after the -save() method:
                   $results = array('author' = $author, 'body' = $body);
                   $this-results = $results;
 And in the addNewTalkbackAjaxSuccess.php page I did this:
 ?php
         var_dump($results);
 ?
 (Because I know that it's possible to pass like that variables from
 the actions to the view
 so I wanted to check the values)
 but it gives me an error for undefined variable $results.

 This still doesn't explain why the talkback object save() method isn't
 saving the information
 (and it doesn't give any error if I don't use the $results variable on
 the view page so I'm clueless).

 I mentioned I'm using 1.2?

 Thanks.

  Gareth

  On Tue, Mar 17, 2009 at 7:51 PM, Liran Tal liran@gmail.com wrote:

   On Mar 17, 4:22 pm, Gareth McCumskey gmccums...@gmail.com wrote:
$talkback_obj = new Talkback();

$talkback_obj-setAuthor($author);
$talkback_obj-setBody($talkback);
$talkback_obj-save();Thanks,

   Thanks,
   If you don't mind me asking also regarding the foThanks,llowing line
   of code
            $isAjax = $this-getRequest()-isXmlHttpRequest();
   It seems to me that it's possible to use $request-isXmlHttpRequest()
   instead of $this?
   it makes sense that $this-getRequest() actually referes to the
   $request object in the function.

On Tue, Mar 17, 2009 at 4:10 PM, Liran Tal liran@gmail.com wrote:

 Hey,

 In my template for showSuccess.php I've added the ability to submit a
 form via Ajax
 as follows:
                div id=talkback_list/div
                ?php echo form_remote_tag(array(
                                'update'   = 'talkback_list',
                                'url'      =
   'talkback/addNewTalkbackAjax',
                                ))
                ?
                label for=AuthorAuthor:/label
                ?php echo input_tag('author') ?
                label for=TalkbackTalkback:/label
                ?php echo input_tag('talkback') ?
                ?php echo submit_tag('Post') ?
                /form

 And in the talkback module's actions I've added an execution handler
 for it, such as:

  public function executeAddNewTalkbackAjax($request)
  {
          $isAjax = $this-getRequest()-isXmlHttpRequest();
          if ($isAjax) {
                  $author = $request-getParameter('author');
                  $talkback = $request-getParameter('talkback');

                  save(); ...

          }
  }

 My question is how to save this data (author and talkback) in the
 table from this execution
 handler?

 Reference: related schema:
  talkback:
    _attributes:  { phpName: Talkback }
    id:           ~
    blog_id:   ~
    author:       varchar(250)
    body:         longvarchar
    created_at:   ~


--~--~-~--~~~---~--~~
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: Saving request? (ajax)

2009-03-18 Thread Gareth McCumskey
Did you actually look in the database to see if it saved the object or not?
Also to get that array what you need to do is after the save():

$this-results = array(author=$talback_obj-getAuthor(),
body=$talback_obj-getBody());

But you do not even need to do this. Just do:

$this-results = $talkback_obj;

Then in your view you can access the object directly:

?php echo $talkback_obj-getAuthor(); ?
?php echo $talkback_obj-getBody(); ?

To debug that problem you are having with Ajax updating the correct div post
the entire form_remote_tag function snippet for me to see...

Gareth

On Wed, Mar 18, 2009 at 4:07 PM, Liran Tal liran@gmail.com wrote:



 Hey Gareth,

 On Mar 18, 11:34 am, Gareth McCumskey gmccums...@gmail.com wrote:
  $request and $this-getRequest() and even
  sfContext::getInstance()-getRequest() are all the same thing within the
  action. Outside the action you won't be able to use $request, thats why
 all
  the other access methods exist. $request in an action is just a
 convenience.

 Thanks for that reference, good to be on the right track.
 Regarding the $talkback_obj-save() method for saving the data, it
 doesn't seem
 to save the data. It doesn't give any error too, just shows me the
 ajax success page.

 More than that, I've also added this after the -save() method:
  $results = array('author' = $author, 'body' = $body);
  $this-results = $results;
 And in the addNewTalkbackAjaxSuccess.php page I did this:
 ?php
var_dump($results);
 ?
 (Because I know that it's possible to pass like that variables from
 the actions to the view
 so I wanted to check the values)
 but it gives me an error for undefined variable $results.

 This still doesn't explain why the talkback object save() method isn't
 saving the information
 (and it doesn't give any error if I don't use the $results variable on
 the view page so I'm clueless).

 I mentioned I'm using 1.2?


 Thanks.


  Gareth
 
  On Tue, Mar 17, 2009 at 7:51 PM, Liran Tal liran@gmail.com wrote:
 
   On Mar 17, 4:22 pm, Gareth McCumskey gmccums...@gmail.com wrote:
$talkback_obj = new Talkback();
 
$talkback_obj-setAuthor($author);
$talkback_obj-setBody($talkback);
$talkback_obj-save();Thanks,
 
   Thanks,
   If you don't mind me asking also regarding the foThanks,llowing line
   of code
$isAjax = $this-getRequest()-isXmlHttpRequest();
   It seems to me that it's possible to use $request-isXmlHttpRequest()
   instead of $this?
   it makes sense that $this-getRequest() actually referes to the
   $request object in the function.
 
On Tue, Mar 17, 2009 at 4:10 PM, Liran Tal liran@gmail.com
 wrote:
 
 Hey,
 
 In my template for showSuccess.php I've added the ability to submit
 a
 form via Ajax
 as follows:
div id=talkback_list/div
?php echo form_remote_tag(array(
'update'   = 'talkback_list',
'url'  =
   'talkback/addNewTalkbackAjax',
))
?
label for=AuthorAuthor:/label
?php echo input_tag('author') ?
label for=TalkbackTalkback:/label
?php echo input_tag('talkback') ?
?php echo submit_tag('Post') ?
/form
 
 And in the talkback module's actions I've added an execution
 handler
 for it, such as:
 
  public function executeAddNewTalkbackAjax($request)
  {
  $isAjax = $this-getRequest()-isXmlHttpRequest();
  if ($isAjax) {
  $author = $request-getParameter('author');
  $talkback = $request-getParameter('talkback');
 
  save(); ...
 
  }
  }
 
 My question is how to save this data (author and talkback) in the
 table from this execution
 handler?
 
 Reference: related schema:
  talkback:
_attributes:  { phpName: Talkback }
id:   ~
blog_id:   ~
author:   varchar(250)
body: longvarchar
created_at:   ~
 
 
 


--~--~-~--~~~---~--~~
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: Saving request? (ajax)

2009-03-18 Thread Gareth McCumskey
Another tip. I would seriously recommend you look at doing the Jobeet
tutorial as it covers this and more in such fantastic detail and will get
you to grips with symfony very quickly.
Gareth

On Wed, Mar 18, 2009 at 6:19 PM, Gareth McCumskey gmccums...@gmail.comwrote:

 Did you actually look in the database to see if it saved the object or not?
 Also to get that array what you need to do is after the save():

 $this-results = array(author=$talback_obj-getAuthor(),
 body=$talback_obj-getBody());

 But you do not even need to do this. Just do:

 $this-results = $talkback_obj;

 Then in your view you can access the object directly:

 ?php echo $talkback_obj-getAuthor(); ?
 ?php echo $talkback_obj-getBody(); ?

 To debug that problem you are having with Ajax updating the correct div
 post the entire form_remote_tag function snippet for me to see...

 Gareth

 On Wed, Mar 18, 2009 at 4:07 PM, Liran Tal liran@gmail.com wrote:



 Hey Gareth,

 On Mar 18, 11:34 am, Gareth McCumskey gmccums...@gmail.com wrote:
  $request and $this-getRequest() and even
  sfContext::getInstance()-getRequest() are all the same thing within the
  action. Outside the action you won't be able to use $request, thats why
 all
  the other access methods exist. $request in an action is just a
 convenience.

 Thanks for that reference, good to be on the right track.
 Regarding the $talkback_obj-save() method for saving the data, it
 doesn't seem
 to save the data. It doesn't give any error too, just shows me the
 ajax success page.

 More than that, I've also added this after the -save() method:
  $results = array('author' = $author, 'body' = $body);
  $this-results = $results;
 And in the addNewTalkbackAjaxSuccess.php page I did this:
 ?php
var_dump($results);
 ?
 (Because I know that it's possible to pass like that variables from
 the actions to the view
 so I wanted to check the values)
 but it gives me an error for undefined variable $results.

 This still doesn't explain why the talkback object save() method isn't
 saving the information
 (and it doesn't give any error if I don't use the $results variable on
 the view page so I'm clueless).

 I mentioned I'm using 1.2?


 Thanks.


  Gareth
 
  On Tue, Mar 17, 2009 at 7:51 PM, Liran Tal liran@gmail.com wrote:
 
   On Mar 17, 4:22 pm, Gareth McCumskey gmccums...@gmail.com wrote:
$talkback_obj = new Talkback();
 
$talkback_obj-setAuthor($author);
$talkback_obj-setBody($talkback);
$talkback_obj-save();Thanks,
 
   Thanks,
   If you don't mind me asking also regarding the foThanks,llowing line
   of code
$isAjax = $this-getRequest()-isXmlHttpRequest();
   It seems to me that it's possible to use $request-isXmlHttpRequest()
   instead of $this?
   it makes sense that $this-getRequest() actually referes to the
   $request object in the function.
 
On Tue, Mar 17, 2009 at 4:10 PM, Liran Tal liran@gmail.com
 wrote:
 
 Hey,
 
 In my template for showSuccess.php I've added the ability to
 submit a
 form via Ajax
 as follows:
div id=talkback_list/div
?php echo form_remote_tag(array(
'update'   = 'talkback_list',
'url'  =
   'talkback/addNewTalkbackAjax',
))
?
label for=AuthorAuthor:/label
?php echo input_tag('author') ?
label for=TalkbackTalkback:/label
?php echo input_tag('talkback') ?
?php echo submit_tag('Post') ?
/form
 
 And in the talkback module's actions I've added an execution
 handler
 for it, such as:
 
  public function executeAddNewTalkbackAjax($request)
  {
  $isAjax = $this-getRequest()-isXmlHttpRequest();
  if ($isAjax) {
  $author = $request-getParameter('author');
  $talkback = $request-getParameter('talkback');
 
  save(); ...
 
  }
  }
 
 My question is how to save this data (author and talkback) in the
 table from this execution
 handler?
 
 Reference: related schema:
  talkback:
_attributes:  { phpName: Talkback }
id:   ~
blog_id:   ~
author:   varchar(250)
body: longvarchar
created_at:   ~
 
 
 



--~--~-~--~~~---~--~~
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: Saving request? (ajax)

2009-03-18 Thread Liran Tal


On Mar 18, 6:19 pm, Gareth McCumskey gmccums...@gmail.com wrote:
 Did you actually look in the database to see if it saved the object or not?

Yes, I checked, it doesn't save the information to the database.

 Also to get that array what you need to do is after the save():

 $this-results = array(author=$talback_obj-getAuthor(),
 body=$talback_obj-getBody());

 But you do not even need to do this. Just do:

 $this-results = $talkback_obj;

 Then in your view you can access the object directly:

 ?php echo $talkback_obj-getAuthor(); ?
 ?php echo $talkback_obj-getBody(); ?


Ok, I changed the code so that the results member stores the object
itself.

 To debug that problem you are having with Ajax updating the correct div post
 the entire form_remote_tag function snippet for me to see...


There it is:

?php use_helper('Javascript'); ?
?php use_helper('Form'); ?

...

input type=hidden name=blog_id id=blog_id value=?php 
echo
$blog-getId(); ? /
label for=AuthorAuthor:/label
?php echo input_tag('author') ?
br/
label for=TalkbackTalkback:/label
?php echo input_tag('talkback') ?
?php echo submit_tag('Post') ?
/form

Thanks.


 Gareth

 On Wed, Mar 18, 2009 at 4:07 PM, Liran Tal liran@gmail.com wrote:

  Hey Gareth,

  On Mar 18, 11:34 am, Gareth McCumskey gmccums...@gmail.com wrote:
   $request and $this-getRequest() and even
   sfContext::getInstance()-getRequest() are all the same thing within the
   action. Outside the action you won't be able to use $request, thats why
  all
   the other access methods exist. $request in an action is just a
  convenience.

  Thanks for that reference, good to be on the right track.
  Regarding the $talkback_obj-save() method for saving the data, it
  doesn't seem
  to save the data. It doesn't give any error too, just shows me the
  ajax success page.

  More than that, I've also added this after the -save() method:
                   $results = array('author' = $author, 'body' = $body);
                   $this-results = $results;
  And in the addNewTalkbackAjaxSuccess.php page I did this:
  ?php
         var_dump($results);
  ?
  (Because I know that it's possible to pass like that variables from
  the actions to the view
  so I wanted to check the values)
  but it gives me an error for undefined variable $results.

  This still doesn't explain why the talkback object save() method isn't
  saving the information
  (and it doesn't give any error if I don't use the $results variable on
  the view page so I'm clueless).

  I mentioned I'm using 1.2?

  Thanks.

   Gareth

   On Tue, Mar 17, 2009 at 7:51 PM, Liran Tal liran@gmail.com wrote:

On Mar 17, 4:22 pm, Gareth McCumskey gmccums...@gmail.com wrote:
 $talkback_obj = new Talkback();

 $talkback_obj-setAuthor($author);
 $talkback_obj-setBody($talkback);
 $talkback_obj-save();Thanks,

Thanks,
If you don't mind me asking also regarding the foThanks,llowing line
of code
         $isAjax = $this-getRequest()-isXmlHttpRequest();
It seems to me that it's possible to use $request-isXmlHttpRequest()
instead of $this?
it makes sense that $this-getRequest() actually referes to the
$request object in the function.

 On Tue, Mar 17, 2009 at 4:10 PM, Liran Tal liran@gmail.com
  wrote:

  Hey,

  In my template for showSuccess.php I've added the ability to submit
  a
  form via Ajax
  as follows:
                 div id=talkback_list/div
                 ?php echo form_remote_tag(array(
                                 'update'   = 'talkback_list',
                                 'url'      =
'talkback/addNewTalkbackAjax',
                                 ))
                 ?
                 label for=AuthorAuthor:/label
                 ?php echo input_tag('author') ?
                 label for=TalkbackTalkback:/label
                 ?php echo input_tag('talkback') ?
                 ?php echo submit_tag('Post') ?
                 /form

  And in the talkback module's actions I've added an execution
  handler
  for it, such as:

   public function executeAddNewTalkbackAjax($request)
   {
           $isAjax = $this-getRequest()-isXmlHttpRequest();
           if ($isAjax) {
                   $author = $request-getParameter('author');
                   $talkback = $request-getParameter('talkback');

                   save(); ...

           }
   }

  My question is how to save this data (author and talkback) in the
  table from this execution
  handler?

  Reference: related schema:
   talkback:
     _attributes:  { phpName: Talkback }
     id:           ~
     blog_id:   ~
     author:       varchar(250)
     body:         longvarchar

[symfony-users] Re: Saving request? (ajax)

2009-03-18 Thread Liran Tal


Oh silly me!
I think I forgot to enable javascript support for the prototype
library in
app/frontend/config/view.yml as I just remembered I didn't do that and
I believe
that this is the problem.

Checking and I'll report back!


On Mar 18, 6:20 pm, Gareth McCumskey gmccums...@gmail.com wrote:
 Another tip. I would seriously recommend you look at doing the Jobeet
 tutorial as it covers this and more in such fantastic detail and will get
 you to grips with symfony very quickly.
 Gareth

 On Wed, Mar 18, 2009 at 6:19 PM, Gareth McCumskey gmccums...@gmail.comwrote:

  Did you actually look in the database to see if it saved the object or not?
  Also to get that array what you need to do is after the save():

  $this-results = array(author=$talback_obj-getAuthor(),
  body=$talback_obj-getBody());

  But you do not even need to do this. Just do:

  $this-results = $talkback_obj;

  Then in your view you can access the object directly:

  ?php echo $talkback_obj-getAuthor(); ?
  ?php echo $talkback_obj-getBody(); ?

  To debug that problem you are having with Ajax updating the correct div
  post the entire form_remote_tag function snippet for me to see...

  Gareth

  On Wed, Mar 18, 2009 at 4:07 PM, Liran Tal liran@gmail.com wrote:

  Hey Gareth,

  On Mar 18, 11:34 am, Gareth McCumskey gmccums...@gmail.com wrote:
   $request and $this-getRequest() and even
   sfContext::getInstance()-getRequest() are all the same thing within the
   action. Outside the action you won't be able to use $request, thats why
  all
   the other access methods exist. $request in an action is just a
  convenience.

  Thanks for that reference, good to be on the right track.
  Regarding the $talkback_obj-save() method for saving the data, it
  doesn't seem
  to save the data. It doesn't give any error too, just shows me the
  ajax success page.

  More than that, I've also added this after the -save() method:
                   $results = array('author' = $author, 'body' = $body);
                   $this-results = $results;
  And in the addNewTalkbackAjaxSuccess.php page I did this:
  ?php
         var_dump($results);
  ?
  (Because I know that it's possible to pass like that variables from
  the actions to the view
  so I wanted to check the values)
  but it gives me an error for undefined variable $results.

  This still doesn't explain why the talkback object save() method isn't
  saving the information
  (and it doesn't give any error if I don't use the $results variable on
  the view page so I'm clueless).

  I mentioned I'm using 1.2?

  Thanks.

   Gareth

   On Tue, Mar 17, 2009 at 7:51 PM, Liran Tal liran@gmail.com wrote:

On Mar 17, 4:22 pm, Gareth McCumskey gmccums...@gmail.com wrote:
 $talkback_obj = new Talkback();

 $talkback_obj-setAuthor($author);
 $talkback_obj-setBody($talkback);
 $talkback_obj-save();Thanks,

Thanks,
If you don't mind me asking also regarding the foThanks,llowing line
of code
         $isAjax = $this-getRequest()-isXmlHttpRequest();
It seems to me that it's possible to use $request-isXmlHttpRequest()
instead of $this?
it makes sense that $this-getRequest() actually referes to the
$request object in the function.

 On Tue, Mar 17, 2009 at 4:10 PM, Liran Tal liran@gmail.com
  wrote:

  Hey,

  In my template for showSuccess.php I've added the ability to
  submit a
  form via Ajax
  as follows:
                 div id=talkback_list/div
                 ?php echo form_remote_tag(array(
                                 'update'   = 'talkback_list',
                                 'url'      =
'talkback/addNewTalkbackAjax',
                                 ))
                 ?
                 label for=AuthorAuthor:/label
                 ?php echo input_tag('author') ?
                 label for=TalkbackTalkback:/label
                 ?php echo input_tag('talkback') ?
                 ?php echo submit_tag('Post') ?
                 /form

  And in the talkback module's actions I've added an execution
  handler
  for it, such as:

   public function executeAddNewTalkbackAjax($request)
   {
           $isAjax = $this-getRequest()-isXmlHttpRequest();
           if ($isAjax) {
                   $author = $request-getParameter('author');
                   $talkback = $request-getParameter('talkback');

                   save(); ...

           }
   }

  My question is how to save this data (author and talkback) in the
  table from this execution
  handler?

  Reference: related schema:
   talkback:
     _attributes:  { phpName: Talkback }
     id:           ~
     blog_id:   ~
     author:       varchar(250)
     body:         longvarchar
     created_at:   ~


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the 

[symfony-users] Loading a new class during program execution

2009-03-18 Thread isleshocky77

I'm creating a class file during execution and need to be able to use
it after creating it.  I've tried calling the sfCacheClearTask::run()
as well as sfAutoloader::unregister(); sfAutoloader::register();
methods.

Anyone have any idea how I can get this functionality?

--
Stephen Ostrow sost...@sowebdesigns.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: Saving request? (ajax)

2009-03-18 Thread Liran Tal


Ok, some update.
1. Obviously I was missing that directive for the javascripts to be
enabled,
so I added that but it didn't solve anything.
2. Debugging with FireBug I notice that the javascript files are
printing an error message:
   You don't have permission to access /sfProtoculousPlugin/js/
prototype.js
So now it sheds some light.

At first it seems like the web server is mis-configured but digging a
little bit further
shows that my /var/www/proj/sf_sandbox/web directory includes the
following symlink:
sfProtoculousPlugin - ../../lib/plugins/sfProtoculousPlugin/web

And trying to find the prototype javascript library it's located here:
/var/www/proj/sf_sandbox/lib/symfony/plugins/sfProtoculousPlugin/web/
js/prototype.js

So that seems a little bit off from the symlink.
Is this a 1.2 sf_sandbox bug?

I've fixed the symlinks and now javascript is enabled (I added an
indicator also to
the page so visually see it).


3. Last issue - I still can't get the results to be passed to the
success template.
Having var_dump($this-results); in the template result in the error
of
Notice: Undefined property: sfPHPView::$results

Any thoughts on that?




Regards,
Liran.

On Mar 18, 6:20 pm, Gareth McCumskey gmccums...@gmail.com wrote:
 Another tip. I would seriously recommend you look at doing the Jobeet
 tutorial as it covers this and more in such fantastic detail and will get
 you to grips with symfony very quickly.
 Gareth

 On Wed, Mar 18, 2009 at 6:19 PM, Gareth McCumskey gmccums...@gmail.comwrote:

  Did you actually look in the database to see if it saved the object or not?
  Also to get that array what you need to do is after the save():

  $this-results = array(author=$talback_obj-getAuthor(),
  body=$talback_obj-getBody());

  But you do not even need to do this. Just do:

  $this-results = $talkback_obj;

  Then in your view you can access the object directly:

  ?php echo $talkback_obj-getAuthor(); ?
  ?php echo $talkback_obj-getBody(); ?

  To debug that problem you are having with Ajax updating the correct div
  post the entire form_remote_tag function snippet for me to see...

  Gareth

  On Wed, Mar 18, 2009 at 4:07 PM, Liran Tal liran@gmail.com wrote:

  Hey Gareth,

  On Mar 18, 11:34 am, Gareth McCumskey gmccums...@gmail.com wrote:
   $request and $this-getRequest() and even
   sfContext::getInstance()-getRequest() are all the same thing within the
   action. Outside the action you won't be able to use $request, thats why
  all
   the other access methods exist. $request in an action is just a
  convenience.

  Thanks for that reference, good to be on the right track.
  Regarding the $talkback_obj-save() method for saving the data, it
  doesn't seem
  to save the data. It doesn't give any error too, just shows me the
  ajax success page.

  More than that, I've also added this after the -save() method:
                   $results = array('author' = $author, 'body' = $body);
                   $this-results = $results;
  And in the addNewTalkbackAjaxSuccess.php page I did this:
  ?php
         var_dump($results);
  ?
  (Because I know that it's possible to pass like that variables from
  the actions to the view
  so I wanted to check the values)
  but it gives me an error for undefined variable $results.

  This still doesn't explain why the talkback object save() method isn't
  saving the information
  (and it doesn't give any error if I don't use the $results variable on
  the view page so I'm clueless).

  I mentioned I'm using 1.2?

  Thanks.

   Gareth

   On Tue, Mar 17, 2009 at 7:51 PM, Liran Tal liran@gmail.com wrote:

On Mar 17, 4:22 pm, Gareth McCumskey gmccums...@gmail.com wrote:
 $talkback_obj = new Talkback();

 $talkback_obj-setAuthor($author);
 $talkback_obj-setBody($talkback);
 $talkback_obj-save();Thanks,

Thanks,
If you don't mind me asking also regarding the foThanks,llowing line
of code
         $isAjax = $this-getRequest()-isXmlHttpRequest();
It seems to me that it's possible to use $request-isXmlHttpRequest()
instead of $this?
it makes sense that $this-getRequest() actually referes to the
$request object in the function.

 On Tue, Mar 17, 2009 at 4:10 PM, Liran Tal liran@gmail.com
  wrote:

  Hey,

  In my template for showSuccess.php I've added the ability to
  submit a
  form via Ajax
  as follows:
                 div id=talkback_list/div
                 ?php echo form_remote_tag(array(
                                 'update'   = 'talkback_list',
                                 'url'      =
'talkback/addNewTalkbackAjax',
                                 ))
                 ?
                 label for=AuthorAuthor:/label
                 ?php echo input_tag('author') ?
                 label for=TalkbackTalkback:/label
                 ?php echo input_tag('talkback') ?
                 ?php echo submit_tag('Post') ?
                 

[symfony-users] Re: Saving request? (ajax)

2009-03-18 Thread Gareth McCumskey
do var_dump($results);
by saying $this-results you are in effect creating a variable $results for
the view.

On Wed, Mar 18, 2009 at 9:06 PM, Liran Tal liran@gmail.com wrote:



 Ok, some update.
 1. Obviously I was missing that directive for the javascripts to be
 enabled,
 so I added that but it didn't solve anything.
 2. Debugging with FireBug I notice that the javascript files are
 printing an error message:
   You don't have permission to access /sfProtoculousPlugin/js/
 prototype.js
 So now it sheds some light.

 At first it seems like the web server is mis-configured but digging a
 little bit further
 shows that my /var/www/proj/sf_sandbox/web directory includes the
 following symlink:
 sfProtoculousPlugin - ../../lib/plugins/sfProtoculousPlugin/web

 And trying to find the prototype javascript library it's located here:
 /var/www/proj/sf_sandbox/lib/symfony/plugins/sfProtoculousPlugin/web/
 js/prototype.js

 So that seems a little bit off from the symlink.
 Is this a 1.2 sf_sandbox bug?

 I've fixed the symlinks and now javascript is enabled (I added an
 indicator also to
 the page so visually see it).


 3. Last issue - I still can't get the results to be passed to the
 success template.
 Having var_dump($this-results); in the template result in the error
 of
 Notice: Undefined property: sfPHPView::$results

 Any thoughts on that?




 Regards,
 Liran.

 On Mar 18, 6:20 pm, Gareth McCumskey gmccums...@gmail.com wrote:
  Another tip. I would seriously recommend you look at doing the Jobeet
  tutorial as it covers this and more in such fantastic detail and will get
  you to grips with symfony very quickly.
  Gareth
 
  On Wed, Mar 18, 2009 at 6:19 PM, Gareth McCumskey gmccums...@gmail.com
 wrote:
 
   Did you actually look in the database to see if it saved the object or
 not?
   Also to get that array what you need to do is after the save():
 
   $this-results = array(author=$talback_obj-getAuthor(),
   body=$talback_obj-getBody());
 
   But you do not even need to do this. Just do:
 
   $this-results = $talkback_obj;
 
   Then in your view you can access the object directly:
 
   ?php echo $talkback_obj-getAuthor(); ?
   ?php echo $talkback_obj-getBody(); ?
 
   To debug that problem you are having with Ajax updating the correct div
   post the entire form_remote_tag function snippet for me to see...
 
   Gareth
 
   On Wed, Mar 18, 2009 at 4:07 PM, Liran Tal liran@gmail.com
 wrote:
 
   Hey Gareth,
 
   On Mar 18, 11:34 am, Gareth McCumskey gmccums...@gmail.com wrote:
$request and $this-getRequest() and even
sfContext::getInstance()-getRequest() are all the same thing within
 the
action. Outside the action you won't be able to use $request, thats
 why
   all
the other access methods exist. $request in an action is just a
   convenience.
 
   Thanks for that reference, good to be on the right track.
   Regarding the $talkback_obj-save() method for saving the data, it
   doesn't seem
   to save the data. It doesn't give any error too, just shows me the
   ajax success page.
 
   More than that, I've also added this after the -save() method:
$results = array('author' = $author, 'body' =
 $body);
$this-results = $results;
   And in the addNewTalkbackAjaxSuccess.php page I did this:
   ?php
  var_dump($results);
   ?
   (Because I know that it's possible to pass like that variables from
   the actions to the view
   so I wanted to check the values)
   but it gives me an error for undefined variable $results.
 
   This still doesn't explain why the talkback object save() method isn't
   saving the information
   (and it doesn't give any error if I don't use the $results variable on
   the view page so I'm clueless).
 
   I mentioned I'm using 1.2?
 
   Thanks.
 
Gareth
 
On Tue, Mar 17, 2009 at 7:51 PM, Liran Tal liran@gmail.com
 wrote:
 
 On Mar 17, 4:22 pm, Gareth McCumskey gmccums...@gmail.com
 wrote:
  $talkback_obj = new Talkback();
 
  $talkback_obj-setAuthor($author);
  $talkback_obj-setBody($talkback);
  $talkback_obj-save();Thanks,
 
 Thanks,
 If you don't mind me asking also regarding the foThanks,llowing
 line
 of code
  $isAjax = $this-getRequest()-isXmlHttpRequest();
 It seems to me that it's possible to use
 $request-isXmlHttpRequest()
 instead of $this?
 it makes sense that $this-getRequest() actually referes to the
 $request object in the function.
 
  On Tue, Mar 17, 2009 at 4:10 PM, Liran Tal liran@gmail.com
 
   wrote:
 
   Hey,
 
   In my template for showSuccess.php I've added the ability to
   submit a
   form via Ajax
   as follows:
  div id=talkback_list/div
  ?php echo form_remote_tag(array(
  'update'   = 'talkback_list',
  'url'  =
 'talkback/addNewTalkbackAjax',
  

[symfony-users] Re: Saving request? (ajax)

2009-03-18 Thread Liran Tal



On Mar 18, 9:08 pm, Gareth McCumskey gmccums...@gmail.com wrote:
 do var_dump($results);
 by saying $this-results you are in effect creating a variable $results for
 the view.

Right, so at the action handler when doing $this-result it creates
the result variable
and assigns it the object? Ahh, I thought it was a member of the
class.

Anyway,
Any ideas regarding those soft links in the sandbox? I'm pretty sure
it's not something
that I've changed myself so I'm guessing it's a bug in the sf_sandbox
package.


Thanks,
Liran.


 On Wed, Mar 18, 2009 at 9:06 PM, Liran Tal liran@gmail.com wrote:

  Ok, some update.
  1. Obviously I was missing that directive for the javascripts to be
  enabled,
  so I added that but it didn't solve anything.
  2. Debugging with FireBug I notice that the javascript files are
  printing an error message:
    You don't have permission to access /sfProtoculousPlugin/js/
  prototype.js
  So now it sheds some light.

  At first it seems like the web server is mis-configured but digging a
  little bit further
  shows that my /var/www/proj/sf_sandbox/web directory includes the
  following symlink:
  sfProtoculousPlugin - ../../lib/plugins/sfProtoculousPlugin/web

  And trying to find the prototype javascript library it's located here:
  /var/www/proj/sf_sandbox/lib/symfony/plugins/sfProtoculousPlugin/web/
  js/prototype.js

  So that seems a little bit off from the symlink.
  Is this a 1.2 sf_sandbox bug?

  I've fixed the symlinks and now javascript is enabled (I added an
  indicator also to
  the page so visually see it).

  3. Last issue - I still can't get the results to be passed to the
  success template.
  Having var_dump($this-results); in the template result in the error
  of
  Notice: Undefined property: sfPHPView::$results

  Any thoughts on that?

  Regards,
  Liran.

  On Mar 18, 6:20 pm, Gareth McCumskey gmccums...@gmail.com wrote:
   Another tip. I would seriously recommend you look at doing the Jobeet
   tutorial as it covers this and more in such fantastic detail and will get
   you to grips with symfony very quickly.
   Gareth

   On Wed, Mar 18, 2009 at 6:19 PM, Gareth McCumskey gmccums...@gmail.com
  wrote:

Did you actually look in the database to see if it saved the object or
  not?
Also to get that array what you need to do is after the save():

$this-results = array(author=$talback_obj-getAuthor(),
body=$talback_obj-getBody());

But you do not even need to do this. Just do:

$this-results = $talkback_obj;

Then in your view you can access the object directly:

?php echo $talkback_obj-getAuthor(); ?
?php echo $talkback_obj-getBody(); ?

To debug that problem you are having with Ajax updating the correct div
post the entire form_remote_tag function snippet for me to see...

Gareth

On Wed, Mar 18, 2009 at 4:07 PM, Liran Tal liran@gmail.com
  wrote:

Hey Gareth,

On Mar 18, 11:34 am, Gareth McCumskey gmccums...@gmail.com wrote:
 $request and $this-getRequest() and even
 sfContext::getInstance()-getRequest() are all the same thing within
  the
 action. Outside the action you won't be able to use $request, thats
  why
all
 the other access methods exist. $request in an action is just a
convenience.

Thanks for that reference, good to be on the right track.
Regarding the $talkback_obj-save() method for saving the data, it
doesn't seem
to save the data. It doesn't give any error too, just shows me the
ajax success page.

More than that, I've also added this after the -save() method:
                 $results = array('author' = $author, 'body' =
  $body);
                 $this-results = $results;
And in the addNewTalkbackAjaxSuccess.php page I did this:
?php
       var_dump($results);
?
(Because I know that it's possible to pass like that variables from
the actions to the view
so I wanted to check the values)
but it gives me an error for undefined variable $results.

This still doesn't explain why the talkback object save() method isn't
saving the information
(and it doesn't give any error if I don't use the $results variable on
the view page so I'm clueless).

I mentioned I'm using 1.2?

Thanks.

 Gareth

 On Tue, Mar 17, 2009 at 7:51 PM, Liran Tal liran@gmail.com
  wrote:

  On Mar 17, 4:22 pm, Gareth McCumskey gmccums...@gmail.com
  wrote:
   $talkback_obj = new Talkback();

   $talkback_obj-setAuthor($author);
   $talkback_obj-setBody($talkback);
   $talkback_obj-save();Thanks,

  Thanks,
  If you don't mind me asking also regarding the foThanks,llowing
  line
  of code
           $isAjax = $this-getRequest()-isXmlHttpRequest();
  It seems to me that it's possible to use
  $request-isXmlHttpRequest()
  instead of $this?
  it makes sense that $this-getRequest() actually referes to the
  $request object in the function.

   

[symfony-users] Re: Serving images from a static server/CDN

2009-03-18 Thread Eno

On Mon, 2 Mar 2009, Christian Schaefer wrote:

 is there a way to tell the image_tag() helper to use a different
 domain than the application?
 
 I am creating a lot of images in symfony and write them to disk
 afterwards to do it only once.
 
 yslow still tells me to serve them from a CDN and I want to do this.
 only I don't fancy to change all image_tag() call for this..

We use a configuration constant and all our image_tag() calls use the 
variable. (Yes, you need to change all the image_tag calls the first time 
you do this but then you only need to change it in one place if it ever 
needs to move somewhere else like a CDN).


-- 



--~--~-~--~~~---~--~~
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] Removing embededForm (when validating

2009-03-18 Thread Sid Ferreira

Im trying to pre-validate a form and, when doing it, remove an embeded
form if a field, of this embeded form, is empty.

I tried to use a preValidator, but got a Fatal error: Call to
undefined method BaseBancoForm::prevalidator().
I got out of ideas, so, can anyone give me one?

Follow my codes (with last tests included):


=== configure method:
  $foto = new BancoImagem();
  $this-embedForm('nova_foto', new BancoImagemForm());
  $this-validatorSchema-setPreValidator(
new sfValidatorCallback(array('callback' = array($this,
'preValidatorImagem')))
  );
=
  public function preValidatorImagem($validator, $values) {
if($values['nova_foto']['texto'] == '') {
//  echo pre;
  var_dump($validator);
  unset($this-widgetSchema['nova_foto']);
  unset($this-validatorSchema['nova_foto']);
  unset($values['nova_foto']);
  //die;
}
return parent::preValidator($validator, $values);
  }
==














--~--~-~--~~~---~--~~
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: symfony + doctrine + MS SQL Server

2009-03-18 Thread umberleigh

Did you find a fix/workaround for this? I've run into the same problem

On Mar 10, 4:32 pm, Todd McNeill todd.mcne...@pmigroup.com wrote:
 Hi –

 I’m new to Symfony and I have a small project that I wanted to start,
 but I’m having trouble building the schema using Doctrine/PDO/SQL
 Server.  I’m running Symfony 1.2.4 on RHEL 5 with Apache 2.2.3.  I’m
 using FreeTDS to communicate to my SQL Server, and I’m successfully
 connecting to the database both natively via FreeTDS and using ODBC
 (unixODBC).  A small database has already been built with a few tables
 containing test data and referential integrity.  I’m attempting to
 build the schema using the following command:

 symfony doctrine:build-schema

 While using the dblib DSN in my config/databases.yml file, I get the
 following error:

 [sfException]
 unknown database attribute type: bigint

 With the ODBC DSN, I get the following error:

 [sfException]
 SQLSTATE[24000]: Invalid cursor state: 0 [unixODBC][Driver Manager]
 Invalid cursor state (SQLFetchScroll[0] at /var/tmp/PDO_ODBC/
 odbc_stmt.c:372)

 Any insight on how I should proceed?

 Thanks,
 Todd

--~--~-~--~~~---~--~~
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: print content in different language

2009-03-18 Thread Tomasz Ignatiuk

@dsb - but this works to load default language to stuff that isn't
translated if I got it right. But for me it won't work

@Lee, but how to use in some part of my templates users culture, and
in other parts culture by parameter? If I use this ?php $sf_user-
setCulture('en_US') ? it will set culture to user, which is to whole
application.

To be more specific. My application is in polish as default. I can
also switch to english.

My invoice module by default prints documents in polish (user culture
set to polish). But I want to also have an option to print invoice in
english, german, french, spanish etc. So that I need translations only
for words used in invoices. Now I want to have a choice list where I
choose language for print, reload page (all stays in polish - menu,
header etc, but invoice text change to different language). I hit Ctrl
+p and it is donehow to make it work?
--~--~-~--~~~---~--~~
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: One module, many forms

2009-03-18 Thread Tomasz Ignatiuk

Any guess?
--~--~-~--~~~---~--~~
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: symfony + doctrine + MS SQL Server

2009-03-18 Thread Todd Mcneill

Actually, I was able to resolve the issue for pdo_dblib, but not for ODBC.  
There are two issues, both with Doctrine, not Symfony.  One is already fixed in 
the latest Doctrine code base, but depending on how you deployed Doctrine and 
Symfony, the fix may not be there.  There is a TRAC ticket for this fix:

http://trac.symfony-project.org/ticket/5853

My additional fix was to add the data type translation into the 
doctrine/Doctrine/DataDict/Mssql.php file.  Here is my diff:

# diff Mssql.php Mssql.php.orig
149,151d148
 case 'bigint':
 $type[0] = 'integer';
 break;

The length (8 bytes) of the bigint data type is captured appropriately by the 
Doctrine tools.

Hope this helps.

Todd

-Original Message-
From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] On 
Behalf Of umberleigh
Sent: Wednesday, March 18, 2009 9:41 AM
To: symfony users
Subject: [symfony-users] Re: symfony + doctrine + MS SQL Server


Did you find a fix/workaround for this? I've run into the same problem

On Mar 10, 4:32 pm, Todd McNeill todd.mcne...@pmigroup.com wrote:
 Hi -

 I'm new to Symfony and I have a small project that I wanted to start,
 but I'm having trouble building the schema using Doctrine/PDO/SQL
 Server.  I'm running Symfony 1.2.4 on RHEL 5 with Apache 2.2.3.  I'm
 using FreeTDS to communicate to my SQL Server, and I'm successfully
 connecting to the database both natively via FreeTDS and using ODBC
 (unixODBC).  A small database has already been built with a few tables
 containing test data and referential integrity.  I'm attempting to
 build the schema using the following command:

 symfony doctrine:build-schema

 While using the dblib DSN in my config/databases.yml file, I get the
 following error:

 [sfException]
 unknown database attribute type: bigint

 With the ODBC DSN, I get the following error:

 [sfException]
 SQLSTATE[24000]: Invalid cursor state: 0 [unixODBC][Driver Manager]
 Invalid cursor state (SQLFetchScroll[0] at /var/tmp/PDO_ODBC/
 odbc_stmt.c:372)

 Any insight on how I should proceed?

 Thanks,
 Todd



--~--~-~--~~~---~--~~
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: sfTitleMakerPlugin

2009-03-18 Thread naholyr

The key was to use a filter at the right place. Before execution :
too early, actions are not yet executed. After execution : too late,
nothing else can be executed after. So we have to replace execution
filter.

First, I added a singleton to your class. This way it's easier to use
in actions and in a filter : the access to the title is centralized.

[php]
  protected static $instance = null;

  /**
   * @return sfTitleMaker
   */
  public static function getInstance()
  {
if (is_null(self::$instance)) {
  self::$instance = new sfTitleMaker();
}

return self::$instance;
  }
[/php]

Then, I made a new filter, extending sfExecutionFilter, and overriding
the executeView() method, using the precedent singleton to set Title.

[php]
class sfTitleMakerExecutionFilter extends sfExecutionFilter
{

  protected function executeView($moduleName, $actionName, $viewName,
$viewAttributes)
  {
sfContext::getInstance()-getResponse()-setTitle
(sfTitleMaker::getInstance());

parent::executeView($moduleName, $actionName, $viewName,
$viewAttributes);
  }

}
[/php]

This way, I just have to call sfTitleMaker::getInstance()-add
('part') to add part to my title ;)
Example :

[php]
  public function executeToto()
  {
sfTitleMaker::getInstance()-add('test1');
sfTitleMaker::getInstance()-add('test2');
sfTitleMaker::getInstance()-add('test3');
  }
[/php]

Nothing else, and it produces test1 » test2 » test3.





On 18 mar, 15:45, Tom Haskins-Vaughan t...@templestreetmedia.com
wrote:
 Hi,

 I wrote a plugin a little while ago called sfTitleMakerPlugin[1] that
 allows you to compose a 'modular' title and then use it in the title tag.

 Currently though I have to add a preExecute and postExecute in each
 action to initiate then send the title. I'm sure there must be a way of
 doing it so that this is done automatically, maybe with filters or
 events. Is anyone willing to give me some pointers on this plugin? I did
 try filters but had no success.

 Cheers,

 Tom

 [1]http://trac.symfony-project.org/browser/plugins/sfTitleMakerPlugin
 --
 Tom Haskins-Vaughan
 Temple Street Media: Design and Development for the Web
 t...@templestreetmedia.com |www.templestreetmedia.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: sfTitleMakerPlugin

2009-03-18 Thread naholyr

I forgot to add the filters.yml, which has to be modified of course

[yml]
rendering: ~
security:  ~

# insert your own filters here

cache: ~
common:~
execution:
  class: sfTitleMakerExecutionFilter   # Filter class
[/yml]

--~--~-~--~~~---~--~~
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: About admin generator again, set filters dynamically?

2009-03-18 Thread Frank He
Where is that file you mentioned? I just know generator.yml, and that can
not be updated based on some outside criteria, is that right?

On Wed, Mar 18, 2009 at 3:11 AM, Alan Bem alan@gmail.com wrote:

 Look at *your_module*/lib/*your_module*GeneratorConfiguration.class.php.
 You can change there almost any AG configuration at runtime.

 Cheers, Alan Gabriel Bem


 On Wed, Mar 18, 2009 at 2:49 AM, xhe hexuf...@gmail.com wrote:


 This is still about admin  generator. Are there anyway to set filters
 dynamically?
 I want to use same backend for admin and sales, but obviously admin
 and sales should have different filters. e.g admin can have list of
 sales as filters, while sales should only access his own clients.
 But in generator.yml, the filters setting is fixed, so are there
 anyway to set filters dynamically. Otherwise I have to set two apps
 and duplicate a lot of codes.
 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] i18n for auto generated forms in admin generator

2009-03-18 Thread Guido

Hi,

I tried searching but found nothing that cleared my mind on this
thing. At the time the only way I found to set another language for
the labels and messages of the auto generated forms in the admin
interface is modifying generator.yml file. This lets me use only one
language. What if I want these labels and messages to be displayed in
2 languages. Is there a way to make a translation of the auto
generated forms as with i18n:extract method? Any help or tip will be
very much appreciated.
--~--~-~--~~~---~--~~
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] sfValidatorRegex Question...

2009-03-18 Thread John Masson

Hey All,

Trying to do some VERY simple regex validation to check for an 8 digit
number (no more, no less), but having some issues...

This:
sfValidatorRegex(array('pattern' = '/[0-9]{8}/'))

Validates the first 8 characters to make sure they are digits, and
accepts 8 digits as it should, but lets you put ANYTHING after those 8
digits... more numbers, letters, whatever.

This:
sfValidatorRegex(array('pattern' = '[0-9]{8}'))

Doesn't seem to let anything through...

At a bit of a loss as using some online regex testers shows either of
these to be ok, but Symfony doesn't like it??

Any ideas?

Thanks,
John
--~--~-~--~~~---~--~~
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: sfValidatorRegex Question...

2009-03-18 Thread John Masson

Should add, I'm using 1.1

On Mar 19, 4:25 pm, John Masson jmas...@gmail.com wrote:
 Hey All,

 Trying to do some VERY simple regex validation to check for an 8 digit
 number (no more, no less), but having some issues...

 This:
 sfValidatorRegex(array('pattern' = '/[0-9]{8}/'))

 Validates the first 8 characters to make sure they are digits, and
 accepts 8 digits as it should, but lets you put ANYTHING after those 8
 digits... more numbers, letters, whatever.

 This:
 sfValidatorRegex(array('pattern' = '[0-9]{8}'))

 Doesn't seem to let anything through...

 At a bit of a loss as using some online regex testers shows either of
 these to be ok, but Symfony doesn't like it??

 Any ideas?

 Thanks,
 John
--~--~-~--~~~---~--~~
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: sfValidatorRegex Question...

2009-03-18 Thread Sid Bachtiar

Try

sfValidatorRegex(array('pattern' = '/^[0-9]{8}$/'))

^ = beginning
$ = end

Note: I'm no regex guru and I have not tested the above, so finger crossed.

On Thu, Mar 19, 2009 at 6:25 PM, John Masson jmas...@gmail.com wrote:

 Hey All,

 Trying to do some VERY simple regex validation to check for an 8 digit
 number (no more, no less), but having some issues...

 This:
 sfValidatorRegex(array('pattern' = '/[0-9]{8}/'))

 Validates the first 8 characters to make sure they are digits, and
 accepts 8 digits as it should, but lets you put ANYTHING after those 8
 digits... more numbers, letters, whatever.

 This:
 sfValidatorRegex(array('pattern' = '[0-9]{8}'))

 Doesn't seem to let anything through...

 At a bit of a loss as using some online regex testers shows either of
 these to be ok, but Symfony doesn't like it??

 Any ideas?

 Thanks,
 John
 




-- 
Blue Horn Ltd - System Development
http://bluehorn.co.nz

--~--~-~--~~~---~--~~
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: sfValidatorRegex Question...

2009-03-18 Thread John Masson

Sid,

You're spot on mate! Works perfectly.

Thank you.

J

On Mar 19, 4:31 pm, Sid Bachtiar sid.bacht...@gmail.com wrote:
 Try

 sfValidatorRegex(array('pattern' = '/^[0-9]{8}$/'))

 ^ = beginning
 $ = end

 Note: I'm no regex guru and I have not tested the above, so finger crossed.



 On Thu, Mar 19, 2009 at 6:25 PM, John Masson jmas...@gmail.com wrote:

  Hey All,

  Trying to do some VERY simple regex validation to check for an 8 digit
  number (no more, no less), but having some issues...

  This:
  sfValidatorRegex(array('pattern' = '/[0-9]{8}/'))

  Validates the first 8 characters to make sure they are digits, and
  accepts 8 digits as it should, but lets you put ANYTHING after those 8
  digits... more numbers, letters, whatever.

  This:
  sfValidatorRegex(array('pattern' = '[0-9]{8}'))

  Doesn't seem to let anything through...

  At a bit of a loss as using some online regex testers shows either of
  these to be ok, but Symfony doesn't like it??

  Any ideas?

  Thanks,
  John

 --
 Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---