Re: [fw-general] Problem by creating a custom router with fall back to a CMS database module

2008-09-25 Thread berthausmans

I created a controller plugin to route the request to the cms controller.
Has someone suggestions to do this with a router.

class My_Controller_Plugin_CmsRouter extends Zend_Controller_Plugin_Abstract
{
/**
 * Routes all (public) request to unknown modules to the standard 
 * Cms module / Page controller
 *
 * @param Zend_Controller_Request_Abstract $request
 */
public function preDispatch (Zend_Controller_Request_Abstract $request)
{
$dispatcher = Zend_Controller_Front::getInstance()-getDispatcher();
if (! $dispatcher-isDispatchable($request, $request)) {
$request-setModuleName('cms');
$request-setControllerName('page');
$request-setActionName('index');
}
}
}


berthausmans wrote:
 
 I'm building a small CMS and i want to create a router to route the
 request to the right module/controller. Below a list with some valid urls:
 
 # http://www.domain.com/rss/
 module = rss
 controller = index
 action = index
 
 # http://www.domain.com/system/sitemap/google/
 module = system
 controller = sitemap
 action = google
 
 # http://www.domain.com/news/archive/
 module = cms
 controller = page
 action = index
 url = /news/archive/
 page_id = 1 (search in database by url)
 (news is no module, if there's a page '(/news/archive/)' available route
 to the cms module)
 
 #
 http://www.domain.com/news/archive/item/the-item-alias-in-the-database/param2/value2/
 module = cms
 controller = page
 action = index
 url = /news/archive/
 page_id = 1 (search in database by url)
 item = the-item-alias-in-the-database
 param2 = value2
 (news is no module, if there's a page '(/news/archive/)' available route
 to the cms module)
 
 Is it possible to create a router/route(s) to handle above url's? I've
 already tried a number of implementations, but I have not succeeded.
 
 Who can help me?
 

-- 
View this message in context: 
http://www.nabble.com/Problem-by-creating-a-custom-router-with-%22fall-back%22-to-a-%22CMS-database-module%22-tp19646242p19664328.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Breakchain on Zend_Form_Element_File fail

2008-09-25 Thread Yann Thomas-Gérard

Thomas Weidner a écrit :
Well... I think that when there is no error by validation 
$this-_messages is empty...

So why should the chain break when there is no failure ?


There are errors by validation when I upload an ascii file:
* The file 'a.txt' has a false mimetype
* The file 'a.txt' has a false extension

This is expected behaviour. Only when there is a validation error all 
further validations are supressed.


Yes, this what I expect too.

Yann


Re: [fw-general] Breakchain on Zend_Form_Element_File fail

2008-09-25 Thread Thomas Weidner

Sorry, but I still think that you are using an outdated revision.
Trunk revision works. I tested it myself yesterday.

Please keep in mind that this component is actually under development and 
things change very fast.
So it could be that a failure from a week before is already solved, or I 
notice something no one has got until now and I fix it without any note or 
issue.


Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: Yann Thomas-Gérard [EMAIL PROTECTED]

To: fw-general@lists.zend.com
Sent: Thursday, September 25, 2008 9:57 AM
Subject: Re: [fw-general] Breakchain on Zend_Form_Element_File fail



Thomas Weidner a écrit :
Well... I think that when there is no error by validation 
$this-_messages is empty...

So why should the chain break when there is no failure ?


There are errors by validation when I upload an ascii file:
* The file 'a.txt' has a false mimetype
* The file 'a.txt' has a false extension

This is expected behaviour. Only when there is a validation error all 
further validations are supressed.


Yes, this what I expect too.

Yann 




Re: [fw-general] Smarty Poll Question

2008-09-25 Thread Karol Grecki

It's unlikely that you will see any significant speed difference between the
two.
You're better off making sure that everything is cached properly instead of
wasting time on refactoring.

Karol


Tony Ford wrote:
 
 We still use smarty for basic legacy reasons. I'm interested in running 
 some benchmarks between zend view and smarty. If there is a significant 
 performance increase I'll consider refactoring all of our views over time.
 
 I plan to do our own benchmarking in the next couple of months, so I'll 
 share that later. Anyone else done any benchmarking?
 
  - Tony
 
 On 9/24/2008 1:23 PM, Karol Grecki wrote:
 Used it few years ago when css adoption was poor and there were no decent
 mvc
 frameworks. Nowadays it's no longer necessary. It's also old php4 code
 that
 I'd rather stay away from.

 Karol


 Garrison Locke wrote:
   
 I know this usually starts a big war, but I was just curious about how
 many people out there are using Smarty and to what extent you're using
 it?
  If you're not using it, why did you decide to not use it?  If you are,
 why?  Also, if you're using it, how big or small are the projects?  Just
 personal things or like giant things with tens of thousands of users.

 Thanks!

 Garrison
 

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



Re: [fw-general] Breakchain on Zend_Form_Element_File fail

2008-09-25 Thread Yann Thomas-Gérard
Yes I was using an outdated version. The breakChainOnFailure works fine 
now. Thanks!


May I point out that with 'a.txt' validation works. If I rename 'a.txt' 
to 'a.jpg' then validation passes. This not what I expect.


FYI:
$ file -i a.txt
a.txt: text/plain; charset=us-ascii
$ file -i a.jpg
a.jpg: text/plain; charset=us-ascii

Yann


Sorry, but I still think that you are using an outdated revision.
Trunk revision works. I tested it myself yesterday.

Please keep in mind that this component is actually under development 
and things change very fast.
So it could be that a failure from a week before is already solved, or I 
notice something no one has got until now and I fix it without any note 
or issue.


Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com


Re: [fw-general] Breakchain on Zend_Form_Element_File fail

2008-09-25 Thread Thomas Weidner

Nice, but you can not rename the file yourself.
Validation is done on the temporary file, then the file is moved and then 
the filter is attached.


So when you rename the file, you rename it after validation and filtering.
There is no processing after that point.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: Yann Thomas-Gérard [EMAIL PROTECTED]

To: fw-general@lists.zend.com
Sent: Thursday, September 25, 2008 10:39 AM
Subject: Re: [fw-general] Breakchain on Zend_Form_Element_File fail


Yes I was using an outdated version. The breakChainOnFailure works fine 
now. Thanks!


May I point out that with 'a.txt' validation works. If I rename 'a.txt' to 
'a.jpg' then validation passes. This not what I expect.


FYI:
$ file -i a.txt
a.txt: text/plain; charset=us-ascii
$ file -i a.jpg
a.jpg: text/plain; charset=us-ascii

Yann


Sorry, but I still think that you are using an outdated revision.
Trunk revision works. I tested it myself yesterday.

Please keep in mind that this component is actually under development and 
things change very fast.
So it could be that a failure from a week before is already solved, or I 
notice something no one has got until now and I fix it without any note 
or issue.


Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com 




Re: [fw-general] encoding in HTTP headers

2008-09-25 Thread Guillaume Oriol

Thank you Matthew.

This issue was my misunderstanding of what the view.encoding was for.
I thougt it was the target encoding (ie related to page Content-Type).
But it is used only by escape() method as the source encoding of the text.
Therefore, when I was setting the view.encoding to UTF-8, I was wrong
because my PHP sources are ISO-8859-1 encoded.


Matthew Weier O'Phinney-3 wrote:
 
 -- Guillaume Oriol [EMAIL PROTECTED] wrote
 (on Wednesday, 24 September 2008, 04:05 AM -0700):
 I wonder why my view sets an HTTP header of
 Content-Type: text/html; charset=iso-8859-1
 
 despite the configuration I do in the bootsrap.php with:
 $view = new Zend_View($config-view-toArray());
 
 referencing my config.ini with :
 view.encoding=UTF-8
 view.escape=htmlentities
 view.strictVars=1
 
 which produces, as expected, in my rendered page:
 meta content=text/html; charset=UTF-8 http-equiv=Content-Type/
 
 Where is my error?
 
 Zend_View's encoding is simply to ensure that the view scripts render
 with the appropriate encoding. Setting it does not create the
 appropriate meta tag nor does setting it set the Content-Type header.
 
 You can set the default content-type header in your apache and/or PHP
 configuration, or you can do it in your bootstrap code.
 
 -- 
 Matthew Weier O'Phinney
 Software Architect   | [EMAIL PROTECTED]
 Zend Framework   | http://framework.zend.com/
 
 


-
Guillaume ORIOL
Sofware architect
Technema
-- 
View this message in context: 
http://www.nabble.com/encoding-in-HTTP-headers-tp19646506p19666366.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Breakchain on Zend_Form_Element_File fail

2008-09-25 Thread Yann Thomas-Gérard

Nice, but you can not rename the file yourself.
Validation is done on the temporary file, then the file is moved and 
then the filter is attached.


What I meant was:
If I click on my navigator's browse button and select the 'a.jpg' file 
from my harddisk, validation passes.



So when you rename the file, you rename it after validation and filtering.
There is no processing after that point.


Nice to know,

Yann


[fw-general] Cronjobs with ZF

2008-09-25 Thread José de Menezes Soares Neto
I am using Zend Framework to develop a web system.
It has a function (let's call it funcA) required to run periodically.
Thus, I would like to use crontab (Linux command) to run funcA every 15 m.

Unfortunately, it seems that there are some configurations on the bootstrap
file, I need to access funcA through HTTP

i.e.

**/15 * * * * wget -O /dev/null http://127.0.0.1/test/html/cron/pageA*


Is it possible to create a cron job to run funcA by using Zend Framework
without HTTP request (use the absolute path, e.g:

**/15 * * * * 
/opt/lampp/htdocs/test/html/application/controllers/CronController.php*

)

Regards,

José

P.S: This is the same question someone did on the internet, but without
answers...


Re: [fw-general] Cronjobs with ZF

2008-09-25 Thread till
On Thu, Sep 25, 2008 at 1:02 PM, José de Menezes Soares Neto
[EMAIL PROTECTED] wrote:
 I am using Zend Framework to develop a web system.
 It has a function (let's call it funcA) required to run periodically.
 Thus, I would like to use crontab (Linux command) to run funcA every 15 m.

 Unfortunately, it seems that there are some configurations on the bootstrap
 file, I need to access funcA through HTTP

 i.e.

 */15 * * * * wget -O /dev/null http://127.0.0.1/test/html/cron/pageA

 Is it possible to create a cron job to run funcA by using Zend Framework
 without HTTP request (use the absolute path, e.g:

 */15 * * * *
 /opt/lampp/htdocs/test/html/application/controllers/CronController.php

 )

 Regards,

 José

 P.S: This is the same question someone did on the internet, but without
 answers...


I don't think you can bypass the entire framework with a simple call. :-)

For starters, we run our webs all on public and private (10.x.x.x) IPs
and what we do with cron-related calls is use the private IP. The
lag is 0, and we still understand what we build in 6-12 months. ;-)

There has been a similar discussion on this mailinglist about MVC on
the shell, I think someone mentioned Zend_Console_Getopt in the
process so search nabble [archive] for that and maybe that gives you a
couple ideas on how to go forward.

Till


Re: [fw-general] Cronjobs with ZF

2008-09-25 Thread José de Menezes Soares Neto
Hi Till,

Could you explain your solution a little bit more?

Regards,

José

2008/9/25 till [EMAIL PROTECTED]

 On Thu, Sep 25, 2008 at 1:02 PM, José de Menezes Soares Neto
 [EMAIL PROTECTED] wrote:
  I am using Zend Framework to develop a web system.
  It has a function (let's call it funcA) required to run periodically.
  Thus, I would like to use crontab (Linux command) to run funcA every 15
 m.
 
  Unfortunately, it seems that there are some configurations on the
 bootstrap
  file, I need to access funcA through HTTP
 
  i.e.
 
  */15 * * * * wget -O /dev/null http://127.0.0.1/test/html/cron/pageA
 
  Is it possible to create a cron job to run funcA by using Zend
 Framework
  without HTTP request (use the absolute path, e.g:
 
  */15 * * * *
  /opt/lampp/htdocs/test/html/application/controllers/CronController.php
 
  )
 
  Regards,
 
  José
 
  P.S: This is the same question someone did on the internet, but without
  answers...
 

 I don't think you can bypass the entire framework with a simple call. :-)

 For starters, we run our webs all on public and private (10.x.x.x) IPs
 and what we do with cron-related calls is use the private IP. The
 lag is 0, and we still understand what we build in 6-12 months. ;-)

 There has been a similar discussion on this mailinglist about MVC on
 the shell, I think someone mentioned Zend_Console_Getopt in the
 process so search nabble [archive] for that and maybe that gives you a
 couple ideas on how to go forward.

 Till



[fw-general] Action to single php

2008-09-25 Thread José de Menezes Soares Neto
Hi friends,

I would like to convert an action into a single file .php

I would like to keep using ZF functions, but I want to access this file .php
alone, not using bootstrap.

i.e.
http://www.mysite.com/myfile.php

It is because this resolves my problem with cronjob creations!

Any help?

Regards,

José


[fw-general] Re: Action to single php

2008-09-25 Thread Colin Guthrie

José de Menezes Soares Neto wrote:

Hi friends,

I would like to convert an action into a single file .php

I would like to keep using ZF functions, but I want to access this file 
.php alone, not using bootstrap.


i.e.
http://www.mysite.com/myfile.php

It is because this resolves my problem with cronjob creations!


Just craft your .htaccess accordingly. You can exclude specific 
REQUEST_FILENAMEs from being routed to ZF pretty easily.


Just look at the many examples and you'll work it out (I can't remember 
the exact syntax off the top of my head!!)


Col
--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]



Re: [fw-general] Cronjobs with ZF

2008-09-25 Thread retoreto


José de Menezes Soares Neto wrote:
 
 I am using Zend Framework to develop a web system.
 It has a function (let's call it funcA) required to run periodically.
 Thus, I would like to use crontab (Linux command) to run funcA every 15
 m.
 

I'm doing this by just creating a simplified bootstrap file. I then access
the actions Id like to do directly by calling methods of models.
Eg a file jobs.php which loads all your needed classes (ZF, models).
Which then for example does something like:
 require_once 'Comment.php';
 Comment::removeOldComments();

Sincerely,
 reto
-- 
View this message in context: 
http://www.nabble.com/Cronjobs-with-ZF-tp19667341p19667906.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Cronjobs with ZF

2008-09-25 Thread keith Pope
ZF is by default setup for a Http environment this means that you get:

Http Request Object
Http Response Object

So to do what you want you need to use the Cli response object, and
you may need create your own Request object.
Look at the request object abstract. The request object holds data to
determine what module controller action to call, also there is a
Simple Request object that you can use. This can all be customized via
the front controller.

I hope this helps, its a little brief :)

2008/9/25 retoreto [EMAIL PROTECTED]:


 José de Menezes Soares Neto wrote:

 I am using Zend Framework to develop a web system.
 It has a function (let's call it funcA) required to run periodically.
 Thus, I would like to use crontab (Linux command) to run funcA every 15
 m.


 I'm doing this by just creating a simplified bootstrap file. I then access
 the actions Id like to do directly by calling methods of models.
 Eg a file jobs.php which loads all your needed classes (ZF, models).
 Which then for example does something like:
  require_once 'Comment.php';
  Comment::removeOldComments();

 Sincerely,
  reto
 --
 View this message in context: 
 http://www.nabble.com/Cronjobs-with-ZF-tp19667341p19667906.html
 Sent from the Zend Framework mailing list archive at Nabble.com.





-- 
--
[MuTe]
--


Re: [fw-general] Cronjobs with ZF

2008-09-25 Thread Benjamin Eberlei
this blog post here offers one solution:

http://webfractor.wordpress.com/2008/08/14/using-zend-framework-from-the-command-line/

On Thursday 25 September 2008 13:02:00 José de Menezes Soares Neto wrote:
 I am using Zend Framework to develop a web system.
 It has a function (let's call it funcA) required to run periodically.
 Thus, I would like to use crontab (Linux command) to run funcA every 15
 m.

 Unfortunately, it seems that there are some configurations on the bootstrap
 file, I need to access funcA through HTTP

 i.e.

 **/15 * * * * wget -O /dev/null http://127.0.0.1/test/html/cron/pageA*


 Is it possible to create a cron job to run funcA by using Zend Framework
 without HTTP request (use the absolute path, e.g:

 **/15 * * * *
 /opt/lampp/htdocs/test/html/application/controllers/CronController.php*

 )

 Regards,

 José

 P.S: This is the same question someone did on the internet, but without
 answers...



-- 
Benjamin Eberlei
http://www.beberlei.de


Re: [fw-general] Dojo BorderContainer Help

2008-09-25 Thread Matthew Weier O'Phinney
-- Panman [EMAIL PROTECTED] wrote
(on Wednesday, 24 September 2008, 01:32 PM -0700):
 I have not been able to get BorderContainer to work at all. Neither with ZF
 nor directly coding a test page. Has anyone been successful with
 BorderContainer?

Yep -- I use it in my pastebin demo:

http://weierophinney.net/matthew/uploads/pastebin-1.0.0.tar.gz

One thing to note: BorderContainer and doctypes don't play well together
in most cases -- I generally need to omit the DocType declaration when
using it. 

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] DojoComboBox and large data set.

2008-09-25 Thread Paweł Chuchmała
On Wed, Sep 24, 2008 at 15:26, Matthew Weier O'Phinney [EMAIL PROTECTED] 
wrote:
 Most likely what's happening is you're getting double-rendering of the
 layout due to an error further down the stack. From what I've seen, most
 of these errors that have been reported have been due to either:

  * missing pdo_sqlite extension

This one is correct. Thanks for help

regards

-- 
Paweł Chuchmała
pawel.chuchmala at gmail dot com


Re: [fw-general] Breakchain on Zend_Form_Element_File fail

2008-09-25 Thread Yann Thomas-Gérard

Yann Thomas-Gérard a écrit :

Nice, but you can not rename the file yourself.
Validation is done on the temporary file, then the file is moved and 
then the filter is attached.


What I meant was:
If I click on my navigator's browse button and select the 'a.jpg' file 
from my harddisk, validation passes.


So when you rename the file, you rename it after validation and 
filtering.

There is no processing after that point.


To resume, I got $breakChainOnFailure to work with the latest trunk.

As for the MimeType validator, I think it checks the type in the files 
array from php. This info is not reliable:


From http://fr.php.net/manual/en/features.file-upload.php

[...]
 $_FILES['userfile']['type']

The mime type of the file, if the browser provided this 
information. An example would be image/gif. This mime type is however 
not checked on the PHP side and therefore don't take its value for granted.

[...]

It could probably be better with this PECL extension:
http://fr.php.net/manual/en/ref.fileinfo.php


[fw-general] Zend_Form custom validator best practices

2008-09-25 Thread cyrilkuch

Hello All,

I have a form with 2 fields and submit button.
Form is created like this:

$form = new Zend_Form();
$form-setMethod('post');

$form-addElement('text','field1', array(
'label' = 'User Name',
'required' = false
));
$form-addElement('text','field2', array(
'label' = 'Secret Code',
'required' = false
));

$form-addElement('submit','submit',array(
'label'='Submit'
));

I need to validate the form like this:
If a user submits the form with ALL empty fields the form should fail the
validation, but if a user fills in AT LEAST ONE of two fields the validation
should be successful.

How should I set up the validation for this?

Now I just check if at least one of the fields is filled in controller, and
display the error message. But I was thinking may be there is a way to
extend Zend_From or some validators  for this purpose as I've got several
forms like this.

Thanks in advance for any help.

-- 
View this message in context: 
http://www.nabble.com/Zend_Form-custom-validator-best-practices-tp19671713p19671713.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Breakchain on Zend_Form_Element_File fail

2008-09-25 Thread Thomas Weidner

You just say what is already described in the manual.
And looking at our issue list you would have mentioned that we will also add 
a content-type validator which checks the stored content, as the mime-type 
can be changed by users.


As I already wrote several times, this component is not finished and under 
continous development.


However, Apache, for example provides related modules which DO handle this 
also for the mime-type.


Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: Yann Thomas-Gérard [EMAIL PROTECTED]

To: fw-general@lists.zend.com
Sent: Thursday, September 25, 2008 5:02 PM
Subject: Re: [fw-general] Breakchain on Zend_Form_Element_File fail



Yann Thomas-Gérard a écrit :

Nice, but you can not rename the file yourself.
Validation is done on the temporary file, then the file is moved and 
then the filter is attached.


What I meant was:
If I click on my navigator's browse button and select the 'a.jpg' file 
from my harddisk, validation passes.


So when you rename the file, you rename it after validation and 
filtering.

There is no processing after that point.


To resume, I got $breakChainOnFailure to work with the latest trunk.

As for the MimeType validator, I think it checks the type in the files 
array from php. This info is not reliable:


From http://fr.php.net/manual/en/features.file-upload.php

[...]
 $_FILES['userfile']['type']

The mime type of the file, if the browser provided this information. 
An example would be image/gif. This mime type is however not checked on 
the PHP side and therefore don't take its value for granted.

[...]

It could probably be better with this PECL extension:
http://fr.php.net/manual/en/ref.fileinfo.php 




[fw-general] Is ZF Teem planned official user plugin repository?

2008-09-25 Thread mezoni

Is ZF Teem planned official user plugin repository?
-- 
View this message in context: 
http://www.nabble.com/Is-ZF-Teem-planned-official-user-plugin-repository--tp19673010p19673010.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Breakchain on Zend_Form_Element_File fail

2008-09-25 Thread Yann Thomas-Gérard

Ok I just saw those issues,

Thank you for your time and informations,

Yann

Thomas Weidner a écrit :

You just say what is already described in the manual.
And looking at our issue list you would have mentioned that we will also 
add a content-type validator which checks the stored content, as the 
mime-type can be changed by users.


As I already wrote several times, this component is not finished and 
under continous development.


However, Apache, for example provides related modules which DO handle 
this also for the mime-type.


Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com


Re: [fw-general] Is ZF Teem planned official user plugin repository?

2008-09-25 Thread Matthew Weier O'Phinney
-- mezoni [EMAIL PROTECTED] wrote
(on Thursday, 25 September 2008, 09:13 AM -0700):
 
 Is ZF Teem planned official user plugin repository?

Not currently; we've been kicking the idea around for a while, though.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


[fw-general] Zend_Form How do I use setLegend addDisplayGroup?

2008-09-25 Thread devxtech

I'm trying to set up a contact form with the proper elements so I can apply a
CSS style sheet to it. Could someone provide me an example of how to
properly use the setLegend and addDisplayGroup methods for interacting with
Zend_Form_DisplayGroup.
-- 
View this message in context: 
http://www.nabble.com/Zend_Form-How-do-I-use-setLegend---addDisplayGroup--tp19674858p19674858.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Is ZF Teem planned official user plugin repository?

2008-09-25 Thread Jason Austin
Count me in as a vote for doing this.  It would be great to provide that 
type of resource to users.


- Jason

Matthew Weier O'Phinney wrote:

-- mezoni [EMAIL PROTECTED] wrote
(on Thursday, 25 September 2008, 09:13 AM -0700):
  

Is ZF Teem planned official user plugin repository?



Not currently; we've been kicking the idea around for a while, though.

  


--
Jason Austin
Senior Solutions Implementation Engineer
NC State University - Office of Information Technology
http://webapps.ncsu.edu
919.513-4372



[fw-general] View Helpers Repository

2008-09-25 Thread Edward Haber
I'm just in the first steps of putting together a ViewHelpers  
repository because there is such a serious need for a resources  
repository for ZF. I would welcome any thoughts on this implementation  
-- any intelligence on the idea itself (does it already exist in a  
better form somewhere else?) -- if this is planned by Zend in the  
future I would be happy not to waste my time.


This is basically a code-repository Wiki: http://zfhelpers.com. If you  
want to email me your view helpers I'll add them to the site. LMK if  
you have any thoughts on better/easier administration.


SO far I put up my view helpers I've used. Is this idea worthwhile?  
i'm curious if people want to trade view helpers and other resources.


Thx!
Eddie




On Sep 25, 2008, at 1:47 PM, Jason Austin wrote:

Count me in as a vote for doing this.  It would be great to provide  
that type of resource to users.


- Jason

Matthew Weier O'Phinney wrote:

-- mezoni [EMAIL PROTECTED] wrote
(on Thursday, 25 September 2008, 09:13 AM -0700):


Is ZF Teem planned official user plugin repository?



Not currently; we've been kicking the idea around for a while,  
though.





--
Jason Austin
Senior Solutions Implementation Engineer
NC State University - Office of Information Technology
http://webapps.ncsu.edu
919.513-4372





Re: [fw-general] Is the Dojo Checkbox code correct ?

2008-09-25 Thread Apsy

I'm using the trunk version !

Andrew Yager a écrit :

On 24/09/2008, at 10:47 PM, Apsy wrote:

Your patch works with the addElement method. Because if i do it 
with the set value with the setters, i have 0 and 1 with for 
checked and unchecked value.



The patch is designed to work with the current ZF trunk in SVN, and 
I'm pretty sure the bugs with the value setters were fixed in trunk. 
There definitely was bugs with HTML generation fixed that were 
important. Are you using the release or trunk version?


Thanks,
Andrew

--
Andrew Yager, Managing Director   (MACS BCompSc MCP)
Real World Technology Solutions Pty Ltd
ph: 1300 798 718 or (02) 9037 0500
fax: (02) 9037 0591 mob: 0405 152 568
http://www.rwts.com.au/ or http://www.stonebridgecomputing.com.au/






Re: [fw-general] View Helpers Repository

2008-09-25 Thread Matthew Ratzloff
Regarding your plural (s) helper...
person = people

-Matt

On Thu, Sep 25, 2008 at 10:53 AM, Edward Haber [EMAIL PROTECTED] wrote:

 I'm just in the first steps of putting together a ViewHelpers repository
 because there is such a serious need for a resources repository for ZF. I
 would welcome any thoughts on this implementation -- any intelligence on the
 idea itself (does it already exist in a better form somewhere else?) -- if
 this is planned by Zend in the future I would be happy not to waste my time.

 This is basically a code-repository Wiki: http://zfhelpers.com. If you
 want to email me your view helpers I'll add them to the site. LMK if you
 have any thoughts on better/easier administration.

 SO far I put up my view helpers I've used. Is this idea worthwhile? i'm
 curious if people want to trade view helpers and other resources.

 Thx!
 Eddie




 On Sep 25, 2008, at 1:47 PM, Jason Austin wrote:

  Count me in as a vote for doing this.  It would be great to provide that
 type of resource to users.

 - Jason

 Matthew Weier O'Phinney wrote:

 -- mezoni [EMAIL PROTECTED] wrote
 (on Thursday, 25 September 2008, 09:13 AM -0700):

  Is ZF Teem planned official user plugin repository?


 Not currently; we've been kicking the idea around for a while, though.



 --
 Jason Austin
 Senior Solutions Implementation Engineer
 NC State University - Office of Information Technology
 http://webapps.ncsu.edu
 919.513-4372





Re: [fw-general] View Helpers Repository

2008-09-25 Thread Ben Scholzen 'DASPRiD'
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Or in other languages, there is more than one plural form, e.g. in polish.

Ben

Matthew Ratzloff schrieb:
 Regarding your plural (s) helper...
 
 person = people
 
 -Matt
 
 On Thu, Sep 25, 2008 at 10:53 AM, Edward Haber [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
 
 I'm just in the first steps of putting together a ViewHelpers
 repository because there is such a serious need for a resources
 repository for ZF. I would welcome any thoughts on this
 implementation -- any intelligence on the idea itself (does it
 already exist in a better form somewhere else?) -- if this is
 planned by Zend in the future I would be happy not to waste my time.
 
 This is basically a code-repository Wiki: http://zfhelpers.com. If
 you want to email me your view helpers I'll add them to the site.
 LMK if you have any thoughts on better/easier administration.
 
 SO far I put up my view helpers I've used. Is this idea worthwhile?
 i'm curious if people want to trade view helpers and other resources.
 
 Thx!
 Eddie
 
 
 
 
 On Sep 25, 2008, at 1:47 PM, Jason Austin wrote:
 
 Count me in as a vote for doing this.  It would be great to
 provide that type of resource to users.
 
 - Jason
 
 Matthew Weier O'Phinney wrote:
 
 -- mezoni [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote
 (on Thursday, 25 September 2008, 09:13 AM -0700):
 
 Is ZF Teem planned official user plugin repository?
 
 
 Not currently; we've been kicking the idea around for a
 while, though.
 
 
 
 -- 
 Jason Austin
 Senior Solutions Implementation Engineer
 NC State University - Office of Information Technology
 http://webapps.ncsu.edu
 919.513-4372
 
 
 

- --
...
:  ___   _   ___ ___ ___ _ ___:
: |   \ /_\ / __| _ \ _ (_)   \   :
: | |) / _ \\__ \  _/   / | |) |  :
: |___/_/:\_\___/_| |_|_\_|___/   :
:::
: Web: http://www.dasprids.de :
: E-mail : [EMAIL PROTECTED]   :
: Jabber : [EMAIL PROTECTED] :
: ICQ: 105677955  :
:::
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI298A0HfT5Ws789ARAqqHAJ9irwWEyFjotrQlxrGQTvtBpC+u/ACgq2e4
iMB0Er9K3omEjjhit+UoVDE=
=zMDr
-END PGP SIGNATURE-


[fw-general] No conditional comment support for headScript?

2008-09-25 Thread Isaak Malik
How come conditional comments are not supported for headscripts? Next to CSS
this method is also commonly used with JavaScript code/files, a common
example is the PNG background fix.

Are there any plans for this or will I have to force my lazy fingers to keep
typing the extra characters?

Thank you
-- 
Isaak Malik
Web Developer


RE: [fw-general] No conditional comment support for headScript?

2008-09-25 Thread Jeremy Brown
This is an excerpt from an email on the fw-mvc list sent on 21 Aug 2008:

$url = $this-_view-baseUrl() . '/css/blueprint/ie.css';
$this-_view-headLink()-appendStylesheet($url, 'screen,projection', 'IE 7');

This outputs:

!--[if IE 7].!-- [endif] --


Jeremy Brown
Senior Web Developer
Spear One
972.661.6038
www.spearone.comhttp://www.spearone.com

From: Isaak Malik [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 25, 2008 2:23 PM
To: fw-general@lists.zend.com
Subject: [fw-general] No conditional comment support for headScript?

How come conditional comments are not supported for headscripts? Next to CSS 
this method is also commonly used with JavaScript code/files, a common example 
is the PNG background fix.

Are there any plans for this or will I have to force my lazy fingers to keep 
typing the extra characters?

Thank you
--
Isaak Malik
Web Developer


Re: [fw-general] Using ACL asserts to validate access to specific instances of a generic resource

2008-09-25 Thread Aldemar Bernal

Colin,

Hope this helps:

http://devzone.zend.com/article/3509-Zend_Acl-and-MVC-Integration-Part-I-Basic-Use
http://devzone.zend.com/article/3510-Zend_Acl-and-MVC-Integration-Part-II-Advanced-Use

Aldemar

- Original Message - 
From: Colin Guthrie [EMAIL PROTECTED]

To: fw-general@lists.zend.com
Sent: Thursday, September 25, 2008 4:13 PM
Subject: [fw-general] Using ACL asserts to validate access to specific 
instances of a generic resource




(resend - first one seemed to get eaten)

Hi,

I'm currently devising how best to deploy Zend_Acl in an application I'm
retrofitting to Zend Framework.

I've spend the time to read the docs and view the webinars and I came to
the conclusion that implementing Zend_Acl_Assert_Interface is the
correct way to go. This isn't a massive cognative leap on my part as
page 25 of the Zend_Acl webinar PDF clearly states an example use of
Asserts as:
 * Allow only the author to edit an article.


But when I started thinking about it, I couldn't work out how to do this
part of the validation. A singleton object knows the user details so the
assert method can get that info easily enough. The controller (or other
calling code as the case may be) knows the specific article but how
should it pass this information across to the assert for validation?

I came up with three possible ways:

1) Define a separate resource instance for each and every article and
assign specific access. This is pretty clunky and really doesn't scale,
so let's just ignore this idea.

2) Create a singleton object for my article too prior to checking the
acl. This is OK and not a bad idea overall, but forcing the use of
singletons here seems a little too prescribed for ZF (remember this is
an example provided in the docs!). I'm not averse to this method, but
something about it doesn't quite sit right with me? Perhaps this is
unfounded tho'?

3) This is my current preference. When you create your resource object,
you can define a static set/get methods to a static class variable (or
just make the static class variable public but personally I prefer
methods) that allows some calling code (e.g. the controller) to set an
article id.

Something like:

class My_Article
  extends Zend_Acl_Resource
{
  private static $id;

  public static function setId($id)
  {
self::$id = $id;
  }

  public static function getId()
  {
return self::$id;
  }
}


They your assert class would be something like...

class My Article_Access
  implements Zend_Acl_Assert_Interface
{
  public function assert(
Zend_Acl $acl,
Zend_Acl_Role_Interface $role = null,
My_Article $resource = null,
$privilege = null)
  {
if (empty($resource))
  return false; // This assert only works with a valid article
$user = Zend_Auth::getInstance()-getIdentity();
// Load user  ... or more likely have a different user singleton...
$user_id = getUserId($user);

$article_id = $resource-getId();

// Do validation that $article_id has author == $user_id.
return $result;
  }
}




So my questions to this list are:

 1) Are there any other ways? (aka am I missing the obvious)
 2) Is my prefered solution sensible?
 3) If this example is continued to be used in the docs as a valid use
of asserts, can this additional information be added as I'd imagine I'm
not the only one running up against this particular brick wall :)

Cheers.

Col

--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]