Re: [fw-general] Zend and jQuery UI best practices

2009-11-30 Thread Саша Стаменковић
Looking at http://framework.zend.com/manual/en/zendx.jquery.form.html now,
but there are not lab components implemented yet. Maybe I can develop them,
if I get my CLA approved ;)

Regards,
Saša Stamenković


On Tue, Dec 1, 2009 at 8:21 AM, umpirsky  wrote:

>
> Hi.
>
> I am using some jQuery UI lab components in my zf app (eg
>
> http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/
> and
>
> http://www.filamentgroup.com/lab/update_jquery_ui_slider_from_a_select_element_now_with_aria_support
> ),
> and I wonder which practice is better and why:
>
> - Use Zend_Form with standard form elements and on page load initialize
> widgets (external js cached)
> - Build custom form elements with mixed html/javascript
>
> What are yours general practices with such things?
>
> Regards,
> Saša Stamenković
> --
> View this message in context:
> http://n4.nabble.com/Zend-and-jQuery-UI-best-practices-tp931962p931962.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>


[fw-general] Zend and jQuery UI best practices

2009-11-30 Thread umpirsky

Hi.

I am using some jQuery UI lab components in my zf app (eg
http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/
and
http://www.filamentgroup.com/lab/update_jquery_ui_slider_from_a_select_element_now_with_aria_support),
and I wonder which practice is better and why:

- Use Zend_Form with standard form elements and on page load initialize
widgets (external js cached)
- Build custom form elements with mixed html/javascript

What are yours general practices with such things?

Regards,
Saša Stamenković
-- 
View this message in context: 
http://n4.nabble.com/Zend-and-jQuery-UI-best-practices-tp931962p931962.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] getFrontController() returns null?

2009-11-30 Thread Eugene Morgan
>$bootstrap = $this->getInvokeArg('bootstrap');

For some reason that works beautifully on my development machine but
not on the production server (shared hosting).

Fortunately this is a very small application so I'm able to work
around it easily by putting my config object in Zend_Registry. But I'm
clueless as to why the server doesn't want to play along ...

On Mon, Nov 30, 2009 at 8:03 PM, Matthew Weier O'Phinney
 wrote:
> -- Eugene Morgan  wrote
> (on Monday, 30 November 2009, 06:35 PM -0600):
>> I am working on a contact form in ZF 1.9. In one of my actions, I am
>> trying to access the bootstrap by
>> $this->getFrontController()->getParam('bootstrap')
>
> Not sure why it's not working, but there's an easier way:
>
>    $bootstrap = $this->getInvokeArg('bootstrap');
>
>> I made some changes to the application.ini file that shouldn't affect
>> anything ... but now the code above is not returning the bootstrap. In
>> fact, $this->getFrontController() returns NULL -- I am not sure why?
>> It was working fine before ...
>>
>> Here is my application.ini file
>> [production]
>> phpSettings.display_startup_errors = 0
>> phpSettings.display_errors = 0
>> phpSettings.date.timezone = "America/Chicago"
>>
>> includePaths.library = APPLICATION_PATH "/../library"
>> bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
>> bootstrap.class = "Bootstrap"
>>
>> resources.frontController.controllerDirectory = APPLICATION_PATH 
>> "/controllers"
>> resources.layout.layout = "layout"
>> resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
>>
>> contactMail.fromAddress = cont...@xyz.com
>> contactMail.fromName = Contact form
>> contactMail.toAddress = a...@abc.com
>> contactMail.toName = Some Name
>> contactMail.subject = "Contact Form Message on xyz.com"
>>
>> [staging : production]
>>
>> [testing : production]
>> phpSettings.display_startup_errors = 1
>> phpSettings.display_errors = 1
>>
>> [development : production]
>> phpSettings.display_startup_errors = 1
>> phpSettings.display_errors = 1
>>
>> Here is the code in the action method:
>>
>>
>>     public function createAction()
>>     {
>>         if (!$this->_request->isPost()) {
>>             return $this->_forward('new');
>>         }
>>
>>         $form = new Form_Contact();
>>         $formData = $this->_request->getPost();
>>         if (!$form->isValid($formData)) {
>>             return $this->_forward('new');
>>         }
>>
>>         // Check for honeypot to avoid spam
>>         if ($form->getValue('altEmail')) {
>>             return $this->_forward('spam');
>>         }
>>
>>         $view = new Zend_View();
>>         $path = APPLICATION_PATH . '/views/scripts';
>>         $view->setScriptPath($path);
>>         $view->name = $form->getValue('contactName');
>>         $view->phone = $form->getValue('phone');
>>         $view->email = $form->getValue('email');
>>         $view->comments = $form->getValue('comments');
>>
>>         $bootstrap = $this->getFrontController()->getParam('bootstrap');
>>         if ($bootstrap->getEnvironment() == 'production') {
>>             $config = new Zend_Config($bootstrap->getOption('smtp'));
>>             $mail = new Zend_Mail('utf-8');
>>             $mail->setFrom($config->fromAddress, $config->fromName);
>>             $mail->addTo($config->toAddress, $config->toName);
>>             $mail->setSubject($config->subject);
>>             $mail->setBodyHtml($view->render('mail/contact.phtml'));
>>             $mail->send();
>>         }
>>
>>         $this->_redirector->gotoSimple('show');
>>     }
>>
>
> --
> Matthew Weier O'Phinney
> Project Lead            | matt...@zend.com
> Zend Framework          | http://framework.zend.com/
>


Re: [fw-general] getFrontController() returns null?

2009-11-30 Thread Matthew Weier O'Phinney
-- Eugene Morgan  wrote
(on Monday, 30 November 2009, 06:35 PM -0600):
> I am working on a contact form in ZF 1.9. In one of my actions, I am
> trying to access the bootstrap by
> $this->getFrontController()->getParam('bootstrap')

Not sure why it's not working, but there's an easier way:

$bootstrap = $this->getInvokeArg('bootstrap');

> I made some changes to the application.ini file that shouldn't affect
> anything ... but now the code above is not returning the bootstrap. In
> fact, $this->getFrontController() returns NULL -- I am not sure why?
> It was working fine before ...
> 
> Here is my application.ini file
> [production]
> phpSettings.display_startup_errors = 0
> phpSettings.display_errors = 0
> phpSettings.date.timezone = "America/Chicago"
> 
> includePaths.library = APPLICATION_PATH "/../library"
> bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
> bootstrap.class = "Bootstrap"
> 
> resources.frontController.controllerDirectory = APPLICATION_PATH 
> "/controllers"
> resources.layout.layout = "layout"
> resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
> 
> contactMail.fromAddress = cont...@xyz.com
> contactMail.fromName = Contact form
> contactMail.toAddress = a...@abc.com
> contactMail.toName = Some Name
> contactMail.subject = "Contact Form Message on xyz.com"
> 
> [staging : production]
> 
> [testing : production]
> phpSettings.display_startup_errors = 1
> phpSettings.display_errors = 1
> 
> [development : production]
> phpSettings.display_startup_errors = 1
> phpSettings.display_errors = 1
> 
> Here is the code in the action method:
> 
> 
> public function createAction()
> {
> if (!$this->_request->isPost()) {
> return $this->_forward('new');
> }
> 
> $form = new Form_Contact();
> $formData = $this->_request->getPost();
> if (!$form->isValid($formData)) {
> return $this->_forward('new');
> }
> 
> // Check for honeypot to avoid spam
> if ($form->getValue('altEmail')) {
> return $this->_forward('spam');
> }
> 
> $view = new Zend_View();
> $path = APPLICATION_PATH . '/views/scripts';
> $view->setScriptPath($path);
> $view->name = $form->getValue('contactName');
> $view->phone = $form->getValue('phone');
> $view->email = $form->getValue('email');
> $view->comments = $form->getValue('comments');
> 
> $bootstrap = $this->getFrontController()->getParam('bootstrap');
> if ($bootstrap->getEnvironment() == 'production') {
> $config = new Zend_Config($bootstrap->getOption('smtp'));
> $mail = new Zend_Mail('utf-8');
> $mail->setFrom($config->fromAddress, $config->fromName);
> $mail->addTo($config->toAddress, $config->toName);
> $mail->setSubject($config->subject);
> $mail->setBodyHtml($view->render('mail/contact.phtml'));
> $mail->send();
> }
> 
> $this->_redirector->gotoSimple('show');
> }
> 

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


Re: [fw-general] "module repository" poll

2009-11-30 Thread Cameron
This sort of thing would be tremendously useful. I'd absolutely love to see
a drop in component for handling, say, User authentication - handling
signups, forgot your password functionality, the whole "check your email and
verify your account" stuff, a very basic admin page, all done in the "right"
way according to ZF practices.

On Mon, Nov 30, 2009 at 9:48 PM, Matthew Weier O'Phinney
wrote:

> Greetings!
>
> Ivo Jansch, of ibuildings.nl, has recently opened a poll for framework
> users of any flavor (ZF, symfony, etc.), asking the question, "Would you
> be interested in a repository of off-the-shelf modules/app components
> for popular frameworks?"
>
> If interested, place your vote here:
>
>http://twtpoll.com/d6kfvh
>
> --
> Matthew Weier O'Phinney
> Project Lead| matt...@zend.com
> Zend Framework  | http://framework.zend.com/
>


[fw-general] getFrontController() returns null?

2009-11-30 Thread Eugene Morgan
I am working on a contact form in ZF 1.9. In one of my actions, I am
trying to access the bootstrap by
$this->getFrontController()->getParam('bootstrap')

I made some changes to the application.ini file that shouldn't affect
anything ... but now the code above is not returning the bootstrap. In
fact, $this->getFrontController() returns NULL -- I am not sure why?
It was working fine before ...

Here is my application.ini file
[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
phpSettings.date.timezone = "America/Chicago"

includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"

resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.layout.layout = "layout"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"

contactMail.fromAddress = cont...@xyz.com
contactMail.fromName = Contact form
contactMail.toAddress = a...@abc.com
contactMail.toName = Some Name
contactMail.subject = "Contact Form Message on xyz.com"

[staging : production]

[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

Here is the code in the action method:


public function createAction()
{
if (!$this->_request->isPost()) {
return $this->_forward('new');
}

$form = new Form_Contact();
$formData = $this->_request->getPost();
if (!$form->isValid($formData)) {
return $this->_forward('new');
}

// Check for honeypot to avoid spam
if ($form->getValue('altEmail')) {
return $this->_forward('spam');
}

$view = new Zend_View();
$path = APPLICATION_PATH . '/views/scripts';
$view->setScriptPath($path);
$view->name = $form->getValue('contactName');
$view->phone = $form->getValue('phone');
$view->email = $form->getValue('email');
$view->comments = $form->getValue('comments');

$bootstrap = $this->getFrontController()->getParam('bootstrap');
if ($bootstrap->getEnvironment() == 'production') {
$config = new Zend_Config($bootstrap->getOption('smtp'));
$mail = new Zend_Mail('utf-8');
$mail->setFrom($config->fromAddress, $config->fromName);
$mail->addTo($config->toAddress, $config->toName);
$mail->setSubject($config->subject);
$mail->setBodyHtml($view->render('mail/contact.phtml'));
$mail->send();
}

$this->_redirector->gotoSimple('show');
}


Re: [fw-general] weird problem

2009-11-30 Thread Apostol Victor
yap is active http://www.apostolvictor.info/info.php

i will talk with system guys

2009/11/30 Núria 

> Are you also using APC? For what I've read, Zend Optimizer and APC are
> incompatible.
>
> 2009/11/30 Apostol Victor 
>
> it could be  a problem with Zend Optimizer?
>>
>>
>> On Mon, Nov 30, 2009 at 10:07 PM, Ralph Schindler <
>> ralph.schind...@zend.com> wrote:
>>
>>> It sounds like you have some kind of encoder extension in PHP perhaps?
>>> Maybe it is trying to automatically "unencode" the file b/c it sees encoded
>>> values in it?  Can you check what extensions you have loaded?
>>>
>>> -ralph
>>>
>>> Apostol Victor wrote:
>>>
 nop is only one

 2009/11/30 Vladas Diržys >>> vladas.dir...@gmail.com>>


Maybe you are including 2 ZF libraries? And one of them is a bit
older?...
--
Regards,
Vladas



On Sun, Nov 29, 2009 at 22:43, Apostol Victor
mailto:apostol.vic...@gmail.com>> wrote:

this is the code

$flickr = new Zend_Service_Flickr('xxx');
  $results = $flickr->userSearch($email);
  foreach ($results as $result) {
echo $result->title . '';
}
and this is the error

|




||Fatal error:  Cannot run code from this file in
 conjunction with non encoded files in
  /||library/Zend/Validate/Hostname/Com.php on line 471





i am using the latest version on zend framework you can se my
 phpinfo here http://www.apostolvictor.info/info.php

anyone any idea why i get this error?



|


--victor

http://apostolvictor.info





 --
 victor

 http://apostolvictor.info

>>>
>>
>>
>> --
>> victor
>>
>> http://apostolvictor.info
>>
>
>


-- 
victor

http://apostolvictor.info


Re: [fw-general] weird problem

2009-11-30 Thread Núria
Are you also using APC? For what I've read, Zend Optimizer and APC are
incompatible.

2009/11/30 Apostol Victor 

> it could be  a problem with Zend Optimizer?
>
>
> On Mon, Nov 30, 2009 at 10:07 PM, Ralph Schindler <
> ralph.schind...@zend.com> wrote:
>
>> It sounds like you have some kind of encoder extension in PHP perhaps?
>> Maybe it is trying to automatically "unencode" the file b/c it sees encoded
>> values in it?  Can you check what extensions you have loaded?
>>
>> -ralph
>>
>> Apostol Victor wrote:
>>
>>> nop is only one
>>>
>>> 2009/11/30 Vladas Diržys >> vladas.dir...@gmail.com>>
>>>
>>>
>>>Maybe you are including 2 ZF libraries? And one of them is a bit
>>>older?...
>>>--
>>>Regards,
>>>Vladas
>>>
>>>
>>>
>>>On Sun, Nov 29, 2009 at 22:43, Apostol Victor
>>>mailto:apostol.vic...@gmail.com>> wrote:
>>>
>>>this is the code
>>>
>>>$flickr = new Zend_Service_Flickr('xxx');
>>>  $results = $flickr->userSearch($email);
>>>  foreach ($results as $result) {
>>>echo $result->title . '';
>>>}
>>>and this is the error
>>>
>>>|
>>>
>>>
>>>
>>>
>>>||Fatal error:  Cannot run code from this file in
>>> conjunction with non encoded files in
>>>  /||library/Zend/Validate/Hostname/Com.php on line 471
>>>
>>>
>>>
>>>
>>>
>>>i am using the latest version on zend framework you can se my
>>> phpinfo here http://www.apostolvictor.info/info.php
>>>
>>>anyone any idea why i get this error?
>>>
>>>
>>>
>>>|
>>>
>>>
>>>--victor
>>>
>>>http://apostolvictor.info
>>>
>>>
>>>
>>>
>>>
>>> --
>>> victor
>>>
>>> http://apostolvictor.info
>>>
>>
>
>
> --
> victor
>
> http://apostolvictor.info
>


Re: [fw-general] weird problem

2009-11-30 Thread Apostol Victor
it could be  a problem with Zend Optimizer?

On Mon, Nov 30, 2009 at 10:07 PM, Ralph Schindler
wrote:

> It sounds like you have some kind of encoder extension in PHP perhaps?
> Maybe it is trying to automatically "unencode" the file b/c it sees encoded
> values in it?  Can you check what extensions you have loaded?
>
> -ralph
>
> Apostol Victor wrote:
>
>> nop is only one
>>
>> 2009/11/30 Vladas Diržys > vladas.dir...@gmail.com>>
>>
>>
>>Maybe you are including 2 ZF libraries? And one of them is a bit
>>older?...
>>--
>>Regards,
>>Vladas
>>
>>
>>
>>On Sun, Nov 29, 2009 at 22:43, Apostol Victor
>>mailto:apostol.vic...@gmail.com>> wrote:
>>
>>this is the code
>>
>>$flickr = new Zend_Service_Flickr('xxx');
>>  $results = $flickr->userSearch($email);
>>  foreach ($results as $result) {
>>echo $result->title . '';
>>}
>>and this is the error
>>
>>|
>>
>>
>>
>>
>>||Fatal error:  Cannot run code from this file in
>> conjunction with non encoded files in
>>  /||library/Zend/Validate/Hostname/Com.php on line 471
>>
>>
>>
>>
>>
>>i am using the latest version on zend framework you can se my
>> phpinfo here http://www.apostolvictor.info/info.php
>>
>>anyone any idea why i get this error?
>>
>>
>>
>>|
>>
>>
>>--victor
>>
>>http://apostolvictor.info
>>
>>
>>
>>
>>
>> --
>> victor
>>
>> http://apostolvictor.info
>>
>


-- 
victor

http://apostolvictor.info


[fw-general] Zend View Navigation Helpers. Solving typical problems.

2009-11-30 Thread mezoni

Zend View Navigation Helpers. Solving typical problems.

Suppose you want to display the following navigation elements.
Main menu
Submenu of main menu
Breadcrumbs

Solution for main menu clear.
navigation()->menu()->setMaxDepth(0) ?>

Possible solution for submenu of main menu could be so.
navigation()->menu()->setMaxDepth(1)->SetMinDepth(1)->setOnlyActiveBranch(true)
?>

Now a few of the breadcrumbs.

Suppose that we want to see breadcrumbs of the next request
/catalog/products/view/id/1
as
Catalog > Categories -> Product category > Product 1

As retreat.
We don't declare '/catalog/products' in application.ini as page.
And we don't want display breadcrumbs as
'Catalog > Products > Product 1'
And we don't want display '/catalog/products' in submenu.
Since '/catalog/products' is minor.
'/catalog/products/index' simple redirects to '/catalog/categories'.

Possible solution.

class Catalog_ProductsController extends Zend_Controller_Action

public function init()
{
$this->navigation = $this->_helper->getHelper('Navigation');
}

public function viewAction()
{
$product = ... // find product

// Navigation
$this->navigation->addTo('id', 'catalog-categories', 'm', array(
'id' => 'catalog-categories-view',
'label' => $product['category_name'],
'controller' => 'categories',
'action' => 'view',
'params' => array('id' => $product['category_id'])));

$this->navigation->addTo('id', 'catalog-categories-view', 'mcap', array(
'id' => 'catalog-products-view',
'label' => $product['name']));

And finaly little helper code.

_container = $navigation;
}
}
}

public function addTo($property, $value, $fillFlags, $options)  
{
if(null == $this->_container)
{
return;
}   

if(!$page = $this->_container->findOneBy($property, $value))
{
return;
}

$flags = str_split(strtolower(strval($fillFlags)));

foreach($flags as $flag)
{
$request = $this->getFrontController()->getRequest();   


switch($flag)
{
case 'a':
$options['action'] = 
$request->getActionName();
break;
case 'c':
$options['controller'] = 
$request->getControllerName();
break;
case 'm':
$options['module'] = 
$request->getModuleName();
break;
case 'p':
$options['params'] = 
$request->getParams();
break;
}
}

$page->AddPage(Zend_Navigation_Page::factory($options));
}

public function direct($property, $value, $flags, $options)
{
$this->addTo($property, $value, $flags, $options);
}
}
-- 
View this message in context: 
http://n4.nabble.com/Zend-View-Navigation-Helpers-Solving-typical-problems-tp931602p931602.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] weird problem

2009-11-30 Thread Ralph Schindler
It sounds like you have some kind of encoder extension in PHP perhaps? 
Maybe it is trying to automatically "unencode" the file b/c it sees 
encoded values in it?  Can you check what extensions you have loaded?


-ralph

Apostol Victor wrote:
nop is only one 



2009/11/30 Vladas Diržys >


Maybe you are including 2 ZF libraries? And one of them is a bit
older?... 


--
Regards,
Vladas



On Sun, Nov 29, 2009 at 22:43, Apostol Victor
mailto:apostol.vic...@gmail.com>> wrote:

this is the code

$flickr = new Zend_Service_Flickr('xxx');
   
$results = $flickr->userSearch($email);
   
foreach ($results as $result) {

echo $result->title . '';
}
and this is the error

|




||Fatal error:  Cannot run code from this file in conjunction with non encoded files in 
/||library/Zend/Validate/Hostname/Com.php on line 471






i am using the latest version on zend framework you can se my phpinfo 
here http://www.apostolvictor.info/info.php

anyone any idea why i get this error?



|


-- 
victor


http://apostolvictor.info





--
victor

http://apostolvictor.info


Re: [fw-general] Zend Forms

2009-11-30 Thread Matthew Weier O'Phinney
-- Stephenalistoun  wrote
(on Monday, 30 November 2009, 10:47 AM -0800):
> 
> Hi All,
> 
> I trying to make my custom Zend form, when you have the input control field
> next to the label field like how you would do in tables. 
> 
> $this->setDecorators(array(
> 'FormElements',
> //array('HTMLTag',array('tag' => 'div' , 'class' =>
> 'detailForm')) ,
> array(array('elementDiv' => 'HtmlTag'), array('tag' => 'div')),
> array(array('td' => 'HtmlTag'), array('tag' => 'td')),
> array('Label', array('tag' => 'td')),

Why are you addding the label decorator to a _form_ object...? I'd
expect this to be added to your elements... This is why you're getting
the warning, btw -- Zend_Form does not have label accessors (as they
have no real meaning within that context).

In fact, everything but FormElements and Form in this list only make
sense for your form elements.

> 'Form'
> ));
> 
> Everytime i add array('Label', array('tag' => 'td')) in the setDecorators i
> get a warning exception saying:
> 
> Warning: Exception caught by form: Method getLabel does not exist Stack
> Trace: #0 [internal function]: Zend_Form->__call('getLabel', Array) #1
> C:\wamp\www\ZendCasts\library\Zend\Form\Decorator\Label.php(250):
> App_forms_TitleEditor->getLabel() #2
> C:\wamp\www\ZendCasts\library\Zend\Form\Decorator\Label.php(293):
> Zend_Form_Decorator_Label->getLabel() #3
> C:\wamp\www\ZendCasts\library\Zend\Form.php(2595):
> Zend_Form_Decorator_Label->render('
> ??
> 
> 
> -- 
> View this message in context: 
> http://n4.nabble.com/Zend-Forms-tp931516p931516.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 

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


[fw-general] Zend Forms

2009-11-30 Thread Stephenalistoun

Hi All,

I trying to make my custom Zend form, when you have the input control field
next to the label field like how you would do in tables. 

$this->setDecorators(array(
'FormElements',
//array('HTMLTag',array('tag' => 'div' , 'class' =>
'detailForm')) ,
array(array('elementDiv' => 'HtmlTag'), array('tag' => 'div')),
array(array('td' => 'HtmlTag'), array('tag' => 'td')),
array('Label', array('tag' => 'td')),

'Form'
));

Everytime i add array('Label', array('tag' => 'td')) in the setDecorators i
get a warning exception saying:

Warning: Exception caught by form: Method getLabel does not exist Stack
Trace: #0 [internal function]: Zend_Form->__call('getLabel', Array) #1
C:\wamp\www\ZendCasts\library\Zend\Form\Decorator\Label.php(250):
App_forms_TitleEditor->getLabel() #2
C:\wamp\www\ZendCasts\library\Zend\Form\Decorator\Label.php(293):
Zend_Form_Decorator_Label->getLabel() #3
C:\wamp\www\ZendCasts\library\Zend\Form.php(2595):
Zend_Form_Decorator_Label->render('
??


-- 
View this message in context: 
http://n4.nabble.com/Zend-Forms-tp931516p931516.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] Has anyone ported ZF project from Windows to Linux before?

2009-11-30 Thread W Itch
Short story
I'll try to make my long story short and do my mystical rain dance while
crossing my fingers. :-)
I'm suspecting most of my problems are file permissions related.

0.)
* I didn't put my ZF project in */var/www/* will this create major problems?
* Instead I put things in */home/user/Desktop/www/* will this create major
problems?

3.)
*Is it a bad idea to put Apache into my User's group list?*
http://forums.debian.net/viewtopic.php?f=5&t=47290


Is it a bad idea to put Apache into my User's group list? In the /etc/group
file. Will this create a security risk for me?

If Ok then the relevant line should look like this am I correct?
myuser:x:1000:www-data


/Darth Apprentice



Long story
I was afraid of pouring too much information on people.  But here's the best
description I could create for my situation.
Please check out my post in the *Zend Forums:*

1.)
*cannot be opened with mode "a" - Zend_Log_Exception*
http://forums.zend.com/viewtopic.php?f=69&t=4421


Which doesn't say much after having fixed Zend_Log I guess, so I suspected a
file permissions problem with my ZF project which I have described here.  At
*Debian Forums:

*2.)*
[ZF] PHP, Apache, permissions problem.
*http://forums.debian.net/viewtopic.php?f=8&t=47277


3.)
*Is it a bad idea to put Apache into my User's group list?*
http://forums.debian.net/viewtopic.php?f=5&t=47290



/Darth Apprentice







On Sun, Nov 29, 2009 at 6:26 PM, Bradley Holt wrote:

> If you can provide more detail about what doesn't work (error
> messages, etc.) then you will probably be more likely to get some
> helpful responses. ZF applications (like PHP applications in general)
> are usually portable between platforms with little or no work. It's
> possible that you're taking advantage of some platform specific
> feature but it's more likely that you don't have a required extension
> installed or that it's simply a configuration issue. The ZF
> documentation has a list of required extensions and what components
> use those extensions:
>
> http://framework.zend.com/manual/en/requirements.html
>
> On Sun, Nov 29, 2009 at 11:50 AM, W Itch
>  wrote:
> > Hi, has anyone ported ZF project from Windows Vista to Linux Debian
> before?
> > The ZF project which I worked on was fully functional on Vista but
> > when I moved it to my Debian machine then nothing works anymore.
> >
> > Can you tell me what the most common things I should take care is
> > about in general, when porting ZF code from one platform to another?
> >
>
> --
> Bradley Holt
> bradley.h...@foundline.com
>


Re: [fw-general] weird problem

2009-11-30 Thread Apostol Victor
nop is only one


2009/11/30 Vladas Diržys 

> Maybe you are including 2 ZF libraries? And one of them is a bit older?...
>
> --
> Regards,
> Vladas
>
>
>
> On Sun, Nov 29, 2009 at 22:43, Apostol Victor wrote:
>
>> this is the code
>>
>> $flickr = new Zend_Service_Flickr('xxx');
>>
>> $results = $flickr->userSearch($email);
>>
>> foreach ($results as $result) {
>> echo $result->title . '';
>> }
>> and this is the error
>>
>> 
>>
>>
>> Fatal error:  Cannot run code from this file in conjunction with non 
>> encoded files in
>> /library/Zend/Validate/Hostname/Com.php on line 471
>>
>>
>>
>> i am using the latest version on zend framework you can se my phpinfo here 
>> http://www.apostolvictor.info/info.php
>>
>> anyone any idea why i get this error?
>>
>>
>> --
>> victor
>>
>> http://apostolvictor.info
>>
>
>


-- 
victor

http://apostolvictor.info


Re: [fw-general] weird problem

2009-11-30 Thread Vladas Diržys
Maybe you are including 2 ZF libraries? And one of them is a bit older?...

--
Regards,
Vladas


On Sun, Nov 29, 2009 at 22:43, Apostol Victor wrote:

> this is the code
>
> $flickr = new Zend_Service_Flickr('xxx');
>
> $results = $flickr->userSearch($email);
>
> foreach ($results as $result) {
> echo $result->title . '';
> }
> and this is the error
>
> 
>
> Fatal error:  Cannot run code from this file in conjunction with non 
> encoded files in
> /library/Zend/Validate/Hostname/Com.php on line 471
>
>
> i am using the latest version on zend framework you can se my phpinfo here 
> http://www.apostolvictor.info/info.php
>
> anyone any idea why i get this error?
>
>
> --
> victor
>
> http://apostolvictor.info
>


[fw-general] "module repository" poll

2009-11-30 Thread Matthew Weier O'Phinney
Greetings!

Ivo Jansch, of ibuildings.nl, has recently opened a poll for framework
users of any flavor (ZF, symfony, etc.), asking the question, "Would you
be interested in a repository of off-the-shelf modules/app components
for popular frameworks?" 

If interested, place your vote here:

http://twtpoll.com/d6kfvh

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


Re: [fw-general] Applying Zend_Acl to Zend_Form_Element

2009-11-30 Thread Bart McLeod

Cameron schreef:
Hi guys, this is pretty pie in the sky, but I was wondering if anyone 
had seen it done / had a good trick for it.


What I'd like to do is come up with a really clean way of controlling 
which users can see which form fields. Example being a "role" field in 
the "user" form - admins can set the user's role, but regular users 
cannot. I know that I can wrap the odd if ($acl->isAllowed($params)) 
call around the element in my form init, but it seems to me that it'd 
be really nice to be able to mark form elements as being a certain 
resource name and then apply the permissions tools in exactly the same 
way as an action plugin does, without explicitly defining the code, 
just setting up the ACL lists. It's like we need a form helper or 
something... It seems to me that the fewer inline ACL checks we have 
to perform, the easier and safer our overall permission structure is 
going to be. Anyone managed to do something like this?

Hi Cameron,

I didn't do it yet, but you can implement the resource infterface on any 
custom element. So just make sure you use only custom elements where you 
need this behavior and have those implement the resource interface and 
let them check against the ACL themselves, using a decoractor for 
example. But you would still have to write code...


-Bart