<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-16154</id>
	<title>Nabble - Zend Framework Community</title>
	<updated>2009-11-20T13:25:24Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Zend-Framework-Community-f16154.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend-Framework-Community-f16154.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26450216</id>
	<title>Re: Howto have the default module controllers with module prefix</title>
	<published>2009-11-20T13:25:24Z</published>
	<updated>2009-11-20T13:25:24Z</updated>
	<author>
		<name>Exception e</name>
	</author>
	<content type="html">&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Exception e wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;2) How can I have the controllers in my default module as &amp;nbsp;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Pagina_IndexController etc ?
&lt;br&gt;&lt;br&gt;instead of
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp;IndexController
&lt;br&gt;&lt;br&gt;Having no module prefix makes switching of a modules to be default very cumbersome: you need to rename all controllers
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
self-help, add:
&lt;br&gt;&lt;br&gt;resources.frontController.prefixDefaultModule = 1&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-MVC-f16155.html&quot; embed=&quot;fixTarget[16155]&quot; target=&quot;_top&quot; &gt;Zend MVC&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Howto-have-the-default-module-controllers-with-module-prefix-tp26441586p26450216.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26448979</id>
	<title>Zend Modules - Calling a Module from Controller</title>
	<published>2009-11-20T12:55:51Z</published>
	<updated>2009-11-20T12:55:51Z</updated>
	<author>
		<name>Stephen Alistoun</name>
	</author>
	<content type="html">Hey All,
&lt;br&gt;&lt;br&gt;I'am trying to call a Module from the Controller and I'm keep on getting an error stated below:
&lt;br&gt;&lt;br&gt;&lt;b&gt;Class 'Default_Module_UsersTable' not found in C:\wamp\www\ZendCasts\application\controllers\IndexController.php on line 16&lt;/b&gt;&lt;br&gt;&lt;br&gt;//***********************
&lt;br&gt;//*******Index Controller******
&lt;br&gt;//***********************
&lt;br&gt;class IndexController extends Zend_Controller_Action
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; public function indexAction()
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$this-&amp;gt;view-&amp;gt;headTitle('Title - ' , 'PREPEND');
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$users = new Default_Module_UsersTable();
&lt;br&gt;&amp;nbsp; &amp;nbsp; } &amp;nbsp; 
&lt;br&gt;}
&lt;br&gt;//***********************
&lt;br&gt;//*******Module*******
&lt;br&gt;//***********************
&lt;br&gt;//require_once 'Zend/Db/Table/Abstract.php';
&lt;br&gt;class Default_Module_UsersTable extends Zend_Db_Table_Abstract
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; /**
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* The default table name
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;nbsp; &amp;nbsp; protected $_name = 'users';
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; /*public function NewUser()
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $params = array(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'name' =&amp;gt; 'jane doe',
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'email' =&amp;gt; 'jane@doe.com');
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //$this-&amp;gt;users-&amp;gt;insert($params);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }*/
&lt;br&gt;}
&lt;br&gt;//***********************
&lt;br&gt;//*******Boot Strap*******
&lt;br&gt;//***********************
&lt;br&gt;class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; /**
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Bootstrap autoloader for application resources
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return Zend_Application_Module_Autoloader
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;nbsp; &amp;nbsp; protected function _initAutoload()
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $autoloader = new Zend_Application_Module_Autoloader(array(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'namespace' =&amp;gt; 'Default',
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'basePath' &amp;nbsp;=&amp;gt; dirname(__FILE__),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return $autoloader;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; /**
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Bootstrap the view doctype
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return void
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;nbsp; &amp;nbsp; protected function _initDoctype()
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;bootstrap('view');
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $view = $this-&amp;gt;getResource('view');
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $view-&amp;gt;doctype('XHTML1_STRICT');
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //$view-&amp;gt;addHelperPath('App/View/Helper' , 'App_View_Helper');
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend-Modules---Calling-a-Module-from-Controller-tp26448979p26448979.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26448376</id>
	<title>Re: Problem with Zend_translate</title>
	<published>2009-11-20T10:43:31Z</published>
	<updated>2009-11-20T10:43:31Z</updated>
	<author>
		<name>thomasW</name>
	</author>
	<content type="html">The registry key &amp;quot;Zend_Translate&amp;quot; is used by all components which provide 
&lt;br&gt;translation capabilities when no other translation object is set.
&lt;br&gt;&lt;br&gt;It is used application wide and this approach is also described within the 
&lt;br&gt;manual.
&lt;br&gt;&lt;br&gt;By setting this key into registry there is nothing more you have to do.
&lt;br&gt;&lt;br&gt;Greetings
&lt;br&gt;Thomas Weidner, I18N Team Leader, Zend Framework
&lt;br&gt;&lt;a href=&quot;http://www.thomasweidner.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.thomasweidner.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: &amp;quot;kusum&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26448376&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kusumsouls@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26448376&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fw-general@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Friday, November 20, 2009 7:38 PM
&lt;br&gt;Subject: Re: [fw-general] Problem with Zend_translate
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks to all the suggestions...
&lt;br&gt;&amp;gt; I read all and tried them...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Finally my translate worked with.....
&lt;br&gt;&amp;gt; application.ini :-
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; resources.translate.data = APPLICATION_PATH &amp;quot;/languages&amp;quot;
&lt;br&gt;&amp;gt; resources.translate.adapter = &amp;quot;array&amp;quot;
&lt;br&gt;&amp;gt; resources.translate.locale = &amp;quot;nl&amp;quot;
&lt;br&gt;&amp;gt; resources.translate.options.scan = &amp;quot;filename&amp;quot;
&lt;br&gt;&amp;gt; resources.translate.options.logUntranslated = true
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; i made three files in languages folder :-
&lt;br&gt;&amp;gt; en.php,nl.php,fr.php
&lt;br&gt;&amp;gt; each had the required translation
&lt;br&gt;&amp;gt; for eg en.php
&lt;br&gt;&amp;gt; &amp;lt;?php
&lt;br&gt;&amp;gt; return array(
&lt;br&gt;&amp;gt; 'application' =&amp;gt; 'application',
&lt;br&gt;&amp;gt; );
&lt;br&gt;&amp;gt; ?&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; and nl.php
&lt;br&gt;&amp;gt; &amp;lt;?php
&lt;br&gt;&amp;gt; return array(
&lt;br&gt;&amp;gt; 'application' =&amp;gt; 'applicatie',
&lt;br&gt;&amp;gt; );
&lt;br&gt;&amp;gt; ?&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; then when i tried &amp;lt;?php echo
&lt;br&gt;&amp;gt; Zend_Registry::get('Zend_Translate')-&amp;gt;_(&amp;quot;application&amp;quot;); ?&amp;gt;
&lt;br&gt;&amp;gt; in one of my files
&lt;br&gt;&amp;gt; with locale en it showed :- application
&lt;br&gt;&amp;gt; with locale nl it showed :- applicatie
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This all is wonderfull :clap:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Just one last request :-
&lt;br&gt;&amp;gt; we can set the default translator for forms by
&lt;br&gt;&amp;gt; $tr = Zend_Registry::get('Zend_Translate');
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Zend_Registry::set('tr', $tr);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Zend_Form::setDefaultTranslator($tr);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; but by this $tr we are able to do translation just for forms
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If i need to use it for any messages i have to write
&lt;br&gt;&amp;gt; echo Zend_Registry::get('Zend_Translate')-&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is there any other way to setDefaultTranslator for the whole application 
&lt;br&gt;&amp;gt; at
&lt;br&gt;&amp;gt; one place ???????????????
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks and Regards
&lt;br&gt;&amp;gt; Kusum
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; View this message in context: 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/Problem-with-Zend_translate-tp26400093p26443620.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Problem-with-Zend_translate-tp26400093p26443620.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Zend Framework mailing list archive at Nabble.com. 
&lt;/div&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-Zend_translate-tp26400093p26448376.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26448331</id>
	<title>Re: Problem with Zend_translate</title>
	<published>2009-11-20T10:39:51Z</published>
	<updated>2009-11-20T10:39:51Z</updated>
	<author>
		<name>kusum</name>
	</author>
	<content type="html">&lt;br&gt;Thanks to all the suggestions... 
&lt;br&gt;I read all and tried them... 
&lt;br&gt;&lt;br&gt;Finally my translate worked with..... 
&lt;br&gt;application.ini :- 
&lt;br&gt;&lt;br&gt;resources.translate.data = APPLICATION_PATH &amp;quot;/languages&amp;quot; 
&lt;br&gt;resources.translate.adapter = &amp;quot;array&amp;quot; 
&lt;br&gt;resources.translate.locale = &amp;quot;nl&amp;quot; 
&lt;br&gt;resources.translate.options.scan = &amp;quot;filename&amp;quot; 
&lt;br&gt;resources.translate.options.logUntranslated = true 
&lt;br&gt;&lt;br&gt;i made three files in languages folder :- 
&lt;br&gt;en.php,nl.php,fr.php 
&lt;br&gt;each had the required translation 
&lt;br&gt;for eg en.php 
&lt;br&gt;&amp;lt;?php 
&lt;br&gt;return array( 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'application' =&amp;gt; 'application', 
&lt;br&gt;); 
&lt;br&gt;?&amp;gt; 
&lt;br&gt;&lt;br&gt;and nl.php 
&lt;br&gt;&amp;lt;?php 
&lt;br&gt;return array( 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'application' =&amp;gt; 'applicatie', 
&lt;br&gt;); 
&lt;br&gt;?&amp;gt; 
&lt;br&gt;&lt;br&gt;then when i tried &amp;lt;?php echo
&lt;br&gt;Zend_Registry::get('Zend_Translate')-&amp;gt;_(&amp;quot;application&amp;quot;); ?&amp;gt; 
&lt;br&gt;in one of my files 
&lt;br&gt;with locale en it showed :- application 
&lt;br&gt;with locale nl it showed :- applicatie 
&lt;br&gt;&lt;br&gt;This all is wonderfull :clap:
&lt;br&gt;&lt;br&gt;Just one last request :- 
&lt;br&gt;we can set the default translator for forms by 
&lt;br&gt;$tr = Zend_Registry::get('Zend_Translate'); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Zend_Registry::set('tr', $tr); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Zend_Form::setDefaultTranslator($tr); 
&lt;br&gt;&lt;br&gt;but by this $tr we are able to do translation just for forms 
&lt;br&gt;&lt;br&gt;If i need to use it for any messages i have to write 
&lt;br&gt;echo Zend_Registry::get('Zend_Translate')-&amp;gt; 
&lt;br&gt;&lt;br&gt;Is there any other way to setDefaultTranslator for the whole application at
&lt;br&gt;one place ??????????????? 
&lt;br&gt;&lt;br&gt;Thanks and Regards 
&lt;br&gt;Kusum
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://old.nabble.com/Problem-with-Zend_translate-tp26400093p26443621.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Problem-with-Zend_translate-tp26400093p26443621.html&lt;/a&gt;&lt;br&gt;Sent from the Zend Framework mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-Zend_translate-tp26400093p26448331.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26443620</id>
	<title>Re: Problem with Zend_translate</title>
	<published>2009-11-20T10:38:18Z</published>
	<updated>2009-11-20T10:38:18Z</updated>
	<author>
		<name>kusum</name>
	</author>
	<content type="html">Thanks to all the suggestions...
&lt;br&gt;I read all and tried them...
&lt;br&gt;&lt;br&gt;Finally my translate worked with.....
&lt;br&gt;application.ini :- 
&lt;br&gt;&lt;br&gt;resources.translate.data = APPLICATION_PATH &amp;quot;/languages&amp;quot;
&lt;br&gt;resources.translate.adapter = &amp;quot;array&amp;quot;
&lt;br&gt;resources.translate.locale = &amp;quot;nl&amp;quot;
&lt;br&gt;resources.translate.options.scan = &amp;quot;filename&amp;quot;
&lt;br&gt;resources.translate.options.logUntranslated = true
&lt;br&gt;&lt;br&gt;i made three files in languages folder :- 
&lt;br&gt;en.php,nl.php,fr.php
&lt;br&gt;each had the required translation
&lt;br&gt;for eg en.php
&lt;br&gt;&amp;lt;?php
&lt;br&gt;return array(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'application' =&amp;gt; 'application',
&lt;br&gt;);
&lt;br&gt;?&amp;gt;
&lt;br&gt;&lt;br&gt;and nl.php
&lt;br&gt;&amp;lt;?php
&lt;br&gt;return array(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'application' =&amp;gt; 'applicatie',
&lt;br&gt;);
&lt;br&gt;?&amp;gt;
&lt;br&gt;&lt;br&gt;then when i tried &amp;lt;?php echo Zend_Registry::get('Zend_Translate')-&amp;gt;_(&amp;quot;application&amp;quot;); ?&amp;gt;
&lt;br&gt;in one of my files
&lt;br&gt;with locale en it showed :- application
&lt;br&gt;with locale nl it showed :- applicatie
&lt;br&gt;&lt;br&gt;This all is wonderfull &lt;img class='smiley' src='http://old.nabble.com/images/smiley/anim_claps.gif' /&gt;&lt;br&gt;&lt;br&gt;Just one last request :- 
&lt;br&gt;we can set the default translator for forms by 
&lt;br&gt;$tr = Zend_Registry::get('Zend_Translate');
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Zend_Registry::set('tr', $tr);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Zend_Form::setDefaultTranslator($tr);
&lt;br&gt;&lt;br&gt;but by this $tr we are able to do translation just for forms
&lt;br&gt;&lt;br&gt;If i need to use it for any messages i have to write 
&lt;br&gt;echo Zend_Registry::get('Zend_Translate')-&amp;gt;
&lt;br&gt;&lt;br&gt;Is there any other way to setDefaultTranslator for the whole application at one place ???????????????
&lt;br&gt;&lt;br&gt;Thanks and Regards
&lt;br&gt;Kusum&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-Zend_translate-tp26400093p26443620.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26443618</id>
	<title>Re: PHP + IIS + SMB + Zend Studios?</title>
	<published>2009-11-20T10:33:22Z</published>
	<updated>2009-11-20T10:33:22Z</updated>
	<author>
		<name>prodigitalson</name>
	</author>
	<content type="html">This share is on the same network &amp;nbsp;youre on (ie. not being routed over internet via VPN or something) correct?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;humansky wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;On Nov 19, 2009, at 4:38 AM, Jason Webster wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; On 18/11/2009 6:00 AM, Henry Umansky wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hello all,
&lt;br&gt;&amp;gt;&amp;gt; This is not a question regarding ZF per se, I just want to know how
&lt;br&gt;&amp;gt;&amp;gt; others would handle the same situation. Currently I was given a &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; task to
&lt;br&gt;&amp;gt;&amp;gt; develop a PHP ZF app on a Windows Server 2k8 running IIS7. Problem is
&lt;br&gt;&amp;gt;&amp;gt; that I'm using Mac Leopard and connecting to windows using SMB &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; through
&lt;br&gt;&amp;gt;&amp;gt; the Zend Studios 6.1 IDE. This process is painfully slow, every key
&lt;br&gt;&amp;gt;&amp;gt; stroke takes about 3-5 seconds to register and connecting to SMB &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; before
&lt;br&gt;&amp;gt;&amp;gt; I open ZS is an extra step I would like to cut out. I've isolated the
&lt;br&gt;&amp;gt;&amp;gt; problem to Zend Studios, since other text editors like TextWrangler &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; or
&lt;br&gt;&amp;gt;&amp;gt; Komodo Edit are fine. So my question is this, how are others &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; connecting
&lt;br&gt;&amp;gt;&amp;gt; to windows servers and developing PHP/ZF applications and what IDEs &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; do
&lt;br&gt;&amp;gt;&amp;gt; they use and what connection protocol does your organization allow?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Also, on a side note, does anyone know of a tool that will allow me &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; to
&lt;br&gt;&amp;gt;&amp;gt; easily package and migrate my application from development server &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; ---&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; QA server ----&amp;gt; finally the two load balanced production server? &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; The old
&lt;br&gt;&amp;gt;&amp;gt; method of connecting to all three via SMB and using the drag and drop
&lt;br&gt;&amp;gt;&amp;gt; method is getting old and I want to minimize downtime. Right now I &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; can
&lt;br&gt;&amp;gt;&amp;gt; do each front-end independently, but there is about a 5-10 second lag
&lt;br&gt;&amp;gt;&amp;gt; until our load balancer detects the 500 error, and sends traffic to &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; other front-end, when I copy the folders over. I guess it ultimately
&lt;br&gt;&amp;gt;&amp;gt; comes down to, is there an rsync equivalent to windows if so, what &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; is it?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thank you,
&lt;br&gt;&amp;gt;&amp;gt; Henry
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; My daily workflow is ZSfE over SMB. I experience no issues whatsoever.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; How are you connecting to the SMB share?
&lt;br&gt;&lt;br&gt;On my Mac Leopard, I'm simply mounting the volume with command-k then &amp;nbsp;
&lt;br&gt;entering in the URI &amp;quot;smb://username@my.dev.server/foldername&amp;quot;, then I &amp;nbsp;
&lt;br&gt;fire up ZS and I have a project that uses the &amp;quot;/Volume/foldername&amp;quot; as &amp;nbsp;
&lt;br&gt;the starting path. What do you do? I know I'm probably doing something &amp;nbsp;
&lt;br&gt;wrong. ZS works fine for all my Apache/PHP project, just not with this &amp;nbsp;
&lt;br&gt;particular PHP/IIS7 project.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/PHP-%2B-IIS-%2B-SMB-%2B-Zend-Studios--tp26408291p26443618.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26447196</id>
	<title>Zend_Navigation &amp; custom routes = several problems</title>
	<published>2009-11-20T09:29:20Z</published>
	<updated>2009-11-20T09:29:20Z</updated>
	<author>
		<name>Marcus Stöhr</name>
	</author>
	<content type="html">Hi list,
&lt;br&gt;&lt;br&gt;to create my navigation I use the following bootstrap-code:
&lt;br&gt;&lt;br&gt;$config = new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation.xml', 'nav');
&lt;br&gt;$nav = new Zend_Application_Resource_Navigation(array('pages' =&amp;gt; $config));
&lt;br&gt;&lt;br&gt;Contents of navigation.xml:
&lt;br&gt;&lt;br&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;lt;configdata&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;nav&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;index&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label&amp;gt;nav_index&amp;lt;/label&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;controller&amp;gt;index&amp;lt;/controller&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action&amp;gt;index&amp;lt;/action&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/index&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;release&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label&amp;gt;nav_release&amp;lt;/label&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;controller&amp;gt;title&amp;lt;/controller&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action&amp;gt;list&amp;lt;/action&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;route&amp;gt;titlelist&amp;lt;/route&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;params&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;char&amp;gt;0-9&amp;lt;/char&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;page&amp;gt;1&amp;lt;/page&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/params&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/release&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;names&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label&amp;gt;nav_names&amp;lt;/label&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;controller&amp;gt;names&amp;lt;/controller&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action&amp;gt;list&amp;lt;/action&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;route&amp;gt;nameslist&amp;lt;/route&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;params&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;char&amp;gt;A&amp;lt;/char&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;page&amp;gt;1&amp;lt;/page&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/params&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/names&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label&amp;gt;nav_label&amp;lt;/label&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;controller&amp;gt;sites&amp;lt;/controller&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;action&amp;gt;list&amp;lt;/action&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;route&amp;gt;labellist&amp;lt;/route&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;params&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;char&amp;gt;0-9&amp;lt;/char&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;page&amp;gt;1&amp;lt;/page&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/params&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/label&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;search&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label&amp;gt;nav_search&amp;lt;/label&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;controller&amp;gt;search&amp;lt;/controller&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/search&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;help&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label&amp;gt;nav_help&amp;lt;/label&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;controller&amp;gt;help&amp;lt;/controller&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/help&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;forum&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label&amp;gt;nav_forum&amp;lt;/label&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;uri&amp;gt;&lt;a href=&quot;http://www.soundtrack-board.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.soundtrack-board.de&lt;/a&gt;&amp;lt;/uri&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/forum&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/nav&amp;gt;
&lt;br&gt;&amp;lt;/configdata&amp;gt;
&lt;br&gt;&lt;br&gt;This works and the navigation gets created, BUT when I hover the links which uses no named route, the links isn't just the expected controller/action-couple but the actual route used for the page I'm on, e.g.
&lt;br&gt;&lt;br&gt;/public/names/0-9-p1.html but it should show /public/search
&lt;br&gt;&lt;br&gt;My custom routes are utilizing Zend_Controller_Router_Route_Regex.
&lt;br&gt;&lt;br&gt;The other problem is: There is no active link and so I can't use some of the helper methods to enhance my navigation with a sub-navigation.
&lt;br&gt;&lt;br&gt;What do I wrong?
&lt;br&gt;&lt;br&gt;- Marcus
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-MVC-f16155.html&quot; embed=&quot;fixTarget[16155]&quot; target=&quot;_top&quot; &gt;Zend MVC&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Navigation---custom-routes-%3D-several-problems-tp26447196p26447196.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26446901</id>
	<title>November bug hunt continues!</title>
	<published>2009-11-20T09:10:37Z</published>
	<updated>2009-11-20T09:10:37Z</updated>
	<author>
		<name>weierophinney</name>
	</author>
	<content type="html">Greetings, all!
&lt;br&gt;&lt;br&gt;November's Bug Hunt Days started yesterday and continue through tonight.
&lt;br&gt;If you haven't participated yet, now is the time to help!
&lt;br&gt;&lt;br&gt;Note: You will need to have a signed CLA on file with us to participate.
&lt;br&gt;&lt;br&gt;If you want some ideas on how to contribute, please visit the wiki:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://framework.zend.com/wiki/display/ZFDEV/Monthly+Bug+Hunt+Days&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/wiki/display/ZFDEV/Monthly+Bug+Hunt+Days&lt;/a&gt;&lt;br&gt;&lt;br&gt;In particular, there is now a section on specific actions you can take,
&lt;br&gt;including helping with documentation, capturing reproduce cases, and
&lt;br&gt;creating patches. 
&lt;br&gt;&lt;br&gt;Help us make this the best bug hunt yet!
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Matthew Weier O'Phinney
&lt;br&gt;Project Lead &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446901&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matthew@...&lt;/a&gt;
&lt;br&gt;Zend Framework &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;a href=&quot;http://framework.zend.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/November-bug-hunt-continues%21-tp26446901p26446901.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26446886</id>
	<title>Re: Zend_Form_Element_File validator</title>
	<published>2009-11-20T09:10:02Z</published>
	<updated>2009-11-20T09:10:02Z</updated>
	<author>
		<name>Daniel Latter-2</name>
	</author>
	<content type="html">Hi,&lt;br&gt;&lt;br&gt;brill, thanks. A lot neater and easier to maintain. &lt;br&gt;&lt;br&gt;To me though, this is exactly what we were doing, albeit syntactically different,&lt;br&gt;so would be good to get some feedback from the author to let us know what we are, &lt;br&gt;
if anything, doing wrong.&lt;br&gt;&lt;br&gt;Thanks again&lt;br&gt;Dan&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/20 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;Found another (better) way to customize the error messages&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;$validator = new Zend_Validate_File_Upload();&lt;/div&gt;
&lt;div&gt;$validator-&amp;gt;setMessages(array(&amp;#39;fileUploadErrorNoFile&amp;#39; =&amp;gt; &amp;#39;Upload an image!&amp;#39;&amp;#39;));&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;div class=&quot;im&quot;&gt;$image = new Zend_Form_Element_File(&amp;#39;image&amp;#39;);&lt;br&gt;$filesmall-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;          -&amp;gt;setDestination(&amp;#39;./temp&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;
&lt;/div&gt;
          -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;jpg&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;/div&gt;
&lt;div&gt;          -&amp;gt;addValidator($validator)    &amp;lt;-----------&lt;/div&gt;
&lt;div&gt;          -&amp;gt;setRequired(true);&lt;br&gt;&lt;/div&gt;
&lt;div&gt;cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Thanks. It&amp;#39;s a good idea. Did that in the view side but still waiting for a better solution. Maybe a custom validator,&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo &lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div bgcolor=&quot;#FFFFFF&quot;&gt;
&lt;div&gt;Hi, &lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;What I was thinking is you could grab all the form error messages, and then overrwrite the message we are after using the error message key, then use setErrorMessages on the form,  but it&amp;#39;s a bit of a hack, and not tried?&lt;/div&gt;


&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;On 19 Nov 2009, at 17:20, &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;blockquote type=&quot;cite&quot;&gt;
&lt;div&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;I also tried -&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, false, array(&amp;#39;messages&amp;#39;=&amp;gt;array(&amp;#39;fileUploadErrorFileNotFound&amp;#39;=&amp;gt;&amp;#39;TEST&amp;#39;))) with no success..&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;


&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;Hi,&lt;br&gt;&lt;br&gt;Also, why does this:&lt;br&gt;&lt;br&gt;-&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, false, array(&amp;#39;messages&amp;#39;=&amp;gt;array(&amp;#39;fileUploadErrorNoFile&amp;#39;=&amp;gt;&amp;#39;TEST&amp;#39;)))&lt;br&gt;

&lt;br&gt;give you a &amp;quot;&lt;b&gt;The file &amp;#39;Water lilies.jpg&amp;#39; was not found&lt;/b&gt;&amp;quot; error? (yes its from xp&amp;#39;s sample pictures folder) 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;


&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;Doh!&lt;br&gt;&lt;br&gt;Well I dont understand that because if it only &amp;quot;..checks if an upload has resulted in an error&amp;quot;,- and in our case a file has been uploaded, so there should&amp;#39;nt be an error, why are we still seeing the message? must be bug?&lt;br&gt;

&lt;br&gt;Thanks&lt;br&gt;Dan&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Talked too soon :)&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;It shows the message in both cases: upload a file, don&amp;#39;t upload a file. &lt;/div&gt;
&lt;div&gt;I keep looking for a solution and cc&amp;#39;d the message to Thomas Weider toosee if I can get a solution.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;cheers&lt;/div&gt;
&lt;div&gt;holo&lt;/div&gt;
&lt;div&gt;&lt;br&gt; &lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div bgcolor=&quot;#FFFFFF&quot;&gt;
&lt;div&gt;Hi &lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Ah, ok, didn&amp;#39;t see that, glad it&amp;#39;s working.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Thanks&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;br&gt;On 19 Nov 2009, at 00:35, &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;br&gt;&lt;/div&gt;


&lt;div&gt;&lt;/div&gt;
&lt;blockquote type=&quot;cite&quot;&gt;
&lt;div&gt;Hi&lt;br&gt;Thanks again. It works now. &lt;br&gt;It works doing -&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, true, ...) or -&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, ...) although the manual states:&lt;br&gt;&lt;br&gt;21.2. Validators for Zend_File_Transfer&lt;br&gt;

...&lt;br&gt;....&lt;br&gt;Upload: This validator is internal. It checks if an upload has resulted in an error. You must not set it, as it&amp;#39;s automatically set by Zend_File_Transfer itself. So you do not use this validator directly. You should only know that it exists.&lt;br&gt;

&lt;br&gt;
&lt;p&gt;Cheers,&lt;br&gt;holo&lt;br&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;


&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;sorry forgot to cc list. 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;---------- Forwarded message ----------&lt;br&gt;From: &lt;b class=&quot;gmail_sendername&quot;&gt;Daniel Latter&lt;/b&gt; &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

Date: 2009/11/18&lt;br&gt;Subject: Re: [fw-general] Zend_Form_Element_File validator&lt;br&gt;To: &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;br&gt;

&lt;br&gt;&lt;br&gt;Hi,&lt;br&gt;&lt;br&gt;You do this:&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;logo&amp;#39;);&lt;br&gt;        $image-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;                  -&amp;gt;setDestination($this-&amp;gt;getimageUploadDir()) 
&lt;div&gt;&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;

&lt;/div&gt;                  &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;-&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, array(&amp;#39;messages&amp;#39;=&amp;gt;&amp;#39;YOUR MESSAGE HERE&amp;#39;))&lt;/span&gt;&lt;br&gt;                  -&amp;gt;setRequired(true);&lt;br&gt;
        $this-&amp;gt;addElement($image);&lt;br&gt;
&lt;br&gt;It took me ages to figure this out, as the validaor doesnt conform to the normal naming conventions of the other validators. I dont know if this is&lt;br&gt;an issue or not? I had to dig into the source code to find it.&lt;br&gt;

&lt;br&gt;Thanks&lt;br&gt;Dan 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=25&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;


&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;Thank you but I don´t see how to set the custom error messages for the Zend_Form_Element_File. I&amp;#39;ve read the manual before posting this question but didn&amp;#39;t found anything. I&amp;#39;m having this problem only with file elements.&lt;/div&gt;


&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=26&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=27&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=28&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;On the element itself because that error message is being triggered by the &amp;#39;required&amp;#39; flag.&lt;br&gt;

&lt;br&gt;The manual is pretty clear on this section.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=29&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=30&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446886&amp;i=31&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;Hi &lt;br&gt;I have a form with a required file element. If file is empty, I get &amp;quot;fileUploadErrorNoFile&amp;quot; =&amp;gt; &amp;quot;The file &amp;#39;image&amp;#39; was not uploaded&amp;quot; in $form-&amp;gt;getMessages().&lt;br&gt;

&lt;br&gt;Which validator should I add to the element to customize this error message ?&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;image&amp;#39;);&lt;br&gt;$filesmall-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;          -&amp;gt;setDestination(&amp;#39;./temp&amp;#39;)&lt;br&gt;

          -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;          -&amp;gt;setRequired(true);&lt;br&gt;

&lt;br&gt;Thanks in advance. &lt;br&gt;Cheers&lt;br&gt;holo&lt;br&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;

&lt;/div&gt;&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Form_Element_File-validator-tp26411241p26446886.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26446864</id>
	<title>Re: Zend Form populate method doesn't support FilteringSelect / ComboBoxes using a Dojo datastore.</title>
	<published>2009-11-20T09:08:19Z</published>
	<updated>2009-11-20T09:08:19Z</updated>
	<author>
		<name>weierophinney</name>
	</author>
	<content type="html">-- Tridem &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446864&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;technik@...&lt;/a&gt;&amp;gt; wrote
&lt;br&gt;(on Friday, 20 November 2009, 04:01 AM -0800):
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; My problem is similar. The only solution I found so far is using Dojo with
&lt;br&gt;&amp;gt; the setUseDeclarative() method instead of the setUseProgrammatic().
&lt;br&gt;&amp;gt; By this the Comobox or FilteringSelect starts loading the multiOptions from
&lt;br&gt;&amp;gt; the StoreUrl and populates it correctely.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Still this isn't very pleasing. At least it would be helpful when the
&lt;br&gt;&amp;gt; setUseProgrammatic() method could do the same. :-/
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Maybe it is a matter of compromising and deciding when loading jsonData form
&lt;br&gt;&amp;gt; an StoreUrl is really neccessary. Well, I don't like compromises! :-D
&lt;/div&gt;&lt;br&gt;This issue was fixed in trunk and the 1.9 release branch just yesterday,
&lt;br&gt;and will be in Tuesday's release of 1.9.6.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Matthew Weier O'Phinney
&lt;br&gt;Project Lead &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26446864&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matthew@...&lt;/a&gt;
&lt;br&gt;Zend Framework &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;a href=&quot;http://framework.zend.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend-Form-populate-method-doesn%27t-support-FilteringSelect---ComboBoxes-using-a-Dojo-datastore.-tp20374640p26446864.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26443580</id>
	<title>Howto have the default module controllers with module prefix</title>
	<published>2009-11-20T08:37:54Z</published>
	<updated>2009-11-20T08:37:54Z</updated>
	<author>
		<name>Exception e</name>
	</author>
	<content type="html">Because the other sublists of zend-framework refuse to process my messages, I am forced to post it here.
&lt;br&gt;Maybe someone can explain why all messages keep pending? I hate this &lt;img class='smiley' src='http://old.nabble.com/images/smiley/smiley_angry.gif' /&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;== &amp;gt; Here is my question:
&lt;br&gt;&lt;br&gt;&lt;br&gt;I have a default module defined in application.ini
&lt;br&gt;&lt;br&gt;resources.frontController.defaultModule = &amp;quot;pagina&amp;quot;
&lt;br&gt;&lt;br&gt;I am able to dispatch to this resource if I have the initAutoload disabled.
&lt;br&gt;&lt;br&gt;1) What is Zend_Application_Module_Autoloader intended for? I am moving to the Zend_Application approach of bootstrapping. Pfew zf has become rocket science
&lt;br&gt;&lt;br&gt;2) How can I have the controllers in my default module as &amp;nbsp;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Pagina_IndexController etc ?
&lt;br&gt;&lt;br&gt;instead of
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;IndexController
&lt;br&gt;&lt;br&gt;Having no module prefix makes switching of a modules to be default very cumbersome: you need to rename all controllers
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The disabled Zend_Application_Module_Autoloader:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; /**
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Bootstrap autoloader for application resources
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return Zend_Application_Module_Autoloader
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;// &amp;nbsp; &amp;nbsp;protected function _initAutoload()
&lt;br&gt;// &amp;nbsp; &amp;nbsp;{
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$autoloader = new Zend_Application_Module_Autoloader(array(
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'namespace' =&amp;gt; 'Default',
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'basePath' &amp;nbsp;=&amp;gt; dirname(__FILE__) ,
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;));
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return $autoloader;
&lt;br&gt;// &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;i&gt;Because the other sublists of zend-framework refuse to process my messages, I am forced to post it here. Maybe someone can explain why all messages keep pending?&lt;/i&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Howto-have-the-default-module-controllers-with-module-prefix-tp26443580p26443580.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26445748</id>
	<title>Re: Zend_Form_Element_File validator</title>
	<published>2009-11-20T08:00:41Z</published>
	<updated>2009-11-20T08:00:41Z</updated>
	<author>
		<name>holografix</name>
	</author>
	<content type="html">&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;Found another (better) way to customize the error messages&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;$validator = new Zend_Validate_File_Upload();&lt;/div&gt;
&lt;div&gt;$validator-&amp;gt;setMessages(array(&amp;#39;fileUploadErrorNoFile&amp;#39; =&amp;gt; &amp;#39;Upload an image!&amp;#39;&amp;#39;));&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;$image = new Zend_Form_Element_File(&amp;#39;image&amp;#39;);&lt;br&gt;$filesmall-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;          -&amp;gt;setDestination(&amp;#39;./temp&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;
          -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;jpg&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;/div&gt;
&lt;div&gt;          -&amp;gt;addValidator($validator)    &amp;lt;-----------&lt;/div&gt;
&lt;div&gt;          -&amp;gt;setRequired(true);&lt;br&gt;&lt;/div&gt;
&lt;div&gt;cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Thanks. It&amp;#39;s a good idea. Did that in the view side but still waiting for a better solution. Maybe a custom validator,&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div class=&quot;h5&quot;&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo &lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div bgcolor=&quot;#FFFFFF&quot;&gt;
&lt;div&gt;Hi, &lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;What I was thinking is you could grab all the form error messages, and then overrwrite the message we are after using the error message key, then use setErrorMessages on the form,  but it&amp;#39;s a bit of a hack, and not tried?&lt;/div&gt;

&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;On 19 Nov 2009, at 17:20, &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;blockquote type=&quot;cite&quot;&gt;
&lt;div&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;I also tried -&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, false, array(&amp;#39;messages&amp;#39;=&amp;gt;array(&amp;#39;fileUploadErrorFileNotFound&amp;#39;=&amp;gt;&amp;#39;TEST&amp;#39;))) with no success..&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Hi,&lt;br&gt;&lt;br&gt;Also, why does this:&lt;br&gt;&lt;br&gt;-&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, false, array(&amp;#39;messages&amp;#39;=&amp;gt;array(&amp;#39;fileUploadErrorNoFile&amp;#39;=&amp;gt;&amp;#39;TEST&amp;#39;)))&lt;br&gt;
&lt;br&gt;give you a &amp;quot;&lt;b&gt;The file &amp;#39;Water lilies.jpg&amp;#39; was not found&lt;/b&gt;&amp;quot; error? (yes its from xp&amp;#39;s sample pictures folder) 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Doh!&lt;br&gt;&lt;br&gt;Well I dont understand that because if it only &amp;quot;..checks if an upload has resulted in an error&amp;quot;,- and in our case a file has been uploaded, so there should&amp;#39;nt be an error, why are we still seeing the message? must be bug?&lt;br&gt;
&lt;br&gt;Thanks&lt;br&gt;Dan&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Talked too soon :)&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;It shows the message in both cases: upload a file, don&amp;#39;t upload a file. &lt;/div&gt;
&lt;div&gt;I keep looking for a solution and cc&amp;#39;d the message to Thomas Weider toosee if I can get a solution.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;cheers&lt;/div&gt;
&lt;div&gt;holo&lt;/div&gt;
&lt;div&gt;&lt;br&gt; &lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div bgcolor=&quot;#FFFFFF&quot;&gt;
&lt;div&gt;Hi &lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Ah, ok, didn&amp;#39;t see that, glad it&amp;#39;s working.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Thanks&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;br&gt;On 19 Nov 2009, at 00:35, &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;br&gt;&lt;/div&gt;

&lt;div&gt;&lt;/div&gt;
&lt;blockquote type=&quot;cite&quot;&gt;
&lt;div&gt;Hi&lt;br&gt;Thanks again. It works now. &lt;br&gt;It works doing -&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, true, ...) or -&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, ...) although the manual states:&lt;br&gt;&lt;br&gt;21.2. Validators for Zend_File_Transfer&lt;br&gt;
...&lt;br&gt;....&lt;br&gt;Upload: This validator is internal. It checks if an upload has resulted in an error. You must not set it, as it&amp;#39;s automatically set by Zend_File_Transfer itself. So you do not use this validator directly. You should only know that it exists.&lt;br&gt;
&lt;br&gt;
&lt;p&gt;Cheers,&lt;br&gt;holo&lt;br&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;sorry forgot to cc list. 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;---------- Forwarded message ----------&lt;br&gt;From: &lt;b class=&quot;gmail_sendername&quot;&gt;Daniel Latter&lt;/b&gt; &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
Date: 2009/11/18&lt;br&gt;Subject: Re: [fw-general] Zend_Form_Element_File validator&lt;br&gt;To: &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;Hi,&lt;br&gt;&lt;br&gt;You do this:&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;logo&amp;#39;);&lt;br&gt;        $image-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;                  -&amp;gt;setDestination($this-&amp;gt;getimageUploadDir()) 
&lt;div&gt;&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;
&lt;/div&gt;                  &lt;span style=&quot;COLOR: rgb(255,0,0)&quot;&gt;-&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, array(&amp;#39;messages&amp;#39;=&amp;gt;&amp;#39;YOUR MESSAGE HERE&amp;#39;))&lt;/span&gt;&lt;br&gt;                  -&amp;gt;setRequired(true);&lt;br&gt;        $this-&amp;gt;addElement($image);&lt;br&gt;
&lt;br&gt;It took me ages to figure this out, as the validaor doesnt conform to the normal naming conventions of the other validators. I dont know if this is&lt;br&gt;an issue or not? I had to dig into the source code to find it.&lt;br&gt;
&lt;br&gt;Thanks&lt;br&gt;Dan 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;Thank you but I don´t see how to set the custom error messages for the Zend_Form_Element_File. I&amp;#39;ve read the manual before posting this question but didn&amp;#39;t found anything. I&amp;#39;m having this problem only with file elements.&lt;/div&gt;

&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;On the element itself because that error message is being triggered by the &amp;#39;required&amp;#39; flag.&lt;br&gt;
&lt;br&gt;The manual is pretty clear on this section.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26445748&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Hi &lt;br&gt;I have a form with a required file element. If file is empty, I get &amp;quot;fileUploadErrorNoFile&amp;quot; =&amp;gt; &amp;quot;The file &amp;#39;image&amp;#39; was not uploaded&amp;quot; in $form-&amp;gt;getMessages().&lt;br&gt;
&lt;br&gt;Which validator should I add to the element to customize this error message ?&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;image&amp;#39;);&lt;br&gt;$filesmall-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;          -&amp;gt;setDestination(&amp;#39;./temp&amp;#39;)&lt;br&gt;
          -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;          -&amp;gt;setRequired(true);&lt;br&gt;
&lt;br&gt;Thanks in advance. &lt;br&gt;Cheers&lt;br&gt;holo&lt;br&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Form_Element_File-validator-tp26411241p26445748.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26441586</id>
	<title>Howto have the default module controllers with module prefix</title>
	<published>2009-11-20T05:57:01Z</published>
	<updated>2009-11-20T05:57:01Z</updated>
	<author>
		<name>Exception e</name>
	</author>
	<content type="html">I have a default module defined in application.ini
&lt;br&gt;&lt;br&gt;resources.frontController.defaultModule = &amp;quot;pagina&amp;quot;
&lt;br&gt;&lt;br&gt;I am able to dispatch to this resource if I have the initAutoload disabled.
&lt;br&gt;&lt;br&gt;1) What is Zend_Application_Module_Autoloader intended for? I am moving to the Zend_Application approach of bootstrapping. Pfew zf has become rocket science
&lt;br&gt;&lt;br&gt;2) How can I have the controllers in my default module as &amp;nbsp;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Pagina_IndexController etc ?
&lt;br&gt;&lt;br&gt;instead of
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp;IndexController
&lt;br&gt;&lt;br&gt;Having no module prefix makes switching of a modules to be default very cumbersome: you need to rename all controllers
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The disabled Zend_Application_Module_Autoloader:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; /**
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Bootstrap autoloader for application resources
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return Zend_Application_Module_Autoloader
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;// &amp;nbsp; &amp;nbsp;protected function _initAutoload()
&lt;br&gt;// &amp;nbsp; &amp;nbsp;{
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$autoloader = new Zend_Application_Module_Autoloader(array(
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'namespace' =&amp;gt; 'Default',
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'basePath' &amp;nbsp;=&amp;gt; dirname(__FILE__) ,
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;));
&lt;br&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return $autoloader;
&lt;br&gt;// &amp;nbsp; &amp;nbsp;}&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-MVC-f16155.html&quot; embed=&quot;fixTarget[16155]&quot; target=&quot;_top&quot; &gt;Zend MVC&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Howto-have-the-default-module-controllers-with-module-prefix-tp26441586p26441586.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26443194</id>
	<title>AW: trouble with Zend_Auth_Adapter_Ldap</title>
	<published>2009-11-20T05:22:31Z</published>
	<updated>2009-11-20T05:22:31Z</updated>
	<author>
		<name>Stefan Gehrig</name>
	</author>
	<content type="html">Hi Ondrej,
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; You can stop Zend_Auth_Adapter_Ldap from trying to split the username by setting the
&lt;br&gt;&amp;gt;&amp;gt; tryUsernameSplit option to false (true by default).
&lt;br&gt;&lt;br&gt;&amp;gt;Good to know, thanks. I missed &amp;nbsp;this option when I browse source but
&lt;br&gt;&amp;gt;any way I have to fetch extra information from LDAP.
&lt;br&gt;&lt;br&gt;To fetch extra information from the LDAP you can either use the Zend_Auth_Adapter_Ldap::getAccountObject() method to retrieve the user account entry or you can use Zend_Auth_Adapter_Ldap::getLdap() to get the underlying LDAP adapter that allows you to query the LDAP (be careful as this adapter is authenticated with the credentials provided to the Zend_Auth_Adapter_Ldap which could result in some access restriction problems).
&lt;br&gt;&lt;br&gt;&amp;gt;I reckon that there is a some bad design in Zend_Amf authentication
&lt;br&gt;&amp;gt;but I have no idea what is wrong.
&lt;br&gt;&lt;br&gt;&amp;gt;Basically, I'm looking for clean way how to implement Ldap auth wit
&lt;br&gt;&amp;gt;Zend_Amf_Server. I could extend Zend_Amf_Auth_Abstract and use it as a
&lt;br&gt;&amp;gt;proxy to Zend_Auth_Adapter_Ldap...
&lt;br&gt;&lt;br&gt;A proxy seems to be the way to go. Create a My_Amf_Auth_LdapProxy (extends Zend_Amf_Auth_Abstract) and let it proxy your authentication request to the LDAP adapter:
&lt;br&gt;&lt;br&gt;class My_Amf_Auth_LdapProxy extends Zend_Amf_Auth_Abstract
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected $_ldapAdapter;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public function __construct(Zend_Auth_Adapter_Ldap $ldapAdapter)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;_ldapAdapter = $ldapAdapter;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public function setCredentials($username, $password) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; parent::setCredentials($username, $password); // not really needed I think
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;_ldapAdapter-&amp;gt;setUsername($username);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;_ldapAdapter-&amp;gt;setPassword($password);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public function authenticate()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return $this-&amp;gt;_ldapAdapter-&amp;gt;authenticate();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;That seems to be the most natural way accomplish your task.
&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;&lt;br&gt;Stefan
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Auth-f16181.html&quot; embed=&quot;fixTarget[16181]&quot; target=&quot;_top&quot; &gt;Zend Auth&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/trouble-with-Zend_Auth_Adapter_Ldap-tp26438387p26443194.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26442900</id>
	<title>Re: trouble with Zend_Auth_Adapter_Ldap</title>
	<published>2009-11-20T04:59:23Z</published>
	<updated>2009-11-20T04:59:23Z</updated>
	<author>
		<name>Ondrej Ivanič-3</name>
	</author>
	<content type="html">Hi Stefan,
&lt;br&gt;&lt;br&gt;2009/11/20 Stefan Gehrig &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26442900&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gehrig@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; You can stop Zend_Auth_Adapter_Ldap from trying to split the username by setting the
&lt;br&gt;&amp;gt; tryUsernameSplit option to false (true by default).
&lt;br&gt;&lt;br&gt;Good to know, thanks. I missed &amp;nbsp;this option when I browse source but
&lt;br&gt;any way I have to fetch extra information from LDAP.
&lt;br&gt;&lt;br&gt;I reckon that there is a some bad design in Zend_Amf authentication
&lt;br&gt;but I have no idea what is wrong.
&lt;br&gt;&lt;br&gt;Basically, I'm looking for clean way how to implement Ldap auth wit
&lt;br&gt;Zend_Amf_Server. I could extend Zend_Amf_Auth_Abstract and use it as a
&lt;br&gt;proxy to Zend_Auth_Adapter_Ldap...
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ondrej Ivanic
&lt;br&gt;(&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26442900&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ondrej.ivanic@...&lt;/a&gt;)
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Auth-f16181.html&quot; embed=&quot;fixTarget[16181]&quot; target=&quot;_top&quot; &gt;Zend Auth&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/trouble-with-Zend_Auth_Adapter_Ldap-tp26438387p26442900.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26440611</id>
	<title>Zend_Dom iterate all texts</title>
	<published>2009-11-20T04:05:12Z</published>
	<updated>2009-11-20T04:05:12Z</updated>
	<author>
		<name>admirau</name>
	</author>
	<content type="html">How to use Zend_Dom to iterate all the text nodes?
&lt;br&gt;&lt;br&gt;I tried like this:
&lt;br&gt;$dom = new Zend_Dom_Query($html);
&lt;br&gt;&lt;br&gt;$results = $dom-&amp;gt;query('*');
&lt;br&gt;&lt;br&gt;foreach ($results as $result) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; var_dump($result-&amp;gt;textContent);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;But this returns texts with childnodes text,
&lt;br&gt;not the texts one by one.
&lt;br&gt;&lt;br&gt;Actually,
&lt;br&gt;I'm trying to write View Filter,
&lt;br&gt;e.g. to uppercase all the strings.
&lt;br&gt;&lt;br&gt;Do I have to use one of SPL Iterators?
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;regards
&lt;br&gt;takeshin&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Dom-iterate-all-texts-tp26440611p26440611.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26440558</id>
	<title>Re: Zend Form populate method doesn't support FilteringSelect / ComboBoxes using a Dojo datastore.</title>
	<published>2009-11-20T04:01:05Z</published>
	<updated>2009-11-20T04:01:05Z</updated>
	<author>
		<name>Tridem</name>
	</author>
	<content type="html">My problem is similar. The only solution I found so far is using Dojo with the setUseDeclarative() method instead of the setUseProgrammatic().
&lt;br&gt;By this the Comobox or FilteringSelect starts loading the multiOptions from the StoreUrl and populates it correctely.
&lt;br&gt;&lt;br&gt;Still this isn't very pleasing. At least it would be helpful when the setUseProgrammatic() method could do the same. &lt;img class='smiley' src='http://old.nabble.com/images/smiley/smiley_what.gif' /&gt;&lt;br&gt;&lt;br&gt;Maybe it is a matter of compromising and deciding when loading jsonData form an StoreUrl is really neccessary. Well, I don't like compromises! &lt;img class='smiley' src='http://old.nabble.com/images/smiley/smiley_happy.gif' /&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend-Form-populate-method-doesn%27t-support-FilteringSelect---ComboBoxes-using-a-Dojo-datastore.-tp20374640p26440558.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26439435</id>
	<title>AW: trouble with Zend_Auth_Adapter_Ldap</title>
	<published>2009-11-19T23:34:13Z</published>
	<updated>2009-11-19T23:34:13Z</updated>
	<author>
		<name>Stefan Gehrig</name>
	</author>
	<content type="html">Dear Ondrej,
&lt;br&gt;&lt;br&gt;the problem is, that Zend_Auth_Adapter_Ldap in its default configuration tries to split the username at the @-sign to retrieve the username and the domain name. It hereby assumes that a username with an @-sign is a new Microsoft Windows domain username in the form username@domain (old form, prior to Windows Server 2003 I think, was DOMAIN\username).
&lt;br&gt;You can stop Zend_Auth_Adapter_Ldap from trying to split the username by setting the tryUsernameSplit option to false (true by default).
&lt;br&gt;&lt;br&gt;$adapter = new Zend_Auth_Adapter_Ldap(array(
&lt;br&gt;&amp;nbsp; &amp;nbsp; // ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; 'tryUsernameSplit' =&amp;gt; false
&lt;br&gt;), $username, $password);
&lt;br&gt;&lt;br&gt;That should do the trick.
&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;&lt;br&gt;Stefan
&lt;br&gt;&lt;br&gt;-----Ursprüngliche Nachricht-----
&lt;br&gt;Von: Ondrej Ivanič [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ondrej.ivanic@...&lt;/a&gt;] 
&lt;br&gt;Gesendet: Freitag, 20. November 2009 05:56
&lt;br&gt;An: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fw-auth@...&lt;/a&gt;
&lt;br&gt;Betreff: [fw-auth] trouble with Zend_Auth_Adapter_Ldap
&lt;br&gt;&lt;br&gt;Hi
&lt;br&gt;&lt;br&gt;I had to implement Zend_Amf auth service against LDAP which seems like
&lt;br&gt;an easy task but it wasn't (maybe I missed something)
&lt;br&gt;&lt;br&gt;Zend_Amf_Server requires to use Zend_Amf_Auth_Abstract as a base class
&lt;br&gt;because abstract class provides additional method for settings
&lt;br&gt;credentials. Another surprise came with &amp;nbsp;Zend_Auth_Adapter_Ldap which
&lt;br&gt;doesn't like e-mail address as a uid. I always got error message
&lt;br&gt;'ondrej' not found (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ondrej@...&lt;/a&gt;). We use following LDAP
&lt;br&gt;structure:
&lt;br&gt;dc=customers, dc=local (&amp;lt;- baseDn)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ou=customer1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=ondrej@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=user1@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ou=customer1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=user1@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=user2@...&lt;/a&gt;
&lt;br&gt;and customers use (email, password) as credentials for login
&lt;br&gt;&lt;br&gt;Basically, I had to copy almost everything from
&lt;br&gt;Zend_Auth_Adapter_Ldap::authenticate() (it's not possible to extend
&lt;br&gt;because Zend_amf server requires Zend_Amf_Auth_Abstract as a base
&lt;br&gt;class) method and add few searches because I need associated user and
&lt;br&gt;company information.
&lt;br&gt;&lt;br&gt;Is there a better solution?
&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;-class Zend_Auth_Adapter_Ldap implements Zend_Auth_Adapter_Interface
&lt;br&gt;+class Amf_Auth_Ldap extends Zend_Amf_Auth_Abstract
&lt;br&gt;&lt;br&gt;@@ -275,15 +252,34 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$canonicalName = $ldap-&amp;gt;getCanonicalAccountName($username);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// bind with defualt credentials
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ldap-&amp;gt;bind();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$user =
&lt;br&gt;$ldap-&amp;gt;search(&amp;quot;(&amp;(objectClass=inetorgperson)(uid=$username))&amp;quot;);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(1 != sizeof($user)) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new Zend_Auth_Adapter_Exception('User: One
&lt;br&gt;user expected; got ' . sizeof($user));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$user = $user-&amp;gt;getFirst();
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ldap-&amp;gt;bind($user['dn'], $password);
&lt;br&gt;&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ldap-&amp;gt;bind($canonicalName, $password);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$parentDn = explode(',', $user['dn'], 3);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(isset($parentDn[1])) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$parentDn = $parentDn[1];
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} else {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new Zend_Auth_Adapter_Exception('Wrong LDAP
&lt;br&gt;structure; expected organisation as a parent' .
&lt;br&gt;sizeof($organisation));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$organisation =
&lt;br&gt;$ldap-&amp;gt;search(&amp;quot;(&amp;(objectClass=organizationalunit)($parentDn))&amp;quot;);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(1 != sizeof($organisation)) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new
&lt;br&gt;Zend_Auth_Adapter_Exception('Organisation: One result expected; got '
&lt;br&gt;. sizeof($organisation));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$organisation = $organisation-&amp;gt;getFirst();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[0] = '';
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[1] = '';
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[] = &amp;quot;$canonicalName authentication successful&amp;quot;;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[] = &amp;quot;$username authentication successful&amp;quot;;
&lt;br&gt;&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return new
&lt;br&gt;Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $canonicalName,
&lt;br&gt;$messages);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return new
&lt;br&gt;Zend_Auth_Result(Zend_Auth_Result::SUCCESS, new
&lt;br&gt;FraudControl_UserInfo($user, $organisation), $messages);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (Zend_Ldap_Exception $zle) {
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ondrej Ivanic
&lt;br&gt;(&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26439435&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ondrej.ivanic@...&lt;/a&gt;)
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Auth-f16181.html&quot; embed=&quot;fixTarget[16181]&quot; target=&quot;_top&quot; &gt;Zend Auth&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/trouble-with-Zend_Auth_Adapter_Ldap-tp26438387p26439435.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26438387</id>
	<title>trouble with Zend_Auth_Adapter_Ldap</title>
	<published>2009-11-19T20:55:51Z</published>
	<updated>2009-11-19T20:55:51Z</updated>
	<author>
		<name>Ondrej Ivanič-3</name>
	</author>
	<content type="html">Hi
&lt;br&gt;&lt;br&gt;I had to implement Zend_Amf auth service against LDAP which seems like
&lt;br&gt;an easy task but it wasn't (maybe I missed something)
&lt;br&gt;&lt;br&gt;Zend_Amf_Server requires to use Zend_Amf_Auth_Abstract as a base class
&lt;br&gt;because abstract class provides additional method for settings
&lt;br&gt;credentials. Another surprise came with &amp;nbsp;Zend_Auth_Adapter_Ldap which
&lt;br&gt;doesn't like e-mail address as a uid. I always got error message
&lt;br&gt;'ondrej' not found (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26438387&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ondrej@...&lt;/a&gt;). We use following LDAP
&lt;br&gt;structure:
&lt;br&gt;dc=customers, dc=local (&amp;lt;- baseDn)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ou=customer1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26438387&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=ondrej@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26438387&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=user1@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ou=customer1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26438387&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=user1@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26438387&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uid=user2@...&lt;/a&gt;
&lt;br&gt;and customers use (email, password) as credentials for login
&lt;br&gt;&lt;br&gt;Basically, I had to copy almost everything from
&lt;br&gt;Zend_Auth_Adapter_Ldap::authenticate() (it's not possible to extend
&lt;br&gt;because Zend_amf server requires Zend_Amf_Auth_Abstract as a base
&lt;br&gt;class) method and add few searches because I need associated user and
&lt;br&gt;company information.
&lt;br&gt;&lt;br&gt;Is there a better solution?
&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;-class Zend_Auth_Adapter_Ldap implements Zend_Auth_Adapter_Interface
&lt;br&gt;+class Amf_Auth_Ldap extends Zend_Amf_Auth_Abstract
&lt;br&gt;&lt;br&gt;@@ -275,15 +252,34 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$canonicalName = $ldap-&amp;gt;getCanonicalAccountName($username);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// bind with defualt credentials
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ldap-&amp;gt;bind();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$user =
&lt;br&gt;$ldap-&amp;gt;search(&amp;quot;(&amp;(objectClass=inetorgperson)(uid=$username))&amp;quot;);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(1 != sizeof($user)) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new Zend_Auth_Adapter_Exception('User: One
&lt;br&gt;user expected; got ' . sizeof($user));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$user = $user-&amp;gt;getFirst();
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ldap-&amp;gt;bind($user['dn'], $password);
&lt;br&gt;&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$ldap-&amp;gt;bind($canonicalName, $password);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$parentDn = explode(',', $user['dn'], 3);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(isset($parentDn[1])) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$parentDn = $parentDn[1];
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} else {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new Zend_Auth_Adapter_Exception('Wrong LDAP
&lt;br&gt;structure; expected organisation as a parent' .
&lt;br&gt;sizeof($organisation));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$organisation =
&lt;br&gt;$ldap-&amp;gt;search(&amp;quot;(&amp;(objectClass=organizationalunit)($parentDn))&amp;quot;);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(1 != sizeof($organisation)) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new
&lt;br&gt;Zend_Auth_Adapter_Exception('Organisation: One result expected; got '
&lt;br&gt;. sizeof($organisation));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$organisation = $organisation-&amp;gt;getFirst();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[0] = '';
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[1] = '';
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[] = &amp;quot;$canonicalName authentication successful&amp;quot;;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$messages[] = &amp;quot;$username authentication successful&amp;quot;;
&lt;br&gt;&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return new
&lt;br&gt;Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $canonicalName,
&lt;br&gt;$messages);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return new
&lt;br&gt;Zend_Auth_Result(Zend_Auth_Result::SUCCESS, new
&lt;br&gt;FraudControl_UserInfo($user, $organisation), $messages);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (Zend_Ldap_Exception $zle) {
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ondrej Ivanic
&lt;br&gt;(&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26438387&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ondrej.ivanic@...&lt;/a&gt;)
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Auth-f16181.html&quot; embed=&quot;fixTarget[16181]&quot; target=&quot;_top&quot; &gt;Zend Auth&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/trouble-with-Zend_Auth_Adapter_Ldap-tp26438387p26438387.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26421495</id>
	<title>Override Zend_Form_Element decorators</title>
	<published>2009-11-19T13:59:32Z</published>
	<updated>2009-11-19T13:59:32Z</updated>
	<author>
		<name>umpirsky</name>
	</author>
	<content type="html">Hi.
&lt;br&gt;&lt;br&gt;Subject sounds simple, but I have big troubles with customizing my forms.
&lt;br&gt;&lt;br&gt;First, I wanted to use default decorators. I'm not a CSS guru, but didn't manage to make form look like I wanted, because I needed to float elements, and by default elements are in dt dd tags, which makes label separated from element, so I dropped default decorators as an option.
&lt;br&gt;&lt;br&gt;So, I'ev created my parent form:
&lt;br&gt;&lt;br&gt;class Automobili_Form_Abstract extends Zend_Form {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public function __construct($options = null) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; parent::__construct($options);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;setElementDecorators(array(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'ViewHelper',
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Label',
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; array('HtmlTag', array('tag' =&amp;gt; 'div')),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public function loadDefaultDecorators(){
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;	if ($this-&amp;gt;loadDefaultDecoratorsIsDisabled()) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;setDecorators(array(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 	'FormElements',
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 	'Form'
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;and similar parent subform (similar decorators).
&lt;br&gt;&lt;br&gt;Now I have elements grouped in divs:
&lt;br&gt;&lt;br&gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;/search/result&amp;quot; enctype=&amp;quot;application/x-www-form-urlencoded&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;fieldset id=&amp;quot;fieldset-advanced_search_form&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;legend&amp;gt;Osnovni podaci&amp;lt;/legend&amp;gt;
&lt;br&gt;&amp;lt;div&amp;gt;
&lt;br&gt;&amp;lt;label class=&amp;quot;optional&amp;quot; for=&amp;quot;general-brand_button_827&amp;quot;&amp;gt;Marka:&amp;lt;/label&amp;gt;
&lt;br&gt;&amp;lt;select id=&amp;quot;general-brand&amp;quot; class=&amp;quot;select-car-brand&amp;quot; name=&amp;quot;general[brand]&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;/select&amp;gt;
&lt;br&gt;&amp;lt;/div&amp;gt;
&lt;br&gt;&amp;lt;div&amp;gt;
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;like I wanted, so applying style on fieldset &amp;gt; div or i can add class to div and select it with class selector.
&lt;br&gt;&lt;br&gt;The problem is now, how to add specific style to only one element div wrapper in the fieldlist???
&lt;br&gt;&lt;br&gt;I don't have id on this div tags, or anything to select them through CSS. I tried with n-th child selector, but no luck.
&lt;br&gt;&lt;br&gt;Is there a way to subclass Zend_Form_Element and override loadDefaultDecorators method? That way I will be able to set id of this div wrappers. Option to subclass each Zend_Form_Element_* class is a mess, right. I saw a guy there &lt;a href=&quot;http://morecowbell.net.au/2009/10/overriding-zend-form-element-default-decorators-for-good/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://morecowbell.net.au/2009/10/overriding-zend-form-element-default-decorators-for-good/&lt;/a&gt;&amp;nbsp;doing this:
&lt;br&gt;&lt;br&gt;abstract class Zend_Form_Element_Xhtml extends Tolerable_Form_Element
&lt;br&gt;&lt;br&gt;and that is not good :)
&lt;br&gt;&lt;br&gt;Is there a way around this? How to override element decorators and get ids like I want?&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Override-Zend_Form_Element-decorators-tp26421495p26421495.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26421491</id>
	<title>Re: Zend_Db_Table_Row strange behavior -added information</title>
	<published>2009-11-19T13:43:37Z</published>
	<updated>2009-11-19T13:43:37Z</updated>
	<author>
		<name>oetting</name>
	</author>
	<content type="html">Hi Bart
&lt;br&gt;&lt;br&gt;A few questions:
&lt;br&gt;&lt;br&gt;What does the var_dump look like before you save the row?
&lt;br&gt;Which version of ZF are you using?
&lt;br&gt;How exactly do you instantiate the Table object?
&lt;br&gt;(Have you double-checked the actual names of the columns in your table?)
&lt;br&gt;&lt;br&gt;Regards, Jacob Oettinger
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Bart McLeod wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;The problem described only occurs if if instantiate the dataobject with 
&lt;br&gt;a tablename in the options for the constructor. It does not occur if I 
&lt;br&gt;inherit from Zend_Db_Table_Abstract and specify the tablename as a property.
&lt;br&gt;That will be the reason that not everybody is complaining.
&lt;br&gt;&lt;br&gt;-Bart
&lt;br&gt;&lt;br&gt;Bart McLeod schreef:
&lt;br&gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I could not find an open issue about this and could not find similar 
&lt;br&gt;&amp;gt; messages on the list, but forgive me if this is a duplicate of 
&lt;br&gt;&amp;gt; anything mentioned earlier.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have a unit test that tests a dataobject class and it uses a 
&lt;br&gt;&amp;gt; Zend_Db_Table_Row to do updates/inserts.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The strange thing is that after setting a few properties and calling 
&lt;br&gt;&amp;gt; -&amp;gt;save(), one of the column indexes (the last one) is replaced with 
&lt;br&gt;&amp;gt; the tablename....
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is so strange that I thought you guys would be all over the list 
&lt;br&gt;&amp;gt; screaming out in anger, but since you are not, I am probably doing 
&lt;br&gt;&amp;gt; something wrong myself. If not, I will be happy to file an issue and 
&lt;br&gt;&amp;gt; try to fix it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is the code:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$this-&amp;gt;DataObject-&amp;gt;code = 11;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$this-&amp;gt;DataObject-&amp;gt;naam = 'testnaam';
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$this-&amp;gt;DataObject-&amp;gt;volgnr = 12;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$this-&amp;gt;assertTrue($this-&amp;gt;DataObject-&amp;gt;save());
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This works.
&lt;br&gt;&amp;gt; But after that, if I var_dump $this-&amp;gt;_row inside the DataObject, I get 
&lt;br&gt;&amp;gt; this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;[&amp;quot;_cleanData:protected&amp;quot;]=&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;array(3) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[&amp;quot;code&amp;quot;]=&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string(2) &amp;quot;11&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[&amp;quot;naam&amp;quot;]=&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string(8) &amp;quot;testnaam&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[&amp;quot;regio&amp;quot;]=&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string(2) &amp;quot;12&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The last index should have been 'volgnr', not 'regio', the latter 
&lt;br&gt;&amp;gt; being the name of the table.....
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; How's that for weird?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If I try to save again, I get the message that volgnr is not in the 
&lt;br&gt;&amp;gt; column list (obvious).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Anyone come to the rescue here?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Bart McLeod
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Bart McLeod
&lt;br&gt;*Space Web*
&lt;br&gt;Middenlaan 47
&lt;br&gt;6865 VN Heveadorp
&lt;br&gt;The Netherlands
&lt;br&gt;*t* +31(0)26 3392952
&lt;br&gt;*m* 06 51 51 89 71
&lt;br&gt;*@* info@spaceweb.nl &amp;lt;mailto:info@spaceweb.nl&amp;gt;
&lt;br&gt;www.spaceweb.nl &amp;lt;&lt;a href=&quot;http://www.spaceweb.nl&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.spaceweb.nl&lt;/a&gt;&amp;gt; 	zce logozce PHP 5 logo zce 
&lt;br&gt;Zend Framework logo
&lt;br&gt;&lt;br&gt;/Bart McLeod is a Zend Certified Engineer./
&lt;br&gt;&lt;br&gt;Click to verify! &amp;lt;&lt;a href=&quot;http://www.zend.com/zce.php?c=ZEND004591&amp;r=218204904&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.zend.com/zce.php?c=ZEND004591&amp;r=218204904&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-DB-f16192.html&quot; embed=&quot;fixTarget[16192]&quot; target=&quot;_top&quot; &gt;Zend DB&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Db_Table_Row-strange-behavior-tp26389971p26421491.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26421477</id>
	<title>Read application.ini options in Controller Plugin</title>
	<published>2009-11-19T12:59:39Z</published>
	<updated>2009-11-19T12:59:39Z</updated>
	<author>
		<name>admirau</name>
	</author>
	<content type="html">Which is the most effective way, to read options set in application.ini
&lt;br&gt;in the controller plugin?
&lt;br&gt;&lt;br&gt;I use:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $front = Zend_Controller_Front::getInstance();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $option = $front-&amp;gt;getParam('bootstrap')-&amp;gt;getOption('optionname');
&lt;br&gt;&lt;br&gt;but it seems a bit overhead.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;regards
&lt;br&gt;takeshin&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Read-application.ini-options-in-Controller-Plugin-tp26421477p26421477.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26431824</id>
	<title>Re: Zend_Form_Element_File validator</title>
	<published>2009-11-19T10:48:47Z</published>
	<updated>2009-11-19T10:48:47Z</updated>
	<author>
		<name>holografix</name>
	</author>
	<content type="html">&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Thanks. It&amp;#39;s a good idea. Did that in the view side but still waiting for a better solution. Maybe a custom validator,&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo &lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div bgcolor=&quot;#FFFFFF&quot;&gt;
&lt;div&gt;Hi, &lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;What I was thinking is you could grab all the form error messages, and then overrwrite the message we are after using the error message key, then use setErrorMessages on the form,  but it&amp;#39;s a bit of a hack, and not tried?&lt;/div&gt;

&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div class=&quot;h5&quot;&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;On 19 Nov 2009, at 17:20, &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;blockquote type=&quot;cite&quot;&gt;
&lt;div&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;I also tried -&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, false, array(&amp;#39;messages&amp;#39;=&amp;gt;array(&amp;#39;fileUploadErrorFileNotFound&amp;#39;=&amp;gt;&amp;#39;TEST&amp;#39;))) with no success..&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Hi,&lt;br&gt;&lt;br&gt;Also, why does this:&lt;br&gt;&lt;br&gt;-&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, false, array(&amp;#39;messages&amp;#39;=&amp;gt;array(&amp;#39;fileUploadErrorNoFile&amp;#39;=&amp;gt;&amp;#39;TEST&amp;#39;)))&lt;br&gt;
&lt;br&gt;give you a &amp;quot;&lt;b&gt;The file &amp;#39;Water lilies.jpg&amp;#39; was not found&lt;/b&gt;&amp;quot; error? (yes its from xp&amp;#39;s sample pictures folder) 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Doh!&lt;br&gt;&lt;br&gt;Well I dont understand that because if it only &amp;quot;..checks if an upload has resulted in an error&amp;quot;,- and in our case a file has been uploaded, so there should&amp;#39;nt be an error, why are we still seeing the message? must be bug?&lt;br&gt;
&lt;br&gt;Thanks&lt;br&gt;Dan&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Talked too soon :)&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;It shows the message in both cases: upload a file, don&amp;#39;t upload a file. &lt;/div&gt;
&lt;div&gt;I keep looking for a solution and cc&amp;#39;d the message to Thomas Weider toosee if I can get a solution.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;cheers&lt;/div&gt;
&lt;div&gt;holo&lt;/div&gt;
&lt;div&gt;&lt;br&gt; &lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div bgcolor=&quot;#FFFFFF&quot;&gt;
&lt;div&gt;Hi &lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Ah, ok, didn&amp;#39;t see that, glad it&amp;#39;s working.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Thanks&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;br&gt;On 19 Nov 2009, at 00:35, &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;br&gt;&lt;/div&gt;

&lt;div&gt;&lt;/div&gt;
&lt;blockquote type=&quot;cite&quot;&gt;
&lt;div&gt;Hi&lt;br&gt;Thanks again. It works now. &lt;br&gt;It works doing -&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, true, ...) or -&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, ...) although the manual states:&lt;br&gt;&lt;br&gt;21.2. Validators for Zend_File_Transfer&lt;br&gt;
...&lt;br&gt;....&lt;br&gt;Upload: This validator is internal. It checks if an upload has resulted in an error. You must not set it, as it&amp;#39;s automatically set by Zend_File_Transfer itself. So you do not use this validator directly. You should only know that it exists.&lt;br&gt;
&lt;br&gt;
&lt;p&gt;Cheers,&lt;br&gt;holo&lt;br&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;sorry forgot to cc list. 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;---------- Forwarded message ----------&lt;br&gt;From: &lt;b class=&quot;gmail_sendername&quot;&gt;Daniel Latter&lt;/b&gt; &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
Date: 2009/11/18&lt;br&gt;Subject: Re: [fw-general] Zend_Form_Element_File validator&lt;br&gt;To: &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;Hi,&lt;br&gt;&lt;br&gt;You do this:&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;logo&amp;#39;);&lt;br&gt;        $image-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;                  -&amp;gt;setDestination($this-&amp;gt;getimageUploadDir()) 
&lt;div&gt;&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;
&lt;/div&gt;                  &lt;span style=&quot;COLOR: rgb(255,0,0)&quot;&gt;-&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, array(&amp;#39;messages&amp;#39;=&amp;gt;&amp;#39;YOUR MESSAGE HERE&amp;#39;))&lt;/span&gt;&lt;br&gt;                  -&amp;gt;setRequired(true);&lt;br&gt;        $this-&amp;gt;addElement($image);&lt;br&gt;
&lt;br&gt;It took me ages to figure this out, as the validaor doesnt conform to the normal naming conventions of the other validators. I dont know if this is&lt;br&gt;an issue or not? I had to dig into the source code to find it.&lt;br&gt;
&lt;br&gt;Thanks&lt;br&gt;Dan 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;Thank you but I don´t see how to set the custom error messages for the Zend_Form_Element_File. I&amp;#39;ve read the manual before posting this question but didn&amp;#39;t found anything. I&amp;#39;m having this problem only with file elements.&lt;/div&gt;

&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;On the element itself because that error message is being triggered by the &amp;#39;required&amp;#39; flag.&lt;br&gt;
&lt;br&gt;The manual is pretty clear on this section.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431824&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Hi &lt;br&gt;I have a form with a required file element. If file is empty, I get &amp;quot;fileUploadErrorNoFile&amp;quot; =&amp;gt; &amp;quot;The file &amp;#39;image&amp;#39; was not uploaded&amp;quot; in $form-&amp;gt;getMessages().&lt;br&gt;
&lt;br&gt;Which validator should I add to the element to customize this error message ?&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;image&amp;#39;);&lt;br&gt;$filesmall-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;          -&amp;gt;setDestination(&amp;#39;./temp&amp;#39;)&lt;br&gt;
          -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;          -&amp;gt;setRequired(true);&lt;br&gt;
&lt;br&gt;Thanks in advance. &lt;br&gt;Cheers&lt;br&gt;holo&lt;br&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Form_Element_File-validator-tp26411241p26431824.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26431466</id>
	<title>Re: Zend_Form_Element_File validator</title>
	<published>2009-11-19T10:24:18Z</published>
	<updated>2009-11-19T10:24:18Z</updated>
	<author>
		<name>Daniel Latter-2</name>
	</author>
	<content type="html">&lt;html&gt;&lt;body bgcolor=&quot;#FFFFFF&quot;&gt;&lt;div&gt;Hi,&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;What I was thinking is you could grab all the form error messages, and then overrwrite the message we are after using the error message key, then use setErrorMessages on the form, &amp;nbsp;but it's a bit of a hack, and not tried?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;On 19 Nov 2009, at 17:20, &quot;holografix .&quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;div&gt;&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;I also tried -&amp;gt;addValidator('Upload', false, array('messages'=&amp;gt;array('fileUploadErrorFileNotFound'=&amp;gt;'TEST'))) with no success..&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Hi,&lt;br&gt;&lt;br&gt;Also, why does this:&lt;br&gt;&lt;br&gt;-&amp;gt;addValidator('Upload', false, array('messages'=&amp;gt;array('fileUploadErrorNoFile'=&amp;gt;'TEST')))&lt;br&gt;
&lt;br&gt;give you a &quot;&lt;b&gt;The file 'Water lilies.jpg' was not found&lt;/b&gt;&quot; error? (yes its from xp's sample pictures folder) 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Doh!&lt;br&gt;&lt;br&gt;Well I dont understand that because if it only &quot;..checks if an upload has resulted in an error&quot;,- and in our case a file has been uploaded, so there should'nt be an error, why are we still seeing the message? must be bug?&lt;br&gt;
&lt;br&gt;Thanks&lt;br&gt;Dan&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Talked too soon :)&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;It shows the message in both cases: upload a file, don't upload a file. &lt;/div&gt;
&lt;div&gt;I keep looking for a solution and cc'd the message to Thomas Weider toosee if I can get a solution.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;cheers&lt;/div&gt;
&lt;div&gt;holo&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div bgcolor=&quot;#FFFFFF&quot;&gt;
&lt;div&gt;Hi&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Ah, ok, didn't see that, glad it's working.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Thanks&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;br&gt;On 19 Nov 2009, at 00:35, &quot;holografix .&quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;blockquote type=&quot;cite&quot;&gt;
&lt;div&gt;Hi&lt;br&gt;Thanks again. It works now. &lt;br&gt;It works doing -&amp;gt;addValidator('Upload', true, ...) or -&amp;gt;addValidator('File_Upload', true, ...) although the manual states:&lt;br&gt;&lt;br&gt;21.2. Validators for Zend_File_Transfer&lt;br&gt;
...&lt;br&gt;....&lt;br&gt;Upload: This validator is internal. It checks if an upload has resulted in an error. You must not set it, as it's automatically set by Zend_File_Transfer itself. So you do not use this validator directly. You should only know that it exists.&lt;br&gt;
&lt;br&gt;
&lt;p&gt;Cheers,&lt;br&gt;holo&lt;br&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;sorry forgot to cc list. 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;---------- Forwarded message ----------&lt;br&gt;From: &lt;b class=&quot;gmail_sendername&quot;&gt;Daniel Latter&lt;/b&gt; &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
Date: 2009/11/18&lt;br&gt;Subject: Re: [fw-general] Zend_Form_Element_File validator&lt;br&gt;To: &quot;holografix .&quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;Hi,&lt;br&gt;&lt;br&gt;You do this:&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File('logo');&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $image-&amp;gt;setLabel('Image:')&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt;setDestination($this-&amp;gt;getimageUploadDir()) 
&lt;div&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt;addValidator('Size', true, '1MB')&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt;addValidator('Extension', true, 'zip')&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt;addValidator('Count', true, 1)&lt;br&gt;
&lt;/div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;COLOR: rgb(255,0,0)&quot;&gt;-&amp;gt;addValidator('File_Upload', true, array('messages'=&amp;gt;'YOUR MESSAGE HERE'))&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt;setRequired(true);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $this-&amp;gt;addElement($image);&lt;br&gt;
&lt;br&gt;It took me ages to figure this out, as the validaor doesnt conform to the normal naming conventions of the other validators. I dont know if this is&lt;br&gt;an issue or not? I had to dig into the source code to find it.&lt;br&gt;
&lt;br&gt;Thanks&lt;br&gt;Dan 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;Thank you but I don´t see how to set the custom error messages for the Zend_Form_Element_File. I've read the manual before posting this question but didn't found anything. I'm having this problem only with file elements.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;On the element itself because that error message is being triggered by the 'required' flag.&lt;br&gt;
&lt;br&gt;The manual is pretty clear on this section.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431466&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Hi &lt;br&gt;I have a form with a required file element. If file is empty, I get &quot;fileUploadErrorNoFile&quot; =&amp;gt; &quot;The file 'image' was not uploaded&quot; in $form-&amp;gt;getMessages().&lt;br&gt;
&lt;br&gt;Which validator should I add to the element to customize this error message ?&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File('image');&lt;br&gt;$filesmall-&amp;gt;setLabel('Image:')&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt;setDestination('./temp')&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt;addValidator('Size', true, '1MB')&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt;addValidator('Extension', true, 'zip')&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt;addValidator('Count', true, 1)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt;setRequired(true);&lt;br&gt;
&lt;br&gt;Thanks in advance. &lt;br&gt;Cheers&lt;br&gt;holo&lt;br&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;/div&gt;&lt;/blockquote&gt;&lt;/body&gt;&lt;/html&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Form_Element_File-validator-tp26411241p26431466.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26430354</id>
	<title>Re: Zend_Form_Element_File validator</title>
	<published>2009-11-19T09:20:39Z</published>
	<updated>2009-11-19T09:20:39Z</updated>
	<author>
		<name>holografix</name>
	</author>
	<content type="html">&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;I also tried -&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, false, array(&amp;#39;messages&amp;#39;=&amp;gt;array(&amp;#39;fileUploadErrorFileNotFound&amp;#39;=&amp;gt;&amp;#39;TEST&amp;#39;))) with no success..&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Hi,&lt;br&gt;&lt;br&gt;Also, why does this:&lt;br&gt;&lt;br&gt;-&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, false, array(&amp;#39;messages&amp;#39;=&amp;gt;array(&amp;#39;fileUploadErrorNoFile&amp;#39;=&amp;gt;&amp;#39;TEST&amp;#39;)))&lt;br&gt;
&lt;br&gt;give you a &amp;quot;&lt;b&gt;The file &amp;#39;Water lilies.jpg&amp;#39; was not found&lt;/b&gt;&amp;quot; error? (yes its from xp&amp;#39;s sample pictures folder) 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Doh!&lt;br&gt;&lt;br&gt;Well I dont understand that because if it only &amp;quot;..checks if an upload has resulted in an error&amp;quot;,- and in our case a file has been uploaded, so there should&amp;#39;nt be an error, why are we still seeing the message? must be bug?&lt;br&gt;
&lt;br&gt;Thanks&lt;br&gt;Dan&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Talked too soon :)&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;It shows the message in both cases: upload a file, don&amp;#39;t upload a file. &lt;/div&gt;
&lt;div&gt;I keep looking for a solution and cc&amp;#39;d the message to Thomas Weider toosee if I can get a solution.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;cheers&lt;/div&gt;
&lt;div&gt;holo&lt;/div&gt;
&lt;div&gt;&lt;br&gt; &lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div bgcolor=&quot;#FFFFFF&quot;&gt;
&lt;div&gt;Hi &lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Ah, ok, didn&amp;#39;t see that, glad it&amp;#39;s working.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Thanks&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;br&gt;On 19 Nov 2009, at 00:35, &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;blockquote type=&quot;cite&quot;&gt;
&lt;div&gt;Hi&lt;br&gt;Thanks again. It works now. &lt;br&gt;It works doing -&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, true, ...) or -&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, ...) although the manual states:&lt;br&gt;&lt;br&gt;21.2. Validators for Zend_File_Transfer&lt;br&gt;
...&lt;br&gt;....&lt;br&gt;Upload: This validator is internal. It checks if an upload has resulted in an error. You must not set it, as it&amp;#39;s automatically set by Zend_File_Transfer itself. So you do not use this validator directly. You should only know that it exists.&lt;br&gt;
&lt;br&gt;
&lt;p&gt;Cheers,&lt;br&gt;holo&lt;br&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;sorry forgot to cc list. 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;---------- Forwarded message ----------&lt;br&gt;From: &lt;b class=&quot;gmail_sendername&quot;&gt;Daniel Latter&lt;/b&gt; &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
Date: 2009/11/18&lt;br&gt;Subject: Re: [fw-general] Zend_Form_Element_File validator&lt;br&gt;To: &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;Hi,&lt;br&gt;&lt;br&gt;You do this:&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;logo&amp;#39;);&lt;br&gt;        $image-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;                  -&amp;gt;setDestination($this-&amp;gt;getimageUploadDir()) 
&lt;div&gt;&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;
&lt;/div&gt;                  &lt;span style=&quot;COLOR: rgb(255,0,0)&quot;&gt;-&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, array(&amp;#39;messages&amp;#39;=&amp;gt;&amp;#39;YOUR MESSAGE HERE&amp;#39;))&lt;/span&gt;&lt;br&gt;                  -&amp;gt;setRequired(true);&lt;br&gt;        $this-&amp;gt;addElement($image);&lt;br&gt;
&lt;br&gt;It took me ages to figure this out, as the validaor doesnt conform to the normal naming conventions of the other validators. I dont know if this is&lt;br&gt;an issue or not? I had to dig into the source code to find it.&lt;br&gt;
&lt;br&gt;Thanks&lt;br&gt;Dan 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;Thank you but I don´t see how to set the custom error messages for the Zend_Form_Element_File. I&amp;#39;ve read the manual before posting this question but didn&amp;#39;t found anything. I&amp;#39;m having this problem only with file elements.&lt;/div&gt;

&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;On the element itself because that error message is being triggered by the &amp;#39;required&amp;#39; flag.&lt;br&gt;
&lt;br&gt;The manual is pretty clear on this section.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430354&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Hi &lt;br&gt;I have a form with a required file element. If file is empty, I get &amp;quot;fileUploadErrorNoFile&amp;quot; =&amp;gt; &amp;quot;The file &amp;#39;image&amp;#39; was not uploaded&amp;quot; in $form-&amp;gt;getMessages().&lt;br&gt;
&lt;br&gt;Which validator should I add to the element to customize this error message ?&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;image&amp;#39;);&lt;br&gt;$filesmall-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;          -&amp;gt;setDestination(&amp;#39;./temp&amp;#39;)&lt;br&gt;
          -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;          -&amp;gt;setRequired(true);&lt;br&gt;
&lt;br&gt;Thanks in advance. &lt;br&gt;Cheers&lt;br&gt;holo&lt;br&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Form_Element_File-validator-tp26411241p26430354.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26430041</id>
	<title>Re: Zend_Form_Element_File validator</title>
	<published>2009-11-19T09:01:45Z</published>
	<updated>2009-11-19T09:01:45Z</updated>
	<author>
		<name>Daniel Latter-2</name>
	</author>
	<content type="html">Hi,&lt;br&gt;&lt;br&gt;Also, why does this:&lt;br&gt;&lt;br&gt;-&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, false, array(&amp;#39;messages&amp;#39;=&amp;gt;array(&amp;#39;fileUploadErrorNoFile&amp;#39;=&amp;gt;&amp;#39;TEST&amp;#39;)))&lt;br&gt;&lt;br&gt;give you a &amp;quot;&lt;b&gt;The file &amp;#39;Water lilies.jpg&amp;#39; was not found&lt;/b&gt;&amp;quot; error? (yes its from xp&amp;#39;s sample pictures folder)&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Doh!&lt;br&gt;&lt;br&gt;Well I dont understand that because if it only &amp;quot;..checks if an upload has resulted in an error&amp;quot;,- and in our case a file has been uploaded, so there should&amp;#39;nt be an error, why are we still seeing the message? must be bug?&lt;br&gt;

&lt;br&gt;Thanks&lt;br&gt;Dan&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;

&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Talked too soon :)&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;It shows the message in both cases: upload a file, don&amp;#39;t upload a file. &lt;/div&gt;
&lt;div&gt;I keep looking for a solution and cc&amp;#39;d the message to Thomas Weider toosee if I can get a solution.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;cheers&lt;/div&gt;
&lt;div&gt;holo&lt;/div&gt;
&lt;div&gt;&lt;br&gt; &lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div bgcolor=&quot;#FFFFFF&quot;&gt;
&lt;div&gt;Hi &lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Ah, ok, didn&amp;#39;t see that, glad it&amp;#39;s working.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Thanks&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;br&gt;On 19 Nov 2009, at 00:35, &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;blockquote type=&quot;cite&quot;&gt;
&lt;div&gt;Hi&lt;br&gt;Thanks again. It works now. &lt;br&gt;It works doing -&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, true, ...) or -&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, ...) although the manual states:&lt;br&gt;&lt;br&gt;21.2. Validators for Zend_File_Transfer&lt;br&gt;


...&lt;br&gt;....&lt;br&gt;Upload: This validator is internal. It checks if an upload has resulted in an error. You must not set it, as it&amp;#39;s automatically set by Zend_File_Transfer itself. So you do not use this validator directly. You should only know that it exists.&lt;br&gt;


&lt;br&gt;
&lt;p&gt;Cheers,&lt;br&gt;holo&lt;br&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;



&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;sorry forgot to cc list. 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;---------- Forwarded message ----------&lt;br&gt;From: &lt;b class=&quot;gmail_sendername&quot;&gt;Daniel Latter&lt;/b&gt; &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;


Date: 2009/11/18&lt;br&gt;Subject: Re: [fw-general] Zend_Form_Element_File validator&lt;br&gt;To: &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;br&gt;


&lt;br&gt;&lt;br&gt;Hi,&lt;br&gt;&lt;br&gt;You do this:&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;logo&amp;#39;);&lt;br&gt;        $image-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;                  -&amp;gt;setDestination($this-&amp;gt;getimageUploadDir()) 
&lt;div&gt;&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;


&lt;/div&gt;                  &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;-&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, array(&amp;#39;messages&amp;#39;=&amp;gt;&amp;#39;YOUR MESSAGE HERE&amp;#39;))&lt;/span&gt;&lt;br&gt;                  -&amp;gt;setRequired(true);&lt;br&gt;

        $this-&amp;gt;addElement($image);&lt;br&gt;
&lt;br&gt;It took me ages to figure this out, as the validaor doesnt conform to the normal naming conventions of the other validators. I dont know if this is&lt;br&gt;an issue or not? I had to dig into the source code to find it.&lt;br&gt;


&lt;br&gt;Thanks&lt;br&gt;Dan 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;



&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;Thank you but I don´t see how to set the custom error messages for the Zend_Form_Element_File. I&amp;#39;ve read the manual before posting this question but didn&amp;#39;t found anything. I&amp;#39;m having this problem only with file elements.&lt;/div&gt;



&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;On the element itself because that error message is being triggered by the &amp;#39;required&amp;#39; flag.&lt;br&gt;


&lt;br&gt;The manual is pretty clear on this section.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26430041&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;Hi &lt;br&gt;I have a form with a required file element. If file is empty, I get &amp;quot;fileUploadErrorNoFile&amp;quot; =&amp;gt; &amp;quot;The file &amp;#39;image&amp;#39; was not uploaded&amp;quot; in $form-&amp;gt;getMessages().&lt;br&gt;


&lt;br&gt;Which validator should I add to the element to customize this error message ?&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;image&amp;#39;);&lt;br&gt;$filesmall-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;          -&amp;gt;setDestination(&amp;#39;./temp&amp;#39;)&lt;br&gt;


          -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;          -&amp;gt;setRequired(true);&lt;br&gt;


&lt;br&gt;Thanks in advance. &lt;br&gt;Cheers&lt;br&gt;holo&lt;br&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;


&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Form_Element_File-validator-tp26411241p26430041.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26429791</id>
	<title>Re: Zend_Form_Element_File validator</title>
	<published>2009-11-19T08:49:35Z</published>
	<updated>2009-11-19T08:49:35Z</updated>
	<author>
		<name>Daniel Latter-2</name>
	</author>
	<content type="html">Doh!&lt;br&gt;&lt;br&gt;Well I dont understand that because if it only &amp;quot;..checks if an upload has resulted in an error&amp;quot;,- and in our case a file has been uploaded, so there should&amp;#39;nt be an error, why are we still seeing the message? must be bug?&lt;br&gt;
&lt;br&gt;Thanks&lt;br&gt;Dan&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Talked too soon :)&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;It shows the message in both cases: upload a file, don&amp;#39;t upload a file. &lt;/div&gt;
&lt;div&gt;I keep looking for a solution and cc&amp;#39;d the message to Thomas Weider toosee if I can get a solution.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;cheers&lt;/div&gt;
&lt;div&gt;holo&lt;/div&gt;
&lt;div&gt;&lt;br&gt; &lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div bgcolor=&quot;#FFFFFF&quot;&gt;
&lt;div&gt;Hi &lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Ah, ok, didn&amp;#39;t see that, glad it&amp;#39;s working.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Thanks&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;br&gt;On 19 Nov 2009, at 00:35, &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;blockquote type=&quot;cite&quot;&gt;
&lt;div&gt;Hi&lt;br&gt;Thanks again. It works now. &lt;br&gt;It works doing -&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, true, ...) or -&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, ...) although the manual states:&lt;br&gt;&lt;br&gt;21.2. Validators for Zend_File_Transfer&lt;br&gt;

...&lt;br&gt;....&lt;br&gt;Upload: This validator is internal. It checks if an upload has resulted in an error. You must not set it, as it&amp;#39;s automatically set by Zend_File_Transfer itself. So you do not use this validator directly. You should only know that it exists.&lt;br&gt;

&lt;br&gt;
&lt;p&gt;Cheers,&lt;br&gt;holo&lt;br&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;


&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;sorry forgot to cc list. 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;---------- Forwarded message ----------&lt;br&gt;From: &lt;b class=&quot;gmail_sendername&quot;&gt;Daniel Latter&lt;/b&gt; &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

Date: 2009/11/18&lt;br&gt;Subject: Re: [fw-general] Zend_Form_Element_File validator&lt;br&gt;To: &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;br&gt;

&lt;br&gt;&lt;br&gt;Hi,&lt;br&gt;&lt;br&gt;You do this:&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;logo&amp;#39;);&lt;br&gt;        $image-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;                  -&amp;gt;setDestination($this-&amp;gt;getimageUploadDir()) 
&lt;div&gt;&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;

&lt;/div&gt;                  &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;-&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, array(&amp;#39;messages&amp;#39;=&amp;gt;&amp;#39;YOUR MESSAGE HERE&amp;#39;))&lt;/span&gt;&lt;br&gt;                  -&amp;gt;setRequired(true);&lt;br&gt;
        $this-&amp;gt;addElement($image);&lt;br&gt;
&lt;br&gt;It took me ages to figure this out, as the validaor doesnt conform to the normal naming conventions of the other validators. I dont know if this is&lt;br&gt;an issue or not? I had to dig into the source code to find it.&lt;br&gt;

&lt;br&gt;Thanks&lt;br&gt;Dan 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;


&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;Thank you but I don´t see how to set the custom error messages for the Zend_Form_Element_File. I&amp;#39;ve read the manual before posting this question but didn&amp;#39;t found anything. I&amp;#39;m having this problem only with file elements.&lt;/div&gt;


&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;On the element itself because that error message is being triggered by the &amp;#39;required&amp;#39; flag.&lt;br&gt;

&lt;br&gt;The manual is pretty clear on this section.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429791&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;Hi &lt;br&gt;I have a form with a required file element. If file is empty, I get &amp;quot;fileUploadErrorNoFile&amp;quot; =&amp;gt; &amp;quot;The file &amp;#39;image&amp;#39; was not uploaded&amp;quot; in $form-&amp;gt;getMessages().&lt;br&gt;

&lt;br&gt;Which validator should I add to the element to customize this error message ?&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;image&amp;#39;);&lt;br&gt;$filesmall-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;          -&amp;gt;setDestination(&amp;#39;./temp&amp;#39;)&lt;br&gt;

          -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;          -&amp;gt;setRequired(true);&lt;br&gt;

&lt;br&gt;Thanks in advance. &lt;br&gt;Cheers&lt;br&gt;holo&lt;br&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Form_Element_File-validator-tp26411241p26429791.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26429635</id>
	<title>Re: Zend_Form_Element_File validator</title>
	<published>2009-11-19T08:40:58Z</published>
	<updated>2009-11-19T08:40:58Z</updated>
	<author>
		<name>holografix</name>
	</author>
	<content type="html">&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Talked too soon :)&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;It shows the message in both cases: upload a file, don&amp;#39;t upload a file. &lt;/div&gt;
&lt;div&gt;I keep looking for a solution and cc&amp;#39;d the message to Thomas Weider toosee if I can get a solution.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;cheers&lt;/div&gt;
&lt;div&gt;holo&lt;/div&gt;
&lt;div&gt;&lt;br&gt; &lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/19 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429635&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div bgcolor=&quot;#FFFFFF&quot;&gt;
&lt;div&gt;Hi &lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Ah, ok, didn&amp;#39;t see that, glad it&amp;#39;s working.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Thanks&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div class=&quot;h5&quot;&gt;
&lt;div&gt;&lt;br&gt;On 19 Nov 2009, at 00:35, &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429635&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;blockquote type=&quot;cite&quot;&gt;
&lt;div&gt;Hi&lt;br&gt;Thanks again. It works now. &lt;br&gt;It works doing -&amp;gt;addValidator(&amp;#39;Upload&amp;#39;, true, ...) or -&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, ...) although the manual states:&lt;br&gt;&lt;br&gt;21.2. Validators for Zend_File_Transfer&lt;br&gt;
...&lt;br&gt;....&lt;br&gt;Upload: This validator is internal. It checks if an upload has resulted in an error. You must not set it, as it&amp;#39;s automatically set by Zend_File_Transfer itself. So you do not use this validator directly. You should only know that it exists.&lt;br&gt;
&lt;br&gt;
&lt;p&gt;Cheers,&lt;br&gt;holo&lt;br&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429635&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;sorry forgot to cc list. 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;---------- Forwarded message ----------&lt;br&gt;From: &lt;b class=&quot;gmail_sendername&quot;&gt;Daniel Latter&lt;/b&gt; &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429635&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
Date: 2009/11/18&lt;br&gt;Subject: Re: [fw-general] Zend_Form_Element_File validator&lt;br&gt;To: &amp;quot;holografix .&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429635&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;Hi,&lt;br&gt;&lt;br&gt;You do this:&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;logo&amp;#39;);&lt;br&gt;        $image-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;                  -&amp;gt;setDestination($this-&amp;gt;getimageUploadDir()) 
&lt;div&gt;&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;                  -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;
&lt;/div&gt;                  &lt;span style=&quot;COLOR: rgb(255,0,0)&quot;&gt;-&amp;gt;addValidator(&amp;#39;File_Upload&amp;#39;, true, array(&amp;#39;messages&amp;#39;=&amp;gt;&amp;#39;YOUR MESSAGE HERE&amp;#39;))&lt;/span&gt;&lt;br&gt;                  -&amp;gt;setRequired(true);&lt;br&gt;        $this-&amp;gt;addElement($image);&lt;br&gt;
&lt;br&gt;It took me ages to figure this out, as the validaor doesnt conform to the normal naming conventions of the other validators. I dont know if this is&lt;br&gt;an issue or not? I had to dig into the source code to find it.&lt;br&gt;
&lt;br&gt;Thanks&lt;br&gt;Dan 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429635&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;

&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;
&lt;div&gt;Hi&lt;/div&gt;
&lt;div&gt;Thank you but I don´t see how to set the custom error messages for the Zend_Form_Element_File. I&amp;#39;ve read the manual before posting this question but didn&amp;#39;t found anything. I&amp;#39;m having this problem only with file elements.&lt;/div&gt;

&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Cheers&lt;/div&gt;
&lt;div&gt;holo&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 Daniel Latter &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429635&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dan.latter@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;On the element itself because that error message is being triggered by the &amp;#39;required&amp;#39; flag.&lt;br&gt;
&lt;br&gt;The manual is pretty clear on this section.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/18 holografix . &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26429635&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;holografix@...&lt;/a&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt; 
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Hi &lt;br&gt;I have a form with a required file element. If file is empty, I get &amp;quot;fileUploadErrorNoFile&amp;quot; =&amp;gt; &amp;quot;The file &amp;#39;image&amp;#39; was not uploaded&amp;quot; in $form-&amp;gt;getMessages().&lt;br&gt;
&lt;br&gt;Which validator should I add to the element to customize this error message ?&lt;br&gt;&lt;br&gt;$image = new Zend_Form_Element_File(&amp;#39;image&amp;#39;);&lt;br&gt;$filesmall-&amp;gt;setLabel(&amp;#39;Image:&amp;#39;)&lt;br&gt;          -&amp;gt;setDestination(&amp;#39;./temp&amp;#39;)&lt;br&gt;
          -&amp;gt;addValidator(&amp;#39;Size&amp;#39;, true, &amp;#39;1MB&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Extension&amp;#39;, true, &amp;#39;zip&amp;#39;)&lt;br&gt;          -&amp;gt;addValidator(&amp;#39;Count&amp;#39;, true, 1)&lt;br&gt;          -&amp;gt;setRequired(true);&lt;br&gt;
&lt;br&gt;Thanks in advance. &lt;br&gt;Cheers&lt;br&gt;holo&lt;br&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Zend_Form_Element_File-validator-tp26411241p26429635.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26428053</id>
	<title>Re: PHP + IIS + SMB + Zend Studios?</title>
	<published>2009-11-19T07:18:14Z</published>
	<updated>2009-11-19T07:18:14Z</updated>
	<author>
		<name>humansky</name>
	</author>
	<content type="html">&lt;br&gt;On Nov 19, 2009, at 4:38 AM, Jason Webster wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 18/11/2009 6:00 AM, Henry Umansky wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hello all,
&lt;br&gt;&amp;gt;&amp;gt; This is not a question regarding ZF per se, I just want to know how
&lt;br&gt;&amp;gt;&amp;gt; others would handle the same situation. Currently I was given a &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; task to
&lt;br&gt;&amp;gt;&amp;gt; develop a PHP ZF app on a Windows Server 2k8 running IIS7. Problem is
&lt;br&gt;&amp;gt;&amp;gt; that I'm using Mac Leopard and connecting to windows using SMB &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; through
&lt;br&gt;&amp;gt;&amp;gt; the Zend Studios 6.1 IDE. This process is painfully slow, every key
&lt;br&gt;&amp;gt;&amp;gt; stroke takes about 3-5 seconds to register and connecting to SMB &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; before
&lt;br&gt;&amp;gt;&amp;gt; I open ZS is an extra step I would like to cut out. I've isolated the
&lt;br&gt;&amp;gt;&amp;gt; problem to Zend Studios, since other text editors like TextWrangler &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; or
&lt;br&gt;&amp;gt;&amp;gt; Komodo Edit are fine. So my question is this, how are others &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; connecting
&lt;br&gt;&amp;gt;&amp;gt; to windows servers and developing PHP/ZF applications and what IDEs &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; do
&lt;br&gt;&amp;gt;&amp;gt; they use and what connection protocol does your organization allow?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Also, on a side note, does anyone know of a tool that will allow me &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; to
&lt;br&gt;&amp;gt;&amp;gt; easily package and migrate my application from development server &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; ---&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; QA server ----&amp;gt; finally the two load balanced production server? &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; The old
&lt;br&gt;&amp;gt;&amp;gt; method of connecting to all three via SMB and using the drag and drop
&lt;br&gt;&amp;gt;&amp;gt; method is getting old and I want to minimize downtime. Right now I &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; can
&lt;br&gt;&amp;gt;&amp;gt; do each front-end independently, but there is about a 5-10 second lag
&lt;br&gt;&amp;gt;&amp;gt; until our load balancer detects the 500 error, and sends traffic to &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; other front-end, when I copy the folders over. I guess it ultimately
&lt;br&gt;&amp;gt;&amp;gt; comes down to, is there an rsync equivalent to windows if so, what &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; is it?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thank you,
&lt;br&gt;&amp;gt;&amp;gt; Henry
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; My daily workflow is ZSfE over SMB. I experience no issues whatsoever.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; How are you connecting to the SMB share?
&lt;/div&gt;&lt;br&gt;On my Mac Leopard, I'm simply mounting the volume with command-k then &amp;nbsp;
&lt;br&gt;entering in the URI &amp;quot;smb://&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26428053&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;username@...&lt;/a&gt;/foldername&amp;quot;, then I &amp;nbsp;
&lt;br&gt;fire up ZS and I have a project that uses the &amp;quot;/Volume/foldername&amp;quot; as &amp;nbsp;
&lt;br&gt;the starting path. What do you do? I know I'm probably doing something &amp;nbsp;
&lt;br&gt;wrong. ZS works fine for all my Apache/PHP project, just not with this &amp;nbsp;
&lt;br&gt;particular PHP/IIS7 project.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/PHP-%2B-IIS-%2B-SMB-%2B-Zend-Studios--tp26408291p26428053.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26421359</id>
	<title>Re: Desgin a Zend_Form using CSS</title>
	<published>2009-11-19T06:42:21Z</published>
	<updated>2009-11-19T06:42:21Z</updated>
	<author>
		<name>umpirsky</name>
	</author>
	<content type="html">&lt;a href=&quot;http://www.zfforums.com/zend-framework-general-discussions-1/general-q-zend-framework-2/css-default-zend_form-841.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.zfforums.com/zend-framework-general-discussions-1/general-q-zend-framework-2/css-default-zend_form-841.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Stefan Sturm-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello,
&lt;br&gt;&lt;br&gt;is there somewhere i tutorial or a quick start which explains howto design a
&lt;br&gt;Zend_Form using CSS?
&lt;br&gt;I'm not a CSS pro, so I would like &amp;nbsp;to get some tipps :-)
&lt;br&gt;&lt;br&gt;Thanks and greetings,
&lt;br&gt;Stefan Sturm
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Desgin-a-Zend_Form-using-CSS-tp15709006p26421359.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26426755</id>
	<title>Re: How to reuse html and model logic? partials? view  helpers?</title>
	<published>2009-11-19T05:57:59Z</published>
	<updated>2009-11-19T05:57:59Z</updated>
	<author>
		<name>nebiros</name>
	</author>
	<content type="html">Thanks mate :).
&lt;br&gt;&lt;br&gt;On Thu, Nov 19, 2009 at 8:54 AM, Matthew Weier O'Phinney
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26426755&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matthew@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -- Juan Felipe Alvarez Saldarriaga &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26426755&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jfalvarez@...&lt;/a&gt;&amp;gt; wrote
&lt;br&gt;&amp;gt; (on Thursday, 19 November 2009, 08:10 AM -0500):
&lt;br&gt;&amp;gt;&amp;gt; I have a page with like four tabs, so I want to reuse each tab html
&lt;br&gt;&amp;gt;&amp;gt; and logic, how to achive this? create a view helper for each tab? I
&lt;br&gt;&amp;gt;&amp;gt; was looking at the current view helpers code and all of them returns
&lt;br&gt;&amp;gt;&amp;gt; an string with all the html, it's possible to use a view?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you extend Zend_View_Helper_Abstract, the View object will be
&lt;br&gt;&amp;gt; injected into your helper; alternately, you can simply add a setView()
&lt;br&gt;&amp;gt; method on your helper, and the view will be injected after instantiation
&lt;br&gt;&amp;gt; but prior to execution of the helper.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; a phtml file to no mix logic with the html? I was thinking something
&lt;br&gt;&amp;gt;&amp;gt; like this:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; class Ceiba_View_Helper_News extends Zend_View_Helper_Abstract
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt;     protected $_view = null;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;     public function setView( Zend_View_Interface $view )
&lt;br&gt;&amp;gt;&amp;gt;     {
&lt;br&gt;&amp;gt;&amp;gt;         $this-&amp;gt;_view = $view;
&lt;br&gt;&amp;gt;&amp;gt;     }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you extend Zend_View_Helper_Abstract, setView() is already defined,
&lt;br&gt;&amp;gt; and sets the public $view property -- so access is simply via
&lt;br&gt;&amp;gt; $this-&amp;gt;view.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;     public function news()
&lt;br&gt;&amp;gt;&amp;gt;     {
&lt;br&gt;&amp;gt;&amp;gt;         /** some logic **/
&lt;br&gt;&amp;gt;&amp;gt;         $this-&amp;gt;_view-&amp;gt;blah = &amp;quot;blah1&amp;quot;;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;         // I'm adding this path to the bootstrap:
&lt;br&gt;&amp;gt;&amp;gt; $view-&amp;gt;addScriptPath( APPLICATION_PATH . &amp;quot;/views/scripts&amp;quot; );
&lt;br&gt;&amp;gt;&amp;gt;         return $this-&amp;gt;_view-&amp;gt;render( &amp;quot;partials/news.phtml&amp;quot; );
&lt;br&gt;&amp;gt;&amp;gt;     }
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yes, that will work fine, and is a good approach.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Matthew Weier O'Phinney
&lt;br&gt;&amp;gt; Project Lead            | &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26426755&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matthew@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Zend Framework          | &lt;a href=&quot;http://framework.zend.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-reuse-html-and-model-logic--partials--view-helpers--tp26425965p26426755.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26426692</id>
	<title>Re: How to reuse html and model logic? partials? view helpers?</title>
	<published>2009-11-19T05:54:39Z</published>
	<updated>2009-11-19T05:54:39Z</updated>
	<author>
		<name>weierophinney</name>
	</author>
	<content type="html">-- Juan Felipe Alvarez Saldarriaga &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26426692&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jfalvarez@...&lt;/a&gt;&amp;gt; wrote
&lt;br&gt;(on Thursday, 19 November 2009, 08:10 AM -0500):
&lt;br&gt;&amp;gt; I have a page with like four tabs, so I want to reuse each tab html
&lt;br&gt;&amp;gt; and logic, how to achive this? create a view helper for each tab? I
&lt;br&gt;&amp;gt; was looking at the current view helpers code and all of them returns
&lt;br&gt;&amp;gt; an string with all the html, it's possible to use a view? 
&lt;br&gt;&lt;br&gt;If you extend Zend_View_Helper_Abstract, the View object will be
&lt;br&gt;injected into your helper; alternately, you can simply add a setView()
&lt;br&gt;method on your helper, and the view will be injected after instantiation
&lt;br&gt;but prior to execution of the helper.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; a phtml file to no mix logic with the html? I was thinking something
&lt;br&gt;&amp;gt; like this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; class Ceiba_View_Helper_News extends Zend_View_Helper_Abstract
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; protected $_view = null;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; public function setView( Zend_View_Interface $view )
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;_view = $view;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;/div&gt;&lt;br&gt;If you extend Zend_View_Helper_Abstract, setView() is already defined,
&lt;br&gt;and sets the public $view property -- so access is simply via
&lt;br&gt;$this-&amp;gt;view.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; public function news()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /** some logic **/
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;_view-&amp;gt;blah = &amp;quot;blah1&amp;quot;;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // I'm adding this path to the bootstrap:
&lt;br&gt;&amp;gt; $view-&amp;gt;addScriptPath( APPLICATION_PATH . &amp;quot;/views/scripts&amp;quot; );
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return $this-&amp;gt;_view-&amp;gt;render( &amp;quot;partials/news.phtml&amp;quot; );
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; }
&lt;/div&gt;&lt;br&gt;Yes, that will work fine, and is a good approach.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Matthew Weier O'Phinney
&lt;br&gt;Project Lead &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26426692&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;matthew@...&lt;/a&gt;
&lt;br&gt;Zend Framework &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;a href=&quot;http://framework.zend.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://framework.zend.com/&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-reuse-html-and-model-logic--partials--view-helpers--tp26425965p26426692.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26425965</id>
	<title>How to reuse html and model logic? partials? view helpers?</title>
	<published>2009-11-19T05:10:18Z</published>
	<updated>2009-11-19T05:10:18Z</updated>
	<author>
		<name>nebiros</name>
	</author>
	<content type="html">Hey!
&lt;br&gt;&lt;br&gt;I have a page with like four tabs, so I want to reuse each tab html
&lt;br&gt;and logic, how to achive this? create a view helper for each tab? I
&lt;br&gt;was looking at the current view helpers code and all of them returns
&lt;br&gt;an string with all the html, it's possible to use a view? a phtml file
&lt;br&gt;to no mix logic with the html? I was thinking something like this:
&lt;br&gt;&lt;br&gt;class Ceiba_View_Helper_News extends Zend_View_Helper_Abstract
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; protected $_view = null;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public function setView( Zend_View_Interface $view )
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;_view = $view;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public function news()
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /** some logic **/
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this-&amp;gt;_view-&amp;gt;blah = &amp;quot;blah1&amp;quot;;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // I'm adding this path to the bootstrap:
&lt;br&gt;$view-&amp;gt;addScriptPath( APPLICATION_PATH . &amp;quot;/views/scripts&amp;quot; );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return $this-&amp;gt;_view-&amp;gt;render( &amp;quot;partials/news.phtml&amp;quot; );
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Any thoughs? thanks.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-reuse-html-and-model-logic--partials--view-helpers--tp26425965p26425965.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26425594</id>
	<title>Re: Call to a member function _() on a non-object</title>
	<published>2009-11-19T04:45:51Z</published>
	<updated>2009-11-19T04:45:51Z</updated>
	<author>
		<name>umpirsky</name>
	</author>
	<content type="html">Poedit -&amp;gt; catalog -&amp;gt; settings -&amp;gt; keywords -&amp;gt; add your function name, in this case &amp;#39;translate&amp;#39;.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Poedit will look for translate() calls and put in all strings. If you need to inject variables into your translation, use sprintf, like:&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;? $this-&amp;gt;sprintf(%this-&amp;gt;translate(&amp;#39;You added %s items.&amp;#39;), $num_of_items) ?&amp;gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;Regards,&lt;br&gt;Saša Stamenković&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 19, 2009 at 12:46 PM, Danny Fröberg &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26425594&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;danny.froberg@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;
Hi,&lt;br&gt;
This one helped me when I was faced with the exact same problem in poedit;&lt;br&gt;
&lt;a href=&quot;http://www.tornstrand.com/2008/03/29/string-localization-with-gettext-and-zend-framework/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.tornstrand.com/2008/03/29/string-localization-with-gettext-and-zend-framework/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
/Danny&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt; -----Ursprungligt meddelande-----&lt;br&gt;
&amp;gt; Från: Kuzma [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26425594&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;01garant@...&lt;/a&gt;]&lt;br&gt;
&amp;gt; Skickat: den 19 november 2009 10:13&lt;br&gt;
&amp;gt; Till: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26425594&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fw-general@...&lt;/a&gt;&lt;br&gt;
&amp;gt; Ämne: Re: [fw-general] Call to a member function _() on a non-object&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thank you for your reply!&lt;br&gt;
&amp;gt; I must have only this translator&amp;#39;s call: echo $this-&amp;gt;translator-&amp;gt;_(&amp;#39;&amp;#39;)&lt;br&gt;
&amp;gt; Otherwise PoEdit won&amp;#39;t accept values for translation. It needs this form.&lt;br&gt;
&amp;gt; I&amp;#39;ve added in _initView that one line (-&amp;gt;bootstrap(&amp;#39;translate&amp;#39;)):&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;         protected function _initViewHelpers()&lt;br&gt;
&amp;gt;         {&lt;br&gt;
&amp;gt;                 $view = new Zend_View();&lt;br&gt;
&amp;gt;                 $view-&amp;gt;setEncoding(&amp;#39;UTF-8&amp;#39;);&lt;br&gt;
&amp;gt;                 $view-&amp;gt;doctype(&amp;#39;XHTML1_STRICT&amp;#39;);&lt;br&gt;
&amp;gt;                 $view-&amp;gt;headTitle(&amp;#39;GM&amp;#39;);&lt;br&gt;
&amp;gt;                 $view-&amp;gt;env = APPLICATION_ENV;&lt;br&gt;
&amp;gt;                 $view-&lt;br&gt;
&amp;gt; &amp;gt;addHelperPath(&amp;quot;Tinymce/View/Helper&amp;quot;,&amp;quot;Tinymce_View_Helper&amp;quot;)&lt;br&gt;
&amp;gt;                 -&amp;gt;addHelperPath(&amp;quot;Views/Helpers&amp;quot;,&amp;quot;Views_Helpers&amp;quot;,&amp;#39;Link&amp;#39;)&lt;br&gt;
&amp;gt;         -&amp;gt;addHelperPath(&amp;quot;ZendX/JQuery/View/Helper/&amp;quot;,&lt;br&gt;
&amp;gt; &amp;quot;ZendX_JQuery_View_Helper&amp;quot;);&lt;br&gt;
&amp;gt;                 ZendX_JQuery::enableView($view);&lt;br&gt;
&amp;gt;                 $viewRenderer = new&lt;br&gt;
&amp;gt; Zend_Controller_Action_Helper_ViewRenderer($view);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;                 $viewRenderer-&amp;gt;setView($view);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;                 Zend_Layout::startMvc(&lt;br&gt;
&amp;gt;             array(&lt;br&gt;
&amp;gt;                                 &amp;#39;layout&amp;#39; =&amp;gt; &amp;#39;layout&amp;#39;,&lt;br&gt;
&amp;gt;                 &amp;#39;layoutPath&amp;#39; =&amp;gt; &amp;#39;/application/views/layouts&amp;#39;,&lt;br&gt;
&amp;gt;                 &amp;#39;pluginClass&amp;#39; =&amp;gt; &amp;#39;ZFBlog_Layout_Controller_Plugin_Layout&amp;#39;&lt;br&gt;
&amp;gt;             )&lt;br&gt;
&amp;gt;         );&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;         $view = Zend_Layout::getMvcInstance()-&amp;gt;getView();&lt;br&gt;
&amp;gt;                 $this-&amp;gt;bootstrap(&amp;#39;layout&amp;#39;)&lt;br&gt;
&amp;gt;                          -&amp;gt;bootstrap(&amp;#39;translate&amp;#39;);&lt;br&gt;
&amp;gt;                 //$this-&amp;gt;bootstrap(&amp;#39;Translate&amp;#39;);&lt;br&gt;
&amp;gt;                 $view-&amp;gt;translator = $this-&amp;gt;translator;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;                 $layout=$this-&amp;gt;getResource(&amp;#39;layout&amp;#39;);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;                 $config=new Zend_Config_Xml(APPLICATION_PATH .&lt;br&gt;
&amp;gt; &amp;#39;/configs/navigation.xml&amp;#39;,&lt;br&gt;
&amp;gt; &amp;#39;nav&amp;#39;);&lt;br&gt;
&amp;gt;                 $navigation=new Zend_Navigation($config);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; $view-&amp;gt;navigation($navigation)-&amp;gt;setAcl($this-&amp;gt;_acl)-&lt;br&gt;
&amp;gt; &amp;gt;setRole(Zend_Registry::get(&amp;#39;role&amp;#39;));&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;         }&lt;br&gt;
&amp;gt; But I&amp;#39;m still receiving that error :-(&lt;br&gt;
&amp;gt; Still can&amp;#39;t find solution :(&lt;br&gt;
&amp;gt; --&lt;br&gt;
&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Call-to-a-member-&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Call-to-a-member-&lt;/a&gt;&lt;br&gt;
&amp;gt; function-_%28%29-on-a-non-object-tp26416195p26421243.html&lt;br&gt;
&amp;gt; Sent from the Zend Framework mailing list archive at Nabble.com.&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Framework-f15440.html&quot; embed=&quot;fixTarget[15440]&quot; target=&quot;_top&quot; &gt;Zend Framework&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Call-to-a-member-function-_%28%29-on-a-non-object-tp26416195p26425594.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26425128</id>
	<title>Re: [DE] Korrekturlesen</title>
	<published>2009-11-19T04:09:41Z</published>
	<updated>2009-11-19T04:09:41Z</updated>
	<author>
		<name>Christoph Löffler</name>
	</author>
	<content type="html">Hallo,&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;da ich im Wiki nicht editieren kann, hier noch ein Datei, die ich momentan bearbeite:&lt;br&gt;&lt;br&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;table class=&quot;confluenceTable&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot;&gt;Zend_Translate-Using.xml&lt;/td&gt;

&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;
&lt;td valign=&quot;top&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td&gt;Chris&lt;/td&gt;
&lt;td&gt;in Bearbeitung&lt;br&gt;&lt;/td&gt;
&lt;/tr&gt;




&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;Bitte ebenfalls eintragen, danke.&lt;br&gt;&lt;br&gt;Greetings&lt;br&gt;Chris&lt;br&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Zend-Doc-f16193.html&quot; embed=&quot;fixTarget[16193]&quot; target=&quot;_top&quot; &gt;Zend Doc&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-DE--Korrekturlesen-tp26407639p26425128.html" />
</entry>

</feed>
