[fw-general] re[fw-general] gistering action helper in zf1.8

2009-06-16 Thread jigen7

I really need help in creating my custom action helper i dont know where to
start ,where to put the files, how to register it via application.ini as of
zf 1.8 so i can call it directly to my controllers.
-- 
View this message in context: 
http://www.nabble.com/registering-action-helper-in-zf1.8-tp24049492p24049492.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Of 3 methods to centralize code used in all/many controllers which do you use when?

2009-06-16 Thread Dalibor Karlović
On Tuesday 16 June 2009 07:35:11 joedevon wrote:
> The following question on Stack Overflow prompted this post:
>
> http://stackoverflow.com/questions/866367/how-do-i-centralize-code-from-my-
>init-functions-in-all-controllers/866517
>
> "How do I centralize code from my init functions in all controllers?"
>
> Three answers all work I believe:
>
> 1. Extend Zend_Controller_Action and have your controllers extend from
> THERE
>
> 2. Write a plugin by extending Zend_Controller_Plugin_Abstract
>
> 3. Create an Action Helper
>
> I assume there are situations where each one of those is the best solution.
> I've been doing answer 1 mostly, but thinking about switching to answer 3
> for future projects.
>
> But I'd like to know what the recommended situations are for each solution.

You should note that "the plugin" is actually front controller plugin while 
"the helper" is the action controller helper. They have different scopes and 
purposes.

-- 
Dado


[fw-general] Get request from view

2009-06-16 Thread umpirsky

Hi.

Is there some easy way to get request parameters from view script (object)?
I like smarty $smarty.post, is there sth like $view->getParam() in zend
framework?

Regards,
Sasa Stamenkovic.
-- 
View this message in context: 
http://www.nabble.com/Get-request-from-view-tp24049727p24049727.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Get request from view

2009-06-16 Thread Dalibor Karlović
On Tuesday 16 June 2009 10:22:10 umpirsky wrote:
> Hi.
>
> Is there some easy way to get request parameters from view script (object)?
> I like smarty $smarty.post, is there sth like $view->getParam() in zend
> framework?

Nope, you should write a view helper which access it (zym has it, IIRC).

-- 
Dado


Re: [fw-general] Get request from view

2009-06-16 Thread Sudheer Satyanarayana

umpirsky wrote:

Hi.

Is there some easy way to get request parameters from view script (object)?
I like smarty $smarty.post, is there sth like $view->getParam() in zend
framework?
  

You can get the request parameters from the request object.

This might help to grab the request object:

http://techchorus.net/how-access-request-object-any-part-your-application


--

With warm regards,
Sudheer. S
Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, 
Personal: http://sudheer.net



[fw-general] Putting Zend Framework application online

2009-06-16 Thread Mantasgl

Hi,

I have my Zend Framework application fully working on my PC (localhost). My
application directory structure is default:
/myapp
 /application
 /library
 /public

I have configured my apache virtual hosts, so that it point to public
directory:

ServerName myapp
DocumentRoot "D:/wamp/www/myapp/public/"


I also added the new virtual domain to my hosts file in Windows XP
127.0.0.1 myapp

At this point on my localhost everything works fine. In browser i type
"myapp" and my application starts.

The problem is, when I put my application online on web server, I can't
change virtual hosts there, so when I type my domain in browser I also have
to enter to public directory. So my address looks like this:
"mydomain/public" 
and in the end I need to change my paths, also form action's paths and so
on.
I haven't contacted my web server administrator yet. What I was trying to do
is that I cut everything out of my public dir and paste it in my root dir
(myapp) and everything now working fine. But at this point I have to change
index.php configuration and the default zend framework application structure
is broken.
So what can you advice me? Is my solution good? Should I try asking my web
server administrator to change virtual hosts? 
-- 
View this message in context: 
http://www.nabble.com/Putting-Zend-Framework-application-online-tp24050069p24050069.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend Form, JQuery, File_Element and ViewScript decorator.

2009-06-16 Thread Paweł Chuchmała
Hi.

Performance of Zend Form with 300 fileds it's very low, so I think to
use viewscript decorator.
How use it with jquery elements and File element?
If i create view scripts like in documentation and apply to alle
elements I have warnings:

Warning: Cannot render jQuery form element without at least one
decorator implementing the
'ZendX_JQuery_Form_Decorator_UiWidgetElementMarker' interface. Default
decorator for this marker interface is the
'ZendX_JQuery_Form_Decorator_UiWidgetElement'. Hint: The ViewHelper
decorator does not render jQuery elements correctly. in
/home/users/styx/www/lib/ZendFramework-1.8.1/library/Zend/Form/Element.php

And for file element:
Warning: No file decorator found... unable to render file element in
/home/users/styx/www/lib/ZendFramework-1.8.1/library/Zend/Form/Element.php
on line 1929

How create viewScripts for that elements?

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


Re: [fw-general] TinyMce editor

2009-06-16 Thread Matt Cockayne


I dont know if you managed to sort this but I have a tutorial on integrating
tinymce into a zend framework (1.8) project 

see http://www.codersarmy.com/zend-tinymce



Razorblade wrote:
> 
> this is not strictly related to Zend Framework, 
> but I need to implement tinyMce inside my ZF app and customize it like in
> wordpress.
> Any advices?
> 

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



Re: [fw-general] Placeholder view helpers in partials don't work for layouts?

2009-06-16 Thread dmitrybelyakov





Hi Deanna,

First of all thanks for your reply. Glad i got some response here.
Maybe i don't use the paradigm it was intended, so correct me is i am wrong:

The Layout is the actually the template of my webpages with a main content
area that is controlled by
module controllers. Besides the main content area it may have some other
included areas which may be
simple included views, or rather complex like partials or other custom view
helpers. 
(This isn't a paradigm misuse, is it?)

The problem is that currently i see no other way of implementing complex
includes with their own logic (accept params, call model with params, pass
to view) and dedicated view files, widgets you may call them. 

You may agree that this is better done in DRY mode, where you create a
helper/widget, and then just skin it with your views (tempates) and have it
all included in the final layout which is as you stated the final assembling
point of all other sections. You can imagine all the examples / use cases
for that.

So as you see i'm not using partials as a layout for everything. But try try
to implement a rather common thing. Using action stack is not an option for
the well-known reason of performance.


Will be glad to hear any further thoughts on the topic.
Good luck.
Dmitry.






-- 
View this message in context: 
http://www.nabble.com/Placeholder-view-helpers-in-partials-don%27t-work-for-layouts--tp24042045p24050819.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Putting Zend Framework application online

2009-06-16 Thread Deepak
On Tue, Jun 16, 2009 at 4:43 PM, Mantasgl wrote:
>
> Hi,
>
> I have my Zend Framework application fully working on my PC (localhost). My
> application directory structure is default:
> /myapp
> /application
> /library
> /public
>
> I have configured my apache virtual hosts, so that it point to public
> directory:
> 
> ServerName myapp
> DocumentRoot "D:/wamp/www/myapp/public/"
> 
>
> I also added the new virtual domain to my hosts file in Windows XP
> 127.0.0.1 myapp
>
> At this point on my localhost everything works fine. In browser i type
> "myapp" and my application starts.
>
> The problem is, when I put my application online on web server, I can't
> change virtual hosts there, so when I type my domain in browser I also have
> to enter to public directory. So my address looks like this:
> "mydomain/public"
> and in the end I need to change my paths, also form action's paths and so
> on.
> I haven't contacted my web server administrator yet. What I was trying to do
> is that I cut everything out of my public dir and paste it in my root dir
> (myapp) and everything now working fine. But at this point I have to change
> index.php configuration and the default zend framework application structure
> is broken.
> So what can you advice me? Is my solution good? Should I try asking my web
> server administrator to change virtual hosts?
> --
> View this message in context: 
> http://www.nabble.com/Putting-Zend-Framework-application-online-tp24050069p24050069.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>

where are you hosting your application? your local server or hosting company?

In case of hosting company, they will give you the directory where
your html files go i.e. your public folder. You just have to map that
with your public folder.

For example:

Hosting company's public folder is public_html, your uploaded file
should look like this

/ (root)
application
library
public_html = your public folder

Disregard your myapp folder. It is for your project purpose only.

Hope this helps.


Re: [fw-general] TinyMce editor

2009-06-16 Thread Dalibor Karlović
On Tuesday 16 June 2009 11:18:19 Matt Cockayne wrote:
> I dont know if you managed to sort this but I have a tutorial on
> integrating tinymce into a zend framework (1.8) project
>
> see http://www.codersarmy.com/zend-tinymce

I did almost the exact same thing. IMHO, Zend should include/support a WYSIWYG 
editor out of the box, TinyMCE seems to be a good candidate.

> Razorblade wrote:
> > this is not strictly related to Zend Framework,
> > but I need to implement tinyMce inside my ZF app and customize it like in
> > wordpress.
> > Any advices?

-- 
Dado


Re: [fw-general] TinyMce editor

2009-06-16 Thread Matt Cockayne


I know what you mean. The rich text that comes with dojo just isn't up to
scratch. I chose Tiny MCE just beacuse I'm familiar with it. But the
principle should be the same for any editor.

Maybe we should start lobbying to get one included in the library by
default. Its pretty much a staple for any site nowadays.


Bugzilla from d...@krizevci.info wrote:
> 
> Zend should include/support a WYSIWYG editor out of the box, TinyMCE seems
> to be a good candidate.
> 

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



RE: [fw-general] TinyMce editor

2009-06-16 Thread Sergio Rinaudo

In the end I choose Markitup! for my application, 
that I think is hundred times simpler than TinyMce

http://markitup.jaysalvat.com/home/

bye

Sergio Rinaudo



> Date: Tue, 16 Jun 2009 03:02:39 -0700
> From: matt.cocka...@hotmail.co.uk
> To: fw-general@lists.zend.com
> Subject: Re: [fw-general] TinyMce editor
> 
> 
> 
> I know what you mean. The rich text that comes with dojo just isn't up to
> scratch. I chose Tiny MCE just beacuse I'm familiar with it. But the
> principle should be the same for any editor.
> 
> Maybe we should start lobbying to get one included in the library by
> default. Its pretty much a staple for any site nowadays.
> 
> 
> Bugzilla from d...@krizevci.info wrote:
> > 
> > Zend should include/support a WYSIWYG editor out of the box, TinyMCE seems
> > to be a good candidate.
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/TinyMce-editor-tp23544383p24051246.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 

_
Naviga più semplice, più veloce e più sicuro. Scarica Internet Explorer 8 per 
MSN!
 
http://cid-16be95750dd16d04.skydrive.live.com/self.aspx/le%20PV%20in%20viaggio!/89.JPG

Re: [fw-general] TinyMce editor

2009-06-16 Thread Jurian Sluiman
Well MarkItUp is a different editor. While TinyMCE is a wysiwyg editor, 
MarkItUp implies you have knowledge of the markup language.

I can't expect all my visitors know html or the wiki syntax. While MarkItUp 
has a fast and simple interface, for advanced editing TinyMCE is imho better.

Regards, Jurian
--
Jurian Sluiman
Soflomo.com

Op Tuesday 16 June 2009 12:20:01 schreef Sergio Rinaudo:
> In the end I choose Markitup! for my application,
> that I think is hundred times simpler than TinyMce
>
> http://markitup.jaysalvat.com/home/
>
> bye
>
> Sergio Rinaudo
>
> > Date: Tue, 16 Jun 2009 03:02:39 -0700
> > From: matt.cocka...@hotmail.co.uk
> > To: fw-general@lists.zend.com
> > Subject: Re: [fw-general] TinyMce editor
> >
> >
> >
> > I know what you mean. The rich text that comes with dojo just isn't up to
> > scratch. I chose Tiny MCE just beacuse I'm familiar with it. But the
> > principle should be the same for any editor.
> >
> > Maybe we should start lobbying to get one included in the library by
> > default. Its pretty much a staple for any site nowadays.
> >
> > Bugzilla from d...@krizevci.info wrote:
> > > Zend should include/support a WYSIWYG editor out of the box, TinyMCE
> > > seems to be a good candidate.
> >
> > --
> > View this message in context:
> > http://www.nabble.com/TinyMce-editor-tp23544383p24051246.html Sent from
> > the Zend Framework mailing list archive at Nabble.com.
>
> _
> Naviga più semplice, più veloce e più sicuro. Scarica Internet Explorer 8
> per MSN!
> http://cid-16be95750dd16d04.skydrive.live.com/self.aspx/le%20PV%20in%20viag
>gio!/89.JPG


Re: [fw-general] Zend Form, JQuery, File_Element and ViewScript decorator.

2009-06-16 Thread Thomas Weidner

Read the FAQ:
http://framework.zend.com/wiki/display/ZFFAQ/Forms

PS: Having 300 elements in a form the usability is also slow... your poor 
users :-)


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

- Original Message - 
From: "Paweł Chuchmała" 

To: "Zend Framework General" 
Sent: Tuesday, June 16, 2009 10:58 AM
Subject: [fw-general] Zend Form, JQuery, File_Element and ViewScript 
decorator.



Hi.

Performance of Zend Form with 300 fileds it's very low, so I think to
use viewscript decorator.
How use it with jquery elements and File element?
If i create view scripts like in documentation and apply to alle
elements I have warnings:

Warning: Cannot render jQuery form element without at least one
decorator implementing the
'ZendX_JQuery_Form_Decorator_UiWidgetElementMarker' interface. Default
decorator for this marker interface is the
'ZendX_JQuery_Form_Decorator_UiWidgetElement'. Hint: The ViewHelper
decorator does not render jQuery elements correctly. in
/home/users/styx/www/lib/ZendFramework-1.8.1/library/Zend/Form/Element.php

And for file element:
Warning: No file decorator found... unable to render file element in
/home/users/styx/www/lib/ZendFramework-1.8.1/library/Zend/Form/Element.php
on line 1929

How create viewScripts for that elements?

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



Re: [fw-general] TinyMce editor

2009-06-16 Thread Matt Cockayne

I'm inclined to agree with Jurian. Im not familiar with MarkItUp but haveing
looked at the website I know that I dont want users to have to need a
knowledge of any form of mark up language in order to get the results they
want. With that as the premise for using wysiwyg I can think of a lot of
editors that fit that criteria a lot better than MarkItUp



Jurian Sluiman wrote:
> 
> Well MarkItUp is a different editor. While TinyMCE is a wysiwyg editor, 
> MarkItUp implies you have knowledge of the markup language.
> 
> I can't expect all my visitors know html or the wiki syntax. While
> MarkItUp 
> has a fast and simple interface, for advanced editing TinyMCE is imho
> better.
> 
> 
> Sergio Rinaudo wrote:
>> 
>>> In the end I choose Markitup! for my application,
>>> that I think is hundred times simpler than TinyMce
>>>
>> 
> 

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



[fw-general] Translating Zend_Form elements

2009-06-16 Thread Stefan Gehrig
Dear all,

I know that Zend_Form is able to translate all the strings used in the form
- this is even true for -fields and other multi-options elements.
But now I have the problem that I'll have to include a -field into
my Zend_Form which displays a list of names that cannot be and should not be
translated at all. I know that I can switch of translation by disabling the
translator for the given element but this also disables label-translation. 

Is there any option to just disable translation for the field's options?
If not: would it be possible to include such an option into
Zend_Form_Element_Multi?

Thanks to all of you!

Best regards

Stefan




Re: [fw-general] Putting Zend Framework application online

2009-06-16 Thread Michael Kimsal
Not every hosting company allows for 'remapping' stuff outside of the
default configuration.  The default Plesk configuration (which many hosts
use) disallows a user putting any files output of the 'httpdocs' folder.
This was true for plesk as of the 8.6 version - I've not tried the 9
version.

Mantasgl, you may want to submit a support ticket to your hosting company to
ask them to do this for you manually.  If they won't do this, there may be
some stuff you can do with setting the 'baseUrl' on the front controller, or
possibly some funky mod_rewrite stuff, but I'm not sure there's a clean way
around your situation.

Good luck.

On Tue, Jun 16, 2009 at 5:34 AM, Deepak  wrote:

> On Tue, Jun 16, 2009 at 4:43 PM, Mantasgl wrote:
> >
> > Hi,
> >
> > I have my Zend Framework application fully working on my PC (localhost).
> My
> > application directory structure is default:
> > /myapp
> > /application
> > /library
> > /public
> >
> > I have configured my apache virtual hosts, so that it point to public
> > directory:
> > 
> > ServerName myapp
> > DocumentRoot "D:/wamp/www/myapp/public/"
> > 
> >
> > I also added the new virtual domain to my hosts file in Windows XP
> > 127.0.0.1 myapp
> >
> > At this point on my localhost everything works fine. In browser i type
> > "myapp" and my application starts.
> >
> > The problem is, when I put my application online on web server, I can't
> > change virtual hosts there, so when I type my domain in browser I also
> have
> > to enter to public directory. So my address looks like this:
> > "mydomain/public"
> > and in the end I need to change my paths, also form action's paths and so
> > on.
> > I haven't contacted my web server administrator yet. What I was trying to
> do
> > is that I cut everything out of my public dir and paste it in my root dir
> > (myapp) and everything now working fine. But at this point I have to
> change
> > index.php configuration and the default zend framework application
> structure
> > is broken.
> > So what can you advice me? Is my solution good? Should I try asking my
> web
> > server administrator to change virtual hosts?
> > --
> > View this message in context:
> http://www.nabble.com/Putting-Zend-Framework-application-online-tp24050069p24050069.html
> > Sent from the Zend Framework mailing list archive at Nabble.com.
> >
> >
>
> where are you hosting your application? your local server or hosting
> company?
>
> In case of hosting company, they will give you the directory where
> your html files go i.e. your public folder. You just have to map that
> with your public folder.
>
> For example:
>
> Hosting company's public folder is public_html, your uploaded file
> should look like this
>
> / (root)
> application
> library
> public_html = your public folder
>
> Disregard your myapp folder. It is for your project purpose only.
>
> Hope this helps.
>



-- 
Michael Kimsal
http://jsmag.com - for javascript developers
http://groovymag.com - for groovy developers
919.827.4724


Re: [fw-general] Putting Zend Framework application online

2009-06-16 Thread Ben Scholzen 'DASPRiD'
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

In any case, you can just put a .htaccess file in your root directory,
rewriting all requests into the public directory. See:

http://site.svn.dasprids.de/trunk/.htaccess
...
:  ___   _   ___ ___ ___ _ ___:
: |   \ /_\ / __| _ \ _ (_)   \   :
: | |) / _ \\__ \  _/   / | |) |  :
: |___/_/:\_\___/_| |_|_\_|___/   :
:::
: Web: http://www.dasprids.de :
: E-mail : m...@dasprids.de   :
: Jabber : jab...@dasprids.de :
: ICQ: 105677955  :
:::


Mantasgl schrieb:
> Hi,
> 
> I have my Zend Framework application fully working on my PC (localhost). My
> application directory structure is default:
> /myapp
>  /application
>  /library
>  /public
> 
> I have configured my apache virtual hosts, so that it point to public
> directory:
> 
> ServerName myapp
> DocumentRoot "D:/wamp/www/myapp/public/"
> 
> 
> I also added the new virtual domain to my hosts file in Windows XP
> 127.0.0.1 myapp
> 
> At this point on my localhost everything works fine. In browser i type
> "myapp" and my application starts.
> 
> The problem is, when I put my application online on web server, I can't
> change virtual hosts there, so when I type my domain in browser I also have
> to enter to public directory. So my address looks like this:
> "mydomain/public" 
> and in the end I need to change my paths, also form action's paths and so
> on.
> I haven't contacted my web server administrator yet. What I was trying to do
> is that I cut everything out of my public dir and paste it in my root dir
> (myapp) and everything now working fine. But at this point I have to change
> index.php configuration and the default zend framework application structure
> is broken.
> So what can you advice me? Is my solution good? Should I try asking my web
> server administrator to change virtual hosts? 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAko3iwMACgkQ0HfT5Ws789BSjwCgjE6X4CirArcM6kS/KQl3sYqi
8EQAnieavgF5FNeZkYKGR17ZR5TlAx3r
=Ogrf
-END PGP SIGNATURE-


RE: [fw-general] TinyMce editor

2009-06-16 Thread Sergio Rinaudo

The only html capabilities I want to give to my users is bold, underlined, 
italic and coloured text, and also  tag to add images ( clicking an image 
from the media library ), and with markitup I can get all of this, as you can 
see in this example implementation 

http://markitup.jaysalvat.com/examples/interaction/

I don't want to say 'MarkItUp is better, forget all the rest', but I noticed it 
is very fast, very simple to customize, any textarea can be enabled/disabled 
runtime ( maybe also in tinymce, but I don't know how.. ), and this helped me a 
lot implement it in my multilanguage editor ( I have more instances of the same 
form, only one is displayed, and only in this one markitup is enabled )

It just worked for me :)
Bye


Sergio Rinaudo




> Date: Tue, 16 Jun 2009 03:37:43 -0700
> From: matt.cocka...@hotmail.co.uk
> To: fw-general@lists.zend.com
> Subject: Re: [fw-general] TinyMce editor
> 
> 
> I'm inclined to agree with Jurian. Im not familiar with MarkItUp but haveing
> looked at the website I know that I dont want users to have to need a
> knowledge of any form of mark up language in order to get the results they
> want. With that as the premise for using wysiwyg I can think of a lot of
> editors that fit that criteria a lot better than MarkItUp
> 
> 
> 
> Jurian Sluiman wrote:
> > 
> > Well MarkItUp is a different editor. While TinyMCE is a wysiwyg editor, 
> > MarkItUp implies you have knowledge of the markup language.
> > 
> > I can't expect all my visitors know html or the wiki syntax. While
> > MarkItUp 
> > has a fast and simple interface, for advanced editing TinyMCE is imho
> > better.
> > 
> > 
> > Sergio Rinaudo wrote:
> >> 
> >>> In the end I choose Markitup! for my application,
> >>> that I think is hundred times simpler than TinyMce
> >>>
> >> 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/TinyMce-editor-tp23544383p24051703.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 

_
Hai voglia di divertirti? Scarica i nuovissimi gadget di Messenger!
http://messenger.it/home_gadget.aspx

Re: [fw-general] Placeholder view helpers in partials don't work for layouts?

2009-06-16 Thread Deanna Bonds

dmitrybelyakov wrote:

The Layout is the actually the template of my webpages with a main content
area that is controlled by
module controllers. Besides the main content area it may have some other
included areas which may be
simple included views, or rather complex like partials or other custom view
helpers. 
(This isn't a paradigm misuse, is it?)

...



You may agree that this is better done in DRY mode, where you create a
helper/widget, and then just skin it with your views (tempates) and have it
all included in the final layout which is as you stated the final assembling
point of all other sections. You can imagine all the examples / use cases
for that.

So as you see i'm not using partials as a layout for everything. But try try
to implement a rather common thing. Using action stack is not an option for
the well-known reason of performance.

  
I think what you are looking for is named capture regions.  You layout 
all your static layout in the layout.phtml file (or whatever your name 
for the layout file is).  Then in your views you use named placeholders 
(capture sections) for the content you want to insert in sections.  In 
your layout you would echo out those captured sections where they 
belong.  This lets the view change the content and layout does what it 
is supposed to do.  For a reference on placeholders and captures look 
here 
http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.placeholder.capture





Re: [fw-general] How to escape forward slash in paginator?

2009-06-16 Thread Matthew Ratzloff
1. Your own library.  library/My/Filter/Foo.php2.
http://framework.zend.com/manual/en/zend.form.elements.html#zend.form.elements.filters
-Matt

On Mon, Jun 15, 2009 at 11:35 PM, Deepak  wrote:

> On Tue, Jun 16, 2009 at 12:49 AM, Matthew
> Ratzloff wrote:
> > You can replace it with a substitute token.  There are a variety of
> > perfectly valid ways to go about it.
> > -Matt
>
> Ok I read the documentation and now I understand that my problem could
> be solved with custom filter (or probably Escapers). The thing that is
> not clear to me now is how to implement this.
>
> 1. Where does my custom filter code go? controller? or form?
> 2. After that how to add in filter chain and how to add that custom
> filter in my form field?
>
> My directory structure is:
>
> application
>  captcha
>  config
>  controllers
>  forms
>  layouts
>  scripts
>  models
>  dbtable
>  views
>  scripts
>
> Currently in my form, the search field is implemented as follows:
>
> public function init()
> {
>$mysearch = New Zend_Form_Element_Text('srchstr');
>$mysearch->setLabel('Search For:');
>$mysearch->setAttrib('size', '30');
>$mysearch->addFilter('StringTrim');
> ...
> ...
> ...
> }
>
>
> Its kind of confusing. Any suggestion (or code sample) greatly appreciated.
>
> Thanks again
>


Re: [fw-general] Small Change to Zend_Date

2009-06-16 Thread Arthur M. Kang
Thanks for the help Thomas.  I will look into the other two formats you 
have suggested.


I made the assumption that Yahoo's RSS feeds would be compliant to the 
spec.  Maybe not...


Arthur


Thomas Weidner wrote:
In this case you should not use RSS but RFC2822 which is not RSS 
conform but

accepted by most RSS readers.
Anyhow, Zend_Date::RSS does not mean that this should be used for 
all RSS

feeds, it's meant to accept RSS conform date formats which are strictly
standard conform.


That's a nice theory but rule of thumb is to create outputs which are
always valid and be relaxed with inputs. As a developer you have to
focus on the products requirement but not sending time on low level
functionality/details which should be covered by framework.


So your opinion is that when someone wants to have a RSS date, 
Zend_Date should create a RFC_2822 date instead of a RSS date ?


Every RSS reader accepts RSS conform dates, but some do not accept RFC 
2822 dates.

What should it bring to change this to RFC 2822 ?

Also, when you want to do RSS you should use Zend_Feed and not 
Zend_Date...

Zend_Date is only related to dates and not to RSS feeds.

Additionally, and this is clearly documented, when you don't know 
which format your input has, you should use ISO8601 which accepts any 
format.


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


Re: [fw-general] Placeholder view helpers in partials don't work for layouts?

2009-06-16 Thread dmitrybelyakov


Deanna Bonds-2 wrote:
> 
> I think what you are looking for is named capture regions.  You layout 
> all your static layout in the layout.phtml file (or whatever your name 
> for the layout file is).  Then in your views you use named placeholders 
> (capture sections) for the content you want to insert in sections.  In 
> your layout you would echo out those captured sections where they 
> belong.  This lets the view change the content and layout does what it 
> is supposed to do.  For a reference on placeholders and captures look 
> here 
> http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.placeholder.capture
> 

Hi, Deanna.

I have read this section of reference guide multiple times but never seen a
real use case for this capture placeholders. Now i do! Seems like what i was
looking for! Thank you very much for your reply.

Good luck.
Dmitry.

-- 
View this message in context: 
http://www.nabble.com/Placeholder-view-helpers-in-partials-don%27t-work-for-layouts--tp24042045p24057551.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] View partials packaged with the framework?

2009-06-16 Thread Matthew Weier O'Phinney
-- Matthew Ratzloff  wrote
(on Tuesday, 09 June 2009, 07:57 AM -0700):
> There was an issue raised requesting that Zend_Paginator output something by
> default without setting a view partial.  The easiest way to do this is to
> include a default view partial.  The question is: where?  I was thinking Zend/
> View/Helper/PaginationControl/default.phtml.  Or is there somewhere else where
> we would want to put that?  Perhaps I just assemble it using XMLWriter (on by
> default starting in 5.1.2)?
> 
> Currently there are two components that I can find that have this
> functionality: Zend_Form and Zend_Navigation.  Form uses the decorators and
> Navigation includes raw HTML.
> 
> Any thoughts?

We're toying with the idea of a data/ directory in the main distribution
for things like this, localization files, and more. We're just not 100%
certain how it would work from the various distribution standpoints
(PEAR installer does it one way, linux distros do it another, etc.) to
ensure it can be autodiscovered.

For now, I'd prefer you use something like XMLWriter so that it is
completely programmatic.

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


Re: [fw-general] Re: where is bootstrap object from within a controller plugin

2009-06-16 Thread Matthew Weier O'Phinney
-- David Mintz  wrote
(on Thursday, 11 June 2009, 02:30 PM -0400):
> On Thu, Jun 11, 2009 at 4:40 AM, Jurian Sluiman 
> wrote:
> 
> Op Thursday 11 June 2009 02:23:08 schreef Michael Depetrillo:
> 
> > I figured it out.
> >
> > $front = Zend_Controller_Front::getInstance();
> > $db = $front->getParam('bootstrap')->getResource('db');
> >
> > Michael DePetrillo
> > the...@michaeldepetrillo.com
> > Mobile: (858) 761-1605
> > www.michaeldepetrillo.com
> >
> > On Wed, Jun 10, 2009 at 5:13 PM, Michael Depetrillo 
> wrote:
> > > What is the best way to access bootstrap object from a controller
> plugin?
> > >
> 
> 
> Or even more simple:
> $this->getInvokeArg('bootstrap')->getResource('myResource');
> 
> 
> In case of the db, you could better use the
> Zend_Db_Table::getDefaultAdapter() method and in some cases for resources
> it's much easier to load them into the (global!) Zend_Registry :)
> 
> 
> 
> Which brings me to a general question. What are the relative merits of doing
> $this->getInvokeArg('bootstrap')->getResource('myResource') versus storing
> things in good old Zend_Registry?

Global, static registries are a pain to test against. I've discovered
this the hard way in maintaining Zend_Controller, creating
Zend_Test_PHPUnit_ControllerTestCase, and other functionality. Ask any
testing bigot, and you'll get the same answer: singletons are the bane
of testing. Singletons make it hard to determine when and where
dependencies are initialized, and also force you to do a bunch of
acrobatics to reset them between tests. Most of the ControllerTestCase
would be unnecessary if we did not use singletons within the framework,
and the Zend_Controller suite would be tons easier to test and maintain
as well.

Local registries and dependency injection, however, are very easy to
test, and provide for a lot of flexibility in implementation. To this
end, I made Zend_Application utilize a local registry and inject it into
the front controller. This will make it easier in the future to wean
away from static registries (and also make it trivial to remove the
singleton from Z_C_F).

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


[fw-general] Get Curl handle ressource when use Zend_Http_Client with Zend_Http_Client_Adapter_Curl

2009-06-16 Thread MARTIN Nicolas
Hi all,

I use Zend_Http_Client with Zend_Http_Client_Adapter_Curl and I would like
to get more informations and so use curl_getinfo($ch) [$ch is handle
ressource]
This handle ressource is the _curl property in
Zend_Http_Client_Adapter_Curl. How get it ?

For the moment I create my own My_Http_Client_Adapter_Curl and add method

class My_Http_Client_Adapter_Curl extends Zend_Http_Client_Adapter_Curl
{
public function getInfo()
{
return curl_getinfo($this->_curl);
}
}

Is it the best way to do?
Or something can be change directly in the framework in a future release ?

Thanks


Re: [fw-general] View partials packaged with the framework?

2009-06-16 Thread Dalibor Karlović
On Tuesday 16 June 2009 18:17:16 Matthew Weier O'Phinney wrote:
> -- Matthew Ratzloff  wrote
>
> (on Tuesday, 09 June 2009, 07:57 AM -0700):
> > There was an issue raised requesting that Zend_Paginator output something
> > by default without setting a view partial.  The easiest way to do this is
> > to include a default view partial.  The question is: where?  I was
> > thinking Zend/ View/Helper/PaginationControl/default.phtml.  Or is there
> > somewhere else where we would want to put that?  Perhaps I just assemble
> > it using XMLWriter (on by default starting in 5.1.2)?
> >
> > Currently there are two components that I can find that have this
> > functionality: Zend_Form and Zend_Navigation.  Form uses the decorators
> > and Navigation includes raw HTML.
> >
> > Any thoughts?
>
> We're toying with the idea of a data/ directory in the main distribution
> for things like this, localization files, and more. We're just not 100%
> certain how it would work from the various distribution standpoints
> (PEAR installer does it one way, linux distros do it another, etc.) to
> ensure it can be autodiscovered.



> For now, I'd prefer you use something like XMLWriter so that it is
> completely programmatic.

That was the original idea:
http://framework.zend.com/issues/browse/ZF-6805

-- 
Dado


[fw-general] Use Lucene as a stand alone component

2009-06-16 Thread Sergio Rinaudo

Hi, 
I need to implement Zend_Lucene in an existing project that is not using Zend 
Framework.
How to do it? Any tutorial on the internet?
Thanks

Sergio Rinaudo


_
Naviga più semplice, più veloce e più sicuro. Scarica Internet Explorer 8 per 
MSN!
 
http://cid-16be95750dd16d04.skydrive.live.com/self.aspx/le%20PV%20in%20viaggio!/89.JPG

[fw-general] Using a DI Container with Zend_Application

2009-06-16 Thread Benjamin Eberlei
Hello,

I have written a blog post on how to integrate the Yadif DI container with 
Zend_Application (to replace Zend_Registry). It uses Application Resources as 
instances of the DI container and allows to use them as dependencies for any 
objects that are instantiated through the container.

http://www.whitewashing.de/blog/articles/117/

Any other DI container that uses __isset, __set and __get can also be 
integrated with Zend_Application. Very awesome! :)

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


[fw-general] Zend_Application_Module_Bootstrap doesn't work with default module

2009-06-16 Thread fab2008

I've read a lot of doc and forum post about autoloading, and after that I've
decided to use the approach of autoloading via modules resources (suggested
also by this article:
http://devzone.zend.com/article/4525-Developing-a-Comprehensive-Autoloader)

What I've done is to insert the following line in my application.ini

resources.modules[] =

and then a _Bootstrap class in a file named Bootstrap.php, one
for each one of my modules. In those files I've extended the class in the
subject with no methods inside. For example my admin module has these lines:

class Admin_Bootstrap extends Zend_Application_Module_Bootstrap {

}

Now this approach works for all modules and I'm able to autoload classes
such as Admin_Form_Login and Admin_Model_User, but for default module this
thing doesn't work.

I've tried playing with some options such as 

resources.frontController.defaultmodule = "default"
;resources.frontController.moduleControllerDirectoryName = "controllers"
;resources.frontController.params.prefixdefaultmodule = true

and with different naming conventions, but i haven't figured out how to
solve this thing yet.

Any hint?

Thanks.

-- 
View this message in context: 
http://www.nabble.com/Zend_Application_Module_Bootstrap-doesn%27t-work-with-default-module-tp24062377p24062377.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Re: re[fw-general] gistering action helper in zf1.8

2009-06-16 Thread joedevon


jigen7 wrote:
> 
> I really need help in creating my custom action helper i dont know where
> to start ,where to put the files, how to register it via application.ini
> if i put it to a custom folder as of zf 1.8 so i can call it directly to
> my controllers.
> 

In your Bootstrap.php put this:

protected function _initActionHelpers()
{
   
Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH."/controllers/helpers");
}

And your action helpers go in /application/controllers/helpers
-- 
View this message in context: 
http://www.nabble.com/registering-action-helper-in-zf1.8-tp24049492p24062606.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Autoloader best practices

2009-06-16 Thread fab2008

I figured out how to solve the problem of the library, just insert these
lines into application.ini file:

includePaths.library = APPLICATION_PATH "/var/lib"
autoloadernamespaces.zenit = "Company_"

and then putting all common code under a directory called Company in the
include path, in my case APPLICATION_PATH . '/var/lib'

I still have the problem for resource autoloading into modules, but also in
that I made some progress, I remain only with a little problem regarding
default module. Since this problem is related to a different question I
opened a new thread for that at:

http://www.nabble.com/Zend_Application_Module_Bootstrap-doesn%27t-work-with-default-module-td24062377.html

Bye.


fab2008 wrote:
> 
> I just started to migrate my main application to ZF 1.8.x, I love
> Zend_Application since it promotes reuse and configuration made all using
> config.ini. (A note about this, IMHO you should standardize also the name
> and the location of the configuration file).
> 
> I rewrote all my previous bootstrap code using only the configuration
> file, so my bootstrap class now it's almost empty. The only thing I cannot
> make work is the autoloader since the documentation about that is pretty
> undetailed.
> 
> What I want to do is to standardize my classes using a consistent
> namespace convention, since i have to refactor most of the classes of my
> app, I want to ask which is the better way to do it before starting.
> 
> Which I am trying to do is to have modules resources (such as forms,
> models and so on) inside respective module directory and call a class
> something like Admin_Model_User or Admin_Form_Login in a structure like
> this one:
> 
> application
>   + modules
>+ admin
>+  controllers
>+  forms
>+ Login.php
>+  modules
>+ User.php
>+  views
> 
> and a library direcotory with common code shared and used across
> applications with classes named something like
> Company_Exception_Permission, Company_Plugin_Foo,
> Company_View_Helper_Date, Company_Form_Validator_Bar or
> Company_Action_Helper_Log in a structure like this one:
> 
> application
>   + library
>  + Company
> + Action
>+ Helper
>   + Log.php
> + Exception
>+ Permission.php
> + Form
>+ Validator
>   + Bar.php
> + Plugin
>+ Foo.php
> + View
>+ Helper
>   + Date.php
> 
> How to achieve this using Zend_Loader_Autoloader?? I'm pretty confused
> about its usage.
> 
> And one more question, in the configuration file I loaded my plugins and
> action helpers in this way:
> 
> ;resources.frontController.plugins.10 = "Company_Plugin_Translator"
> ;resources.frontController.plugins.20 = "Company_Plugin_DbProfiler"
> ;resources.frontController.actionhelperpaths.Zenit_Action_Helper_ =
> APPLICATION_PATH "/var/lib/helpers/action"
> 
> and in the Bootstrap file I've only this:
> 
> class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {
>   
>   
>   public function _initAutoloader() {
>   $moduleLoader = new Zend_Application_Module_Autoloader(
>   array ('namespace' => 'Company_', 'basePath' => 
> APPLICATION_PATH .
> '/var/lib'));
>   return $moduleLoader;
>   }
> }
> 
> So it found Company_Plugin_Translator under var/lib/plugins path, but I
> think this is wrong, because in this way I cannot put resources into
> modules directory under application.
> 
> And the last thing: in the index.php file I have this
> 
> // Ensure library/ is on include_path
> set_include_path(
>   implode(PATH_SEPARATOR, 
>   array (
>   realpath(APPLICATION_PATH . 
> '/var/lib'), 
>   get_include_path(;
> /** Zend_Application */
> require_once 'Zend/Application.php';
> 
> // Create application, bootstrap, and run
> $application = new Zend_Application(APPLICATION_ENV, 
>   array (
>   'config' => APPLICATION_PATH . 
> '/configs/application.ini', 
>   'pluginPaths' => array 
> ('Company_Application_Resources' =>
> 'resources')));
> // run the application
> $application->bootstrap()->run();
> 
> Since I wrote a couple of resource classes, for example to configure
> logfiles properties via application.ini and I want to reuse them as well,
> in a new application, I'd like to keep them under the Company directory of
> the lib folder instead of the resources folder
> 
> So instead of
> 
> application
>   + var
>  + lib
> + resources
>+ Log.php
> 
> I'd like:
> 
> application
>   + var
>  + lib
> + Company
>+ Application
>   + Resources
>  + Log.php
> 
> I know these are a lot of questions, but please help me,

[fw-general] How to include the result of a request inside the phtml file ?

2009-06-16 Thread debussy007

Hello,

When rendering the phtml file, I would like to get the result of a request
and put it in the html :

[some html code ...]

baseUrl . '/admin/widgets/' .  $widget . '/page/' .  $page
 // right here
 ?>

[some html code ...]

Does anyone know how to achieve this ?
Thank you for any help !!
-- 
View this message in context: 
http://www.nabble.com/How-to-include-the-result-of-a-request-inside-the-phtml-file---tp24062971p24062971.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] How to include the result of a request inside the phtml file ?

2009-06-16 Thread Sergio Rinaudo

I think an iframe can help, 
or an ajax call as well... I don't know if there are any other solutions..
Bye


Sergio Rinaudo




> Date: Tue, 16 Jun 2009 14:12:19 -0700
> From: debussy...@gmail.com
> To: fw-general@lists.zend.com
> Subject: [fw-general] How to include the result of a request inside the phtml 
> file ?
> 
> 
> Hello,
> 
> When rendering the phtml file, I would like to get the result of a request
> and put it in the html :
> 
> [some html code ...]
> 
>   // put the output of 
>  // $this->baseUrl . '/admin/widgets/' .  $widget . '/page/' .  $page
>  // right here
>  ?>
> 
> [some html code ...]
> 
> Does anyone know how to achieve this ?
> Thank you for any help !!
> -- 
> View this message in context: 
> http://www.nabble.com/How-to-include-the-result-of-a-request-inside-the-phtml-file---tp24062971p24062971.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 

_
Naviga al sicuro, usa Windows Live Messenger!
http://messenger.it/home_sicurezza.aspx

Re: [fw-general] Using a DI Container with Zend_Application

2009-06-16 Thread Matthew Weier O'Phinney
-- Benjamin Eberlei  wrote
(on Tuesday, 16 June 2009, 09:54 PM +0200):
> I have written a blog post on how to integrate the Yadif DI container with 
> Zend_Application (to replace Zend_Registry). It uses Application Resources as 
> instances of the DI container and allows to use them as dependencies for any 
> objects that are instantiated through the container.
> 
> http://www.whitewashing.de/blog/articles/117/
> 
> Any other DI container that uses __isset, __set and __get can also be 
> integrated with Zend_Application. Very awesome! :)

Awesome -- glad to see this post! As you note in the entry, this was
actually a design goal of Zend_Application, and I was very much
targetting simple property overloading in the container, which is a
common paradigm with DI containers.

Nice work, and I hope others start following suit!

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


Re: [fw-general] How to include the result of a request inside the phtml file ?

2009-06-16 Thread Matthew Weier O'Phinney
-- debussy007  wrote
(on Tuesday, 16 June 2009, 02:12 PM -0700):
> When rendering the phtml file, I would like to get the result of a request
> and put it in the html :
> 
> [some html code ...]
> 
>   // put the output of 
>  // $this->baseUrl . '/admin/widgets/' .  $widget . '/page/' .  $page
>  // right here
>  ?>
> 
> [some html code ...]
> 
> Does anyone know how to achieve this ?
> Thank you for any help !!

Use the action() view helper, and pass it the module, controller,
action, and any other parameters.

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


Re: [fw-general] Use Lucene as a stand alone component

2009-06-16 Thread Ben Scholzen 'DASPRiD'
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

There's no difference in using it without the MVC-part of ZF, as it
doesn't use it. You just need Zend_Loader and Zend_Exception in place.
...
:  ___   _   ___ ___ ___ _ ___:
: |   \ /_\ / __| _ \ _ (_)   \   :
: | |) / _ \\__ \  _/   / | |) |  :
: |___/_/:\_\___/_| |_|_\_|___/   :
:::
: Web: http://www.dasprids.de :
: E-mail : m...@dasprids.de   :
: Jabber : jab...@dasprids.de :
: ICQ: 105677955  :
:::


Sergio Rinaudo schrieb:
> Hi,
> I need to implement Zend_Lucene in an existing project that is not using
> Zend Framework.
> How to do it? Any tutorial on the internet?
> Thanks
> 
> Sergio Rinaudo
> 
> 
> 
> Preparati alla sfida all'ultima combinazione, gioca con Crosswire!
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAko4FXEACgkQ0HfT5Ws789CNDwCfWy7C/pIOic9N7wPnkrCgBcPx
zjEAmgJmfovM3NqDGGo+te3wCXhTGhLH
=SnBz
-END PGP SIGNATURE-


Re: [fw-general] TinyMce editor

2009-06-16 Thread Juan Felipe Alvarez Saldarriaga
Hey, what about FCKEditor ? I love the "browse server files" feature.

On Tue, Jun 16, 2009 at 7:19 AM, Sergio Rinaudo wrote:
> The only html capabilities I want to give to my users is bold, underlined,
> italic and coloured text, and also  tag to add images ( clicking an
> image from the media library ), and with markitup I can get all of this, as
> you can see in this example implementation
>
> http://markitup.jaysalvat.com/examples/interaction/
>
> I don't want to say 'MarkItUp is better, forget all the rest', but I noticed
> it is very fast, very simple to customize, any textarea can be
> enabled/disabled runtime ( maybe also in tinymce, but I don't know how.. ),
> and this helped me a lot implement it in my multilanguage editor ( I have
> more instances of the same form, only one is displayed, and only in this one
> markitup is enabled )
>
> It just worked for me :)
> Bye
>
>
> Sergio Rinaudo
>
>
>
>
>> Date: Tue, 16 Jun 2009 03:37:43 -0700
>> From: matt.cocka...@hotmail.co.uk
>> To: fw-general@lists.zend.com
>> Subject: Re: [fw-general] TinyMce editor
>>
>>
>> I'm inclined to agree with Jurian. Im not familiar with MarkItUp but
>> haveing
>> looked at the website I know that I dont want users to have to need a
>> knowledge of any form of mark up language in order to get the results they
>> want. With that as the premise for using wysiwyg I can think of a lot of
>> editors that fit that criteria a lot better than MarkItUp
>>
>>
>>
>> Jurian Sluiman wrote:
>> >
>> > Well MarkItUp is a different editor. While TinyMCE is a wysiwyg editor,
>> > MarkItUp implies you have knowledge of the markup language.
>> >
>> > I can't expect all my visitors know html or the wiki syntax. While
>> > MarkItUp
>> > has a fast and simple interface, for advanced editing TinyMCE is imho
>> > better.
>> >
>> >
>> > Sergio Rinaudo wrote:
>> >>
>> >>> In the end I choose Markitup! for my application,
>> >>> that I think is hundred times simpler than TinyMce
>> >>>
>> >>
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/TinyMce-editor-tp23544383p24051703.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>
> 
> Personalizza Messenger 2009. Scegli la grafica che ti rappresenta meglio!


Re: [fw-general] Putting Zend Framework application online

2009-06-16 Thread Peter Myllykoski
Hi,

My solution to this problem was to use two .htaccess files. In the
"mydomain" folder you put the following:

RewriteEngine On
RewriteRule ^\.htaccess$ - [F]
RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]
RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
RewriteRule ^public/.*$ /public/index.php [NC,L]

and in your "mydomain/public" you put the following in a .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]



Mantasgl wrote:
> Hi,
>
> I have my Zend Framework application fully working on my PC (localhost). My
> application directory structure is default:
> /myapp
>  /application
>  /library
>  /public
>
> I have configured my apache virtual hosts, so that it point to public
> directory:
> 
> ServerName myapp
> DocumentRoot "D:/wamp/www/myapp/public/"
> 
>
> I also added the new virtual domain to my hosts file in Windows XP
> 127.0.0.1 myapp
>
> At this point on my localhost everything works fine. In browser i type
> "myapp" and my application starts.
>
> The problem is, when I put my application online on web server, I can't
> change virtual hosts there, so when I type my domain in browser I also have
> to enter to public directory. So my address looks like this:
> "mydomain/public" 
> and in the end I need to change my paths, also form action's paths and so
> on.
> I haven't contacted my web server administrator yet. What I was trying to do
> is that I cut everything out of my public dir and paste it in my root dir
> (myapp) and everything now working fine. But at this point I have to change
> index.php configuration and the default zend framework application structure
> is broken.
> So what can you advice me? Is my solution good? Should I try asking my web
> server administrator to change virtual hosts? 
>   




signature.asc
Description: OpenPGP digital signature


Re: [fw-general] Putting Zend Framework application online

2009-06-16 Thread Deepak
On Tue, Jun 16, 2009 at 7:22 PM, Michael Kimsal wrote:
> Not every hosting company allows for 'remapping' stuff outside of the
> default configuration.

I am assuming that the *nix based hosting. In my case I am hosting in
bluehost and their public_html folder is where all the html files
should go.

If you access via ftp and go to you home directory then, its just the
matter of copying directory and files in different location and all is
done.

For example Mantasgl's project structure looks like this in his local computer

/myapp
/application
/library
/public

and remote host you have

/ (your home folder)
  /public_html


After transferring the files via ftp, it should look like this in
remote host, which should work without any modification

LOCAL   REMOTE HOST
/myapp   /
/application/application
/library  /library
/public  /public_html (just copy the contents here)

This should work perfectly without any modification. Again I am
assuming that you are using your own version of ZF (i.e. not relying
on what ZF you hosting company provides).

I guess this is clear.

Regards!


Re: [fw-general] Putting Zend Framework application online

2009-06-16 Thread Vadim Gabriel
This will work only on Linux hosts where the mod_rewrite is enabled.
Wouldn't it be better to add another index.php file inside the root folder
that will include the index.php file from the public folder? What happens to
members using windows?


On Tue, Jun 16, 2009 at 3:07 PM, Ben Scholzen 'DASPRiD' wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> In any case, you can just put a .htaccess file in your root directory,
> rewriting all requests into the public directory. See:
>
> http://site.svn.dasprids.de/trunk/.htaccess
> ...
> :  ___   _   ___ ___ ___ _ ___:
> : |   \ /_\ / __| _ \ _ (_)   \   :
> : | |) / _ \\__ \  _/   / | |) |  :
> : |___/_/:\_\___/_| |_|_\_|___/   :
> :::
> : Web: http://www.dasprids.de :
> : E-mail : m...@dasprids.de   :
> : Jabber : jab...@dasprids.de :
> : ICQ: 105677955  :
> :::
>
>
> Mantasgl schrieb:
> > Hi,
> >
> > I have my Zend Framework application fully working on my PC (localhost).
> My
> > application directory structure is default:
> > /myapp
> >  /application
> >  /library
> >  /public
> >
> > I have configured my apache virtual hosts, so that it point to public
> > directory:
> > 
> > ServerName myapp
> > DocumentRoot "D:/wamp/www/myapp/public/"
> > 
> >
> > I also added the new virtual domain to my hosts file in Windows XP
> > 127.0.0.1 myapp
> >
> > At this point on my localhost everything works fine. In browser i type
> > "myapp" and my application starts.
> >
> > The problem is, when I put my application online on web server, I can't
> > change virtual hosts there, so when I type my domain in browser I also
> have
> > to enter to public directory. So my address looks like this:
> > "mydomain/public"
> > and in the end I need to change my paths, also form action's paths and so
> > on.
> > I haven't contacted my web server administrator yet. What I was trying to
> do
> > is that I cut everything out of my public dir and paste it in my root dir
> > (myapp) and everything now working fine. But at this point I have to
> change
> > index.php configuration and the default zend framework application
> structure
> > is broken.
> > So what can you advice me? Is my solution good? Should I try asking my
> web
> > server administrator to change virtual hosts?
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAko3iwMACgkQ0HfT5Ws789BSjwCgjE6X4CirArcM6kS/KQl3sYqi
> 8EQAnieavgF5FNeZkYKGR17ZR5TlAx3r
> =Ogrf
> -END PGP SIGNATURE-
>



-- 
Vincent Gabriel.
Lead Developer, Senior Support.
Zend Certified Engineer.
Zend Framework Certified Engineer.
-- http://www.vadimg.co.il/


Re: [fw-general] How to escape forward slash in paginator?

2009-06-16 Thread Deepak
On Tue, Jun 16, 2009 at 10:25 PM, Matthew
Ratzloff wrote:
> 1. Your own library.  library/My/Filter/Foo.php
> 2.
> http://framework.zend.com/manual/en/zend.form.elements.html#zend.form.elements.filters
> -Matt



OK I got the concept of custom filter. Now I have custom filter
implemented but it is not working.

I have
/application
  /library
/My
  /Filter
 Interface.php
 Slash2Comma.php

Basically my idea is to replace the slash(/) with comma and this is
how it looks like

Interface.php
++
setLabel('Search For:');
   $mysearch->setAttrib('size', '30');
   $mysearch->addPrefixPath('My_Filter', 'My/Filter/', 'filter');
   $mysearch->addFilter('Slash2Comma');
   $mysearch->addFilter('StringTrim');
...
...
...
}

+++

Now when I var_dump my query string, it is still the same. What's
wrong with my Slash2Comma code? Any suggestion?

Besides that if i execute query, i am getting SQL error

Just need some input.

Thanks again for your valuable time


Re: [fw-general] Using a DI Container with Zend_Application

2009-06-16 Thread keith Pope
2009/6/16 Matthew Weier O'Phinney :
> -- Benjamin Eberlei  wrote
> (on Tuesday, 16 June 2009, 09:54 PM +0200):
>> I have written a blog post on how to integrate the Yadif DI container with
>> Zend_Application (to replace Zend_Registry). It uses Application Resources as
>> instances of the DI container and allows to use them as dependencies for any
>> objects that are instantiated through the container.
>>
>> http://www.whitewashing.de/blog/articles/117/
>>
>> Any other DI container that uses __isset, __set and __get can also be
>> integrated with Zend_Application. Very awesome! :)
>
> Awesome -- glad to see this post! As you note in the entry, this was
> actually a design goal of Zend_Application, and I was very much
> targetting simple property overloading in the container, which is a
> common paradigm with DI containers.

Great to see this, I really like the Yadif container in the way it is
so simple :) Hopefully something like this will make it into zend core
at some point??
>
> Nice work, and I hope others start following suit!
>
> --
> Matthew Weier O'Phinney
> Project Lead            | matt...@zend.com
> Zend Framework          | http://framework.zend.com/
>



-- 
--
[MuTe]
--


[fw-general] Fwd: Transferring site to 5.0.5 php installation

2009-06-16 Thread Mark Steudel
Sorry if this is a duplicate wasn't fully signed up on the list before I
sent this 

I had to transfer a site from one server to another, and the new server is
installed with 5.0.5. I'm now getting the following error when I include the
PDO Mysql adapter:

require_once 'Zend/Db.php';
require_once 'Zend/Db/Adapter/Pdo/Mysql.php';


*Parse error*: syntax error, unexpected T_ARRAY, expecting '&' or T_VARIABLE
in */netapp/whnas-swamp/s10/s10/01577/
www.morbern.com/webdocs/Zend/library/Zend/Db/Adapter/Abstract.php* on line *
238*

I have version 1.5.1 of the framework installed ... not sure if upgrading to
the latest would solve this ... I only found one usable reference that this
might be a bug with the php version ... I'm at a bit of a loss ...

Thanks, Mark



-- 

-
Mark Steudel
P: 206.375.7244
msteu...@gmail.com

. : Work : .
http://www.mindfulinteractive.com

. : Play : .
http://www.steudel.org/blog