Re: [fw-general] Zend Form DisplayGroup remove decorator from factory...

2009-11-17 Thread Саша Стаменковић
Removing 'DtDdWrapper' did the job.

Regards,
Saša Stamenković


On Tue, Nov 17, 2009 at 7:53 PM, Саша Стаменковић wrote:

> Hehum, after this:
>
> ...
> )->addDisplayGroup(
> array(
> 'brand',
> 'model',
> 'year_from',
> 'year_to',
> 'price_from',
> 'price_to',
>  'kilometer_from',
> 'kilometer_to'
> ),
> 'group1'
> )->addElement(
> ...
>
> $this->getDisplayGroup('group1')->removeDecorator('Label');
>
> ...
>
> in init method of my form which extends Zend_Form, I still have labels on
> group elements!?!?
>
> Regards,
> Saša Stamenković
>
>
> On Tue, Nov 17, 2009 at 7:33 PM, Matthew Weier O'Phinney  > wrote:
>
>> -- umpirsky  wrote
>> (on Tuesday, 17 November 2009, 10:28 AM -0800):
>> > I use factory method Zend_Form::addDisplayGroup() to add display group,
>> and
>> > it works great:
>> >
>> > ...
>> > )->addDisplayGroup(
>> >   array(
>> >   'el1',
>> >   'el2',
>> > ...
>> >   'eln'
>> >   ),
>> >   'group1')...
>> >
>> > I want to remove label decorator. Is that possible with factory method
>> or I
>> > must pass all decorators, or instantiate Zend_Form_DisplayGroup and call
>> > removeDecorator?
>>
>> If you use the factory method, you need to indicate the exact set of
>> decorators you want to use.
>>
>> You can also call removeDecorator() *after* instantiating the group.
>>
>>$group = $form->getDisplayGroup('group1');
>>$group->removeDecorator('Label');
>>
>> --
>> Matthew Weier O'Phinney
>> Project Lead| matt...@zend.com
>> Zend Framework  | http://framework.zend.com/
>>
>
>


[fw-general] Zend_Ldap ZF 1.9 account Canonical Form

2009-11-17 Thread Greg
Hi,

I seem to be having difficulties connecting to the ldap server (which
I'm told they think is an AD).

What it seems to be boiling down to is that Zend_Ldap is building the
canonical username dn from the supplied username and the baseDn. From
what I read it seems that in order to build the username dn the
username dn and password must be passed as the config options before
building the username dn for any other given username - which in some
senses is kind of odd.

Instead what I had to resort to was to build the username dn, and set
the password into the config array prior to using the Zend_Ldap
connector.

Because if the username option is not in a dn format and the
accountCanonicalForm is 1 (DN) then the initial ldap_bind even though
it returns not false (i.e a respource) the subsequent search then
fails because the bind did not have the correct credentials (ie.
authorised and correct username dn).

So the following will not work

$options = array(
  'host' => 'ldap.server.net',
  'port'   => 636,
  'useSsl' => true,
  'accountCanonicalForm'   => 1,
  'baseDn' => 'OU=People,DC=server,DC=net',
  'bindRequiresDn' => true,
);

$ldap = new Zend_Ldap($options);

$canonicalName = $ldap->getCanonicalAccountName($username,
Zend_Ldap::ACCTNAME_FORM_DN);


Is there something to config that I'm missing, I have tried specifying
various account Filters... but it seems to be the underlying issuer is
that $username used in the initial ldap_bind is not in dn form unless
set as part of the config options.



-- 
Greg


[fw-general] Problem with Zend_translate

2009-11-17 Thread kusum

I am trying to use zend_Translate for translation in my application but it is
not working :-((
I am using en.mo and en.po files for translation in my lang folder

In my application.ini i am using

resources.translate.registry_key   = "Zend_Translate"
resources.translate.adapter = "gettext"
resources.translate.data.directory  = APPLICATION_PATH "/lang/"
resources.translate.disableNotices  = false
resources.translate.options.scan= "filename"
resources.translate.options.logUntranslated = true
resources.translate.data.fileExt= "php"
resources.translate.locale  = "en_US"


in my Bootstrap.php my initialisation function goes as
protected function _initTranslation()
{

$this->bootstrap('translate');
$tr = $this->getResource('translate');
Zend_Registry::set('tr', $tr);
Zend_Form::setDefaultTranslator($tr);
print_r($tr->getList());


}


And when i am trying to print this
_('Register'); ?>

it gives me an error
Uncaught exception 'Zend_Translate_Exception' with message 'Error opening
translation file 'Array'.' in
C:\wamp\www\photoshop\library\Zend\Translate\Adapter\Gettext.php:85 Stack
trace: #0 C:\wamp\www\photoshop\library\Zend\Translate\Adapter.php(464):
Zend_Translate_Adapter_Gettext->_loadTranslationData(Array, 'en_US', Array)
#1 C:\wamp\www\photoshop\library\Zend\Translate\Adapter.php(207):
Zend_Translate_Adapter->_addTranslationData(Array, 'en_US', Array) #2
C:\wamp\www\photoshop\library\Zend\Translate\Adapter.php(112):
Zend_Translate_Adapter->addTranslation(Array, 'en_US', Array) #3
C:\wamp\www\photoshop\library\Zend\Translate\Adapter\Gettext.php(51):
Zend_Translate_Adapter->__construct(Array, 'en_US', Array) #4
C:\wamp\www\photoshop\library\Zend\Translate.php(93):
Zend_Translate_Adapter_Gettext->__construct(Array, 'en_US', Array) #5
C:\wamp\www\photoshop\library\Zend\Translate.php(71):
Zend_Translate->setAdapter('gettext', Array, 'en_US', Array) #6
C:\wamp\www\photoshop\library\Zend\Application\Resource\Tra in
C:\wamp\www\photoshop\library\Zend\Translate\Adapter\Gettext.php on line 85


I am not getting the reason of the problem.:confused:

Please Help

Thanks
Kusum

-- 
View this message in context: 
http://old.nabble.com/Problem-with-Zend_translate-tp26400093p26400093.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Form DisplayGroup remove decorator from factory...

2009-11-17 Thread Саша Стаменковић
Hehum, after this:

...
)->addDisplayGroup(
array(
'brand',
'model',
'year_from',
'year_to',
'price_from',
'price_to',
 'kilometer_from',
'kilometer_to'
),
'group1'
)->addElement(
...

$this->getDisplayGroup('group1')->removeDecorator('Label');

...

in init method of my form which extends Zend_Form, I still have labels on
group elements!?!?

Regards,
Saša Stamenković


On Tue, Nov 17, 2009 at 7:33 PM, Matthew Weier O'Phinney
wrote:

> -- umpirsky  wrote
> (on Tuesday, 17 November 2009, 10:28 AM -0800):
> > I use factory method Zend_Form::addDisplayGroup() to add display group,
> and
> > it works great:
> >
> > ...
> > )->addDisplayGroup(
> >   array(
> >   'el1',
> >   'el2',
> > ...
> >   'eln'
> >   ),
> >   'group1')...
> >
> > I want to remove label decorator. Is that possible with factory method or
> I
> > must pass all decorators, or instantiate Zend_Form_DisplayGroup and call
> > removeDecorator?
>
> If you use the factory method, you need to indicate the exact set of
> decorators you want to use.
>
> You can also call removeDecorator() *after* instantiating the group.
>
>$group = $form->getDisplayGroup('group1');
>$group->removeDecorator('Label');
>
> --
> Matthew Weier O'Phinney
> Project Lead| matt...@zend.com
> Zend Framework  | http://framework.zend.com/
>


Re: [fw-general] Zend Form DisplayGroup remove decorator from factory...

2009-11-17 Thread Саша Стаменковић
Naah, a little drag :)

I didn't like factory methods at first, didn't like strings instead
constants..., but now I just don't want to break the chain.

Will do it like you said

 $group = $form->getDisplayGroup('
group1');
   $group->removeDecorator('Label');

Thanks for the fast response!

Regards,
Saša Stamenković


On Tue, Nov 17, 2009 at 7:33 PM, Matthew Weier O'Phinney
wrote:

> -- umpirsky  wrote
> (on Tuesday, 17 November 2009, 10:28 AM -0800):
> > I use factory method Zend_Form::addDisplayGroup() to add display group,
> and
> > it works great:
> >
> > ...
> > )->addDisplayGroup(
> >   array(
> >   'el1',
> >   'el2',
> > ...
> >   'eln'
> >   ),
> >   'group1')...
> >
> > I want to remove label decorator. Is that possible with factory method or
> I
> > must pass all decorators, or instantiate Zend_Form_DisplayGroup and call
> > removeDecorator?
>
> If you use the factory method, you need to indicate the exact set of
> decorators you want to use.
>
> You can also call removeDecorator() *after* instantiating the group.
>
>$group = $form->getDisplayGroup('group1');
>$group->removeDecorator('Label');
>
> --
> Matthew Weier O'Phinney
> Project Lead| matt...@zend.com
> Zend Framework  | http://framework.zend.com/
>


Re: [fw-general] Zend Form DisplayGroup remove decorator from factory...

2009-11-17 Thread Matthew Weier O'Phinney
-- umpirsky  wrote
(on Tuesday, 17 November 2009, 10:28 AM -0800):
> I use factory method Zend_Form::addDisplayGroup() to add display group, and
> it works great:
> 
> ...
> )->addDisplayGroup(
>   array(
>   'el1',
>   'el2',
> ...
>   'eln'
>   ),
>   'group1')...
> 
> I want to remove label decorator. Is that possible with factory method or I
> must pass all decorators, or instantiate Zend_Form_DisplayGroup and call
> removeDecorator?

If you use the factory method, you need to indicate the exact set of
decorators you want to use.

You can also call removeDecorator() *after* instantiating the group.

$group = $form->getDisplayGroup('group1');
$group->removeDecorator('Label');

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


[fw-general] Zend Form DisplayGroup remove decorator from factory...

2009-11-17 Thread umpirsky

Hi.

I use factory method Zend_Form::addDisplayGroup() to add display group, and
it works great:

...
)->addDisplayGroup(
array(
'el1',
'el2',
...
'eln'
),
'group1')...

I want to remove label decorator. Is that possible with factory method or I
must pass all decorators, or instantiate Zend_Form_DisplayGroup and call
removeDecorator?

Regards
Sasa Stamenkovic.
-- 
View this message in context: 
http://old.nabble.com/Zend-Form-DisplayGroup-remove-decorator-from-factory...-tp26395053p26395053.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Re: [zf-contributors] Zend_Service_Amazon_SimpleDB ready for review!

2009-11-17 Thread Jon Whitcraft




Wil,

Excellent work.  I have not had a change to look over everything yet
and test it out but from what I saw it looks great!

Jon

Wil Sinclair wrote:

  Hi all, I've posted a proposal for a SimpleDB client library here:
http://framework.zend.com/wiki/display/ZFPROP/Zend_Service_Amazon_Simple
DB+-+Wil+Sinclair.
The code is currently available in the Simple Cloud API project here:
http://framework.zend.com/svn/framework/laboratory/Zend_Cloud/trunk/.

Please let me know what you think, and stay tuned for a Simple Cloud API
Document Service adapter!
,Wil
  


-- 


Jon Whitcraft
Zend Certified Engineer
jwhitcr...@mac.com






[fw-general] Intuit Hosting Zend Screencast Tomorrow

2009-11-17 Thread McGinnis, Joshua
Hey Everyone,

 

I'll be hosting Jon Lebensold (zendcasts.com) at an Intuit Engineering
Network event tomorrow in our Boston Intuit office. Jon will be building
a Google Wave extension using Intuit QuickBase online database
 . 

 

Everyone is welcome to dial-in, watch and participate in Q&A. 

 

Please get the word out!

http://www.zendcasts.com/live-zendcast-tomorrow-in-boston/2009/11/

 

Follow @joshuamc, @intuitquickbase for updates.

 

Thanks,

 

- Joshua

 


Joshua McGinnis | Web Developer Intuit QuickBase| 781 370-4605 | E-mail
  | AIM: intuitjosh


---

Intuit QuickBase  Leading the way in helping
teams build "Right For Me" online applications

The QuickBase BlogThe definitive resource for
QuickBase fans

TheAppGap Blog  Work 2.0: News, Views and
Reviews

 



Re: [fw-general] Zend_Layout and view rendering

2009-11-17 Thread prodigitalson

I usually use a placeholder/partial directly in the view script for things
like this. In fact i never even thought to go abotu it in the way you are
doing.

so in my layout.phtml i might have something like:

placeholder('sidebar'); ?>

and in my index.phtml i would have:

placeholder('sidebar')->set($this->partial('sidebar.phtml'));
?>

Or if i needed logic to compile my data for use in the sidebar.phtml then i
might the action view helper instead of the partial.


Gabriel Malkas-2 wrote:
> 
> Hi,
> 
> I use Zend_Layout and I need to render a different 'navbar' accordingly to
> the active action. I simply wrote this in my layout.phtml file :
> 
>  layout()->sidebar; ?>
> 
> Then, in every action that needs to display a sidebar, I have :
> $this->render('sidebar', 'sidebar');
> 
> This works since it renders the sidebar.phtml script, but it doesn't
> render
> the action-name.phtml script anymore. It's possible to render both scripts
> but I have to add a line :
> $this->render('sidebar', 'sidebar');
> $this->render('index', 'default');
> 
> Now this does exactly what I need, but it's cumbersome since the action's
> script "should" be rendered automatically anyway. Is it possible ?
> 
> Is there a better way to achieve that ?
> 
> Thanks.
> Regards,
> Gabriel.
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Zend_Layout-and-view-rendering-tp26359008p26389939.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Issues with $this->headScript()

2009-11-17 Thread drm

Hi Ian,

How much hacking is need do you think to make the latest release work
with 5.1.6.? I suppose it depends on what packages I am using, bit
desperate at this client refuses to upgrade.
  


Would it help you if you'd patch the code to use an array in stead of 
the iterator?


$container = iterator_to_array($this->getContainer());
ksort($container);
foreach ($container as $item) {
   $items[] = $this->itemToString($item);
}

I'm not sure, but it's worth a try.


Gerard



Re: [fw-general] Issues with $this->headScript()

2009-11-17 Thread Ian Warner
Matthew

Appreciate the reply I went and checked the Requirements and see they
are up at 5.2.4 now  - been a while since I checked them

How much hacking is need do you think to make the latest release work
with 5.1.6.? I suppose it depends on what packages I am using, bit
desperate at this client refuses to upgrade.

Cheers

Ian


2009/11/16 Matthew Weier O'Phinney :
> -- Ian Warner  wrote
> (on Monday, 16 November 2009, 10:34 PM +0900):
>> Stefan
>>
>> Spot on
>>
>> However I get this error now:
>> Fatal error: Call to undefined method
>> Zend_View_Helper_Placeholder_Container::ksort() in
>> /content/pringlus/docs/conga/library/Zend/View/Helper/HeadLink.php on
>> line 311
>
> This will happen pre 5.2.0 as well, IIRC; ArrayObject only added it at
> that point.
>
>> In the toString method:
>>
>>     public function toString($indent = null)
>>     {
>>         $indent = (null !== $indent)
>>                 ? $this->getWhitespace($indent)
>>                 : $this->getIndent();
>>
>>         $items = array();
>>         $this->getContainer()->ksort();
>>         foreach ($this as $item) {
>>             $items[] = $this->itemToString($item);
>>         }
>>
>>         return $indent . implode($this->_escape($this->getSeparator())
>> . $indent, $items);
>>     }
>>
>> Ian
>>
>>
>> 2009/11/16 Stefan Gehrig :
>> > The problem is that you're doing
>> >
>> > echo $this->headScript() . PHP_EOL;
>> >                         ^
>> >                         |
>> > that's a concatenation --+
>> >
>> > That's effectively "concat the result from $this->headScript() with an 
>> > PHP_EOL and echo the result".
>> > Therefore this is not strictly considered "directly combined with echo() 
>> > or print()".
>> >
>> > You'd have to do:
>> > echo $this->headScript();
>> > echo PHP_EOL;
>> >
>> > Best regards
>> >
>> > Stefan
>> >
>> >
>> > -Ursprüngliche Nachricht-
>> > Von: Ian Warner [mailto:iwar...@triangle-solutions.com]
>> > Gesendet: Montag, 16. November 2009 12:48
>> > An: Stefan Gehrig
>> > Betreff: Re: [fw-general] Issues with $this->headScript()
>> >
>> > Stefan
>> >
>> > appreciate that, indeed this server has 5.1.x on it
>> >
>> > However I am doing
>> > echo $this->headScript() . PHP_EOL;
>> >
>> > therefore from the instructions:
>> >
>> > "It is worth noting that before PHP 5.2.0 the __toString method was
>> > only called when it was directly combined with echo() or print()"
>> >
>> > am I not doiing this correctly?
>> >
>> > 2009/11/16 Stefan Gehrig :
>> >> Hi Ian,
>> >>
>> >> please check your PHP version...
>> >>
>> >> It is worth noting that before PHP 5.2.0 the __toString method was only 
>> >> called when it was directly combined with echo() or print(). Since PHP 
>> >> 5.2.0, it is called in any string context (e.g. in printf() with %s 
>> >> modifier) but not in other types contexts (e.g. with %d modifier). [...]
>> >> http://www.php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring
>> >>
>> >> __toString will not be called in concatenation-operations prior to PHP 
>> >> 5.2.0.
>> >>
>> >> Best regards
>> >>
>> >> Stefan
>> >>
>> >>
>> >> -Ursprüngliche Nachricht-
>> >> Von: Ian Warner [mailto:iwar...@triangle-solutions.com]
>> >> Gesendet: Montag, 16. November 2009 12:28
>> >> An: Zend Framework
>> >> Betreff: [fw-general] Issues with $this->headScript()
>> >>
>> >> Hi
>> >>
>> >> When I use:
>> >> echo $this->headScript() . PHP_EOL;
>> >>
>> >>
>> >> All that prints out is:
>> >> Object id #99
>> >>
>> >> This is a new and unfamiliar server I am deploying on so could be
>> >> anything - but any pointed gratefully received
>> >>
>> >> Ian
>> >>
>> >>
>> >
>> >
>>
>
> --
> Matthew Weier O'Phinney
> Project Lead            | matt...@zend.com
> Zend Framework          | http://framework.zend.com/
>


[fw-general] Zend Form Decorators - Adding id Attribute to Error output.

2009-11-17 Thread boxers999

Hi,

I need to be able to hide Zend_Form errors dynamically if the user changes
some options after a form fails validation.

How do I inject an id attribute in to the error markup ?

Some Error
Message

It would be good if I could specify the id when bulding the form element.

I have tried things like:-

$element->getDecorator('Error')->setOption('id', 'test');

But no joy.

Many thanks.



-- 
View this message in context: 
http://old.nabble.com/Zend-Form-Decorators---Adding-id-Attribute-to-Error-output.-tp26388632p26388632.html
Sent from the Zend Framework mailing list archive at Nabble.com.