[fw-general] Re: Generating URL's - View Helper? Action Helper?

2010-10-20 Thread Fozzyuw
Actually, it turns out, it was a lot of over thinking. You don't need to extend or create a new view helper URL at all. This is all you have to do: 1. In your action script, pass the parameters to your view script so you can use them (maybe there's a way of accessing them in your view script t

Re: [fw-general] Re: Generating URL's - View Helper? Action Helper?

2010-10-20 Thread Hector Virgen
Good catch, but if you reset the parameters, you'll lose the ones that weren't explicitly passed in. Maybe the answer is to extend the router so you can customize its assemble method? -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com On Wed, Oct

[fw-general] Re: Generating URL's - View Helper? Action Helper?

2010-10-20 Thread Fozzyuw
Yes you are right. I got it to work but there was one "gotcha". I needed to set the "reset" parameter to true, to let the parameters to sort properly. This is the view helper I created (basically a copy/paste of the actual view helper URL class, you can, of course, just extend as Hector did) ht

[fw-general] New Proposal: Zend_Options

2010-10-20 Thread Werner
Hi Everyone When (and if) you have some spare time, please take a look at the Zend_Options proposal. It's an (conceptual, initial) attempt to provide a standardized way to interact with those Zend Framework clas

Re: [fw-general] Re: Generating URL's - View Helper? Action Helper?

2010-10-20 Thread Hector Virgen
I just ran a quick test using a simple route, and my assumption was correct -- the wildcard params keep the order that was supplied: echo $view->url(array('foo' => 'bar', 'derp' => 'doo')); // /index/index/foo/bar/derp/doo echo $view->url(array('derp' => 'doo', 'foo' => 'bar')); // /index/index/d

Re: [fw-general] Re: Generating URL's - View Helper? Action Helper?

2010-10-20 Thread Hector Virgen
Named parameters (such as "module", "controller" and "action" in the "default" route) should not be affected by the ksort, but anything that is handled by "*" should (in your case, the name1 and name2 keys). Again, I didn't test the code, but if it doesn't work that way I'd be surprised. -- *Hecto

[fw-general] Re: Generating URL's - View Helper? Action Helper?

2010-10-20 Thread Fozzyuw
Hi Hector, Thanks for the tip about helpers. One item of note, ksorting doesn't actually do anything when passing it to: "$router->assemble($urlOptions, $name, $reset, $encode);" If that doesn't make sense, here's the thing, the URL helper code is simply this: $router = Zend_Controller_Fr

Re: [fw-general] Re: Generating URL's - View Helper? Action Helper?

2010-10-20 Thread Hector Virgen
There's an easier way to extend the existing Url view helper. Since view helpers are loaded using a LIFO stack, you can create your own view helper named "url" and Zend_View will use that one instead of the built-in version. I suggest extending the existing helper instead of copying it. That way yo

[fw-general] Re: Generating URL's - View Helper? Action Helper?

2010-10-20 Thread Fozzyuw
As a follow up to myself, I've found that the View Helper "Url()" works pretty well, with one exception, I so far haven't found if it is capable of sorting parameters alphabetically by the "name" column. ie: "/[module]/controller/action/name1/value1/name2/value2" Where name1 is always alphabeti

Re: SV: [fw-general] Found the issue to "Firefox - double request" !

2010-10-20 Thread debussy007
I am using the following for each request : $this->view->setEncoding('UTF-8'); I notice that adding the following : header("content-type: text/html; charset=utf-8"); solves the problem. However I'm quite surprised that I have to add this as I already set encoding with $view->setEncoding(). Also,

Re: [fw-general] How can I render a Zend_Barcode inside a html page?

2010-10-20 Thread Jonathan Maron
Ok. I have experienced similar issues! When I debug such image related issues, I now clear the cache between each new page load. Glad you got the issue fixed, nevertheless! -Original Message- From: scs Date: Wed, 20 Oct 2010 16:24:34 To: Cc: ZF Subject: Re: [fw-general] How can I rend

Re: [fw-general] How can I render a Zend_Barcode inside a html page?

2010-10-20 Thread scs
Hello Jonathan, I am not sure what I have changed but now the barcode appears properly in IE. It might be related to cache or maybe permissions problem. I was not able to use pear's package due to the same problem. But now will be able to use ZF's barcode component. Thanks On Wed, Oct 20, 2010

Re: [fw-general] How can I render a Zend_Barcode inside a html page?

2010-10-20 Thread Jonathan Maron
Hello scs Are you sure that the page that is serving up the actual image data is sending the correct HTTP header for GIF data? Jonathan -Original Message- From: scs Date: Wed, 20 Oct 2010 11:50:39 To: Cc: Laurens van Vliet Subject: Re: [fw-general] How can I render a Zend_Barcode insi

[fw-general] Design problems - forward to different view from an action

2010-10-20 Thread debussy007
Hi, In different views I have forms which points to the same action when submitted. The problem is that, when the action is completed, I want to forward the user to that same view again including the submitted form. How, from that action, can I forward the user to the appropriate view in a nice

Re: [fw-general] Re: Date Subtractions Differences

2010-10-20 Thread scs
Thank you all for the information about - difference. I found that the problem is related to getDate function. When I removed this function from the chain, the date diff became the same for both 2010 and 2011. Now, I removed this function and it is okay. Hope I am not missing anything. s

Re: [fw-general] How can I render a Zend_Barcode inside a html page?

2010-10-20 Thread scs
By the way, I cannot see the barcode image on IE8. It show a broken image. The code is the same code as below: $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $barcodeOptions = array('text' => '28810105487'); $rendererO

Re: [fw-general] How can I render a Zend_Barcode inside a html page?

2010-10-20 Thread Laurens van Vliet
Thnx scs! looks like this is working. Laurens Op 20 okt 2010, om 10:42 heeft scs het volgende geschreven: > This will work. > > > scs > > On Wed, Oct 20, 2010 at 11:32 AM, Vincent de Lau wrote: >>> Van: Laurens van Vliet [mailto:laur...@herinneringenoplinnen.nl] >> >>> ... >>> >>>act

Re: [fw-general] How can I render a Zend_Barcode inside a html page?

2010-10-20 Thread scs
This will work. scs On Wed, Oct 20, 2010 at 11:32 AM, Vincent de Lau wrote: >>Van: Laurens van Vliet [mailto:laur...@herinneringenoplinnen.nl] > >> ... >>   >>    action('barcode', 'label', null, array()); ?> >>   >> ... > > > This is probably not what you want... The action helper (labeled as

RE: [fw-general] How can I render a Zend_Barcode inside a html page?

2010-10-20 Thread Vincent de Lau
>Van: Laurens van Vliet [mailto:laur...@herinneringenoplinnen.nl] > ... > >action('barcode', 'label', null, array()); ?> > > ... This is probably not what you want... The action helper (labeled as evil) includes the output of another action inside the view. You would want somthing like

[fw-general] How can I render a Zend_Barcode inside a html page?

2010-10-20 Thread Laurens van Vliet
Hey, I have this barcode action in a LabelController that renders a gif image of a Zend_Barcode: public function barcodeAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $barcodeOptions = array('text' => 'ZendFramework'); $rendererOption

[fw-general] Auto discovering/loading project providers.

2010-10-20 Thread ellis
Hello, I'm trying to figure out how i can auto discover/load some project providers. IIRC, this is something that was disabled in 1.10. I don't see much benefit in project providers if they cant be operated without registering them in a user/enviroment config file, unrelated to the project. Bt