Re: [fw-general] Why use resources.view.basePath = APPLICATION_PATH "/views"?

2010-05-15 Thread Mon Zafra
That method has absolutely no relation at all to the view basepath. It is
also useless since you're not really doing anything at all with the request
object you instantiated. The front controller already lazily loads the same
class during dispatch.

The reason your application still works even without the basePath line in
the config is because the view renderer infers the location of the view
scripts from the controller directories defined by the front controller. If
your app seems to load faster, it might be because it doesn't have to load
the View resource plugin anymore after removing that line (can't really tell
without seeing the rest of the ini), or it might be an illusion caused by
APC being primed after your first run.


   -- Mon


On Sun, May 16, 2010 at 8:03 AM, Mike A  wrote:

> Why use resources.view.basePath = APPLICATION_PATH "/views" in an
> application configuration file?
>
> Placing the following code in global Bootstrap.php seems to do the same
> things - and more:
> protected function _initBaseUrl() {
>$this->bootstrap("frontController");
>$front=$this->getResource("frontController");
>$request=new Zend_Controller_Request_Http();
>$front->setRequest($request);
> }
>
> If I remove the resources.view.basePath from the configuration file it
> doesn't seem to make any difference - except for some reason I haven't
> worked out yet the application seems to load a bit faster.
>
> The project, which is for experimentation, uses multiple modules.
>
> TIA...
>
> Mike A.
>


[fw-general] Why use resources.view.basePath = APPLICATION_PATH "/views"?

2010-05-15 Thread Mike A
Why use resources.view.basePath = APPLICATION_PATH "/views" in an 
application configuration file?


Placing the following code in global Bootstrap.php seems to do the same 
things - and more:

protected function _initBaseUrl() {
$this->bootstrap("frontController");
$front=$this->getResource("frontController");
$request=new Zend_Controller_Request_Http();
$front->setRequest($request);
}

If I remove the resources.view.basePath from the configuration file it 
doesn't seem to make any difference - except for some reason I haven't 
worked out yet the application seems to load a bit faster.


The project, which is for experimentation, uses multiple modules.

TIA...

Mike A.


[fw-general] Re: add new virtual host in zend server

2010-05-15 Thread dmitrybelyakov

It's located under /usrl/local/zend/apache2/conf/extra :)
-- 
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/add-new-virtual-host-in-zend-server-tp2217695p2218167.html
Sent from the Zend Framework mailing list archive at Nabble.com.


[fw-general] Mootools Form Validation

2010-05-15 Thread Meroe Meroe
Anyone know how to use the default zend framework validation with mootools
Ajax for submit?

I don't want to use a custom mootools validation such as formcheck or the
like.  Any thoughts? examples?


Re: [fw-general] How can change my registred mail adress for thismailing list ?

2010-05-15 Thread d.fohl
Thank you Matthew, to be always here for us.

 Le ven 14/05/10 17:32, "Matthew Weier O'Phinney" matt...@zend.com a écrit:
> -- d.f...@df-
> info.com  info.com> wrote
(on Friday, 14 May 2010, 04:33 PM +0200):
> >  How can change my registred mail adress for this
> mailing list ?
> 
> > I'd like fw-general messages to arrive at another
> address.
> You can't directly; you need to unsub and then subscribe. 
> 
> Unsubscribe this address (send an email from the current address to
> fw-general-unsubscr...@lists.zend.com), and then subscribe
> with the new
email address (send an email from your new address to
> fw-general-subscr...@lists.zend.com).
> -- 
> Matthew Weier O'Phinney
> Project Lead| matt...@zend
> .com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
> 
> 



[fw-general] add new virtual host in zend server

2010-05-15 Thread shahrzad khorrami
hi dears,

How can I add new virtual host in zend server?in where?

in which path in zend server, I can find sites-available/default (like in
apache2) and add Virtual Host...??

Thanks,
Shahrzad


Re: [fw-general] grouped Zend_Form text elements

2010-05-15 Thread Aleksey Zapparov
Hello,

In this case (CSS tricks) IMHO it's better leave elements with
standard decorators as-is
and mangle them with small JavaScript instead. But in fact, both ways
are not very far
from (or even btter than) simply ViewScript usage. If you don't want
to use ViewScript,
IMHO you better create your own form Element which will return an
array of zipCode and
city, something like this one: http://gist.github.com/402131


2010/5/15 Philip Iezzi :
> Great, Eugene, thanks a lot!
>
> That's how I did it:
>
>        $city->removeDecorator('Label');
>
> (there is no DtDdWrapper on a standard Zend_Form_Element_Text, so I just 
> removed the "Label" (dt) decorator, the dd tag comes from the "HtmlTag" 
> decorator)
>
> Form element output:
>
> Zipcode / 
> City
> 
>  
> 
> 
>  
> 
>
>
> My CSS looks like this:
>
> --
> fieldset dt {
>    width: 210px;
>    float: left;
> }
>
> fieldset dd {
>    float: left;
> }
>
> fieldset dd#zipcode-element {
>    width: 110px;
> }
> fieldset dd#city-element {
>    width: 330px;
> }
> fieldset input#zipcode {
>    width: 100px;
> }
> fieldset input#city {
>    width: 325px;
> }
>
> fieldset dd#city-element ul.errors {
>    margin-left: -115px;
> }
> --
>
> It's kind of an ugly hack, especially the positioning of ul.errors - errors 
> of both input fields override each other. But as 
> Zend_Validate_NotEmpty::IS_EMPTY is the only possible error message in this 
> case, this doesn't matter and looks even better than two identical errors.
>
> take care
> Philip
>
>
>
> Am 14.05.2010 um 16:03 schrieb Eugene Morgan:
>
>> This is one way to do it:
>>
>> $city->removeDecorator('DtDdWrapper')
>>            ->addDecorator('HtmlTag', array(
>>                'tag' => 'dd'
>>            ));
>>
>> You'll get markup like this:
>> Zipcode /
>> City
>> 
>>   
>> 
>> 
>>   
>> 
>>
>> Then you can use CSS to make that second  display inline.
>>
>>
>> On Thu, May 13, 2010 at 4:50 PM, Philip Iezzi  wrote:
>>> Hi,
>>>
>>> What I'm trying to accomplish is to group two Zend_Form_Element_Text 
>>> elements that they show up on the same line.
>>> I'm styling my standard Zend_Form output (standard decorators) by CSS to 
>>> bring the form element's label to the left side of the input field.
>>>
>>>    $zipcode = new Zend_Form_Element_Text('zipcode', array('size' => 10));
>>>    $zipcode->setLabel('City')
>>>            ->setRequired(true);
>>>
>>>    $city = new Zend_Form_Element_Text('city');
>>>    $city->setLabel('Ort')
>>>         ->setRequired(true);
>>>
>>> The rendered form produces the following:
>>>
>>>  >> class="required">Zipcode
>>>  
>>>    
>>>  
>>>  City
>>>  
>>>    
>>>  
>>>
>>> Now I would like to group those two input fields together that they show up 
>>> on the same line, say:
>>>
>>>  Zipcode / 
>>> City
>>>  
>>>    
>>>    
>>>  
>>>
>>> Removing the HtmlTag & Label decorators of $city doesn't do the trick...
>>>
>>>    $city->removeDecorator('HtmlTag')
>>>         ->removeDecorator('Label');
>>>
>>> How can I attach the $city element into the HtmlTag decorator (dd-Tag) of 
>>> the previous element? If possible, without building the whole form from 
>>> scratch with a ViewScript decorator.
>>>
>>> Thanks a lot
>>> Philip
>>
>
>



-- 
Sincerely yours,
Aleksey V. Zapparov A.K.A. ixti
FSF Member #7118
Mobile Phone: +34 617 179 344
Homepage: http://www.ixti.ru
JID: zappa...@jabber.ru

*Origin: Happy Hacking!


Re: [fw-general] grouped Zend_Form text elements

2010-05-15 Thread Philip Iezzi
Great, Eugene, thanks a lot!

That's how I did it:

$city->removeDecorator('Label');

(there is no DtDdWrapper on a standard Zend_Form_Element_Text, so I just 
removed the "Label" (dt) decorator, the dd tag comes from the "HtmlTag" 
decorator)

Form element output:

Zipcode / 
City

  


  



My CSS looks like this:

--
fieldset dt {
width: 210px;
float: left;
}

fieldset dd {
float: left;
}

fieldset dd#zipcode-element {
width: 110px;
}
fieldset dd#city-element {
width: 330px;
}
fieldset input#zipcode {
width: 100px;
}
fieldset input#city {
width: 325px;
}

fieldset dd#city-element ul.errors {
margin-left: -115px;
}
--

It's kind of an ugly hack, especially the positioning of ul.errors - errors of 
both input fields override each other. But as Zend_Validate_NotEmpty::IS_EMPTY 
is the only possible error message in this case, this doesn't matter and looks 
even better than two identical errors.

take care
Philip



Am 14.05.2010 um 16:03 schrieb Eugene Morgan:

> This is one way to do it:
> 
> $city->removeDecorator('DtDdWrapper')
>->addDecorator('HtmlTag', array(
>'tag' => 'dd'
>));
> 
> You'll get markup like this:
> Zipcode /
> City
> 
>   
> 
> 
>   
> 
> 
> Then you can use CSS to make that second  display inline.
> 
> 
> On Thu, May 13, 2010 at 4:50 PM, Philip Iezzi  wrote:
>> Hi,
>> 
>> What I'm trying to accomplish is to group two Zend_Form_Element_Text 
>> elements that they show up on the same line.
>> I'm styling my standard Zend_Form output (standard decorators) by CSS to 
>> bring the form element's label to the left side of the input field.
>> 
>>$zipcode = new Zend_Form_Element_Text('zipcode', array('size' => 10));
>>$zipcode->setLabel('City')
>>->setRequired(true);
>> 
>>$city = new Zend_Form_Element_Text('city');
>>$city->setLabel('Ort')
>> ->setRequired(true);
>> 
>> The rendered form produces the following:
>> 
>>  > class="required">Zipcode
>>  
>>
>>  
>>  City
>>  
>>
>>  
>> 
>> Now I would like to group those two input fields together that they show up 
>> on the same line, say:
>> 
>>  Zipcode / 
>> City
>>  
>>
>>
>>  
>> 
>> Removing the HtmlTag & Label decorators of $city doesn't do the trick...
>> 
>>$city->removeDecorator('HtmlTag')
>> ->removeDecorator('Label');
>> 
>> How can I attach the $city element into the HtmlTag decorator (dd-Tag) of 
>> the previous element? If possible, without building the whole form from 
>> scratch with a ViewScript decorator.
>> 
>> Thanks a lot
>> Philip
> 



Re: [fw-general] create tree from arrays

2010-05-15 Thread shahrzad khorrami
Thankss Aleksey Zapparov :) it works grea! merc