[fw-general] 404 on Api Docs

2008-04-13 Thread Karl Katzke
When I head over to

http://framework.zend.com/apidoc/core

I get
Not Found

The requested URL /apidoc/core was not found on this server.

. augh! Help! ;)


[fw-general] LinkedIn Group

2008-04-12 Thread Karl Katzke
If you're on LinkedIn, I've created a group for Zend Framework Developers.
You can join by searching for my profile using my email address, and then
clicking on the Zend Frameworks group and clicking join.

If anyone at Zend wants to take over as a manager of the group, I'm happy to
hand the keys over -- Other PHP groups/frameworks have LinkedIn groups, and
I wanted one for us too!

Thanks!
-Karl


Re: [fw-general] LinkedIn Group

2008-04-12 Thread Karl Katzke
Here's a direct link, I think...

http://www.linkedin.com/pub/0/626/433

On Sat, Apr 12, 2008 at 12:04 PM, Josh Team [EMAIL PROTECTED] wrote:

 Couldn't find you with [EMAIL PROTECTED]


 On Sat, Apr 12, 2008 at 11:57 AM, Karl Katzke [EMAIL PROTECTED] wrote:

  If you're on LinkedIn, I've created a group for Zend Framework
  Developers. You can join by searching for my profile using my email address,
  and then clicking on the Zend Frameworks group and clicking join.
 
  If anyone at Zend wants to take over as a manager of the group, I'm
  happy to hand the keys over -- Other PHP groups/frameworks have LinkedIn
  groups, and I wanted one for us too!
 
  Thanks!
  -Karl
 




Re: [fw-general] LinkedIn Group

2008-04-12 Thread Karl Katzke
Wil, on of the nice things about LinkedIn's groups feature is that multiple
people can be managers. I've added you and Matt as managers as well in case
I'm not able to tend to something.

-Karl

On Sat, Apr 12, 2008 at 12:32 PM, Wil Sinclair [EMAIL PROTECTED] wrote:

  Cool! I've signed up. If there are admin responsibilities that you don't
 have time for, then I'd be happy to take it over. But in general we'd prefer
 that community members take on as many forums and organizations as they can.
 In fact, we very carefully select community functions to take on ourselves
 because we want to encourage community members to contribute in every way to
 grow our ecosystem. After all, we'll never be able to scale the community if
 five time-strapped people are trying to hold it all together themselves!



 Thanks for the new means to keep us all in touch, and I hope to add all of
 you as connections soon.

 ,Wil



 *From:* Karl Katzke [mailto:[EMAIL PROTECTED]
 *Sent:* Saturday, April 12, 2008 10:11 AM
 *To:* Josh Team; Zend Mailing List
 *Subject:* Re: [fw-general] LinkedIn Group



 Here's a direct link, I think...

 http://www.linkedin.com/pub/0/626/433

 On Sat, Apr 12, 2008 at 12:04 PM, Josh Team [EMAIL PROTECTED] wrote:

 Couldn't find you with [EMAIL PROTECTED]



 On Sat, Apr 12, 2008 at 11:57 AM, Karl Katzke [EMAIL PROTECTED] wrote:

 If you're on LinkedIn, I've created a group for Zend Framework Developers.
 You can join by searching for my profile using my email address, and then
 clicking on the Zend Frameworks group and clicking join.

 If anyone at Zend wants to take over as a manager of the group, I'm happy
 to hand the keys over -- Other PHP groups/frameworks have LinkedIn groups,
 and I wanted one for us too!

 Thanks!
 -Karl







Re: [fw-general] LinkedIn Group

2008-04-12 Thread Karl Katzke
If I don't approve you right away for group membership, don't worry, I will
next time I log in. It's a beautiful 70 degree day here in south central
Texas, and I'm trying to spend some of it outside!

-K


   On Sat, Apr 12, 2008 at 11:57 AM, Karl Katzke [EMAIL PROTECTED]
   wrote:
  
If you're on LinkedIn, I've created a group for Zend Framework
Developers. You can join by searching for my profile using my email 
address,
and then clicking on the Zend Frameworks group and clicking join.
   
If anyone at Zend wants to take over as a manager of the group, I'm
happy to hand the keys over -- Other PHP groups/frameworks have LinkedIn
groups, and I wanted one for us too!
   
Thanks!
-Karl
   
  
  
 


 --
 Bradley Holt
 [EMAIL PROTECTED]




Re: [fw-general] And a big thanks to Varien for the new site design!

2008-04-07 Thread Karl Katzke
Wil,

I'm not a big fan of the new site's homepage either. Let me try and explain
why, from both a design perspective and a usability perspective.

On the front page, everything is cartoony and oversized. The icons are big,
the fonts are far too big, the ZF logo (which is normally rather slick) is
big and embossed, the MAKE THE CHOICE is the biggest and first thing you
see. Those are challenge words, not welcoming words. The color scheme
clashes and calls your attention to too many things at once. There are far
too many choices on the front page for anyone to find where they should get
started. The subheadings under Make the choice / get started / give back
are dorky and un-necessary. How do you know what feels good to me? ;)

Compare this to CodeIgniter's site: http://codeigniter.com/ ... the color
scheme is bright in areas where it wants to call your attention. The first
thing you read is a description of what CodeIgniter is, the second is a
welcome message. The icons are understated and are small enough to not
clash. You can scan the site easily and figure out where you need to go.

On top of all the other sins we have unoriginality; the Make the choice,
get started, and give back tricolor scheme seems to have been stolen
directly from OpenSuse.org, which does it far better... they only give you
three choices until you've decided if you're there to download, there for
information, or there to contribute to the software factory. (I realize
they're not the same exact colors, but that's the first thing I thought when
I saw the blue top with the orange and green.)

On the other hand, the inside pages are nice. I like the use of a block
serif font. I like the tabbed menu. I like the organized layout. The font
size is readable.

We take the good with the bad, but I have a feeling that Code Igniter's
website and websites like phpdoctrine.org should be used as examples. Those
sites are well-organized and appeal to both decision makers and developers.
Then again, it's not like the competition's stiff -- CakePHP's site has many
of the same sins we do, and Symfony's site looks like garbage.

-K

On Mon, Apr 7, 2008 at 12:17 PM, Wil Sinclair [EMAIL PROTECTED] wrote:

 I gotta say- it's awesome that we have a forum where we can agree,
 disagree, and generally figure out every way we can make the project
 better.
 OK, here's my take on the front page:
 '1.5' will represent all the 1.5 releases; in my experience this is
 common for less detailed pages. It really is meant to call out that
 we've moved on from the 1.0 branch.
 Keep in mind, this page may simply not be for you. It is dominated by
 formatting and is meant to put the best face on ZF to new decision
 makers, developers, and contributors. We've tried to make the other
 pages more content driven, but it is safe to assume most of the content
 on the main site PHP site will be more or less introductory. The tools
 (wiki, IT, etc.) we have and will continue to keep as effective as
 possible for our active users/contributors.
 Ultimately, you haven't yet convinced me that the front page is not
 effective at what it sets out to do. For example, having a prominent
 download button makes it easy for everyone to download the project and
 get started, which is exactly what we want new users to do.
 Do you have more feedback on the site that might help us improve it? We
 will be adding more improvements over the next few weeks as we get it to
 a state we can be happy with until the next big update.

 Thanks!
 ,Wil

  -Original Message-
  From: thurting [mailto:[EMAIL PROTECTED]
  Sent: Monday, April 07, 2008 12:39 AM
  To: fw-general@lists.zend.com
  Subject: Re: [fw-general] And a big thanks to Varien for the new site
  design!
 
 
  I'm going to have to disagree here.  The front page is an atrocity.
  The
  download header dominates, the logo is out of control, and it is
  incredibly
  hard to scan the page for information.  Also, the project is on
 version
  1.5.1 now.  You need to update the .jpg because that is where this
  pivotal
  and dynamic information is displayed.
 
 
  Amr Mostafa wrote:
  
   Thanks for making us look like rock stars, Varien! ;-)
  
   On Mon, Mar 17, 2008 at 9:28 PM, Wil Sinclair [EMAIL PROTECTED] wrote:
  
   . . .and that's what I wish I would have remembered to say in the
  1.5
   announcement. :/ Seriously, they did an excellent job on the
 design;
  we
   asked them to take the ZF site to a completely new level, and I
  think
   most people would agree they did just that. This is one BIG way
 that
   they give back to the ZF project. Thanks SO much, guys.
  
   ,Wil
  
  
  
 
  --
  View this message in context: http://www.nabble.com/And-a-big-thanks-
  to-Varien-for-the-new-site-design%21-tp16105849p16535205.html
  Sent from the Zend Framework mailing list archive at Nabble.com.




Re: [fw-general] Our new Zend Framework Architect

2008-04-07 Thread Karl Katzke
Congratulations, Matthew! The promotion is well deserved -- when someone
asks me who a PHP genius/guru/person-whose-code-to-read is, I always mention
your name.

-Karl

On Mon, Apr 7, 2008 at 3:35 PM, Wil Sinclair [EMAIL PROTECTED] wrote:

  Matthew Weier O'Phinney
  Software Architect   | [EMAIL PROTECTED]
  Zend - The PHP Company   | http://www.zend.com/

 Yikes! I knew there was something I forgot to do on Friday. Without
 further ado, it's my immense pleasure to announce that Matthew has been
 promoted to Software Architect at Zend. I'm sure I don't have to explain
 what he's done to deserve this here. ;)
 He'll still maintain his existing components and develop new components.
 But he'll also be heading up efforts that involve cross-cutting concerns
 with all components. The general consistency of design and quality
 across all components should benefit greatly from his attention.
 In addition, he will be heading up the initiative to define exactly what
 we'll be doing for the 2.0 release. This is of course a critical role as
 we make the right tradeoffs between improvements and backwards
 compatibility.
 Congrats Matthew!

 ,Wil



Re: [fw-general] ZF and AJAX toolkit

2008-04-07 Thread Karl Katzke
Exactly like Zend_Form -- It may be useful, and you may have to extend it or
go outside of it. I'm fine with that, I just want to get there sooner as
opposed to later, since I have some applications right now that could use
it... and I'm frankly too lazy to write my own and see it obliterated by
something else later! ;)

-K

On Mon, Apr 7, 2008 at 4:06 PM, Wil Sinclair [EMAIL PROTECTED] wrote:

 We are working hard to get to a point where we can announce to the
 community; for now you can assume that it's 'unknown'. Honestly, we've been
 gathering some really useful feedback from the speculation- maybe we'll be
 able to capture it somewhere on the wiki or in the issue tracker. Please
 keep in mind that Zend Framework currently supports- and always will
 support- any AJAX library. We will be working with an AJAX lib only to
 provide out of the box AJAX form elements and components. These components
 may or may not be useful in a complex AJAX application.

 ,Wil

  -Original Message-
  From: reto [mailto:[EMAIL PROTECTED]
  Sent: Monday, April 07, 2008 1:43 PM
  To: Zend Mailing List
  Subject: [fw-general] ZF and AJAX toolkit
 
  Hi everyone,
 
  I'm just at the point where I'm going to implement some ajax-features
  in a somewhat bigger ZF based project.
  On the new fancy site I read the following: We are collaborating with
  a popular AJAX toolkit to improve Zend Framework's AJAX capabilities.
 
  I see that the AutoComplete action helper suggests Scriptaculous
  or Dojo. So would this popular AJAX toolkit be one of those? Or is
  it still unknown?
  I'm just asking so I could chose a javascript/ajax-toolkit that I can
  then easily use with ZF components.
 
  Thanks for any information.
 
  Sincerely,
   Reto Kaiser



Re: [fw-general] Zend_Feed: Two Quibbles

2008-04-01 Thread Karl Katzke
Hi, Simone.

The problem is that $item-content doesn't appear. Upon further reading, it
seems that Content is a namespace, and Encoded is the actual attribute.
There's a line at the start of my RSS feed that says

rss version=2.0
xmlns:content=http://purl.org/rss/1.0/modules/content/;


Now, I'm new to this RSS feed stuff. Would I just need to use the
Zend_Feed::registerNamespace function?

Thanks,
Karl Katzke

On Tue, Apr 1, 2008 at 4:33 AM, Simone Carletti [EMAIL PROTECTED] wrote:

 Hi Karl,

 as stated in the coding standard, the right version is saveXml and getDOM.
 I'm going to open a ticket for this issue.

 About the second question, you have access to a content:encoded element
 via *content* statement.

 $item-content (attribute-style)

 or

 $item-content() (method-style)


 Simone


 On Tue, Apr 1, 2008 at 1:24 AM, Karl Katzke [EMAIL PROTECTED] wrote:

  Zend_Feed is a giant leap forward in feed parsing. It's made what I'm
  working on now -easy-.
 
  That being said, I've got two quibbles. Minor one first.
 
  Function capitalization: In Zend_Feed_Element, there's getDOM() and
  saveXml(). Guys, do me a favor and pick ONE capitalization standard and
  stick with it...
 
  Second quibble: I can't find any support, except for going all the way
  down to the DOMElement, for accessing an element with a name like
  content:encoded. This is the way my Wordpress blog passes the full
  content in RSS. ( http://www.karlkatzke.com/feed ) Is there something
  I'm just not missing because we don't have great tools for introspection
  into what, exactly, these darned classes contain? (Or, could someone suggest
  a better way for me to see what-all a Feed_Element actually contains?)
 
  Thanks,
  Karl Katzke
 




[fw-general] Zend_Feed: Two Quibbles

2008-03-31 Thread Karl Katzke
Zend_Feed is a giant leap forward in feed parsing. It's made what I'm
working on now -easy-.

That being said, I've got two quibbles. Minor one first.

Function capitalization: In Zend_Feed_Element, there's getDOM() and
saveXml(). Guys, do me a favor and pick ONE capitalization standard and
stick with it...

Second quibble: I can't find any support, except for going all the way down
to the DOMElement, for accessing an element with a name like
content:encoded. This is the way my Wordpress blog passes the full
content in RSS. ( http://www.karlkatzke.com/feed ) Is there something I'm
just not missing because we don't have great tools for introspection into
what, exactly, these darned classes contain? (Or, could someone suggest a
better way for me to see what-all a Feed_Element actually contains?)

Thanks,
Karl Katzke


Re: [fw-general] How to get data after calling $this-_forward()

2008-03-27 Thread Karl Katzke
http://framework.zend.com/manual/en/zend.controller.dispatcher.html

The action controller method that controlls such dispatching is _forward();
call this method from any of the pre/postDispatch() or action methods,
providing an action, controller, module, and optionally any additional
parameters you may wish to send to the new action:

public function fooAction()
{
// forward to another action in the current controller and module:
$this-_forward('bar', null, null, array('baz' = 'bogus'));
}

public function barAction()
{

// forward to an action in another controller, FooController::bazAction(),
// in the current module:
$this-_forward('baz', 'foo', null, array('baz' = 'bogus'));
}





On Thu, Mar 27, 2008 at 5:50 PM, mysticav [EMAIL PROTECTED] wrote:


 basically I want this:

 function fooAction(){
 $var = 'test';
 $this-_forward('bar');
 }

 function barAction(){
 print $var; // prints 'test'

 }

 AS you can see, I want to share data from the first action.

 Is it possible ?
 --
 View this message in context:
 http://www.nabble.com/How-to-get-data-after-calling-%24this-%3E_forward%28%29-tp16340300p16340300.html
 Sent from the Zend Framework mailing list archive at Nabble.com.




[fw-general] Bug in Zend Form - On second bad submit, repopulated values incorrect

2008-03-27 Thread Karl Katzke
I have a Zend_Form class used for a login form. When I validate the form
once, it repopulates correctly. When I resubmit the form a second time with
a bad password value but the correct login value, the login value is
repopulated as 'login'. I'm not quite sure what in tarnation could be
happening here, but maybe someone can give me a hand.

I'm using the latest from:
http://framework.zend.com/svn/framework/branch/release-1.5/library/Zend ...
r9083 as of this writing.

Here's my form class:

  1 ?php
  2
  3 class My_Form_Login extends Zend_Form {
  4
  5   public function __construct($options = null) {
  6 parent::__construct($options);
  7
  8 $this-setAction('login/login');
  9 $this-setMethod('post');
 10
 11 $login = new Zend_Form_Element_Text('login');
 12 $login-setLabel('Login');
 13 $login-setRequired(true);
 14 $this-addElement($login);
 15
 16 $pass = new Zend_Form_Element_Password('pass');
 17 $pass-setLabel('Password');
 18 $pass-setRequired(true);
 19 $this-addElement($pass);
 20
 21 $submit = new Zend_Form_Element_Submit('submit');
 22 $submit-setLabel('Submit');
 23 $this-addElement($submit);
 24
 25   }
 26
 27 }
 28
 29 ?

And here's the login action:

 30 function loginAction() {
 31   $form = new My_Form_Login();
 32   $param = $this-getRequest()-getParams();
 33
 34   //Init the view up here, even if we throw it out.
 35   $this-initView();
 36
 37   if(!empty($param['submit'])  $form-isValid($param)) {
 38 // If the form validated, then we know there are both passwd and
value fields.
 39 // Authenticate against the databse. First, get an instance.
 40 $auth = Zend_Auth::getInstance();
 41
 42 // Let's set up the adapter. Don't forget that the password is
just hashed,
 43 // while the email has had htmlspecialchars run on it before
being inserted.
 44 // This also serves as our input cleaning... no bobby tables!
 45 $adapt = new
Zend_Auth_Adapter_DbTable(Zend_Registry::get('db'));
 46 $adapt-setTableName('users');
 47 $adapt-setIdentityColumn('login');
 48 $adapt-setCredentialColumn('sha1password');
 49 $adapt-setCredential(sha1($param['pass']));
 50 $adapt-setIdentity(htmlspecialchars($param['login']));
 51
 52
 53 // And run the auth.
 54 $result = $auth-authenticate($adapt);
 55
 56 // Compare the values and do stuff.
 57 if($result-isValid()) {
 58   $storage = new Zend_Auth_Storage_Session();
 59
$storage-write($adapt-getResultRowObject(array('login','password_reset')));
 60   $auth-setStorage($storage);
 61   $this-_redirect('/user/index');
 62 } else {
 63   $this-view-message = 'Invalid login. Please try again.';
 64   $this-view-form = $form;
 65 }
 66   } else {
 67 $this-view-form = $form;
 68   }
 69 }

And here's the login form:
  1 h1Administration Login/h1
  2 ? if(!empty($this-message)): ?
  3   p class=error?= $this-message ?/p
  4 ? endif; ?
  5 ?= $this-form ?
  6


The behaviour I'm getting can be reproduced in Firefox and Safari by
repeating the following steps:

1) Going to the login form in your browser
2) Typing a username in the login field
3) Typing an incorrect password
4) The form repopulates as expected, and shows the expected error message.
5) Type another incorrect password
6) The form repopulates with the string 'login' in the login instead of the
expected user name.


Matt, I'll email you a link to my working copy so you can see the behaviour.


Thanks!

-Karl


[fw-general] Re: Bug in Zend Form - On second bad submit, repopulated values incorrect

2008-03-27 Thread Karl Katzke
Nevermind, self-help desk strikes again. On the second bad submit, the URL
looks like:

localhost/login/login/login/login

instead of the proper /login/login.

Changing line 8 of the form class to
  8 $this-setAction('/login/login');

fixed the problem.

Kids, this is why you shouldn't file bug reports after midnight.

Hope the code example can help someone out!

-K

On Fri, Mar 28, 2008 at 12:34 AM, Karl Katzke [EMAIL PROTECTED] wrote:

 I have a Zend_Form class used for a login form. When I validate the form
 once, it repopulates correctly. When I resubmit the form a second time with
 a bad password value but the correct login value, the login value is
 repopulated as 'login'. I'm not quite sure what in tarnation could be
 happening here, but maybe someone can give me a hand.

 I'm using the latest from:
 http://framework.zend.com/svn/framework/branch/release-1.5/library/Zend... 
 r9083 as of this writing.

 Here's my form class:

   1 ?php
   2
   3 class My_Form_Login extends Zend_Form {
   4
   5   public function __construct($options = null) {
   6 parent::__construct($options);
   7
   8 $this-setAction('login/login');
   9 $this-setMethod('post');
  10
  11 $login = new Zend_Form_Element_Text('login');
  12 $login-setLabel('Login');
  13 $login-setRequired(true);
  14 $this-addElement($login);
  15
  16 $pass = new Zend_Form_Element_Password('pass');
  17 $pass-setLabel('Password');
  18 $pass-setRequired(true);
  19 $this-addElement($pass);
  20
  21 $submit = new Zend_Form_Element_Submit('submit');
  22 $submit-setLabel('Submit');
  23 $this-addElement($submit);
  24
  25   }
  26
  27 }
  28
  29 ?

 And here's the login action:

  30 function loginAction() {
  31   $form = new My_Form_Login();
  32   $param = $this-getRequest()-getParams();
  33
  34   //Init the view up here, even if we throw it out.
  35   $this-initView();
  36
  37   if(!empty($param['submit'])  $form-isValid($param)) {
  38 // If the form validated, then we know there are both passwd
 and value fields.
  39 // Authenticate against the databse. First, get an instance.
  40 $auth = Zend_Auth::getInstance();
  41
  42 // Let's set up the adapter. Don't forget that the password is
 just hashed,
  43 // while the email has had htmlspecialchars run on it before
 being inserted.
  44 // This also serves as our input cleaning... no bobby tables!
  45 $adapt = new
 Zend_Auth_Adapter_DbTable(Zend_Registry::get('db'));
  46 $adapt-setTableName('users');
  47 $adapt-setIdentityColumn('login');
  48 $adapt-setCredentialColumn('sha1password');
  49 $adapt-setCredential(sha1($param['pass']));
  50 $adapt-setIdentity(htmlspecialchars($param['login']));
  51
  52
  53 // And run the auth.
  54 $result = $auth-authenticate($adapt);
  55
  56 // Compare the values and do stuff.
  57 if($result-isValid()) {
  58   $storage = new Zend_Auth_Storage_Session();
  59
 $storage-write($adapt-getResultRowObject(array('login','password_reset')));
  60   $auth-setStorage($storage);
  61   $this-_redirect('/user/index');
  62 } else {
  63   $this-view-message = 'Invalid login. Please try again.';
  64   $this-view-form = $form;
  65 }
  66   } else {
  67 $this-view-form = $form;
  68   }
  69 }

 And here's the login form:
   1 h1Administration Login/h1
   2 ? if(!empty($this-message)): ?
   3   p class=error?= $this-message ?/p
   4 ? endif; ?
   5 ?= $this-form ?
   6


 The behaviour I'm getting can be reproduced in Firefox and Safari by
 repeating the following steps:

 1) Going to the login form in your browser
 2) Typing a username in the login field
 3) Typing an incorrect password
 4) The form repopulates as expected, and shows the expected error message.
 5) Type another incorrect password
 6) The form repopulates with the string 'login' in the login instead of
 the expected user name.


 Matt, I'll email you a link to my working copy so you can see the
 behaviour.

 Thanks!

 -Karl



Re: [fw-general] Zend_Filter_Input and Unicode

2008-03-26 Thread Karl Katzke
I'll run some tests on it tomorrow, but I think that Zend_Filter_Input pulls
from the post variables in the request object, which are processed before
the $_POST variable that you set above would be set.

Unicode issues are *tricky* to get pinned down. You also need to have the
right charset being passed in the headers from the server, the right
override in your browser, etc. so on so forth. We've had problems with a
bunch of our servers when they were going through a misconfigured squid
cache that stripped the UTF-8 headers off ... but only when you hit it with
a request for the site in the Turkish charset. All kinds of things could
cause the behaviour you're seeing. And knowing how much translation and
internationalization that is happening, I think we'd have seen this fairly
simple case show up before now.

-K

On Tue, Mar 25, 2008 at 11:53 PM, Philip G [EMAIL PROTECTED] wrote:


 Well, the script I wrote was a hack job to show what I was doing.
 Technically, the data is being based through _POST. Are you saying the only
 way to get this to work is to Unicode the scripts on the file system? I
 never herd of that requirement.

 I'm trying to make a form submit function more unicode friendly. I have
 the required UTF-8 accet charset in place. I have verified that 'Bertrán'
 is being passed across properly. I even verified that PHP doesn't mess with
 it (by printing out _POST). However, once it goes through the filter
 process, it gets stripped.

 Philip


 On Tue, Mar 25, 2008 at 7:20 PM, Guillaume Rossolini 
 [EMAIL PROTECTED] wrote:

  Hi,
 
  I suppose the script is encoded as Unicode in your filesystem?  Your
  sample code fails if encoded as ANSI, but succeeds if encoded as UTF-8.
 
  ?php
  require_once 'Zend/Filter/Input.php';
 
  $_POST['first_nm'] = Bertrán;
 
  $filters = array ( 'first_nm' = 'Alpha' );
  $validators = array( 'first_nm' = array ('Alpha', 'presence' =
  'required') );
  $input = new Zend_Filter_Input($filters, $validators, $_POST);
 
  echo $input-isValid() ? 'ok' : 'dead';
 
 
  Regards,
 
 
 
 
  On 3/25/08, Philip G [EMAIL PROTECTED] wrote:
  
  
   I'm trying to get a form to validate with unicode characters.
  
   For a very simple example, I have:
  
   $_POST['first_nm'] = Bertrán;
  
   $filters = array ( 'first_nm' = 'Alpha' );
   $validators = array( 'first_nm' = array ('Alpha', 'presence' =
   'required) );
   $input = Zend_Filter_Input($filter, $validators, $_POST);
  
  
   Now, a simple $input-isValid() call and it fails. Returns: [first_nm]
   = Array ( [stringEmpty] = ' ' is an empty string )
  
   Is there something special I need to do in order to get
   Zend_Filter_Input to understand UTF-8? I've checked the data being passed 
   to
   PHP; it is valid. I checked the code and it seems to do some utf8 check, 
   but
   apparently it's not working for some reason.
  
   Thanks
  
   --
   Philip
   [EMAIL PROTECTED]
   http://www.gpcentre.net/
 
 
 
 
  --
  Guillaume Rossolini




 --
 Philip
 [EMAIL PROTECTED]
 http://www.gpcentre.net/



Re: [fw-general] setDefaultModule Bug

2008-03-25 Thread Karl Katzke
Arthur, what version are you using?

On Tue, Mar 25, 2008 at 5:41 PM, Arthur M. Kang [EMAIL PROTECTED]
wrote:

  Can somebody confirm this or is it me?  :-)  Everything works fine
 otherwise, including the error controller.

 In bootstrap:
 $frontController-setDefaultModule('validmodule');
 $frontController-dispatch();

 Error:
 *Fatal error*: Uncaught exception 'Zend_Controller_Dispatcher_Exception'
 with message 'Invalid controller specified (error)' in
 /application/library/Zend/Controller/Dispatcher/Standard.php:249 Stack
 trace: #0 /application/library/Zend/Controller/Front.php(914):
 Zend_Controller_Dispatcher_Standard-dispatch(Object(Zend_Controller_Request_Http),
 Object(Zend_Controller_Response_Http)) #1 /html/index2.php(152):
 Zend_Controller_Front-dispatch() #2 {main} thrown in *
 /application/library/Zend/Controller/Dispatcher/Standard.php* on line *249
 *



Re: [fw-general] Implementing SSL with Zend Framework

2008-03-21 Thread Karl Katzke
SSL is a function of your web *server*, such as apache or IIS, not of Zend
Framework.

On Sat, Mar 22, 2008 at 12:29 AM, photo312 [EMAIL PROTECTED] wrote:


 I would like to implement SSL with Zend Framework. Is there some built in
 code to handle this properly?
 --
 View this message in context:
 http://www.nabble.com/Implementing-SSL-with-Zend-Framework-tp16216607s16154p16216607.html
 Sent from the Zend Framework mailing list archive at Nabble.com.




Re: [fw-general] Zend_Layout Zend_View Enhancements Demo

2008-03-20 Thread Karl Katzke
Worked fine for me on OSX, but StuffIt did crash after unpacking it.

-K

On Thu, Mar 20, 2008 at 11:50 AM, Julian Davchev [EMAIL PROTECTED] wrote:

 Is it just me or archive is broken and cannot extract.


 Ralph Schindler wrote:
  Hello everyone,
 
  I have put together a demo application that showcases some features of
  Zend_Layout and Zend_View Enhancements within the MVC environment. If
  you would like to download, set it up and play/browse the code within
  it, it is located here:
 
 
 http://framework.zend.com/wiki/display/ZFUSER/Zend_Layout+and+Zend_View+Enhancements+Demo
 
 
  The demo currently includes ZF version 1.5 and Dojo 1.0.2 in the
  download.  So basically, this demo app is pretty self contained.  Not
  alot of setup aside from pointing a doc root to its public folder is
  necessary.
 
  Over the course of the coming weeks, I will be taking the time to add
  more examples (I will increment the version number of the download as
  I do).
 
  If anyone has any feedback, or requests as to what you would like to
  see Demo'ed within it either reply here or add comments directly to
  that page.
 
  Thanks!
  Ralph Schindler
 
 
 




[fw-general] 1.5 and Ajax Forms

2008-03-17 Thread Karl Katzke
This is likely a stupid question that could be resolved by digging through
the documents in a little more detail, but I can't seem to find a section of
the Zend_Form documentation that deals with how to create form elements that
work via ajax. Can anyone else help me locate it, or point me to a howto?

Thanks,
Karl Katzke


Re: [fw-general] New ZF site home page broken under Firefox/Debian

2008-03-17 Thread Karl Katzke
Also busted at the moment on OSX in Firefox 2.0.0.12.

This may be due to the Zend team messin' with it at the mo' -- it worked
earlier today.

-K

On Mon, Mar 17, 2008 at 9:55 PM, Mark Maynereid [EMAIL PROTECTED] wrote:

 Hi,

 The new ZF site's home page looks broken under Firefox 2.0.0.12 on
 Debian's
 stable 'etch' release. I have attached a screenshot.

 It also fails to validate for both XHTML and CSS.

 There is a site problems form on the page which I submitted, but I also
 wondered if I should raise an issue for this? Under no component
 perhaps?

 Sorry to bring a downer on it. I'm sure the new site looks great on
 Windows
 going by all the comments. Hope I can get to enjoy it too.

 Many thanks for 1.5 btw. I've been living on the trunk waiting for this
 day :)

 Regards,
 Mark



[fw-general] Is there a way to set options on a tag surrounding a label?

2008-03-07 Thread Karl Katzke
I'm using Zend_Form to build a form, and I'd like to align all of the labels
to the right inside their table cells. I can do this with either CSS or the
align=right attribute of the table cell, but I would need to be able to
set attributes on the tag... which by my read, currently isn't possible.

Sample decorator:

 46 $this-setElementDecorators(array(
 47 'ViewHelper',
 48 'Errors',
 49
array('decorator'=array('td'='HtmlTag'),'options'=array('tag'='td')),
 50 array('Label',array('tag'='td')),
 51
array('decorator'=array('tr'='HtmlTag'),'options'=array('tag'='tr')),
 52 ));

In Zend_Form_Decorator_Label, we're already using
Zend_Form_Decorator_HtmlTag to render the tag option of the label. Could we
add a tagoptions field to that Label decorator and pass the array of options
through to the Zend_Form_Decorator_HtmlTag?

I'm a bit of a newb to Zend Framework, and this is deep enough inside the
framework to make my head spin a bit, but it looks like a fairly simple
addition. I'm just not sure how to execute it without breaking things
further! I realize that everyone's in a rush to get the last few changes in
before the freeze, but I'd appreciate a hand with this if anyone has the
time.

Thanks,
Karl Katzke


[fw-general] Autoload issue with PHP 5.1.6

2008-03-05 Thread Karl Katzke
Is PHP 5.1.6 still supported with ZF, or not? If it is, I seem to be having
an issue with the autoloader.

On my local workstation, which is running 5.2.3, I can autoload classes in
the Validator folder just fine. When I try with my server running PHP 5.1.6,
I'll get a stack trace akin to this:

2008-03-05T16:24:29-06:00 DEBUG (7): Plugin by name Notempty was not found
in the registry.
#0 /var/www/mansites/corpworlds.com/lib/Zend/Form/Element.php(909):
Zend_Loader_PluginLoader-load('notempty')
#1
/var/www/mansites/corpworlds.com/lib/Corpworlds/Form/Quickregister.php(31):
Zend_Form_Element-addValidator('notempty', true)
#2 /var/www/mansites/corpworlds.com/app/controllers/UserController.php(18):
Corpworlds_Form_Quickregister-__construct()
#3 /var/www/mansites/corpworlds.com/lib/Zend/Controller/Action.php(502):
UserController-quickregisterAction()
#4
/var/www/mansites/corpworlds.com/lib/Zend/Controller/Dispatcher/Standard.php(293):
Zend_Controller_Action-dispatch('quickregisterAc...')
#5 /var/www/mansites/corpworlds.com/lib/Zend/Controller/Front.php(914):
Zend_Controller_Dispatcher_Standard-dispatch(Object(Zend_Controller_Request_Http),
Object(Zend_Controller_Response_Http))
#6 /var/www/mansites/corpworlds.com/lib/Zend/Controller/Front.php(223):
Zend_Controller_Front-dispatch()
#7 /var/www/mansites/corpworlds.com/html/index.php(32):
Zend_Controller_Front::run('/var/www/mansit...')
#8 {main}

... but if I add a line like this in the front controller, it picks up the
NotEmpty validator just fine:

 $ne = new Zend_Validate_NotEmpty();

... Like I said, not sure if this is a bug or something that I should know
how to work around. Still just using forms and validators for the first
time.

-Karl


Re: [fw-general] Autoload issue with PHP 5.1.6

2008-03-05 Thread Karl Katzke
The workstation is Mac (using MAMP) and the server is CentOS 4. If I didn't
have a bunch of live stuff running on the server, I'd be able to install a
more recent version of PHP on it ... but alas, I can't, and don't have a
testing box handy.

However, you did cause me to go back and read my code, and shore-'nuff I had
it in lowercase ... which apparently works in the more recent versions of
PHP.

So going from
 $login-addValidator('notempty',true);
to
 $login-addValidator('NotEmpty',true);

works.

Thanks!

-K

On Wed, Mar 5, 2008 at 4:47 PM, Ralph Schindler [EMAIL PROTECTED] wrote:

 Is your workstation windows and your server *nix?

 If so, that could be the problem.  You are probably refereing to that
 vaidator in a case insensitive way.  Perhaps try loading it with
 NotEmpty instead of notempty.

 If that doesnt work, perhaps there is some deeper issue.

 -ralph

 Karl Katzke wrote:
  Is PHP 5.1.6 still supported with ZF, or not? If it is, I seem to be
  having an issue with the autoloader.
 
  On my local workstation, which is running 5.2.3, I can autoload classes
  in the Validator folder just fine. When I try with my server running PHP
  5.1.6, I'll get a stack trace akin to this:
 
  2008-03-05T16:24:29-06:00 DEBUG (7): Plugin by name Notempty was not
  found in the registry.
  #0 /var/www/mansites/corpworlds.com/lib/Zend/Form/Element.php(909):
  Zend_Loader_PluginLoader-load('notempty')
  #1
 
 /var/www/mansites/corpworlds.com/lib/Corpworlds/Form/Quickregister.php(31):
  Zend_Form_Element-addValidator('notempty', true)
  #2
  /var/www/mansites/corpworlds.com/app/controllers/UserController.php(18):
  Corpworlds_Form_Quickregister-__construct()
  #3 /var/www/mansites/corpworlds.com/lib/Zend/Controller/Action.php(502):
  UserController-quickregisterAction()
  #4
 
 /var/www/mansites/corpworlds.com/lib/Zend/Controller/Dispatcher/Standard.php(293):
  Zend_Controller_Action-dispatch('quickregisterAc...')
  #5 /var/www/mansites/corpworlds.com/lib/Zend/Controller/Front.php(914):
 
 Zend_Controller_Dispatcher_Standard-dispatch(Object(Zend_Controller_Request_Http),
  Object(Zend_Controller_Response_Http))
  #6 /var/www/mansites/corpworlds.com/lib/Zend/Controller/Front.php(223):
  Zend_Controller_Front-dispatch()
  #7 /var/www/mansites/corpworlds.com/html/index.php(32):
  Zend_Controller_Front::run('/var/www/mansit...')
  #8 {main}
 
  ... but if I add a line like this in the front controller, it picks up
  the NotEmpty validator just fine:
 
   $ne = new Zend_Validate_NotEmpty();
 
  ... Like I said, not sure if this is a bug or something that I should
  know how to work around. Still just using forms and validators for the
  first time.
 
  -Karl




[fw-general] Layout headStylesheet is incorrect in docs

2008-03-01 Thread Karl Katzke
I'm not quite sure where it's defined, but the documentation on this page: (
20.2.4 - Layout quickstart)
http://framework.zend.com/manual/en/zend.layout.quickstart.html#zend.layout.quickstart.examplespecifies
that you should use $this-headStylesheet() to retrieve the CSS,
but the function doesn't exist. It should actually be $this-headStyle() I
believe.

Considering that this is the only bug I've found in 1.5.0RC1 so far, and
it's just a documentation goof, we're doing pretty well!

-Karl Katzke


[fw-general] Vim Function Library

2008-02-14 Thread Karl Katzke
Has anyone put together a vim plugin / function library for Zend Framework?
I use vim as my IDE... yes, old-school, I know, and have a library I love
for Symfony with tab completion and all, and one for PHP itself, but not one
for Zend yet.

Thanks!

-Karl Katzke


Re: [fw-general] ZF Packaging

2008-01-22 Thread Karl Katzke
A better example might be Python Eggs. You can unpack them to a directory of
your choosing using a simple CLI-bootstrap file.

Symfony does use Pear, but Symfony is not very shared-hosting friendly --
and Zend *is* shared-hosting friendly, which is something that I would very
much like to see the community maintain.

-K

On Jan 22, 2008 6:12 PM, Kevin McArthur [EMAIL PROTECTED] wrote:

  -1 from me on this idea.

 Pear updating something as fragile as the framework could cause all kinds
 of serious problems for sites using it as a shared library.

 It would be better to have a cli tool for framework installation.. a web
 installer like go-pear would probably be a better format for this.

 I'd also still continue to advocate when using a shared library approach
 that people use a versioned installation path like
 /usr/share/php/ZendFramework/ZendFramework-1.5 such that bootstrap files
 can pick their target versions explicitly.

 Kevin



 Wil Sinclair wrote:

  Actually, I'm a bit ignorant since I'm a relative PHP newbie, but let me
 turn that question around- why would a PEAR channel be a good way to
 distribute ZF? That is, considering the current ZF installation is basically
 download, decompress, and update include path, what does PEAR bring to the
 table that I'm missing?



 ,Wil



 *From:* Bryce Lohr [mailto:[EMAIL PROTECTED][EMAIL PROTECTED]]

 *Sent:* Tuesday, January 22, 2008 2:13 PM
 *To:* fw-general@lists.zend.com
 *Subject:* Re: [fw-general] ZF Packaging



 I second the request for PEAR channel. Is there any reason why that would
 not be a good way to distribute the framework?

 Regards,
 Bryce Lohr


 Pádraic Brady wrote:

 *Hi Will,

 It sounds good - an optional lean package would frighten off far less
 prospective users who have heard tales about HDD's dying from the strain of
 downloading the ZF ;).
 I would still like to see a PEAR channel emerge at some point though -
 that may be a fanciful concept but I gather from the last paragraph
 something along those lines is under consideration?
 Hope someone comes up with colourful names for these variants!

 Best regards,
 Paddy*



 *Pádraic Brady

 **http://blog.astrumfutura.com
 http://www.patternsforphp.com
 OpenID Europe Foundation http://www.openideurope.eu/*



 - Original Message 
 From: Wil Sinclair [EMAIL PROTECTED] [EMAIL PROTECTED]
 To: fw-general@lists.zend.com
 Sent: Tuesday, January 22, 2008 8:36:39 PM
 Subject: [fw-general] ZF Packaging

 As part of the 1.5 release process, we've been reviewing the size of our
 distribution package and what contributes the most weight. We've
 determined that there are a few 'heavyweights' that we currently have in
 the zips/tarballs that many- if not most- users will never need. These
 include the unit tests, the demos, and the locale files (currently
 consuming ~8MB uncompressed on my hdd :O). With these components, the
 1.0.3 release is ~5.3MB compressed on my hdd. We would like to
 distribute, starting with the 1.5 RC1, a 'lean and mean' ZF package
 alongside the 'everything' package. The 'lean and mean' package would
 not contain the tests, demos, locale files, or extras. 'Everything'
 would include, well, everything- even docs in html format. To facilitate
 access to the omissions from the 'lean and mean' release, we would
 provide a download action for the CLI tool so they can be retrieved and
 installed in the correct place with a single command.
 Thomas can give more details about how the locale-aware components would
 behave in this proposal.
 Thoughts?

 Thanks.
 ,Wil