[fw-general] URL Routing and Params

2008-09-05 Thread spaceage

I'm in the early stages of designing a site with the framework and trying to
understand more fully the url/routing interaction.

Assuming the standard routing behavior of:

[URI]/controller/action/var1/value1/var2/value2

what if I want to pass vars/params using a default and/or omitted (index)
controller and/or action specified in the url?

ie. do I have to use a url of:

[URI]/index/index/var1/value1/var2/value2

to pass var/params in my url?

Is there any way around this, ie. a magic way to signal default/index for
one or both of the controller/action designators and still pass in
parameters in their place(s) without confusing the router?
-- 
View this message in context: 
http://www.nabble.com/URL-Routing-and-Params-tp19325888p19325888.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Is there a way to unsubscribe from this list?

2008-09-05 Thread Christoph Dorn




You need to send an email to: [EMAIL PROTECTED]


Dragos Roua wrote:
unsubscribe
  
  



-- 

  

  Christoph
Dorn


  
  http://www.ChristophDorn.com/

  






Re: [fw-general] URL Routing and Params

2008-09-05 Thread Michał Minicki
spaceage [EMAIL PROTECTED] napisał(a):

 Is there any way around this, ie. a magic way to signal default/index
 for one or both of the controller/action designators and still pass in
 parameters in their place(s) without confusing the router?

You are most probably trying to achieve something like below route. I.e. to 
pass all requests to one controller and action and parse all the parameters 
as dynamic var-value pairs. And if so - yes, it's possible.

$route = new Z...C...R_Route(
'*',
array('controller' = 'default', 'action' = 'index')
)



-- 
Martel Valgoerad aka Michal Minicki | [EMAIL PROTECTED] | 
http://aie.pl/martel.asc
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Idleness is not doing nothing. Idleness is being free to do anything. 
 -- Floyd Dell



Re: [fw-general] Basic dojo help and programmatic dojo example

2008-09-05 Thread Ken Petri

Thanks Matthew.

After some fiddling around, I downloaded a copy of dojo from the
dojotoolkit.org web site and replaced the code that had shipped with ZF 1.6.
This fixed the undefined node problem and the button began to render.

I implemented all of the changes you recommended for the bootstrap and the
code is now cleaner in the layout.

But I have a related question. I have been trying to discover an optimal way
to hook-up dojo with elements programmatically. Currently, I'm not using the
form view helpers to render out the elements. I'm just hard coding the HTML.

Here is the significant portion of my index view script:
-
?php $this-dojo()-javascriptCaptureStart() ?
  function alert1()
  {
alert(go 1);
  }
  function alert2()
  {
alert(go 2);
  }
?php $this-dojo()-javascriptCaptureEnd() ?

?php $this-dojo()-onLoadCaptureStart() ?
  function() {

var params1 = {
  label: I am button 1,
  onClick: alert1
};
var params2 = {
  label: I am button 2,
  onClick: alert2
};

new dijit.form.Button( params1, dojo.byId(button1));
new dijit.form.Button( params2, dojo.byId(button2));

  }
?php $this-dojo()-onLoadCaptureEnd() ? 
-

I then hard code a couple of buttons and give them the proper ids so that
dojo.byId can find them.

Is this a reasonable approach. Can you recommend something more streamlined,
cleaner, clearer? Are there emerging best practices?

Again, thanks for you time on this.

- ken



Matthew Weier O'Phinney-3 wrote:
 
 -- Ken Petri [EMAIL PROTECTED] wrote
 (on Thursday, 04 September 2008, 01:54 PM -0700):
 I need some (I hope) very basic help in getting dojo up and working and
 some
 notion of how to do not have to use the declarative syntax would also be
 great.
 
 First off, programmatic usage is the default, so nothing specialy you
 need to do there.
 
 Here are the contents of the files in question:
 bootstrap.php:
 -
 ?php 
 // ** Check to see if the environment is already setup **
 if (isset($bootstrap)  $bootstrap) { 
 // Enable all errors so we'll know when something goes wrong. 
 error_reporting(E_ALL | E_STRICT);  
 ini_set('display_startup_errors', 1);  
 ini_set('display_errors', 1); 
  
 set_include_path('../library');  
  
 require_once Zend/Loader.php; 
 Zend_Loader::registerAutoload(); 
 
 } 
 
  
 $frontController = Zend_Controller_Front::getInstance(); 
 $frontController-setControllerDirectory('../application/controllers'); 
 $frontController-setParam('env', 'development');
 
 // set up dojo helper
 $viewRenderer =
 Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
 $viewRenderer-initView();
 Zend_Dojo::enableView($viewRenderer-view); 
 
 That's all you need to do there. I'd do the following additional stuff:
 
 $viewRenderer-view-dojo()-setLocalPath('/js/dojo/dojo/dojo.js')
   
 -addStyleSheetModule('dijit.themes.tundra')
-disable();
 
 //set up the layout
 Zend_Layout::startMvc(array('layoutPath' =
 '../application/views/layouts'));
 -
 
 layout.phtml:
 -
 ?php echo $this-doctype('XHTML1_STRICT'); ?
 
 html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
 head
 ?php echo $this-headTitle(); ? 
 ?php echo $this-headMeta(); ? 
 ?php echo $this-headLink(); ? 
 ?php echo $this-headStyle(); ? 
 ?php 
   if ($this-dojo()-isEnabled()) :
 $this-dojo()-setLocalPath('/js/dojo/dojo/dojo.js')
  -addStyleSheetModule('dijit.themes.tundra');
 echo $this-dojo(); 
   endif;
 ?
 
 If you do as I suggest earlier, then all you need to do here is:
 
 ?php echo $this-dojo(); ?
 
 ?php echo $this-headScript(); ? 
 /head
 body class=tundra
 
 ?php echo $this-layout()-content; ?
 
 /body
 /html
 -
 
 and the index view, index.phtml
 -
 ?php 
   $this-dojo()-enable()
-setDjConfigOption('parseOnLoad', true)
 
 Only set parseOnLoad if you need to --- i.e., if you're creating markup
 that defines dijits. It looks like you're doing that below, though.
 
-requireModule('dijit.form.Button');
 ?
 
 button dojoType=dijit.form.Button id=helloButton
Hello World!
script type=dojo/method event=onClick
 alert('You pressed the button');
 /script
 /button

 -
 
 What happens: 
 The page loads but I get a JavaScript error that says node is undefined
 coming from bootstrap.js in the dojo library. The page is blank and,
 looking
 at the DOM's view of the HTML (using Firebug) I see only:div
 style=display: none;/
 
 Is the path to dojo correct? did dojo.js load? does FireBug report that
 dijit.form.Button loaded?
 
 So, something is wrong, but I sure can't figure out what.
 
 Also, if someone has a fix for this, I would certainly appreciate an
 example
 of rendering out the same button example but programmatically. I would
 rather not have all those proprietary attributes in the button code.
 
 First 

[fw-general] Question about Zend_Dojo

2008-09-05 Thread Christoph Dorn




Hi Matthew,

I have decided to re-write my FirePHP test site with ZF and dojo so we
can see how the three can work together.

I have managed to setup a basic app that does a json-rpc request. Now I
am trying to use some of the dijit components but am running into
problems.

Can you take a look at this file:
http://code.google.com/p/firephp/source/browse/trunk/DevApp/application/views/scripts/index/index.phtml

I am trying to render an AccordionPane but am not sure what I need to
put in the HTML and what I can pass to $view-accordionPane(). I am
also getting a "node is undefined" error in the console.

When I got this working I'll add all available elements and make a nice
demo out of it that you can point users to.

You could also take a look at the rest of the app to see if I have done
everything how you intended.

-- 

  

  Christoph
Dorn


  
  http://www.ChristophDorn.com/

  






Re: [fw-general] Basic dojo help and programmatic dojo example

2008-09-05 Thread Matthew Weier O'Phinney
-- Ken Petri [EMAIL PROTECTED] wrote
(on Friday, 05 September 2008, 12:30 AM -0700):
 After some fiddling around, I downloaded a copy of dojo from the
 dojotoolkit.org web site and replaced the code that had shipped with ZF 1.6.
 This fixed the undefined node problem and the button began to render.
 
 I implemented all of the changes you recommended for the bootstrap and the
 code is now cleaner in the layout.
 
 But I have a related question. I have been trying to discover an optimal way
 to hook-up dojo with elements programmatically. Currently, I'm not using the
 form view helpers to render out the elements. I'm just hard coding the HTML.
 
 Here is the significant portion of my index view script:
 -
 ?php $this-dojo()-javascriptCaptureStart() ?
   function alert1()
   {
 alert(go 1);
   }
   function alert2()
   {
 alert(go 2);
   }
 ?php $this-dojo()-javascriptCaptureEnd() ?
 
 ?php $this-dojo()-onLoadCaptureStart() ?
   function() {
 
 var params1 = {
   label: I am button 1,
   onClick: alert1
 };
 var params2 = {
   label: I am button 2,
   onClick: alert2
 };
 
 new dijit.form.Button( params1, dojo.byId(button1));
 new dijit.form.Button( params2, dojo.byId(button2));
 
   }
 ?php $this-dojo()-onLoadCaptureEnd() ? 
 -
 
 I then hard code a couple of buttons and give them the proper ids so that
 dojo.byId can find them.
 
 Is this a reasonable approach. Can you recommend something more streamlined,
 cleaner, clearer? Are there emerging best practices?

Everything you do above for creating the buttons (not the functions they
attach to, though) is already possible with the view helpers; it makes
no sense to me to write the code manually, as this is what the
integration points try to solve.

You can create your buttons like this:

?= $this-button('button1', 'I am button 1', array('onClick' = 'alert1')) 
?
?= $this-button('button2', 'I am button 2', array('onClick' = 'alert2')) 
?

which will create all the functionality you need, and, by default, do it
programmatically. You would then only need the code you provided for
creating the alert1/alert2 functions. There is really zero reason to
write the javascript manually as you are doing here.

 Matthew Weier O'Phinney-3 wrote:
  
  -- Ken Petri [EMAIL PROTECTED] wrote
  (on Thursday, 04 September 2008, 01:54 PM -0700):
  I need some (I hope) very basic help in getting dojo up and working and
  some
  notion of how to do not have to use the declarative syntax would also be
  great.
  
  First off, programmatic usage is the default, so nothing specialy you
  need to do there.
  
  Here are the contents of the files in question:
  bootstrap.php:
  -
  ?php 
  // ** Check to see if the environment is already setup **
  if (isset($bootstrap)  $bootstrap) { 
  // Enable all errors so we'll know when something goes wrong. 
  error_reporting(E_ALL | E_STRICT);  
  ini_set('display_startup_errors', 1);  
  ini_set('display_errors', 1); 
   
  set_include_path('../library');  
   
  require_once Zend/Loader.php; 
  Zend_Loader::registerAutoload(); 
  
  } 
  
   
  $frontController = Zend_Controller_Front::getInstance(); 
  $frontController-setControllerDirectory('../application/controllers'); 
  $frontController-setParam('env', 'development');
  
  // set up dojo helper
  $viewRenderer =
  Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
  $viewRenderer-initView();
  Zend_Dojo::enableView($viewRenderer-view); 
  
  That's all you need to do there. I'd do the following additional stuff:
  
  $viewRenderer-view-dojo()-setLocalPath('/js/dojo/dojo/dojo.js')

  -addStyleSheetModule('dijit.themes.tundra')
 -disable();
  
  //set up the layout
  Zend_Layout::startMvc(array('layoutPath' =
  '../application/views/layouts'));
  -
  
  layout.phtml:
  -
  ?php echo $this-doctype('XHTML1_STRICT'); ?
  
  html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
  head
  ?php echo $this-headTitle(); ? 
  ?php echo $this-headMeta(); ? 
  ?php echo $this-headLink(); ? 
  ?php echo $this-headStyle(); ? 
  ?php 
if ($this-dojo()-isEnabled()) :
  $this-dojo()-setLocalPath('/js/dojo/dojo/dojo.js')
   -addStyleSheetModule('dijit.themes.tundra');
  echo $this-dojo(); 
endif;
  ?
  
  If you do as I suggest earlier, then all you need to do here is:
  
  ?php echo $this-dojo(); ?
  
  ?php echo $this-headScript(); ? 
  /head
  body class=tundra
  
  ?php echo $this-layout()-content; ?
  
  /body
  /html
  -
  
  and the index view, index.phtml
  -
  ?php 
$this-dojo()-enable()
 -setDjConfigOption('parseOnLoad', true)
  
  Only set parseOnLoad if you need to --- i.e., if you're creating markup
  that defines dijits. It looks like you're doing that below, though.
  
 

Re: [fw-general] Question about Zend_Dojo

2008-09-05 Thread Matthew Weier O'Phinney
-- Christoph Dorn [EMAIL PROTECTED] wrote
(on Friday, 05 September 2008, 01:39 AM -0700):
 I have decided to re-write my FirePHP test site with ZF and dojo so we
 can see how the three can work together.
 
 I have managed to setup a basic app that does a json-rpc request. Now I
 am trying to use some of the dijit components but am running into problems.
 
 Can you take a look at this file:
 http://code.google.com/p/firephp/source/browse/trunk/DevApp/application/views/scripts/index/index.phtml
 
 I am trying to render an AccordionPane but am not sure what I need to
 put in the HTML and what I can pass to $view-accordionPane(). I am also
 getting a node is undefined error in the console.

I'll address the rest of this later, but somebody else reported the
node is undefined error earlier, and said they solved it by choosing
to either use the CDN and/or downloading a Dojo distribution from the
Dojo website. Try that and see if the error goes away.


 When I got this working I'll add all available elements and make a nice
 demo out of it that you can point users to.
 
 You could also take a look at the rest of the app to see if I have done
 everything how you intended.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


[fw-general] Zend_Form and Ajax Reload

2008-09-05 Thread Stefan Sturm
Hello,

I have a Form with two Dropdown boxes. When the first Box is changed,
there should be an Ajax Request getting the Value for the second box.
Is this possible using Zend_Form?

If so, perhaps somebody can give me a hint or two?

Greetings,

Stefan Sturm


[fw-general] Can someone help about zend multipage form? Example from ZF docs doesnt work

2008-09-05 Thread vladimirn

Hello all,
I already posted this, but no one answered, so  i deleted this post and i
will try with this one.
I used Example 19.9. Registration Form Example.
I did change the name of the file, and added some fields inside subforms and
delete some others.
SO imo, this should not cause this example from not working. Actually it
works, and all data provided do the validation, and button save and continue
works as well, but!
On every page i am getting this message:
Strict Standards: Declaration of forms_Registration::setSubFormDecorators()
should be compatible with that of Zend_Form::setSubFormDecorators()

What i need to paste here to helpp you to help me? :)
I didnt change anything from egzample in Zend docs but some fields inside
subforms.

-- 
View this message in context: 
http://www.nabble.com/Can-someone-help-about-zend-multipage-form--Example-from-ZF-docs-doesnt-work-tp19332460p19332460.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Basic dojo help and programmatic dojo example

2008-09-05 Thread Ken Petri

Thank you. This interchange was extremely helpful for me. You and the others
working on ZF are doing a fantastic job modernizing PHP coding practices.
And this Nabble forum is a great support system.



Matthew Weier O'Phinney-3 wrote:
 
 -- Ken Petri [EMAIL PROTECTED] wrote
 (on Friday, 05 September 2008, 12:30 AM -0700):
 After some fiddling around, I downloaded a copy of dojo from the
 dojotoolkit.org web site and replaced the code that had shipped with ZF
 1.6.
 This fixed the undefined node problem and the button began to render.
 
 I implemented all of the changes you recommended for the bootstrap and
 the
 code is now cleaner in the layout.
 
 But I have a related question. I have been trying to discover an optimal
 way
 to hook-up dojo with elements programmatically. Currently, I'm not using
 the
 form view helpers to render out the elements. I'm just hard coding the
 HTML.
 
 Here is the significant portion of my index view script:
 -
 ?php $this-dojo()-javascriptCaptureStart() ?
   function alert1()
   {
 alert(go 1);
   }
   function alert2()
   {
 alert(go 2);
   }
 ?php $this-dojo()-javascriptCaptureEnd() ?
 
 ?php $this-dojo()-onLoadCaptureStart() ?
   function() {
 
 var params1 = {
   label: I am button 1,
   onClick: alert1
 };
 var params2 = {
   label: I am button 2,
   onClick: alert2
 };
 
 new dijit.form.Button( params1, dojo.byId(button1));
 new dijit.form.Button( params2, dojo.byId(button2));
 
   }
 ?php $this-dojo()-onLoadCaptureEnd() ? 
 -
 
 I then hard code a couple of buttons and give them the proper ids so that
 dojo.byId can find them.
 
 Is this a reasonable approach. Can you recommend something more
 streamlined,
 cleaner, clearer? Are there emerging best practices?
 
 Everything you do above for creating the buttons (not the functions they
 attach to, though) is already possible with the view helpers; it makes
 no sense to me to write the code manually, as this is what the
 integration points try to solve.
 
 You can create your buttons like this:
 
 ?= $this-button('button1', 'I am button 1', array('onClick' =
 'alert1')) ?
 ?= $this-button('button2', 'I am button 2', array('onClick' =
 'alert2')) ?
 
 which will create all the functionality you need, and, by default, do it
 programmatically. You would then only need the code you provided for
 creating the alert1/alert2 functions. There is really zero reason to
 write the javascript manually as you are doing here.
 
 Matthew Weier O'Phinney-3 wrote:
  
  -- Ken Petri [EMAIL PROTECTED] wrote
  (on Thursday, 04 September 2008, 01:54 PM -0700):
  I need some (I hope) very basic help in getting dojo up and working
 and
  some
  notion of how to do not have to use the declarative syntax would also
 be
  great.
  
  First off, programmatic usage is the default, so nothing specialy you
  need to do there.
  
  Here are the contents of the files in question:
  bootstrap.php:
  -
  ?php 
  // ** Check to see if the environment is already setup **
  if (isset($bootstrap)  $bootstrap) { 
  // Enable all errors so we'll know when something goes wrong. 
  error_reporting(E_ALL | E_STRICT);  
  ini_set('display_startup_errors', 1);  
  ini_set('display_errors', 1); 
   
  set_include_path('../library');  
   
  require_once Zend/Loader.php; 
  Zend_Loader::registerAutoload(); 
  
  } 
  
   
  $frontController = Zend_Controller_Front::getInstance(); 
 
 $frontController-setControllerDirectory('../application/controllers'); 
  $frontController-setParam('env', 'development');
  
  // set up dojo helper
  $viewRenderer =
  Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
  $viewRenderer-initView();
  Zend_Dojo::enableView($viewRenderer-view); 
  
  That's all you need to do there. I'd do the following additional stuff:
  
  $viewRenderer-view-dojo()-setLocalPath('/js/dojo/dojo/dojo.js')

  -addStyleSheetModule('dijit.themes.tundra')
 -disable();
  
  //set up the layout
  Zend_Layout::startMvc(array('layoutPath' =
  '../application/views/layouts'));
  -
  
  layout.phtml:
  -
  ?php echo $this-doctype('XHTML1_STRICT'); ?
  
  html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
  head
  ?php echo $this-headTitle(); ? 
  ?php echo $this-headMeta(); ? 
  ?php echo $this-headLink(); ? 
  ?php echo $this-headStyle(); ? 
  ?php 
if ($this-dojo()-isEnabled()) :
  $this-dojo()-setLocalPath('/js/dojo/dojo/dojo.js')
   -addStyleSheetModule('dijit.themes.tundra');
  echo $this-dojo(); 
endif;
  ?
  
  If you do as I suggest earlier, then all you need to do here is:
  
  ?php echo $this-dojo(); ?
  
  ?php echo $this-headScript(); ? 
  /head
  body class=tundra
  
  ?php echo $this-layout()-content; ?
  
  /body
  /html
  -
  
  and the index view, index.phtml
  

Re: [fw-general] Question about Zend_Dojo

2008-09-05 Thread Christoph Dorn

 I'll address the rest of this later, but somebody else reported the
 node is undefined error earlier, and said they solved it by choosing
 to either use the CDN and/or downloading a Dojo distribution from the
 Dojo website. Try that and see if the error goes away.
   
Yes using:

$view-dojo()-setCdnBase(Zend_Dojo::CDN_BASE_AOL)

works. Also works if you download 1.1.1 manually. I looked at the source
and it looks like their build script adds some code to files that is
needed. Shame that we cannot use svn:externals. Would be great to get
that setup so we don't have to commit all of dojo to every application.
I would prefer the svn:externals route for development as the code on
the CDN is minified causing variable names to be shortened which makes
it hard to debug.


I got the Accordion mostly working now. At the moment I have set the
$content variable of the accordionContainer to the return value of the
accordionPane helper. Is that correct? How do I add more than one
accordionPane to accordionContainer?

Christoph


[fw-general] Zend Dojo webinar

2008-09-05 Thread Aldemar Bernal

Hi,

I couldn't attend to the past Zend Dojo webinar, I can see there are slides 
of it (http://www.zend.com/topics/Zend-Framework-Dojo-webinar.pdf) but any 
idea if it is recorded somewhere?


Best,

Aldemar



Re: [fw-general] Basic dojo help and programmatic dojo example

2008-09-05 Thread Matthew Weier O'Phinney
-- Ken Petri [EMAIL PROTECTED] wrote
(on Friday, 05 September 2008, 07:41 AM -0700):
 Thank you. This interchange was extremely helpful for me. 

Glad I could be of help!

 You and the others working on ZF are doing a fantastic job modernizing
 PHP coding practices.  And this Nabble forum is a great support
 system.

The fun part is that most of us on the Nabble forum are actually using
a mailing list. :) Nabble integration was added as an afterthought to a)
provide a browseable archive of messages, and b) appeal to those like
yourself who prefer to use a forum interface. I'm glad that the strategy
is working!

 Matthew Weier O'Phinney-3 wrote:
  
  -- Ken Petri [EMAIL PROTECTED] wrote
  (on Friday, 05 September 2008, 12:30 AM -0700):
  After some fiddling around, I downloaded a copy of dojo from the
  dojotoolkit.org web site and replaced the code that had shipped with ZF
  1.6.
  This fixed the undefined node problem and the button began to render.
  
  I implemented all of the changes you recommended for the bootstrap and
  the
  code is now cleaner in the layout.
  
  But I have a related question. I have been trying to discover an optimal
  way
  to hook-up dojo with elements programmatically. Currently, I'm not using
  the
  form view helpers to render out the elements. I'm just hard coding the
  HTML.
  
  Here is the significant portion of my index view script:
  -
  ?php $this-dojo()-javascriptCaptureStart() ?
function alert1()
{
  alert(go 1);
}
function alert2()
{
  alert(go 2);
}
  ?php $this-dojo()-javascriptCaptureEnd() ?
  
  ?php $this-dojo()-onLoadCaptureStart() ?
function() {
  
  var params1 = {
label: I am button 1,
onClick: alert1
  };
  var params2 = {
label: I am button 2,
onClick: alert2
  };
  
  new dijit.form.Button( params1, dojo.byId(button1));
  new dijit.form.Button( params2, dojo.byId(button2));
  
}
  ?php $this-dojo()-onLoadCaptureEnd() ? 
  -
  
  I then hard code a couple of buttons and give them the proper ids so that
  dojo.byId can find them.
  
  Is this a reasonable approach. Can you recommend something more
  streamlined,
  cleaner, clearer? Are there emerging best practices?
  
  Everything you do above for creating the buttons (not the functions they
  attach to, though) is already possible with the view helpers; it makes
  no sense to me to write the code manually, as this is what the
  integration points try to solve.
  
  You can create your buttons like this:
  
  ?= $this-button('button1', 'I am button 1', array('onClick' =
  'alert1')) ?
  ?= $this-button('button2', 'I am button 2', array('onClick' =
  'alert2')) ?
  
  which will create all the functionality you need, and, by default, do it
  programmatically. You would then only need the code you provided for
  creating the alert1/alert2 functions. There is really zero reason to
  write the javascript manually as you are doing here.
  
  Matthew Weier O'Phinney-3 wrote:
   
   -- Ken Petri [EMAIL PROTECTED] wrote
   (on Thursday, 04 September 2008, 01:54 PM -0700):
   I need some (I hope) very basic help in getting dojo up and working
  and
   some
   notion of how to do not have to use the declarative syntax would also
  be
   great.
   
   First off, programmatic usage is the default, so nothing specialy you
   need to do there.
   
   Here are the contents of the files in question:
   bootstrap.php:
   -
   ?php 
   // ** Check to see if the environment is already setup **
   if (isset($bootstrap)  $bootstrap) { 
   // Enable all errors so we'll know when something goes wrong. 
   error_reporting(E_ALL | E_STRICT);  
   ini_set('display_startup_errors', 1);  
   ini_set('display_errors', 1); 

   set_include_path('../library');  

   require_once Zend/Loader.php; 
   Zend_Loader::registerAutoload(); 
   
   } 
   

   $frontController = Zend_Controller_Front::getInstance(); 
  
  $frontController-setControllerDirectory('../application/controllers'); 
   $frontController-setParam('env', 'development');
   
   // set up dojo helper
   $viewRenderer =
   Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
   $viewRenderer-initView();
   Zend_Dojo::enableView($viewRenderer-view); 
   
   That's all you need to do there. I'd do the following additional stuff:
   
   $viewRenderer-view-dojo()-setLocalPath('/js/dojo/dojo/dojo.js')
 
   -addStyleSheetModule('dijit.themes.tundra')
  -disable();
   
   //set up the layout
   Zend_Layout::startMvc(array('layoutPath' =
   '../application/views/layouts'));
   -
   
   layout.phtml:
   -
   ?php echo $this-doctype('XHTML1_STRICT'); ?
   
   html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
   head
   ?php echo $this-headTitle(); ? 
   ?php echo $this-headMeta(); ? 
   

Re: [fw-general] Zend Dojo webinar

2008-09-05 Thread Matthew Weier O'Phinney
-- Aldemar Bernal [EMAIL PROTECTED] wrote
(on Friday, 05 September 2008, 11:01 AM -0500):
 I couldn't attend to the past Zend Dojo webinar, I can see there are 
 slides of it (http://www.zend.com/topics/Zend-Framework-Dojo-webinar.pdf) 
 but any idea if it is recorded somewhere?

It was recorded, but has not yet been posted to the site. Check back
sometime later today or early next week.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] Question about Zend_Dojo

2008-09-05 Thread Christoph Dorn

 Actually, if you're using SVN already for ZF, we *do* use svn:externals
 to pull in dojo -- you can see it in the exernals/dojo/ directory of the
 standard library.
   
Right. I am using the same source
(http://svn.dojotoolkit.org/src/branches/1.1) and it has the same node
not found issue.
Also http://svn.dojotoolkit.org/src/tags/release-1.1.1 does not work either.
As mentioned, the dojo build system seems to add some code to the files
that makes it work.

Christoph




Re: [fw-general] Question about Zend_Dojo

2008-09-05 Thread Christoph Dorn






  Easiest way is to use content capturing:

?  $this-dojo()-accordionContainer()-captureStart('identifier', $params, $attribs) ?
?= $this-dojo()-contentPane('paneIdentifier2', $content, $params, $attribs) ?
?= $this-dojo()-contentPane('paneIdentifier2', $content, $params, $attribs) ?
?= $this-dojo()-accordionContainer()-captureEnd('identifier') ?

$params and $attribs are always optional; $params are Dijit parameters,
$attribs are HTML attributes.

The captureStart/captureEnd pairs can also be used with the contentPanes
themselves, using the same syntax as for the container.
  


Nearly there. I don't like using the ?= syntax so I have:

print $this-accordionContainer()-captureStart(
 'accordion1',
 array('title' = 'Pane Title'),
 array('style' = 'background-color: lightgray;'));
print $this-accordionPane(
 'p1', 
 'Pane 1 Content', 
 array('title' = 'Pane 1 Title'),
 array('style' = 'background-color: lightgray;'));
print $this-accordionPane(
 'p2', 
 'Pane 2 Content', 
 array('title' = 'Pane 2 Title'),
 array('style' = 'background-color: lightgray;'));
print $this-accordionContainer()-captureEnd('accordion1');


Now according to your sample I should omit the "print" for the first
$this-accordionContainer() BUT if I leave it out it does not work.
Problem is if I leave it in in inserts an extra "1" inside the
accordion div.


--

  

  Christoph
Dorn


  
  http://www.ChristophDorn.com/

  






Re: [fw-general] Zend_Translate TMX doesn't downgrade?

2008-09-05 Thread Thomas Weidner
Simply said, you wanted to change the language to a language where no 
translation is available at all.
It seems that you have only empty 'nl_NL' files and wanted to 
setLocale('nl_NL');


This has nothing to do with downgrading. Downgrading does work and is always 
done when translating.
But you can not set a language where you have not added translations before 
as then there would nothing be there to downgrade to.


And beware: The TMX format defines the language within the source file. The 
locale parameter is ignored for sourcefiles which define there locale 
themself.


Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: Codiac [EMAIL PROTECTED]

To: fw-general@lists.zend.com
Sent: Friday, September 05, 2008 5:00 PM
Subject: [fw-general] Zend_Translate TMX doesn't downgrade?




Hi all,

I've switched from a CSV file to using TMX for my translations, but it 
seems

there's a problem with the TMX adapter. According to the manual, if a
language can't be found it downgrades the language code (without the
region). However I get the following message, even with language 'nl' in 
my

TMX file:

Fatal error: Uncaught exception 'Zend_Translate_Exception' with message 
'No

translation for the language 'nl_NL' available.'

This is in my bootstrap:

$locale = new Zend_Locale();
self::$registry-Zend_Locale = $locale;

$translate = new Zend_Translate('tmx', self::$basepath . '/languages');
self::$registry-Zend_Translate = $translate;


However, if I adjust the following line:
$translate = new Zend_Translate('tmx', self::$basepath . '/languages',
'nl');

Everything works fine. Can someone verify if this is a bug?

Regards, TJ.
--
View this message in context: 
http://www.nabble.com/Zend_Translate-TMX-doesn%27t-downgrade--tp19333160p19333160.html
Sent from the Zend Framework mailing list archive at Nabble.com. 




Re: [fw-general] Zend_Translate TMX doesn't downgrade?

2008-09-05 Thread Taco Jung
Thomas,

The nl (not nl_NL) translations are in the source file:

?xml version=1.0 encoding=UTF-8?
tmx version=2.0 xmlns=http://www.lisa.org/tmx20;
  header adminlang=en creationtool=locale4j creationtoolversion=1.1
o-tmf=unknown segtype=block srclang=*all*/
  body
tu tuid=Add
  tuv xml:lang=nl
segToevoegen/seg
  /tuv
  tuv xml:lang=en
segAdd/seg
  /tuv
/tu

I'm trying to autohandle the languages, so I'm especially interested in your
remark about The locale parameter is ignored for sourcefiles which define
there locale themself.

What does that actually mean? That I can't autohandle the language? From the
manual I read:

 TMX files can have several languages within the same file. All other
included languages are added automatically, so you do not have to call
addLanguage().

Shouldn't nl_NL downgrade to nl and therefore the language is autohandled
and fetched when translating?

Regards, TJ.



On Fri, Sep 5, 2008 at 7:29 PM, Thomas Weidner [EMAIL PROTECTED]wrote:

 Simply said, you wanted to change the language to a language where no
 translation is available at all.
 It seems that you have only empty 'nl_NL' files and wanted to
 setLocale('nl_NL');

 This has nothing to do with downgrading. Downgrading does work and is
 always done when translating.
 But you can not set a language where you have not added translations before
 as then there would nothing be there to downgrade to.

 And beware: The TMX format defines the language within the source file. The
 locale parameter is ignored for sourcefiles which define there locale
 themself.

 Greetings
 Thomas Weidner, I18N Team Leader, Zend Framework
 http://www.thomasweidner.com

 - Original Message - From: Codiac [EMAIL PROTECTED]
 To: fw-general@lists.zend.com
 Sent: Friday, September 05, 2008 5:00 PM
 Subject: [fw-general] Zend_Translate TMX doesn't downgrade?




 Hi all,

 I've switched from a CSV file to using TMX for my translations, but it
 seems
 there's a problem with the TMX adapter. According to the manual, if a
 language can't be found it downgrades the language code (without the
 region). However I get the following message, even with language 'nl' in
 my
 TMX file:

 Fatal error: Uncaught exception 'Zend_Translate_Exception' with message
 'No
 translation for the language 'nl_NL' available.'

 This is in my bootstrap:

 $locale = new Zend_Locale();
 self::$registry-Zend_Locale = $locale;

 $translate = new Zend_Translate('tmx', self::$basepath . '/languages');
 self::$registry-Zend_Translate = $translate;


 However, if I adjust the following line:
 $translate = new Zend_Translate('tmx', self::$basepath . '/languages',
 'nl');

 Everything works fine. Can someone verify if this is a bug?

 Regards, TJ.
 --
 View this message in context:
 http://www.nabble.com/Zend_Translate-TMX-doesn%27t-downgrade--tp19333160p19333160.html
 Sent from the Zend Framework mailing list archive at Nabble.com.





Re: [fw-general] Question about Zend_Dojo

2008-09-05 Thread Matthew Weier O'Phinney
-- Christoph Dorn [EMAIL PROTECTED] wrote
(on Friday, 05 September 2008, 10:14 AM -0700):
 
  Easiest way is to use content capturing:
 
  ?  $this-dojo()-accordionContainer()-captureStart('identifier', 
  $params, $attribs) ?
  ?= $this-dojo()-contentPane('paneIdentifier2', $content, $params, 
  $attribs) ?
  ?= $this-dojo()-contentPane('paneIdentifier2', $content, $params, 
  $attribs) ?
  ?= $this-dojo()-accordionContainer()-captureEnd('identifier') ?
 
  $params and $attribs are always optional; $params are Dijit parameters,
  $attribs are HTML attributes.
 
  The captureStart/captureEnd pairs can also be used with the contentPanes
  themselves, using the same syntax as for the container.

 
 Nearly there. I don't like using the ?= syntax so I have:
 
 print $this-accordionContainer()-captureStart(

You shouldn't do this, but you already know that...

 'accordion1',
 array('title' = 'Pane Title'),
 array('style' = 'background-color: lightgray;'));
 print $this-accordionPane(

oh, and use echo. echo is a language construct, print is a function.
echo operates faster. Minor optimization.

 'p1',
 'Pane 1 Content',
 array('title' = 'Pane 1 Title'),
 array('style' = 'background-color: lightgray;'));
 print $this-accordionPane(
 'p2',
 'Pane 2 Content',
 array('title' = 'Pane 2 Title'),
 array('style' = 'background-color: lightgray;'));
 print $this-accordionContainer()-captureEnd('accordion1');
 
 
 Now according to your sample I should omit the print for the first
 $this-accordionContainer() BUT if I leave it out it does not work.
 Problem is if I leave it in in inserts an extra 1 inside the accordion
 div.

Odd. I just ran your exact example through, both with and without the
initial print statement, and it worked fine. 

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] Question about Zend_Dojo

2008-09-05 Thread Sudheer



Actually, if you're using SVN already for ZF, we *do* use svn:externals
to pull in dojo -- you can see it in the exernals/dojo/ directory of the
standard library.
  
  

Right. I am using the same source
(http://svn.dojotoolkit.org/src/branches/1.1) and it has the same node
not found issue.
Also http://svn.dojotoolkit.org/src/tags/release-1.1.1 does not work either.
As mentioned, the dojo build system seems to add some code to the files
that makes it work.



Odd, as I've tested all the dijits against the externals previously.

As I said, I'll continue to look into it. As it is, you can actually
create your own builds using either the Dojo shipped with 1.6.0 or via
externals. I'll post more information on how to do this soon.

  
I had similar issues with svn:externals 
http://svn.dojotoolkit.org/src/tags/release-1.1.1 which I added in my 
SVN(not the one used in externals). DateTextBox was not working due a 
file missing in the cldr direcctory. So far, Zend_Dojo works well with 
the code locally added(downloaded from 
http://download.dojotoolkit.org/release-1.1.1/dojo-release-1.1.1-mini.tar.gz 
).



--

With warm regards,
Sudheer. S
http://binaryvibes.co.in



Re: [fw-general] Zend_Translate TMX doesn't downgrade?

2008-09-05 Thread Thomas Weidner

There is one mistake in your thoughts.

Zend_Translate will automatically translate and downgrade when a translation 
is not available.

BUT:
You can not set a language where you have not defined a single string.

And regarding to you sourcefile you just defined en and nl... but no 
other language.
So you can only set those two languages for translation as no other was 
defined.


Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: Taco Jung [EMAIL PROTECTED]

To: fw-general@lists.zend.com
Sent: Friday, September 05, 2008 8:10 PM
Subject: Re: [fw-general] Zend_Translate TMX doesn't downgrade?



Thomas,

The nl (not nl_NL) translations are in the source file:

?xml version=1.0 encoding=UTF-8?
tmx version=2.0 xmlns=http://www.lisa.org/tmx20;
 header adminlang=en creationtool=locale4j creationtoolversion=1.1
o-tmf=unknown segtype=block srclang=*all*/
 body
   tu tuid=Add
 tuv xml:lang=nl
   segToevoegen/seg
 /tuv
 tuv xml:lang=en
   segAdd/seg
 /tuv
   /tu

I'm trying to autohandle the languages, so I'm especially interested in 
your

remark about The locale parameter is ignored for sourcefiles which define
there locale themself.

What does that actually mean? That I can't autohandle the language? From 
the

manual I read:

 TMX files can have several languages within the same file. All other
included languages are added automatically, so you do not have to call
addLanguage().

Shouldn't nl_NL downgrade to nl and therefore the language is autohandled
and fetched when translating?

Regards, TJ.



On Fri, Sep 5, 2008 at 7:29 PM, Thomas Weidner 
[EMAIL PROTECTED]wrote:



Simply said, you wanted to change the language to a language where no
translation is available at all.
It seems that you have only empty 'nl_NL' files and wanted to
setLocale('nl_NL');

This has nothing to do with downgrading. Downgrading does work and is
always done when translating.
But you can not set a language where you have not added translations 
before

as then there would nothing be there to downgrade to.

And beware: The TMX format defines the language within the source file. 
The

locale parameter is ignored for sourcefiles which define there locale
themself.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - From: Codiac [EMAIL PROTECTED]
To: fw-general@lists.zend.com
Sent: Friday, September 05, 2008 5:00 PM
Subject: [fw-general] Zend_Translate TMX doesn't downgrade?





Hi all,

I've switched from a CSV file to using TMX for my translations, but it
seems
there's a problem with the TMX adapter. According to the manual, if a
language can't be found it downgrades the language code (without the
region). However I get the following message, even with language 'nl' in
my
TMX file:

Fatal error: Uncaught exception 'Zend_Translate_Exception' with message
'No
translation for the language 'nl_NL' available.'

This is in my bootstrap:

$locale = new Zend_Locale();
self::$registry-Zend_Locale = $locale;

$translate = new Zend_Translate('tmx', self::$basepath . '/languages');
self::$registry-Zend_Translate = $translate;


However, if I adjust the following line:
$translate = new Zend_Translate('tmx', self::$basepath . '/languages',
'nl');

Everything works fine. Can someone verify if this is a bug?

Regards, TJ.
--
View this message in context:
http://www.nabble.com/Zend_Translate-TMX-doesn%27t-downgrade--tp19333160p19333160.html
Sent from the Zend Framework mailing list archive at Nabble.com.










[fw-general] Zend_Paginator render function and user parameters

2008-09-05 Thread Aristide ZOUNGRANA
Hi All,

 

To add the user parameters to paginator, we are obliged to use the view
helper paginationControl :

 

public function paginationControl(Zend_Paginator $paginator, $scrollingStyle
= null, $partial = null, $params = null)

 

 

 

but I think that we can do it so :

 

$paginator = new Zend_Paginator($adapter) ;

…

$paginator-render($view) ;

 

 

 

 

Or the render function does not include the user parameters, and no setters
functions in Zend_Paginator

 

/**

 * Render the paginator

 * 

 * @param  Zend_View_Interface $view 

 * @return string

 */

public function render(Zend_View_Interface $view = null)

{

if (null !== $view) {

$this-setView($view);

}

 

$view = $this-getView();



return $view-paginationControl($this);

}

 

 

 

So I think that the user parameters can be set directly to Zend_paginator.

Your opinion?

 

Best Regards,

 

Aristide R. ZOUNGRANA

La Connaissance s'accroît quand on la partage

 

 



Re: [fw-general] Zend_Translate TMX doesn't downgrade?

2008-09-05 Thread Taco Jung
Hi Thomas,

Could you elaborate a bit more on your remark about You can not set a
language where you have not defined a single string. . It's unclear to me
what you mean by that? Perhaps an example helps?

Regards, TJ.


On Fri, Sep 5, 2008 at 8:41 PM, Thomas Weidner [EMAIL PROTECTED]wrote:

 There is one mistake in your thoughts.

 Zend_Translate will automatically translate and downgrade when a
 translation is not available.
 BUT:
 You can not set a language where you have not defined a single string.

 And regarding to you sourcefile you just defined en and nl... but no
 other language.
 So you can only set those two languages for translation as no other was
 defined.

 Greetings
 Thomas Weidner, I18N Team Leader, Zend Framework
 http://www.thomasweidner.com

 - Original Message - From: Taco Jung [EMAIL PROTECTED]
 To: fw-general@lists.zend.com
 Sent: Friday, September 05, 2008 8:10 PM
 Subject: Re: [fw-general] Zend_Translate TMX doesn't downgrade?



  Thomas,

 The nl (not nl_NL) translations are in the source file:

 ?xml version=1.0 encoding=UTF-8?
 tmx version=2.0 xmlns=http://www.lisa.org/tmx20;
  header adminlang=en creationtool=locale4j creationtoolversion=1.1
 o-tmf=unknown segtype=block srclang=*all*/
  body
   tu tuid=Add
 tuv xml:lang=nl
   segToevoegen/seg
 /tuv
 tuv xml:lang=en
   segAdd/seg
 /tuv
   /tu

 I'm trying to autohandle the languages, so I'm especially interested in
 your
 remark about The locale parameter is ignored for sourcefiles which define
 there locale themself.

 What does that actually mean? That I can't autohandle the language? From
 the
 manual I read:

  TMX files can have several languages within the same file. All other
 included languages are added automatically, so you do not have to call
 addLanguage().

 Shouldn't nl_NL downgrade to nl and therefore the language is autohandled
 and fetched when translating?

 Regards, TJ.



 On Fri, Sep 5, 2008 at 7:29 PM, Thomas Weidner [EMAIL PROTECTED]
 wrote:

  Simply said, you wanted to change the language to a language where no
 translation is available at all.
 It seems that you have only empty 'nl_NL' files and wanted to
 setLocale('nl_NL');

 This has nothing to do with downgrading. Downgrading does work and is
 always done when translating.
 But you can not set a language where you have not added translations
 before
 as then there would nothing be there to downgrade to.

 And beware: The TMX format defines the language within the source file.
 The
 locale parameter is ignored for sourcefiles which define there locale
 themself.

 Greetings
 Thomas Weidner, I18N Team Leader, Zend Framework
 http://www.thomasweidner.com

 - Original Message - From: Codiac [EMAIL PROTECTED]
 To: fw-general@lists.zend.com
 Sent: Friday, September 05, 2008 5:00 PM
 Subject: [fw-general] Zend_Translate TMX doesn't downgrade?




  Hi all,

 I've switched from a CSV file to using TMX for my translations, but it
 seems
 there's a problem with the TMX adapter. According to the manual, if a
 language can't be found it downgrades the language code (without the
 region). However I get the following message, even with language 'nl' in
 my
 TMX file:

 Fatal error: Uncaught exception 'Zend_Translate_Exception' with message
 'No
 translation for the language 'nl_NL' available.'

 This is in my bootstrap:

 $locale = new Zend_Locale();
 self::$registry-Zend_Locale = $locale;

 $translate = new Zend_Translate('tmx', self::$basepath . '/languages');
 self::$registry-Zend_Translate = $translate;


 However, if I adjust the following line:
 $translate = new Zend_Translate('tmx', self::$basepath . '/languages',
 'nl');

 Everything works fine. Can someone verify if this is a bug?

 Regards, TJ.
 --
 View this message in context:

 http://www.nabble.com/Zend_Translate-TMX-doesn%27t-downgrade--tp19333160p19333160.html
 Sent from the Zend Framework mailing list archive at Nabble.com.








Re: [fw-general] Zend_Translate TMX doesn't downgrade?

2008-09-05 Thread Thomas Weidner

Prior to be able to set a wished language you must add it's source.

Example:
You add nl and en...
So you can not set fr.

Also you have not set nl_NL so you can't set it as language to use for 
default translations.


Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: Taco Jung [EMAIL PROTECTED]

To: fw-general@lists.zend.com
Sent: Friday, September 05, 2008 8:53 PM
Subject: Re: [fw-general] Zend_Translate TMX doesn't downgrade?



Hi Thomas,

Could you elaborate a bit more on your remark about You can not set a
language where you have not defined a single string. . It's unclear to me
what you mean by that? Perhaps an example helps?

Regards, TJ.


On Fri, Sep 5, 2008 at 8:41 PM, Thomas Weidner 
[EMAIL PROTECTED]wrote:



There is one mistake in your thoughts.

Zend_Translate will automatically translate and downgrade when a
translation is not available.
BUT:
You can not set a language where you have not defined a single string.

And regarding to you sourcefile you just defined en and nl... but no
other language.
So you can only set those two languages for translation as no other was
defined.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - From: Taco Jung [EMAIL PROTECTED]
To: fw-general@lists.zend.com
Sent: Friday, September 05, 2008 8:10 PM
Subject: Re: [fw-general] Zend_Translate TMX doesn't downgrade?



 Thomas,


The nl (not nl_NL) translations are in the source file:

?xml version=1.0 encoding=UTF-8?
tmx version=2.0 xmlns=http://www.lisa.org/tmx20;
 header adminlang=en creationtool=locale4j 
creationtoolversion=1.1

o-tmf=unknown segtype=block srclang=*all*/
 body
  tu tuid=Add
tuv xml:lang=nl
  segToevoegen/seg
/tuv
tuv xml:lang=en
  segAdd/seg
/tuv
  /tu

I'm trying to autohandle the languages, so I'm especially interested in
your
remark about The locale parameter is ignored for sourcefiles which 
define

there locale themself.

What does that actually mean? That I can't autohandle the language? From
the
manual I read:

 TMX files can have several languages within the same file. All other
included languages are added automatically, so you do not have to call
addLanguage().

Shouldn't nl_NL downgrade to nl and therefore the language is 
autohandled

and fetched when translating?

Regards, TJ.



On Fri, Sep 5, 2008 at 7:29 PM, Thomas Weidner [EMAIL PROTECTED]
wrote:

 Simply said, you wanted to change the language to a language where no

translation is available at all.
It seems that you have only empty 'nl_NL' files and wanted to
setLocale('nl_NL');

This has nothing to do with downgrading. Downgrading does work and is
always done when translating.
But you can not set a language where you have not added translations
before
as then there would nothing be there to downgrade to.

And beware: The TMX format defines the language within the source file.
The
locale parameter is ignored for sourcefiles which define there locale
themself.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - From: Codiac [EMAIL PROTECTED]
To: fw-general@lists.zend.com
Sent: Friday, September 05, 2008 5:00 PM
Subject: [fw-general] Zend_Translate TMX doesn't downgrade?




 Hi all,


I've switched from a CSV file to using TMX for my translations, but it
seems
there's a problem with the TMX adapter. According to the manual, if a
language can't be found it downgrades the language code (without the
region). However I get the following message, even with language 'nl' 
in

my
TMX file:

Fatal error: Uncaught exception 'Zend_Translate_Exception' with 
message

'No
translation for the language 'nl_NL' available.'

This is in my bootstrap:

$locale = new Zend_Locale();
self::$registry-Zend_Locale = $locale;

$translate = new Zend_Translate('tmx', self::$basepath . 
'/languages');

self::$registry-Zend_Translate = $translate;


However, if I adjust the following line:
$translate = new Zend_Translate('tmx', self::$basepath . '/languages',
'nl');

Everything works fine. Can someone verify if this is a bug?

Regards, TJ.
--
View this message in context:

http://www.nabble.com/Zend_Translate-TMX-doesn%27t-downgrade--tp19333160p19333160.html
Sent from the Zend Framework mailing list archive at Nabble.com.















Re: [fw-general] Question about Zend_Dojo

2008-09-05 Thread Christoph Dorn






  
'p1',
'Pane 1 Content',
array('title' = 'Pane 1 Title'),
array('style' = 'background-color: lightgray;'));
print $this-accordionPane(
'p2',
'Pane 2 Content',
array('title' = 'Pane 2 Title'),
array('style' = 'background-color: lightgray;'));
print $this-accordionContainer()-captureEnd('accordion1');


Now according to your sample I should omit the "print" for the first
$this-accordionContainer() BUT if I leave it out it does not work.
Problem is if I leave it in in inserts an extra "1" inside the accordion
div.

  
  
Odd. I just ran your exact example through, both with and without the
initial print statement, and it worked fine. 
  


My bad. Was a dojo issue. Was missing "height: 300px;" for the
accordionConatiner.

Let me know when you have had a chance to look through the app. I want
to make it a reference implementation for ZF + Dojo + FirePHP so your
feedback would be very valuable before I add all the other components.


-- 

  

  Christoph
Dorn


  
  http://www.ChristophDorn.com/

  






[fw-general] Support of PO files by Zend_Translate

2008-09-05 Thread Aristide ZOUNGRANA
Hi All,

 

Zend_Translate does not supporte PO files. This is specifically decided?

Some CMS supporte PO and MO files (Wordpress, Drupal…) and allow direct
edition in PHP application.

 

I join a file that I copy to framework prado. Developper can adapted it.

 

 

Best Regards

 

Aristide Ramondegwindé ZOUNGRANA

La Connaissance s'accroît quand on la partage

 

 



Zend_Gettext_PO.php
Description: Binary data


Re: [fw-general] Support of PO files by Zend_Translate

2008-09-05 Thread Thomas Weidner

Zend_Translate supports 9 different source formats.
This is more then most available framework support until now.
And you can do your own adapter if you are in need.

As Zend Framework is no CMS but a framework there is generally no need of a 
own editor.
There are several free tools for gettext available which can be used and it 
would make no sense at all to duplicate them within Zend Framework.


Simply use poEdit to make a mo file from your po file.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: Aristide ZOUNGRANA [EMAIL PROTECTED]

To: fw-general@lists.zend.com
Sent: Friday, September 05, 2008 9:51 PM
Subject: [fw-general] Support of PO files by Zend_Translate


Hi All,



Zend_Translate does not supporte PO files. This is specifically decided?

Some CMS supporte PO and MO files (Wordpress, Drupal.) and allow direct
edition in PHP application.



I join a file that I copy to framework prado. Developper can adapted it.





Best Regards



Aristide Ramondegwindé ZOUNGRANA

La Connaissance s'accroît quand on la partage








[fw-general] Zend Layouts for Default and Admin

2008-09-05 Thread Opel

I have set up my app directory as follows :

application
 modules
 templates
-default
-admin
 models
library


What I am trying to do is use default template for my public view and admin
template for the admin module. I need to set my bootstrap up to switch the
template for that single admin module. This was covered in Padraic Brady's
tutorial but seems to have been taken down and I didn't have a copy of the
source. 

Could anyone advice me how to do this. The searches on forum for answers all
seem to be different layouts per module.
-- 
View this message in context: 
http://www.nabble.com/Zend-Layouts-for-Default-and-Admin-tp19340002p19340002.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Layouts for Default and Admin

2008-09-05 Thread t-mow

You could register a plugin which sets the alternative layout if the module
is == admin...

For example:
if($request-getModule() == 'admin')
Zend_Layout::getMvcInstance()-setLayout('alternative');


Opel wrote:
 
 I have set up my app directory as follows :
 
 application
  modules
  templates
 -default
 -admin
  models
 library
 
 
 What I am trying to do is use default template for my public view and
 admin template for the admin module. I need to set my bootstrap up to
 switch the template for that single admin module. This was covered in
 Padraic Brady's tutorial but seems to have been taken down and I didn't
 have a copy of the source. 
 
 Could anyone advice me how to do this. The searches on forum for answers
 all seem to be different layouts per module.
 

-- 
View this message in context: 
http://www.nabble.com/Zend-Layouts-for-Default-and-Admin-tp19340002p19340177.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] getParams and getAllParams not found in registry

2008-09-05 Thread zonezero
Everything in my app works great until I try to get the parameters out of
the url http://localhost/tickets/index/view/9/ using $this-_getAllParams()
or $this-_getParam('ticket_id') in the view.phtml or the
IndexController.php files.  Did I miss something in the bootstrap.php
fileusing autoload.



*Fatal error*: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with
message 'Plugin by name _getAllParams was not found in the registry.' in
C:\apache\sites\kool_wisp\zend_framework\library\Zend\Loader\PluginLoader.php:370
Stack trace: #0
C:\apache\sites\kool_wisp\zend_framework\library\Zend\View\Abstract.php(1114):
Zend_Loader_PluginLoader-load('_getAllParams') #1
C:\apache\sites\kool_wisp\zend_framework\library\Zend\View\Abstract.php(545):
Zend_View_Abstract-_getPlugin('helper', '_getAllParams') #2
C:\apache\sites\kool_wisp\zend_framework\library\Zend\View\Abstract.php(312):
Zend_View_Abstract-getHelper('_getAllParams') #3 [internal function]:
Zend_View_Abstract-__call('_getAllParams', Array) #4
C:\apache\sites\kool_wisp\application\modules\tickets\views\scripts\index\view.phtml(8):
Zend_View-_getAllParams() #5
C:\apache\sites\kool_wisp\zend_framework\library\Zend\View.php(107):
include('C:\apache\sites...') #6
C:\apache\sites\kool_wisp\zend_framework\library\Zend\View\Abstract.php(787):
Zend_View-_run('C:\a in *
C:\apache\sites\kool_wisp\zend_framework\library\Zend\Loader\PluginLoader.php
* on line *370*


Re: [fw-general] URL Routing and Params

2008-09-05 Thread Jason Webster
One possible way would be to create a route like this (please forgive 
the laziness of my copy and paste):


   routeschedule/*/route
  
   defaults

   moduleevents/module
   controllerindex/controller
   actionindex/action
   /defaults


spaceage wrote:

So this Z...C...R approach would route all requests to a single controller
and action, no?  But what if I want to allow something like this (but not
always):

[URI]/controller/var1/value1/var2/value2

while still allowing the standard:

[URI]/controller/action/var1/value1/var2/value2



Michał Minicki wrote:
  

spaceage  napisał(a):



Is there any way around this, ie. a magic way to signal default/index
for one or both of the controller/action designators and still pass in
parameters in their place(s) without confusing the router?
  

You are most probably trying to achieve something like below route. I.e.
to 
pass all requests to one controller and action and parse all the
parameters 
as dynamic var-value pairs. And if so - yes, it's possible.


$route = new Z...C...R_Route(
'*',
array('controller' = 'default', 'action' = 'index')
)



--
Martel Valgoerad aka Michal Minicki | [EMAIL PROTECTED] |
http://aie.pl/martel.asc
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Idleness is not doing nothing. Idleness is being free to do anything. 
 -- Floyd Dell







  




Re: [fw-general] URL Routing and Params

2008-09-05 Thread spaceage

Thanks for the tip, Jason.

In thinking about this more (and having almost no familiarity with the
router at this point), I'm wondering if you can do a regex-type matching on
the url in the router, and prefix parameters with something (ie. the ::
static notation might be a good choice...) that signals the end of the
controller/action inputs and the start of parameters.  This way, if you
prefix all params consistently, you're router instruction can set controller
and/or action to default as soon as it sees the presence of your prefix. 
Eg:

[URI]/viewer/::collection/photos/::item/38

means:

controller=viewer
action=default //not specified in URL
param1='collection'
value1='photos'
param2='item'
value2='38'

etc...

Not sure if : is a valid char in a url, but that would be the general
idea...does anybody have any experience with anything like this?








Jason Webster wrote:
 
 One possible way would be to create a route like this (please forgive 
 the laziness of my copy and paste):
 
 routeschedule/*/route

 defaults
 moduleevents/module
 controllerindex/controller
 actionindex/action
 /defaults
 
 
 spaceage wrote:
 So this Z...C...R approach would route all requests to a single
 controller
 and action, no?  But what if I want to allow something like this (but not
 always):

 [URI]/controller/var1/value1/var2/value2

 while still allowing the standard:

 [URI]/controller/action/var1/value1/var2/value2



 Michał Minicki wrote:
   
 spaceage  napisał(a):

 
 Is there any way around this, ie. a magic way to signal default/index
 for one or both of the controller/action designators and still pass in
 parameters in their place(s) without confusing the router?
   
 You are most probably trying to achieve something like below route. I.e.
 to 
 pass all requests to one controller and action and parse all the
 parameters 
 as dynamic var-value pairs. And if so - yes, it's possible.

 $route = new Z...C...R_Route(
 '*',
 array('controller' = 'default', 'action' = 'index')
 )



 -- 
 Martel Valgoerad aka Michal Minicki | [EMAIL PROTECTED] |
 http://aie.pl/martel.asc
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Idleness is not doing nothing. Idleness is being free to do anything. 
  -- Floyd Dell



 

   
 
 
 

-- 
View this message in context: 
http://www.nabble.com/URL-Routing-and-Params-tp19325888p19341501.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] getParams and getAllParams not found in registry

2008-09-05 Thread Matthew Weier O'Phinney
-- zonezero [EMAIL PROTECTED] wrote
(on Friday, 05 September 2008, 03:18 PM -0700):
 Everything in my app works great until I try to get the parameters out of the
 url http://localhost/tickets/index/view/9/ using $this-_getAllParams() or
 $this-_getParam('ticket_id') in the view.phtml or the IndexController.php
 files.  Did I miss something in the bootstrap.php fileusing autoload.

The _getAllParams() and _getParam() methods are exposed in
Zend_Controller_Action, not in Zend_View. If you need access to
parameters from the request object in your view, either explicitly pass
them in or pass your request object to the view.


 Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with
 message 'Plugin by name _getAllParams was not found in the registry.' in C:\
 apache\sites\kool_wisp\zend_framework\library\Zend\Loader\PluginLoader.php:370
 Stack trace: #0 C:\apache\sites\kool_wisp\zend_framework\library\Zend\View\
 Abstract.php(1114): Zend_Loader_PluginLoader-load('_getAllParams') #1 C:\
 apache\sites\kool_wisp\zend_framework\library\Zend\View\Abstract.php(545):
 Zend_View_Abstract-_getPlugin('helper', '_getAllParams') #2 C:\apache\sites\
 kool_wisp\zend_framework\library\Zend\View\Abstract.php(312):
 Zend_View_Abstract-getHelper('_getAllParams') #3 [internal function]:
 Zend_View_Abstract-__call('_getAllParams', Array) #4 
 C:\apache\sites\kool_wisp
 \application\modules\tickets\views\scripts\index\view.phtml(8): Zend_View-
 _getAllParams() #5 C:\apache\sites\kool_wisp\zend_framework\library\Zend\
 View.php(107): include('C:\apache\sites...') #6 C:\apache\sites\kool_wisp\
 zend_framework\library\Zend\View\Abstract.php(787): Zend_View-_run('C:\a in 
 C:
 \apache\sites\kool_wisp\zend_framework\library\Zend\Loader\PluginLoader.php on
 line 370

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


[fw-general] View Helper Repository

2008-09-05 Thread DorkFest

I don't know if this already exists somewhere, but here is my first attempt
at a View Helper repository. Seems unnecessary for all of us to be writing
the same View Helpers when there could be a trading post.

http://www.zfhelpers.com

Soon, I'll give it a decent skin. For now its the stock DokuWiki skin.
Registered users may submit comments on the site. Let me know if anyone has
thoughts on the best way to organize this site and feel free to submit your
view helpers to me by email.

Thanks,
Eddie
-- 
View this message in context: 
http://www.nabble.com/View-Helper-Repository-tp19343041p19343041.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] getParams and getAllParams not found in registry

2008-09-05 Thread zonezero
I tried to do this from inside the IndexController.php file in the
viewAction() method file but with the same results.

On Fri, Sep 5, 2008 at 9:08 PM, Matthew Weier O'Phinney [EMAIL 
PROTECTED]wrote:

 -- zonezero [EMAIL PROTECTED] wrote
 (on Friday, 05 September 2008, 03:18 PM -0700):
  Everything in my app works great until I try to get the parameters out of
 the
  url http://localhost/tickets/index/view/9/ using $this-_getAllParams()
 or
  $this-_getParam('ticket_id') in the view.phtml or the
 IndexController.php
  files.  Did I miss something in the bootstrap.php fileusing autoload.

 The _getAllParams() and _getParam() methods are exposed in
 Zend_Controller_Action, not in Zend_View. If you need access to
 parameters from the request object in your view, either explicitly pass
 them in or pass your request object to the view.


  Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with
  message 'Plugin by name _getAllParams was not found in the registry.' in
 C:\
 
 apache\sites\kool_wisp\zend_framework\library\Zend\Loader\PluginLoader.php:370
  Stack trace: #0
 C:\apache\sites\kool_wisp\zend_framework\library\Zend\View\
  Abstract.php(1114): Zend_Loader_PluginLoader-load('_getAllParams') #1
 C:\
 
 apache\sites\kool_wisp\zend_framework\library\Zend\View\Abstract.php(545):
  Zend_View_Abstract-_getPlugin('helper', '_getAllParams') #2
 C:\apache\sites\
  kool_wisp\zend_framework\library\Zend\View\Abstract.php(312):
  Zend_View_Abstract-getHelper('_getAllParams') #3 [internal function]:
  Zend_View_Abstract-__call('_getAllParams', Array) #4
 C:\apache\sites\kool_wisp
  \application\modules\tickets\views\scripts\index\view.phtml(8):
 Zend_View-
  _getAllParams() #5 C:\apache\sites\kool_wisp\zend_framework\library\Zend\
  View.php(107): include('C:\apache\sites...') #6
 C:\apache\sites\kool_wisp\
  zend_framework\library\Zend\View\Abstract.php(787): Zend_View-_run('C:\a
 in C:
 
 \apache\sites\kool_wisp\zend_framework\library\Zend\Loader\PluginLoader.php
 on
  line 370

 --
 Matthew Weier O'Phinney
 Software Architect   | [EMAIL PROTECTED]
 Zend Framework   | http://framework.zend.com/




-- 
Do you really want to know?