[fw-general] Testing of controller's action with redirect via Zend_Test

2009-01-22 Thread Tir

Hi! I'm trying to test my controller with redirect in one of its actions.
Redirect to index action of index controller was realized via gotoUrl()
method of Zend_Controller_Action_Helper_Redirector:
$this-_helper-redirector-gotoUrl('/'). On the web-server all works
ideally. But when i run test which tests this controller i receive error:
Zend_Controller_Action_Exception: Action error does not exist and was not
trapped in __call(). To all appearance after redirect in my action next
request dispatches to error action of error controller. But i can't
understand why this happens. Any ideas?
-- 
View this message in context: 
http://www.nabble.com/Testing-of-controller%27s-action-with-redirect-via-Zend_Test-tp21599509p21599509.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Dojo_Form_Element_HorizontalSlider renders invalid Dojo code

2009-01-22 Thread frank.quosdorf

In a form, a horizontal slider is instantiated:

$overallRating = new
Zend_Dojo_Form_Element_HorizontalSlider(overallRating);

and further specified (as per Zend documentation example
http://framework.zend.com/manual/en/zend.dojo.form.html#zend.dojo.form.elements.horizontalSlider):

$overallRating-setMinimum($minimum);
$overallRating-setMaximum($maximum);
$overallRating-setDiscreteValues($discreteValues);
$overallRating-setValue($maximum / 2);
$overallRating-setDijitParam(showButtons, false);
//setShowButtons() does not render valid Dojo code
$overallRating-setBottomDecorationDijit(HorizontalRule);
$overallRating-setBottomDecorationContainer(bottomContainer);
$overallRating-setBottomDecorationLabels(array(best, average,
worst));
$overallRating-setBottomDecorationParams(array(
container = array(
count = 3,
style = height:3px;
),
list  = array(style =
height:1em;font-size:75%;color:gray;)
)
);

The slider renders, bottom marks are visible, but labels are not visible.
The following code is rendered:

input id=overallRating name=overallRating value=50 type=hidden /
div id=overallRating-slider onChange=dojo.byId('overallRating').value =
arguments[0]; minimum=0 maximum=100 discreteValues=100
showButtons=false value=50 dojoType=dijit.form.HorizontalSlider
div id=overallRating-slider-bottomDecoration count=3
style=height:3px; container=bottomDecoration
dojoType=dijit.form.HorizontalRule
ol id=overallRating-slider-bottomDecoration-labels
list=height:1em;font-size:75%;color:gray;
container=bottomDecorationdojoType=dijit.form.HorizontalRuleLabelslibest/liliaverage/liliworst/li
/ol
/div
/div

The Dojo tutorial
http://dojocampus.org/explorer/#Dijit_Form%20Controls_Slider_Custom%20Labels
suggests one div for the HorizontalRule and a separate ol for the
HorizontalRuleLabels. The code produced shows the ol within the div and
a list attribute instead of style assigned to the ol tag.

What is the correct way using mutators?
-- 
View this message in context: 
http://www.nabble.com/Zend_Dojo_Form_Element_HorizontalSlider-renders-invalid-Dojo-code-tp21599833p21599833.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Test message - please ignore Jan 22 2009 - 0930GMT

2009-01-22 Thread David L
Test message - please ignore Jan 22 2009 - 0930GMT


[fw-general] Radio Button Label Escape

2009-01-22 Thread Kieran Hall
Hi All,

I'm attempting to escape the label used in conjunction with some radio
buttons on a form I'm building.  Currently, I am setting the following
decorator:

public $radioDecorators = array(
array('ViewHelper'),
array('HtmlTag', array('tag' = 'dd')),
array(
array('labelDtClose' = 'HtmlTag'),
array(
'tag'   = 'dt',
'closeOnly' = true,
'placement' = 'prepend'
)
),
array('Label', array( 'escape' = false)),
array(
array('labelDtOpen' = 'HtmlTag'),
array(
'tag'   = 'dt',
'openOnly'  = true,
'placement' = 'prepend',
'class' = 'radio'
)
)
);

Is there a reason that this should behave in the same why that the
Select button does (with respect to the decorator)?

Thanks in advance.

-- 
Kieran Hall


Re: [fw-general] Zend_Dojo_Form_Element_Editor

2009-01-22 Thread Holon35

I just want to add that it seems that the generate code is the problem for IE
: 
p
  label for=textarea class=optionalCV sportif/label
  input id=textarea name=sportids_carriere value=Année type=hidden
/
  textarea height=150 id=textarea-Editor cols=40 rows=3
name=sportids_carriere[Editor] type=textAnnée /textarea
/p


Holon35 wrote:
 
 Hi,
 I have a Zend_Dojo_Form, and Zend_Dojo_Form_Element_Editor work fine with
 FireFox, but in IE7 a see the textbox, but its impossible to enter some
 text in it...
 
 Is someone can help me ?
 

-- 
View this message in context: 
http://www.nabble.com/Zend_Dojo_Form_Element_Editor-tp21593349p21601354.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Form Order and Jira

2009-01-22 Thread Matthew Weier O'Phinney
-- Arthur M. Kang art...@levelogic.com wrote
(on Wednesday, 21 January 2009, 02:21 PM -0800):
 Also, wouldn't it be a lot more flexible to have the order be a float rather
 than an int?  If you create a form with two elements (order 4, and order 5),
 just to insert another element to be displayed between the two would be
 somewhat of an unnecessary chore.  If the order was a float, it would simplify
 things a lot.  Maybe there are other inherent problems with using floats that
 I'm not aware of...

Use increments of 10 if you're explicitly setting order -- that makes it
easy to add elements in between.

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


Re: [fw-general] Zend_Dojo_Form_Element_HorizontalSlider renders invalid Dojo code

2009-01-22 Thread Matthew Weier O'Phinney
-- frank.quosdorf frank.quosd...@totuba.com wrote
(on Thursday, 22 January 2009, 12:32 AM -0800):
 The slider renders, bottom marks are visible, but labels are not visible.

Check against trunk or the new 1.7.3 release; I fixed this last week.

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


Re: [fw-general] Zend_Dojo_Form_Element_Editor

2009-01-22 Thread Matthew Weier O'Phinney
-- Holon35 jean-m...@rigade.com wrote
(on Thursday, 22 January 2009, 02:15 AM -0800):
 
 I just want to add that it seems that the generate code is the problem for IE
 : 
 p
   label for=textarea class=optionalCV sportif/label
   input id=textarea name=sportids_carriere value=Année type=hidden
 /
   textarea height=150 id=textarea-Editor cols=40 rows=3
 name=sportids_carriere[Editor] type=textAnnée /textarea
 /p


Do you have an example of code that would work? If so, I'll file an
issue and fix it.


 Holon35 wrote:
  Hi,
  I have a Zend_Dojo_Form, and Zend_Dojo_Form_Element_Editor work fine with
  FireFox, but in IE7 a see the textbox, but its impossible to enter some
  text in it...
  
  Is someone can help me ?

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


Re: [fw-general] What do you use to manage your ZF projects?

2009-01-22 Thread Marco
What do people use as a CI solution for their projects?

I see Zend are using bamboo but it doesn't look like its really used very
much.

I was looking at Xinc but that project doesn't seem to be going very far and
i've also looked at phpundercontrol but that doesn't really seem actively
developed either and i'm not sure I want to have to have java etc running to
do builds.

Anyone know of anything else written in PHP or that can be used to build PHP
(phing) projects easily?

I've started to knock up a very quick UI for Phing using ZF and will
continue with that if nothing else is available.

Open source or commercial - as long as the commercial is of a reasonable
price ;-)

Thanks

Marco


Re: [fw-general] What do you use to manage your ZF projects?

2009-01-22 Thread Matthew Weier O'Phinney
-- Marco markri...@gmail.com wrote
(on Thursday, 22 January 2009, 02:28 PM +0100):
 What do people use as a CI solution for their projects?
 
 I see Zend are using bamboo but it doesn't look like its really used very 
 much.

Actually, we're having some issues with configuration, due to our
network layout. Wil and I are making a push to get those issues resolved
this week and next. :)

 I was looking at Xinc but that project doesn't seem to be going very far and
 i've also looked at phpundercontrol but that doesn't really seem actively
 developed either and i'm not sure I want to have to have java etc running to 
 do
 builds.

The most activity I see around CI for PHP development is with
phpUnderControl, which is basically a targetted distribution for
CruiseControl that includes support for PHPUnit, phpDocumentor, and
PHP_CodeSniffer. It _does_ require Java, since it builds on top of
CruiseControl.

 Anyone know of anything else written in PHP or that can be used to
 build PHP (phing) projects easily?

 I've started to knock up a very quick UI for Phing using ZF and will continue
 with that if nothing else is available.

I've done a little work doing CI using just shell/PHP scripts and
cronjobs, but the results are not nearly as good -- more to keep track
of, and less introspection into the actual build process (i.e.,
inability to see the status of the build, such as status of test
running, etc). 

Phing itself is not really a CI tool -- it's a build tool. I personally
don't like it much, because I feel everything in the XML file would be
more understandable written as code.

 Open source or commercial - as long as the commercial is of a
 reasonable price ;-)

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


[fw-general] IIRF ReWrite Rules for Zend Framework on IIS

2009-01-22 Thread drj201

Hello,

Does anyone use IIRF with Zend Framework and IIS?

I am using IIS6 and I am having great difficulty creating the correct
rewrite rules for IIRF that will work with Zend Framework.

So far I have the following in my IsapiRewrite4.ini:

RewriteRule ^/(.*(js|ico|gif|jpg|png|flv|swf|css))$ /$1 [L,I,U]
RewriteRule ^(.*)$ /index.php [L,I,U]

This works fine EXCEPT when making any HTTP GET requests such as:

http://www.example.com/search?query=myquery

The contents of $_GET are blank yet it is fine on Apache. My rule is
incorrect.

The example given in the Zend Wiki
(http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter)
is far far too simplified and I have found little to nothing elsewhere.

Can anyone help me please?

Regards,

David


-- 
View this message in context: 
http://www.nabble.com/IIRF-ReWrite-Rules-for-Zend-Framework-on-IIS-tp21604335p21604335.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] What do you use to manage your ZF projects?

2009-01-22 Thread Marco


  I see Zend are using bamboo but it doesn't look like its really used very
 much.

 Actually, we're having some issues with configuration, due to our
 network layout. Wil and I are making a push to get those issues resolved
 this week and next. :)


Great, I did see Will posted some ideas for bamboo improvements, did any of
these get accepted by Atlassain and are they likely to appear anytime soon?



 I've done a little work doing CI using just shell/PHP scripts and
 cronjobs, but the results are not nearly as good -- more to keep track
 of, and less introspection into the actual build process (i.e.,
 inability to see the status of the build, such as status of test
 running, etc).


What I've gotten so far is a very simple ZF app which is used to configure
projects to be built, it uses a mysql DB to store information about the
builds so for each build I record start / end times, number of lines changed
/ added / removed from svn and also the build status (pass / fail). The
projects are built using Phing currently.

For each project it stores a build number which is just a simple incremental
counter.

The app then copies the code coverage / unit tests / phpdoc files from the
build folder to a public folder on the internal webserver so that I can view
the latest API docs and code coverage results etc.

I don't yet have any graphs etc but its something I might look at adding at
somepoint if management bug me enough about it.

No where near as powerful as cruisecontrol / phpundercontrol but was quite
simple to implement. Are there others out there who would be interested in
something like this that could help with design / coding if I decide to take
it any further?

Regards

Marco


RE: [fw-general] What do you use to manage your ZF projects?

2009-01-22 Thread Robert Castley
I am using Hudson https://hudson.dev.java.net/ 

I use a small shell script to perform all my build needs and Hudson takes
care of the rest.

- Robert

-Original Message-
From: Matthew Weier O'Phinney [mailto:matt...@zend.com] 
Sent: 22 January 2009 13:39
To: fw-general@lists.zend.com
Subject: Re: [fw-general] What do you use to manage your ZF projects?

-- Marco markri...@gmail.com wrote
(on Thursday, 22 January 2009, 02:28 PM +0100):
 What do people use as a CI solution for their projects?
 
 I see Zend are using bamboo but it doesn't look like its really used very
much.

Actually, we're having some issues with configuration, due to our network
layout. Wil and I are making a push to get those issues resolved this week
and next. :)

 I was looking at Xinc but that project doesn't seem to be going very 
 far and i've also looked at phpundercontrol but that doesn't really 
 seem actively developed either and i'm not sure I want to have to have 
 java etc running to do builds.

The most activity I see around CI for PHP development is with
phpUnderControl, which is basically a targetted distribution for
CruiseControl that includes support for PHPUnit, phpDocumentor, and
PHP_CodeSniffer. It _does_ require Java, since it builds on top of
CruiseControl.

 Anyone know of anything else written in PHP or that can be used to 
 build PHP (phing) projects easily?

 I've started to knock up a very quick UI for Phing using ZF and will 
 continue with that if nothing else is available.

I've done a little work doing CI using just shell/PHP scripts and cronjobs,
but the results are not nearly as good -- more to keep track of, and less
introspection into the actual build process (i.e., inability to see the
status of the build, such as status of test running, etc). 

Phing itself is not really a CI tool -- it's a build tool. I personally
don't like it much, because I feel everything in the XML file would be more
understandable written as code.

 Open source or commercial - as long as the commercial is of a 
 reasonable price ;-)

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


This email has been scanned for all known viruses by the MessageLabs Email
Security Service and the Macro 4 plc internal virus protection system.




This email has been scanned for all known viruses by the MessageLabs Email 
Security Service and the Macro 4 plc internal virus protection system.


RE: [fw-general] What do you use to manage your ZF projects?

2009-01-22 Thread Robert Castley
I now have a public link where what I have achieved to date can be viewed 
 
This is far from complete and there is still loads to do.  If you fancy
helping out then drop me a line.
 
It would be nice to get a decent PHP based Tracker and Wiki solution.
 
I have the Wiki working  with Textile markup and a simple macro engine for
the Wiki.  At the moment there is one for fetching tickets e.g.
 
{macro:bug}4{macro}
 
And one for formatting/displaying PHP code e.g.
 
{macro:php}
?php
myFunction()
{
$a = $b
}
?
{macro}
 
You can add/view tickets at the moment but that is it.
 
Everything else is under development :-)
 
http://rcastley.plus.com/ http://rcastley.plus.com/ 
 
- Robert

  _  

From: Robert Castley 
Sent: 21 January 2009 17:33
To: Karol Grecki; fw-general@lists.zend.com
Subject: RE: [fw-general] What do you use to manage your ZF projects?



Well ... 

Depending on which way you look at it, I have stupidly decided to have a
stab at developing my own PHP based solution. 

Using ZF ... of course! 

My starting point is a direct copy of the sqlite database from trac, this
has already been modified to support projects :-)

I have the Wiki side of things all working thanks to my other attempt at a
project called ZFWiki. 

I will report back when I have more information :-) 

I have some screenshots at http://gallery.me.com/robert.castley#100086
http://gallery.me.com/robert.castley#100086  

- Robert 

-Original Message- 
From: Karol Grecki [mailto:kgre...@gmail.com mailto:kgre...@gmail.com ] 
Sent: 21 December 2008 22:42 
To: fw-general@lists.zend.com 
Subject: RE: [fw-general] What do you use to manage your ZF projects? 


Everything is raised as tickets, there are different types like bug, task,
proposal etc. 
You can organise them using milestones, components and versions. 
I used milestones for projects because they have special meaning in Roadmap
view, but you can chose any of them and create appropriate reports using sql
syntax.

Anyway I feel your pain, I couldn't find anything meeting my requirements
either. 
I even considered building it myself, using ZF of course :) 

Karol 


rcastley wrote: 
 
 Hi Karol, 
 
 How do you handle issue/bug tracking? 
 
 In Bugzilla I can choose the Product and then the component etc. 
 
 More research tonight has unveiled the following projects: 
 
 1) Redmine (seems to be like Trac but written in Ruby).  Not used Ruby 
 or Rails so not comfortable with this from a systems managament POV.  
 See Item 3! 
 2) I used Gforge on the Mambo project, they now over an Advanced Version: 
 http://gforgegroup.com/es/download.php
http://gforgegroup.com/es/download.php  
 3) Retrospectiva - but look at the 'Quick' Install guide: 
 http://retrospectiva.org/wiki/Quick%20install
http://retrospectiva.org/wiki/Quick%20install .  Now I know why I love 
 PHP 
 ;-) 
 
 I think I am now getting myself down to Gforge AS or Trac. 
 
 Why is nothing ever easy, eh? 
 
 - Robert 
 
 -Original Message- 
 From: Karol Grecki [mailto:kgre...@gmail.com mailto:kgre...@gmail.com ] 
 Sent: 21 December 2008 21:46 
 To: fw-general@lists.zend.com 
 Subject: Re: [fw-general] What do you use to manage your ZF projects? 
 
 
 Robert 
 
 I had the same problem over a year ago and settled for Trac. It 
 doesn't support multiple projects but we use milestones for it e.g. 
 project A sprint 1 It integrates really well with Subversion and 
 there's a lot of plugins extending its functionality. It may still be 
 your best bet if you don't find anything matching all your 
 requirements. 
 
 Karol 
 
 
 rcastley wrote: 
 
 Hi, 
  
 Just curious here.  I/we currently use  Bugzilla  CVS, no formal 
 wiki but I do have a MediaWiki used for somethings. 
  
 I am looking for a solution that fits all, so the obvious choices are 
 'Trac' 
 like. 
  
 My problem is that I need a solution that will support multiple projects.

 (Trac doesn't score well in this area.) 
  
 Bugzilla is used by multiple PHP, Java  C/C++ products.  CVS is used 
 only by PHP developers the 'others' use VSS. 
 MediaWiki is used for 'sparse' documentation. 
  
  
 My gripes with the current setup: 
  
 Bugzilla - v. slow and ugly but it fitted the bill at the time. 
 CVS - I like, no love, CVS but I know that there are better solutions 
 out there but am concerned about migration etc. 
 MediaWiki - Probably too much of an overkill for what we need and it 
 is not that easy to configured, extend etc. 
  
 I now that the ZF team uses JIRA, Confluence etc but I have a budget 
 of £0/$0 :-) and don't qualify for the OS licenses. 
  
 So ... I would be interested on the views of others of a 'one hat 
 fits all' 
 solution that can handle multiple projects. 
 The solution needs to offer Issues/Bug tracking and Wiki at a minimum. 
 Integration with SCM not important but if it does it great. 
  
 I would prefer a PHP based solution but happy to consider others i.e. 
 Ruby, 
 Perl, Java etc. 
  
 - Robert 
  
 
 

-- 

Re: [fw-general] IIRF ReWrite Rules for Zend Framework on IIS

2009-01-22 Thread Matthew Weier O'Phinney
-- drj201 drj...@gmail.com wrote
(on Thursday, 22 January 2009, 05:41 AM -0800):
 Does anyone use IIRF with Zend Framework and IIS?
 
 I am using IIS6 and I am having great difficulty creating the correct
 rewrite rules for IIRF that will work with Zend Framework.
 
 So far I have the following in my IsapiRewrite4.ini:
 
 RewriteRule ^/(.*(js|ico|gif|jpg|png|flv|swf|css))$ /$1 [L,I,U]
 RewriteRule ^(.*)$ /index.php [L,I,U]
 
 This works fine EXCEPT when making any HTTP GET requests such as:
 
 http://www.example.com/search?query=myquery
 
 The contents of $_GET are blank yet it is fine on Apache. My rule is
 incorrect.
 
 The example given in the Zend Wiki
 (http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter)
 is far far too simplified and I have found little to nothing elsewhere.
 
 Can anyone help me please?

There's an example in the Zend_Controller docs for use with IIS 7.0
(which has a native rewrite implementation):

http://framework.zend.com/manual/en/zend.controller.html

Can't help you much with IsapiRewrite, however.

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


Re: [fw-general] IIRF ReWrite Rules for Zend Framework on IIS

2009-01-22 Thread Bryce Lohr
About two years ago, I was running ZF with IIRF. I had the same problem 
with it not propagating the GET parameters. I hacked the IIRF code to 
get it to pass the GET parms the same way IsapiRewrite does. I can give 
you the code if you're interested, however, I haven't actually used it 
in more than a year and a half, so I don't know if it'll still work 
properly. I haven't kept up with any newer versions of IIRF (the project 
had seemed to die right about the time I was doing this).


Regards,
Bryce Lohr


drj201 wrote:

Hello,

Does anyone use IIRF with Zend Framework and IIS?

I am using IIS6 and I am having great difficulty creating the correct
rewrite rules for IIRF that will work with Zend Framework.

So far I have the following in my IsapiRewrite4.ini:

RewriteRule ^/(.*(js|ico|gif|jpg|png|flv|swf|css))$ /$1 [L,I,U]
RewriteRule ^(.*)$ /index.php [L,I,U]

This works fine EXCEPT when making any HTTP GET requests such as:

http://www.example.com/search?query=myquery

The contents of $_GET are blank yet it is fine on Apache. My rule is
incorrect.

The example given in the Zend Wiki
(http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter)
is far far too simplified and I have found little to nothing elsewhere.

Can anyone help me please?

Regards,

David


  


[fw-general] Zend Form - Setting element required based on a condition

2009-01-22 Thread Colin J

Hi

Just wanted to check whether this was being done the 'right' way and welcome
any feedback.  I would like to set a field to be required based on a certain
condition, for example, if a form has a 'How would you like to be
contacted?' dropdown (of Post or Email) and the user selects 'Email' then I
want an Email Address field to be required.

To do this, I have created the form like this:

class MyForm extends Zend_Form
{
public function init()
{
$this-addElement(
'select',
'contactBy', 
array(
'label' = 'How would you like to be 
contacted?',
'multiOptions' = array(
'' = '-- Please Select --',
'post' = 'Post',
'email' = 'Email'
)
'required' = true,
)
);

$this-addElement(
'text',
'emailAddress',
array(
'label' = 'Email Address'
)
);

}

/**
/* override the isValid function of Zend_Form so that I can
/* set a required field based on a condition
*/

public function isValid($value)
{
if (array_key_exists('contactBy', $value)  
$value['contactBy'] ==
'email') {
$this-emailAddress-setRequired(true);
}

parent::isValid($value);
}
}   

It is the overriding of isValid() and the call parent::isValid($value) that
I particularly wanted to ask is a suitable approach in OO terms (not being
an expert!)?

Thanks, in advance, for any feedback

Colin
-- 
View this message in context: 
http://www.nabble.com/Zend-Form---Setting-element-required-based-on-a-condition-tp21605109p21605109.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Form Radio Buttons in ini file

2009-01-22 Thread Bob O

Im trying to set a group of radio buttons inside an .ini file and then
display it in the view script using 1 call..

this is the html im trying to create with the ini
input type=radio name=message_retry value=1 / 1
input type=radio name=message_retry value=2 / 2
input type=radio name=message_retry value=3 / 3

this is the current .ini segment

; Message Attempts Radio
advertiser.campaignCreate.elements.campaignMessageAttempts.t ype = radio
advertiser.campaignCreate.elements.campaignMessageAttempts.o ptions.required
= false
advertiser.campaignCreate.elements.campaignMessageAttempts.o ptions.label =
Message Attempts Retry
advertiser.campaignCreate.elements.campaignMessageAttempts.o
ptions.attribs.id = campaign_frequency
advertiser.campaignCreate.elements.campaignMessageAttempts.o
ptions.attribs.tabIndex = 27
advertiser.campaignCreate.elements.campaignMessageAttempts.o
ptions.attribs.alt = Set Retry Attempts
advertiser.campaignCreate.elements.campaignMessageAttempts.o
ptions.decorators.type = ViewHelper

and then call it in the script like so

?php echo $this-campaignCreateForm-campaignMessageAttempts; ?


im just not sure how to set the elements up in the ini file?

-
Bob Hanson
Web Developer
SLC, UT
-- 
View this message in context: 
http://www.nabble.com/Zend_Form-Radio-Buttons-in-ini-file-tp21606880p21606880.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Form - Setting element required based on a condition

2009-01-22 Thread Martin Martinov
2009/1/22 Colin J colin.john...@johnguest.co.uk:

 Hi

 Just wanted to check whether this was being done the 'right' way and welcome
 any feedback.  I would like to set a field to be required based on a certain
 condition, for example, if a form has a 'How would you like to be
 contacted?' dropdown (of Post or Email) and the user selects 'Email' then I
 want an Email Address field to be required.

 To do this, I have created the form like this:

 class MyForm extends Zend_Form
 {
public function init()
{
$this-addElement(
'select',
'contactBy',
array(
'label' = 'How would you like to be 
 contacted?',
'multiOptions' = array(
'' = '-- Please Select --',
'post' = 'Post',
'email' = 'Email'
)
'required' = true,
)
);

$this-addElement(
'text',
'emailAddress',
array(
'label' = 'Email Address'
)
);

}

/**
/* override the isValid function of Zend_Form so that I can
/* set a required field based on a condition
*/

public function isValid($value)
{
if (array_key_exists('contactBy', $value)  
 $value['contactBy'] ==
 'email') {
$this-emailAddress-setRequired(true);
}

parent::isValid($value);
}
 }

 It is the overriding of isValid() and the call parent::isValid($value) that
 I particularly wanted to ask is a suitable approach in OO terms (not being
 an expert!)?

 Thanks, in advance, for any feedback

 Colin
 --
 View this message in context: 
 http://www.nabble.com/Zend-Form---Setting-element-required-based-on-a-condition-tp21605109p21605109.html
 Sent from the Zend Framework mailing list archive at Nabble.com.



I don't see anything wrong with your approach but I'm not an expert too ;-)
However, I believe that the recommended way of doing this is by
creating a custom validator and utilizing the $context parameter.
Take a look at this page in the manual
http://framework.zend.com/manual/en/zend.form.elements.html and search
for the note on Validation Context.

-- 
Regards,
Martin Martinov
http://mmartinov.com/


Re: [fw-general] IIRF ReWrite Rules for Zend Framework on IIS

2009-01-22 Thread Jason Webster
There's a section here http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter 
on using IIRF. I cannot verify if it is accurate or correct, but it's worth a shot.


On 22/01/2009 6:14 AM, Bryce Lohr wrote:

About two years ago, I was running ZF with IIRF. I had the same problem
with it not propagating the GET parameters. I hacked the IIRF code to
get it to pass the GET parms the same way IsapiRewrite does. I can give
you the code if you're interested, however, I haven't actually used it
in more than a year and a half, so I don't know if it'll still work
properly. I haven't kept up with any newer versions of IIRF (the project
had seemed to die right about the time I was doing this).

Regards,
Bryce Lohr


drj201 wrote:

Hello,

Does anyone use IIRF with Zend Framework and IIS?

I am using IIS6 and I am having great difficulty creating the correct
rewrite rules for IIRF that will work with Zend Framework.

So far I have the following in my IsapiRewrite4.ini:

RewriteRule ^/(.*(js|ico|gif|jpg|png|flv|swf|css))$ /$1 [L,I,U]
RewriteRule ^(.*)$ /index.php [L,I,U]

This works fine EXCEPT when making any HTTP GET requests such as:

http://www.example.com/search?query=myquery

The contents of $_GET are blank yet it is fine on Apache. My rule is
incorrect.

The example given in the Zend Wiki
(http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter)

is far far too simplified and I have found little to nothing elsewhere.

Can anyone help me please?

Regards,

David






Re: [fw-general] Zend Form - Setting element required based on a condition

2009-01-22 Thread jkendall


Martin Martinov-2 wrote:
 
 However, I believe that the recommended way of doing this is by
 creating a custom validator and utilizing the $context parameter.
 

I second Martin's suggestion.

I wrote up how I dealt with this at
http://www.jeremykendall.net/2008/12/24/conditional-form-validation-with-zend_form/

Good luck.


-
Jeremy Kendall --  http://www.jeremykendall.net http://www.jeremykendall.net 
-- 
View this message in context: 
http://www.nabble.com/Zend-Form---Setting-element-required-based-on-a-condition-tp21605109p21608829.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Form - Setting element required based on a condition

2009-01-22 Thread Colin J


Martin Martinov-2 wrote:
 
 
 I don't see anything wrong with your approach but I'm not an expert too
 ;-)
 However, I believe that the recommended way of doing this is by
 creating a custom validator and utilizing the $context parameter.
 Take a look at this page in the manual
 http://framework.zend.com/manual/en/zend.form.elements.html and search
 for the note on Validation Context.
 
 -- 
 Regards,
 Martin Martinov
 http://mmartinov.com/
 
 
Thanks for the pointers Martin

Yes, I looked at creating a custom validator against the emailAddress field
to check the value of the contactBy field in the $context but ran into a
couple of issues.

(a)  I could not find a way of using the standard
Zend_Validate_NotEmpty::IS_EMPTY message (which may or may not be
translated).

(b) I had issues when attaching another validator to the emailAddress field
(e.g. Zend Validate EmailAddress) because to fire the custom validator when
the field is empty you need 'allowEmpty' = false but this, in turn, causes
the EmailAddress validator to run even when the field is empty :-(

My alternative approach to override the isValid method on Zend_Form did seem
simpler (I'm lazy, I suppose, but that's if it's OK to do that in OO terms!)

Thanks again



-- 
View this message in context: 
http://www.nabble.com/Zend-Form---Setting-element-required-based-on-a-condition-tp21605109p21608927.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Form - Setting element required based on a condition

2009-01-22 Thread Colin J


jkendall wrote:
 
 I second Martin's suggestion.
 
 I wrote up how I dealt with this at
 http://www.jeremykendall.net/2008/12/24/conditional-form-validation-with-zend_form/
 
 Good luck.
 
 

Jeremy, I read your post, it was very useful, thank you.  I'm on a mission
at the moment to keep the controller as clean as possible, so I was trying
to find a way of not having to call anything but $form-isValid from the
controller.  If I could somehow hook your $form-preValidation call into any
calls that a form isValid that would suit me better.  Maybe that's just
about me creating a custom object that extends Zend_Form and adds a
preValidation call automatically.
-- 
View this message in context: 
http://www.nabble.com/Zend-Form---Setting-element-required-based-on-a-condition-tp21605109p21609167.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Form - Setting element required based on a condition

2009-01-22 Thread jkendall



Colin J wrote:
 
  I'm on a mission at the moment to keep the controller as clean as
 possible, so I was trying to find a way of not having to call anything but
 $form-isValid from the controller.  If I could somehow hook your
 $form-preValidation call into any calls that a form isValid that would
 suit me better.  Maybe that's just about me creating a custom object that
 extends Zend_Form and adds a preValidation call automatically.
 

I had some of the same reservations about adding a preValidation() call to
my controller, but in the end I decided the explicit call was the best way
to go.  Not every form will require a preValidation() method, so I'd have to
use a different Zend_Form subclass for those that did.  When I look back at
my controllers in six weeks, I won't remember which form used
preValidation() and which didn't.  Having that call in the controller helps
me to remember and makes debugging and adding features a lot easier.  YMMV.


-
Jeremy Kendall --  http://www.jeremykendall.net http://www.jeremykendall.net 
-- 
View this message in context: 
http://www.nabble.com/Zend-Form---Setting-element-required-based-on-a-condition-tp21605109p21609466.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Cache Backend Proposals For Community Review

2009-01-22 Thread Pádraic Brady
Hi all,

I've been tinkering with caching a lot recently, so I have started a series of 
proposals to assist developers in integrating caching into their Zend Framework 
applications. To get the process going I have proposed two new Zend_Cache 
backends:

Zend_Cache_Backend_Static
http://framework.zend.com/wiki/pages/viewpage.action?pageId=8947732

A simple means of caching pages into static HTML files, and includes a tagging 
system to offset the major disadvantage of static caching which is of course 
expiring/invalidating the files without needing to manually track them all by 
hand. The power of a static file cache is that it is far faster than the 
current Page cache even with a memory backend. It also removes the need for a 
caching proxy like Squid. It's widely recognised as one of the fastest caching 
strategies possible for web applications since it completely avoids PHP and 
lets the HTTP server reach it maximum potential throughput by avoiding any 
unnecessary processing.

Zend_Cache_Backend_Database
http://framework.zend.com/wiki/pages/viewpage.action?pageId=9437191

Offers a nice database backed cache for data which requires longer term 
caching. This creates a persistent cache which does not rely on the filesystem, 
scales well, and which is not exposed to the volatility of memory caching 
(because then stuff vanishes mysteriously when you switch off machines :)). 
Database caching is obviously slow but there are a lot of precedents. Just for 
starters, have a look at where Zend_Openid can store time limited association 
data! Often a database cache is used as a more dependable secure cache which 
can be re-cached into memory (without fear of losing any of the data) for 
faster access as part of a layered cache system.

Future proposals will move towards an approach of expanding caching strategies 
available from the framework, and integrating those caches and easy to use APIs 
deeper into the framework through a mix of helpers and plugins. The goal is to 
minimise setup source code and development time, and offer a complete cache 
management subsystem available from all levels of the application.

I hope these first proposals meet with the community's approval and I invite 
any comments.

Thanks!

Paddy

 Pádraic Brady

http://blog.astrumfutura.com
http://www.survivethedeepend.com
OpenID Europe Foundation Irish Representative

RE: [fw-general] What do you use to manage your ZF projects?

2009-01-22 Thread Robert Castley
Hi,
 
Now have SCM browser in early stages :-)  SVN only at the moment.
 
http://rcastley.plus.com http://rcastley.plus.com 
 
- Robert

  _  

From: Robert Castley 
Sent: 22 January 2009 14:09
To: fw-general@lists.zend.com
Subject: RE: [fw-general] What do you use to manage your ZF projects?


I now have a public link where what I have achieved to date can be viewed 
 
This is far from complete and there is still loads to do.  If you fancy
helping out then drop me a line.
 
It would be nice to get a decent PHP based Tracker and Wiki solution.
 
I have the Wiki working  with Textile markup and a simple macro engine for
the Wiki.  At the moment there is one for fetching tickets e.g.
 
{macro:bug}4{macro}
 
And one for formatting/displaying PHP code e.g.
 
{macro:php}
?php
myFunction()
{
$a = $b
}
?
{macro}
 
You can add/view tickets at the moment but that is it.
 
Everything else is under development :-)
 
http://rcastley.plus.com/ http://rcastley.plus.com/ 
 
- Robert

  _  

From: Robert Castley 
Sent: 21 January 2009 17:33
To: Karol Grecki; fw-general@lists.zend.com
Subject: RE: [fw-general] What do you use to manage your ZF projects?



Well ... 

Depending on which way you look at it, I have stupidly decided to have a
stab at developing my own PHP based solution. 

Using ZF ... of course! 

My starting point is a direct copy of the sqlite database from trac, this
has already been modified to support projects :-)

I have the Wiki side of things all working thanks to my other attempt at a
project called ZFWiki. 

I will report back when I have more information :-) 

I have some screenshots at http://gallery.me.com/robert.castley#100086
http://gallery.me.com/robert.castley#100086  

- Robert 

-Original Message- 
From: Karol Grecki [mailto:kgre...@gmail.com mailto:kgre...@gmail.com ] 
Sent: 21 December 2008 22:42 
To: fw-general@lists.zend.com 
Subject: RE: [fw-general] What do you use to manage your ZF projects? 


Everything is raised as tickets, there are different types like bug, task,
proposal etc. 
You can organise them using milestones, components and versions. 
I used milestones for projects because they have special meaning in Roadmap
view, but you can chose any of them and create appropriate reports using sql
syntax.

Anyway I feel your pain, I couldn't find anything meeting my requirements
either. 
I even considered building it myself, using ZF of course :) 

Karol 


rcastley wrote: 
 
 Hi Karol, 
 
 How do you handle issue/bug tracking? 
 
 In Bugzilla I can choose the Product and then the component etc. 
 
 More research tonight has unveiled the following projects: 
 
 1) Redmine (seems to be like Trac but written in Ruby).  Not used Ruby 
 or Rails so not comfortable with this from a systems managament POV.  
 See Item 3! 
 2) I used Gforge on the Mambo project, they now over an Advanced Version: 
 http://gforgegroup.com/es/download.php
http://gforgegroup.com/es/download.php  
 3) Retrospectiva - but look at the 'Quick' Install guide: 
 http://retrospectiva.org/wiki/Quick%20install
http://retrospectiva.org/wiki/Quick%20install .  Now I know why I love 
 PHP 
 ;-) 
 
 I think I am now getting myself down to Gforge AS or Trac. 
 
 Why is nothing ever easy, eh? 
 
 - Robert 
 
 -Original Message- 
 From: Karol Grecki [mailto:kgre...@gmail.com mailto:kgre...@gmail.com ] 
 Sent: 21 December 2008 21:46 
 To: fw-general@lists.zend.com 
 Subject: Re: [fw-general] What do you use to manage your ZF projects? 
 
 
 Robert 
 
 I had the same problem over a year ago and settled for Trac. It 
 doesn't support multiple projects but we use milestones for it e.g. 
 project A sprint 1 It integrates really well with Subversion and 
 there's a lot of plugins extending its functionality. It may still be 
 your best bet if you don't find anything matching all your 
 requirements. 
 
 Karol 
 
 
 rcastley wrote: 
 
 Hi, 
  
 Just curious here.  I/we currently use  Bugzilla  CVS, no formal 
 wiki but I do have a MediaWiki used for somethings. 
  
 I am looking for a solution that fits all, so the obvious choices are 
 'Trac' 
 like. 
  
 My problem is that I need a solution that will support multiple projects.

 (Trac doesn't score well in this area.) 
  
 Bugzilla is used by multiple PHP, Java  C/C++ products.  CVS is used 
 only by PHP developers the 'others' use VSS. 
 MediaWiki is used for 'sparse' documentation. 
  
  
 My gripes with the current setup: 
  
 Bugzilla - v. slow and ugly but it fitted the bill at the time. 
 CVS - I like, no love, CVS but I know that there are better solutions 
 out there but am concerned about migration etc. 
 MediaWiki - Probably too much of an overkill for what we need and it 
 is not that easy to configured, extend etc. 
  
 I now that the ZF team uses JIRA, Confluence etc but I have a budget 
 of £0/$0 :-) and don't qualify for the OS licenses. 
  
 So ... I would be interested on the views of others of a 'one hat 
 fits all' 
 solution 

Re: [fw-general] Zend_Form Radio Buttons in ini file

2009-01-22 Thread swilhelm

Try adding the following

advertiser.campaignCreate.elements.campaignMessageAttempts.options.multiOptions.1
= 1
advertiser.campaignCreate.elements.campaignMessageAttempts.options.multiOptions.2
= 2
advertiser.campaignCreate.elements.campaignMessageAttempts.options.multiOptions.3
= 3

- Steve W.


Bob O wrote:
 
 Im trying to set a group of radio buttons inside an .ini file and then
 display it in the view script using 1 call..
 
 this is the html im trying to create with the ini
 input type=radio name=message_retry value=1 / 1
 input type=radio name=message_retry value=2 / 2
 input type=radio name=message_retry value=3 / 3
 
 this is the current .ini segment
 
 ; Message Attempts Radio
 advertiser.campaignCreate.elements.campaignMessageAttempts.t ype = radio
 advertiser.campaignCreate.elements.campaignMessageAttempts.o
 ptions.required = false
 advertiser.campaignCreate.elements.campaignMessageAttempts.o ptions.label
 = Message Attempts Retry
 advertiser.campaignCreate.elements.campaignMessageAttempts.o
 ptions.attribs.id = campaign_frequency
 advertiser.campaignCreate.elements.campaignMessageAttempts.o
 ptions.attribs.tabIndex = 27
 advertiser.campaignCreate.elements.campaignMessageAttempts.o
 ptions.attribs.alt = Set Retry Attempts
 advertiser.campaignCreate.elements.campaignMessageAttempts.o
 ptions.decorators.type = ViewHelper
 
 and then call it in the script like so
 
 ?php echo $this-campaignCreateForm-campaignMessageAttempts; ?
 
 
 im just not sure how to set the elements up in the ini file?
 

-- 
View this message in context: 
http://www.nabble.com/Zend_Form-Radio-Buttons-in-ini-file-tp21606880p21613975.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Cache Backend Proposals For Community Review

2009-01-22 Thread Xavier Vidal Piera
Great contribution !!

2009/1/22 Pádraic Brady padraic.br...@yahoo.com

 Hi all,

 I've been tinkering with caching a lot recently, so I have started a series
 of proposals to assist developers in integrating caching into their Zend
 Framework applications. To get the process going I have proposed two new
 Zend_Cache backends:

 Zend_Cache_Backend_Static
 http://framework.zend.com/wiki/pages/viewpage.action?pageId=8947732

 A simple means of caching pages into static HTML files, and includes a
 tagging system to offset the major disadvantage of static caching which is
 of course expiring/invalidating the files without needing to manually track
 them all by hand. The power of a static file cache is that it is far faster
 than the current Page cache even with a memory backend. It also removes the
 need for a caching proxy like Squid. It's widely recognised as one of the
 fastest caching strategies possible for web applications since it completely
 avoids PHP and lets the HTTP server reach it maximum potential throughput by
 avoiding any unnecessary processing.

 Zend_Cache_Backend_Database
 http://framework.zend.com/wiki/pages/viewpage.action?pageId=9437191

 Offers a nice database backed cache for data which requires longer term
 caching. This creates a persistent cache which does not rely on the
 filesystem, scales well, and which is not exposed to the volatility of
 memory caching (because then stuff vanishes mysteriously when you switch off
 machines :)). Database caching is obviously slow but there are a lot of
 precedents. Just for starters, have a look at where Zend_Openid can store
 time limited association data! Often a database cache is used as a more
 dependable secure cache which can be re-cached into memory (without fear of
 losing any of the data) for faster access as part of a layered cache system.

 Future proposals will move towards an approach of expanding caching
 strategies available from the framework, and integrating those caches and
 easy to use APIs deeper into the framework through a mix of helpers and
 plugins. The goal is to minimise setup source code and development time, and
 offer a complete cache management subsystem available from all levels of the
 application.

 I hope these first proposals meet with the community's approval and I
 invite any comments.

 Thanks!

 Paddy

 Pádraic Brady

 http://blog.astrumfutura.com
 http://www.survivethedeepend.com
 OpenID Europe Foundation Irish Representativehttp://www.openideurope.eu/




-- 
Xavier Vidal Piera
Director Tècnic de Citrusparadis.com - Grupo Intercom
Enginyer Tècnic Informàtic de Gestió
Tècnic Especialista Informàtic d'equips
xavivi...@gmail.com
http://web.xaviervidal.net
610.68.41.78


Re: [fw-general] What do you use to manage your ZF projects?

2009-01-22 Thread Marco
 Now have SCM browser in early stages :-)  SVN only at the moment.



Nice!

Is this something you plan to release?

Regards

Marco


Re: [fw-general] Zend_Dojo_Form_Element_HorizontalSlider renders invalid Dojo code

2009-01-22 Thread frank.quosdorf

checked against 1.7.3 release - works for me. Thanks for the hint


Matthew Weier O'Phinney-3 wrote:
 
 -- frank.quosdorf frank.quosd...@totuba.com wrote
 (on Thursday, 22 January 2009, 12:32 AM -0800):
 The slider renders, bottom marks are visible, but labels are not visible.
 
 Check against trunk or the new 1.7.3 release; I fixed this last week.
 
 -- 
 Matthew Weier O'Phinney
 Software Architect   | matt...@zend.com
 Zend Framework   | http://framework.zend.com/
 
 

-- 
View this message in context: 
http://www.nabble.com/Zend_Dojo_Form_Element_HorizontalSlider-renders-invalid-Dojo-code-tp21599833p21617790.html
Sent from the Zend Framework mailing list archive at Nabble.com.