Re: [fw-general] Best way to setup a Default controller that will be called if controller not found

2012-01-25 Thread Hector Virgen
tes.page.type = "Zend_Controller_Router_Route" resources.router.routes.page.route = "page/:action/*" resources.router.routes.page.defaults.controller = "page" You would have to repeat this for each controller you want to expose. I hope this helps! -- *Hector Virgen* http://www.virgentech.com Circle me on Google+ https://plus.google.com/101544567700763078999/

Re: [fw-general] Re: Zend_Auth::getInstance()->clearIdentity() doesn't seem to log me out?

2011-12-05 Thread Hector Virgen
you're using a custom one) you'll need to configure Zend_Auth so it will clear the identity correctly. If that fixes the problem, I suggest bootstrapping Zend_Auth so that it's ready to go in all of your actions. -- *Hector Virgen* http://www.virgentech.com Circle me on G

Re: [fw-general] Best practice with routes management using separate .ini

2011-08-15 Thread Hector Virgen
eginning of each line. I hope this helps! -- *Hector Virgen* http://www.virgentech.com Follow me on Twitter: @djvirgen <http://twitter.com/djvirgen> On Mon, Aug 15, 2011 at 1:47 PM, Sergio Rinaudo wrote: > > Hi all, > in my ZF project I have lots of different routes that now are d

Re: [fw-general] Re: Views error 404 in XP using Zend Server + apache

2011-08-15 Thread Hector Virgen
ill end up looking more like this: http://localhost/controller/action I hope this helps! -- *Hector Virgen* http://www.virgentech.com Follow me on Twitter: @djvirgen <http://twitter.com/djvirgen>

Re: [fw-general] Naming controllers

2011-08-15 Thread Hector Virgen
ention in order to use it with the Zend_Controller component. -- *Hector Virgen* http://www.virgentech.com Follow me on Twitter: @djvirgen <http://twitter.com/djvirgen> > > >

Re: [fw-general] Zend_Console_Getopt manage if there no options

2011-07-07 Thread Hector Virgen
gument required: if (null === $opts->id) { echo $opts->getUsageMessage(); exit; } -- *Hector Virgen* http://www.virgentech.com Follow me on Twitter: @djvirgen <http://twitter.com/djvirgen> On Thu, Jul 7, 2011 at 7:13 AM, whisher wrote: > Hi, > try { >$opts = new Zend_Co

Re: [fw-general] Re: How can I insert class name for Zend Navigation generated menu?

2011-06-10 Thread Hector Virgen
Can you use :last-child pseudo-selector? It's not available in older browsers but works great with new browsers and jQuery. ul.navigation li:last-child{ color: red; } -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Navigation visibility of subpages

2011-05-10 Thread Hector Virgen
Have you tried using setOnlyActiveBranch()? echo $this->navigation()->menu()->setOnlyActiveBranch(true)->menu(); -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Setting list seperator in Zend_View_Helper_FormRadio

2011-05-10 Thread Hector Virgen
Or when you add your element: $form->addElement('radio', 'my_radio', array( 'separator' => '' )); -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Module Bootstrap

2011-05-05 Thread Hector Virgen
d this line to your application.ini: autoloadernamespaces[] = "My_" And lastly the directory that contains the "My" directory should be in your include path. One such place might be the "library" folder in your application. I hope this helps! -- *Hector Virgen* Sr. Web Deve

Re: [fw-general] Module Bootstrap

2011-05-04 Thread Hector Virgen
You might want to use a front controller plugin to handle this. The plugin could inspect the route prior to dispatching (using the routeShutdown() hook) and if the detected module is disabled it could forward the request to the error controller. -- *Hector Virgen* Sr. Web Developer http

Re: [fw-general] Easy ZF projects deployment with capistrano

2011-05-03 Thread Hector Virgen
This sounds great, but have you looked at Phing (based on Apache Ant)? http://www.phing.info/trac/ -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Re: Change layout in bootstrap

2011-04-27 Thread Hector Virgen
Also remove any code you added to your bootstrap.php file that attempts to load this plugin. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Wed, Apr 27, 2011 at 10:40 AM, ratclot wrote: > the same error: > > Fatal error: Class 'Plugin_Layout' not foun

Re: [fw-general] Re: Change layout in bootstrap

2011-04-27 Thread Hector Virgen
Rename your class to "Default_Plugin_Layout" (keeping the same file name) and place this line in your application.ini: resources.frontController.plugins.layout = "Default_Plugin_Layout" -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Wed, Apr 27, 2011

Re: [fw-general] Re: Reference guide suggestion

2011-04-25 Thread Hector Virgen
That's a pretty nice user script! I like how he used nested lists and placed the navigation in the sidebar. I borrowed from his idea and updated my user script to use nested lists and to pull the title from the h1. http://www.virgentech.com/userscripts/zfdocs.user.js -- *Hector Virgen* Sr

Re: [fw-general] Zend_Json_Encoder strange behaviour with array of Object

2011-04-21 Thread Hector Virgen
Perhaps you could create a new object that contains your objects and implements its own toJson method, and then pass that to Zend_Json::encode(): http://pastie.org/1820421 -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Reference guide suggestion

2011-04-21 Thread Hector Virgen
it includes the jQuery source at the top. I didn't have time to learn Dojo but I'm sure it could be ported quite easily. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Thu, Apr 21, 2011 at 10:22 AM, ctoomey wrote: > Hi, my team and I are new to ZF and have bee

Re: [fw-general] Displaying data in table with select element in each row - how?

2011-04-18 Thread Hector Virgen
You probably don't need Zend_Form for this since you most likely won't be using element-level validators/filters. So I'd stick to a regular view script and use the formCheckbox/formSubmit view helpers. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Zend_Cache Two_Levels - APC and Sqlite

2011-04-13 Thread Hector Virgen
Are you using Zend_Cache or APC directly? BTW I'm surprised about the behavior of APC. According to the docs: keys are cache-unique, so storing a second value with the same key will > overwrite the original value. http://www.php.net/manual/en/function.apc-store.php -- *Hector Virgen*

Re: [fw-general] after submit form event

2011-03-28 Thread Hector Virgen
t updates the dialog with what the server responded with. 5. Don't forget to set up callbacks for error responses. I hope this helps. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Custom Decorators (buildErrors empty)

2011-03-24 Thread Hector Virgen
On Thu, Mar 24, 2011 at 11:33 AM, My Lists wrote: > $element->getMessages(), returns empty. $element->getMessages() will be empty unless the element's value is invalid. Are you validating the form (or element) and passing in a known invalid value? -- *Hector Virgen* Sr. Web

Re: [fw-general] Zend_Rest_Client and non-XML REST services

2011-03-22 Thread Hector Virgen
On Tue, Mar 22, 2011 at 2:02 PM, Matthew Weier O'Phinney wrote: > -- Hector Virgen wrote > (on Tuesday, 22 March 2011, 01:25 PM -0700): > > • Client support for various response content types (xml, json, etc.) > > I'd expect this to be pluggable > My tho

Re: [fw-general] Zend_Rest_Client and non-XML REST services

2011-03-22 Thread Hector Virgen
rver and client) according to the Richardson Maturity Model http://martinfowler.com/articles/richardsonMaturityModel.html Any thoughts on this? -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

[fw-general] Zend_Rest_Client and non-XML REST services

2011-03-22 Thread Hector Virgen
Hello, I'm attempting to use Zend_Rest_Client to talk to our own in-house REST service which responds with a content-type of application/json, but it seems that Zend_Rest_Client is only compatible with XML responses. Is there a way to support non-XML responses such as JSON? Thanks! -- *H

Re: [fw-general] Re: Detect Mobile use Different View

2011-03-18 Thread Hector Virgen
apping. A front-controller plugin seems the best approach. Have you tried my suggestions? It seems you should be able to write some quick logic in your plugin. In pseudo code: if [Zend_Useragent detects a mobile browser] AND [mobile view script exists] then update view renderer's view script suffi

Re: [fw-general] Re: Detect Mobile use Different View

2011-03-18 Thread Hector Virgen
ew for you: $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); if (null === ($view = $viewRenderer->getView())) { $viewRenderer->initView(); $view = $viewRenderer->getView(); } -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Re: Detect Mobile use Different View

2011-03-18 Thread Hector Virgen
is a little cleaner because it will search through your view scripts paths as if it were actually rendering a view script. Note that $name will need to be in the format "{controller}/{action}.mobile.phtml". -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Re: How can I extend Zend_View_Helper_Navigation_Menu?

2011-03-17 Thread Hector Virgen
ation', > 'Zend_View_Helper_Navigation'); >$view->addHelperPath('Custom/View/Helper', 'Custom_View_Helper'); > You don't need to add helper paths here since they were already added in application.ini and you should now be using a single

Re: [fw-general] How can I extend Zend_View_Helper_Navigation_Menu?

2011-03-16 Thread Hector Virgen
gt; Zend/View/Helper/Navigation Custom_View_Helper => Custom/View/Helper At this point Zend_View should now be able to find your custom "menu" view helper. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Error message on a create form

2011-03-16 Thread Hector Virgen
Please see correction below: -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Wed, Mar 16, 2011 at 9:40 AM, Hector Virgen wrote: > $newsletter->setLabel('Subscribe to Newsletter')*; // <-- remove this > semi-colon* >->setCheckedValue('

Re: [fw-general] Error message on a create form

2011-03-16 Thread Hector Virgen
$newsletter->setLabel('Subscribe to Newsletter')*; // <-- remove this semi-colon* ->setCheckedValue=>('1') Those are easy to miss :) -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Hiding the default controller in modular layout

2011-03-15 Thread Hector Virgen
bably want to put it in a controller plugin's routeShutdown() hook. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Re: Testing ZF models with PHPUnit

2011-03-12 Thread Hector Virgen
n src/tests/phpunit.xml --group models -- Hector Virgen Sent from my Droid X On Mar 12, 2011 11:11 AM, "tonystamp" wrote: > Thanks for the pointers. I prefer the second one too, but was wondering if > that would be best placed in the test bootstrap, or should it placed in > every

Re: [fw-general] Testing ZF models with PHPUnit

2011-03-11 Thread Hector Virgen
onment and benefits from also bootstrapping any resources that your model may need. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Fri, Mar 11, 2011 at 5:45 AM, tonystamp wrote: > Hi, finally managed to get phpunit configured all nice and happy with that, > but i'

Re: [fw-general] Re: Zend_Db_Select with multiple from's

2011-03-09 Thread Hector Virgen
On Wed, Mar 9, 2011 at 4:30 PM, gelform wrote: > i guess I have to use raw sql. What is the resulting SQL you are trying to achieve? Most likely Zend_Db_Select can be used to generate it. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Zend_Db_Select with multiple from's

2011-03-09 Thread Hector Virgen
The join() method will use an INNER JOIN, but if you need a LEFT JOIN use the joinLeft() method. For more info you might want to read up on the documentation: http://framework.zend.com/manual/en/zend.db.select.html -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] mv controller modules/default -- not recognised

2011-03-08 Thread Hector Virgen
In Windows the command is "move". For more information type "move /?" in the command prompt. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Zend guru advise on how to build a secure function - could we make a proposal out of this ?

2011-03-08 Thread Hector Virgen
etc). As for HtmlPurifier, it is bundled with "more code" that is there specifically for security reasons. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Re: Newbie : Message: Invalid controller specified

2011-03-07 Thread Hector Virgen
ocumentation here: http://framework.zend.com/manual/en/zend.application.available-resources.html#zend.application.available-resources.router I hope this helps! -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] how to use json action context?

2011-03-06 Thread Hector Virgen
t()->setParam('format', 'json'); /* ... the rest of your code ... */ } -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Re: Setting a custom route seems to break zend_navigation URLs

2011-03-03 Thread Hector Virgen
"Why is the base/basic/standard route not used when I don't specify one?" I posted a comment about this in the Zend_Navigation documentation, but perhaps it could be made more obvious by specifying this "gotcha" directly in the docs. http://framework.zend.com/

Re: [fw-general] Re: Catching ALL Exceptions

2011-03-03 Thread Hector Virgen
n class, so I'm surprised that an exception thrown within your action controller is not being caught. Are you sure that's where it's being thrown from? Take a look at the stack trace to be sure. And are you sure that the front controller's throwExceptions flag is false (it is false by

Re: [fw-general] Re: Setting a custom route seems to break zend_navigation URLs

2011-03-03 Thread Hector Virgen
In your navigation configuration you need to specify which route to use for each page -- it won't default to the "default" route. Without specifying a route it's like calling the Url view helper and passing in NULL as the route (which ends up using the currently matched route)

Re: [fw-general] Problem accessing view helpers in the default (layout) within modules other than default.

2011-03-01 Thread Hector Virgen
owledgebase/views/helpers" othermodule.resources.view.helperPath.Othermodule_View_Helper = APPLICATION_PATH "/modules/othermodule/views/helpers" -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Mon, Feb 28, 2011 at 4:45 PM, Markizano Draconus wrote: > Hey Aaron, > > > I am having a bit of trouble with

Re: [fw-general] About a way of refreshing MetaDataCache of Zend_Db_Table.

2011-03-01 Thread Hector Virgen
or how to set up the cache id prefix: http://framework.zend.com/manual/en/zend.cache.frontends.html -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Detecting a routing error in a controller plugin

2011-02-18 Thread Hector Virgen
In your error controller, at the end of the errorAction() method, make a call to $this->renderScript() and pass in a relative path to your error script template -- "relative" as in relative to one of your view script paths. I hope this helps! -- *Hector Virgen* Sr. Web D

Re: [fw-general] Re: How can I inlude flashMessenger messages in JSON context

2011-02-11 Thread Hector Virgen
I believe the correct approach is to assign those to $this->layout(), for example: ## views/scripts/index/index.phtml layout()->foo = "Foo!" ?> ## layouts/scripts/layout.phtml layout()->foo ?> -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Re: How can I inlude flashMessenger messages in JSON context

2011-02-11 Thread Hector Virgen
line to your application.ini: resources.view[] = I hope this helps! -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] How can I inlude flashMessenger messages in JSON context

2011-02-11 Thread Hector Virgen
vious request: $this->view->flashMessages = $this->getMessages(); // Get messages stored during current request: $this->view->flashMessages = $this->getCurrentMessages(); Or you can use array_merge() to merge both of them together. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Re: [zf-contributors] Re: [fw-general] Re: [zf-contributors] Discontinuing Maintenance of ZendX JQuery - Suggest drop for 2.0

2011-01-31 Thread Hector Virgen
> Damn. As a high-level userland freeloader I have been loving the convenience > of doing what seems kind of like time travel -- > $this->JQuery()->onLoadCaptureStart() -- in my views. I wonder how you might > hack up something equivalent in ZF 2.0. I use this: jQuery(function($){ // js code

Re: [fw-general] Re: Search for existing value in headMeta

2011-01-27 Thread Hector Virgen
Wed, 26 Feb 1997 08:21:57 GMT" resources.meta.httpEquivs.pragma = "no-cache" resources.meta.httpEquivs.Cache-Control = "no-cache" resources.meta.httpEquivs.Content-Type = "text/html;charset=utf-8" resources.meta.httpEquivs.Content-Language = "en-US" I hope

Re: [fw-general] Re: why Zend_Db_Adapter happened to be much slower than mysql_query

2011-01-27 Thread Hector Virgen
g it takes to build the query and execute the query separately. And also time the commit() call mysql_query() equivalent. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Thu, Jan 27, 2011 at 2:25 AM, Oleg_201080 wrote: > > I don't beleive that using Zend_Db is

Re: [fw-general] Zend_Mail enable/disable

2011-01-04 Thread Hector Virgen
an try creating your own "blackhole" transport if you just want them to disappear forever. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Tue, Jan 4, 2011 at 8:37 AM, Antonio Caccese wrote: > Hi, exist a way to enable/disable email sending, for example in > application.ini? > > Thank you > >

Re: RE: [fw-general] Get full html response in a plugin

2010-12-22 Thread Hector Virgen
You should benchmark your app with and without the plugin. Try benchmarking common pages like the homepage, login, etc. and see for yourself if the performance gains outweigh the minification-on-the-fly cost. -- Hector Virgen Sent from my Droid X On Dec 22, 2010 7:56 PM, "Sergio Rinaudo&qu

Re: [fw-general] Get full html response in a plugin

2010-12-22 Thread Hector Virgen
was detected): if (!$request->isDispatched()) { return; } -- Hector Virgen Sent from my Droid X On Dec 22, 2010 4:53 PM, "Sergio Rinaudo" wrote: > > Hi all, > how to get and set the full html response in a plugin? > > I'm trying to minify the html response bu

Re: [fw-general] How to not enter in the frontController's dispatch loop properly ?

2010-12-20 Thread Hector Virgen
Have you tried calling $request->setDispatched(true) within your plugin? That should prevent the dispatcher from dispatching your action controller. You may also want to disable your layout to prevent it from double rendering. -- Hector Virgen Sent from my Droid X On Dec 20, 2010 7:54 AM, &quo

Re: [fw-general] delete, update params quoting

2010-12-07 Thread Hector Virgen
helps! <http://framework.zend.com/manual/en/zend.db.adapter.html> -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Mon, Dec 6, 2010 at 11:59 AM, Fred Garlov wrote: > Hello, > > is there any reason for not having auto quoting of query parameters > for delete() and

Re: [fw-general] Problems with Zend Test and redirects in controller plugins

2010-12-06 Thread Hector Virgen
If you tell the request that it has already been dispatched, it will skip dispatching the action controller. There are certain times (like when redirecting) that you'll want to skip dispatching. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Mon, Dec 6, 2010 at 4:

Re: [fw-general] Problems with Zend Test and redirects in controller plugins

2010-12-06 Thread Hector Virgen
I didn't realize this was from within a plugin. Which hook are you in? Did you try calling $request->isDispatched(true)? -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Mon, Dec 6, 2010 at 4:18 PM, Fernando Marcelo < cont...@fernandomarcelo.com> wrote: > Tha

Re: [fw-general] Problems with Zend Test and redirects in controller plugins

2010-12-06 Thread Hector Virgen
You need to return the redirector for unit tests: return $redirector->gotoSimple(/*...*/); -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Mon, Dec 6, 2010 at 3:00 PM, Fernando Morgenstern < cont...@fernandomarcelo.com> wrote: > Hi, > > I'm having som

Re: [fw-general] headlink append seems to prepend

2010-12-06 Thread Hector Virgen
x27;] End result should be loader.css followed by homepage.css. I'm not sure why the OP is getting different results. More detail on the code snippet might be useful. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] singleton models

2010-11-29 Thread Hector Virgen
ever objects will need it. I hope this helps :) -- Hector Virgen Sent from my Droid X On Nov 29, 2010 6:28 AM, "Serkan Temizel" wrote: > Do you think is it a good idea making models singleton? > > On my project I need *users *model object many times. I call it in the > contr

Re: [fw-general] Re: problem with autoloading class definition for serialization and deserialization

2010-11-29 Thread Hector Virgen
David, do you think implementing the SPL's Serializable interface can help with concern #3? -- Hector Virgen Sent from my Droid X On Nov 29, 2010 5:10 AM, "David Muir" > wrote: > > Throwing it on a slight tangent, but maybe storing the objects in the session > isn

Re: [fw-general] problem with autoloading class definition for serialization and deserialization

2010-11-28 Thread Hector Virgen
amespace or manually require_once() the file. You can also try bootstrapping the "modules" resource if that is what sets up your module autoloader for the shop module. I how this helps! -- Hector Virgen Sent from my Droid X On Nov 28, 2010 10:32 AM, "Bram Gadeyne" wrot

Re: [fw-general] problem with autoloading class definition for serialization and deserialization

2010-11-28 Thread Hector Virgen
Can you use pastebin.com or pastie.org instead? Thanks! -- Hector Virgen Sent from my Droid X On Nov 28, 2010 10:01 AM, "Bram Gadeyne" wrote: > Thank you for your answer! > > However, I think I already do what you propose here. Here's the first > method from my boo

Re: [fw-general] problem with autoloading class definition for serialization and deserialization

2010-11-28 Thread Hector Virgen
Is the module autoloader set up before the session is started? If you are using protected _init* methods in your bootstrap, make sure the autoloader method is above the session one, or call $this->bootstrap('autoloader') within your _initSession method. -- Hector Virgen Sent from

Re: [fw-general] Meta tags rendering and indentation issues

2010-11-28 Thread Hector Virgen
Are you using the doctype view helper? That's what all the other view helpers will reference when generating their html. -- Hector Virgen Sent from my Droid X On Nov 28, 2010 4:54 AM, "navanitachora" wrote: > > Dear Folks, > > I have a problem with meta tags being re

Re: [fw-general] Error controller query

2010-11-25 Thread Hector Virgen
The code in the first var_dump is the exception code, which defaults to zero. I don't think ZF uses exception codes but I could be wrong. On the second var_dump(), that's a response object which was updated to respond with a 404. I hope this helps! -- Hector Virgen Sent from my Droi

Re: [fw-general] Basic unit testing of error controller

2010-11-24 Thread Hector Virgen
'll see that it defaults to a 500 error code even if no exception was thrown. There is nothing in the error controller that causes an exception to be thrown if a bad parameter is passed -- you'll need to implement this logic yourself. I hope this helps! -- *Hector Virgen* Sr. Web Developer

Re: [fw-general] Re: Zend_Loader::isReadable: need to get the path tested

2010-11-24 Thread Hector Virgen
ample. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Wed, Nov 24, 2010 at 7:50 AM, benoit wrote: > > Ok, i choose the solution with de file_get_contents, didn't know that it > use > include_path with its second parameter to true. > > But I think it coul

Re: [fw-general] Re: ZF models and Zend_Db classes

2010-11-18 Thread Hector Virgen
o.php You don't have to follow this convention but this is how it would work "out of the box". I hope this helps! -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Thu, Nov 18, 2010 at 1:31 PM, Fozzyuw wrote: > > Hi Bill, > > First, thank you ver

[fw-general] Re: Zend_Form and Custom Error Messages

2010-11-10 Thread Hector Virgen
ust be that I am not using Zend_Form correctly. Has anyone run into this problem before? -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Wed, Nov 10, 2010 at 1:53 PM, Hector Virgen wrote: > Hello, > > What is the most straight-forward way to mark an element as invalid

[fw-general] Zend_Form and Custom Error Messages

2010-11-10 Thread Hector Virgen
s this typically how it should be done? Or am I missing something? Thanks! -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

Re: [fw-general] Accessing config from CLI crons

2010-11-05 Thread Hector Virgen
Either way works, but I like your version because I personally believe singletons are evil :) Just don't forget to bootstrap the front controller before accessing the resource, otherwise it will return null. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Fri, Nov 5, 20

Re: [fw-general] Accessing config from CLI crons

2010-11-05 Thread Hector Virgen
I believe that param is added when the application is run(). Since you're not calling run(), you'll need to add that param manually: $bootstrap = $application->getBootstrap(); Zend_Controller_Front::getInstance()->setParam('bootstrap', $bootstrap); -- Hector Virgen Sen

Re: [fw-general] MVC design question

2010-10-29 Thread Hector Virgen
You can probably place that common code in your preDispatch() hook: if ($article = $this->_request->getParam('article')) { // Load article and assign to view } -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Fri, Oct 29, 2010 at 3:32 PM, debussy007

Re: [fw-general] Dinamicly created Menu question

2010-10-29 Thread Hector Virgen
You might want to take a look at existing open-source CMSs built on ZF. Recite CMS looks promising: http://www.recitecms.com/ <http://www.recitecms.com/>There are more here: http://framework.zend.com/wiki/pages/viewpage.action?pageId=14134 -- *Hector Virgen* Sr. Web Develope

Re: [fw-general] Securing database username/password

2010-10-26 Thread Hector Virgen
I would extend the built-in resource plugin so that it accepts a "configPath" option that points to an external config file. Once the external config is loaded, you can call parent::init() and continue on like normal. -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts O

Re: [fw-general] Preventing XSS : Zend_Filter_Tags is enough?

2010-10-25 Thread Hector Virgen
concerned about performance. Might want to benchmark it though. -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com On Mon, Oct 25, 2010 at 12:39 PM, robert mena wrote: > Hi Hector, > > In my case I'd like to have control over this. In mo

Re: [fw-general] Preventing XSS : Zend_Filter_Tags is enough?

2010-10-25 Thread Hector Virgen
the actual HTML instead of it being stripped or rendered. If you're only concerned about XSS then escaping should be fine -- as long as you remember to escape it whenever it can be evaluated by a parser. -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virge

Re: [fw-general] Zend_Form - Unable to translate error messages post-validation

2010-10-25 Thread Hector Virgen
Thanks for the clarification, Thomas. I'll be sure to add translations prior to validating. -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com

Re: [fw-general] Preventing XSS : Zend_Filter_Tags is enough?

2010-10-25 Thread Hector Virgen
If HTML is not allowed, it's better to escape the value instead of strip out content that resembles HTML. -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com On Mon, Oct 25, 2010 at 9:29 AM, robert mena wrote: > Hi, > > I'd

[fw-general] Zend_Form - Unable to translate error messages post-validation

2010-10-22 Thread Hector Virgen
27;t appear to be a way to directly modify the error messages. I ended up using ReflectionObject to manually modify Zend_Form_Element's protected $_messages array -- but this seems very hackish to me. Is there a better way? -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com

Re: [fw-general] Re: Generating URL's - View Helper? Action Helper?

2010-10-20 Thread Hector Virgen
Good catch, but if you reset the parameters, you'll lose the ones that weren't explicitly passed in. Maybe the answer is to extend the router so you can customize its assemble method? -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com

Re: [fw-general] Re: Generating URL's - View Helper? Action Helper?

2010-10-20 Thread Hector Virgen
y('derp' => 'doo', 'foo' => 'bar')); // /index/index/derp/doo/foo/bar So in theory a ksort should work. -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com On Wed, Oct 20, 2010 at 11:54 AM, Hector

Re: [fw-general] Re: Generating URL's - View Helper? Action Helper?

2010-10-20 Thread Hector Virgen
code, but if it doesn't work that way I'd be surprised. -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com On Wed, Oct 20, 2010 at 11:48 AM, Fozzyuw wrote: > > Hi Hector, > > Thanks for the tip about helpers. > > One item of n

Re: [fw-general] Re: Generating URL's - View Helper? Action Helper?

2010-10-20 Thread Hector Virgen
() and pass in "true" as the fifth parameter. I hope this helps! -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com On Wed, Oct 20, 2010 at 9:11 AM, Fozzyuw wrote: > > As a follow up to myself, > > I've found t

Re: [fw-general] Re: Date Subtractions Differences

2010-10-18 Thread Hector Virgen
ounced, maybe with a bright background color or larger font. Or maybe it could be marked "important" instead of "note". -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com On Sun, Oct 17, 2010 at 8:16 PM, David Muir > wrote: &

Re: [fw-general] Image CAPTCHA creates huge files

2010-10-18 Thread Hector Virgen
It seems the default image format is PNG and I couldn't find a way to change it (perhaps JPG might have better compression). Have you tried decreasing the height/width? 900KB seems rather large even for a PNG. -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online

Re: [fw-general] Letter case problem in Zend_Http_Response

2010-10-14 Thread Hector Virgen
As brought up by Artem, it's case-insensitive so it shouldn't matter as long as browsers are following the spec. -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com On Thu, Oct 14, 2010 at 9:47 AM, Ryan Chan wrote: > Hi, >

Re: [fw-general] Re: Firefox - double request

2010-10-12 Thread Hector Virgen
Have you checked your HTML for broken links? Although the HTML may validate, a or tag with an empty source (href, src, etc.) will resolve to the current page and can cause a double request. Also check your CSS -- a background image URL or @import directive may be broken. -- *Hector Virgen* Sr

Re: [fw-general] Re: Zend_Validate_Date returns false for dates between: 28/10/2038 and 19/03/2042

2010-10-08 Thread Hector Virgen
echo PHP_EOL; echo $v->isValid('2038-10-29') ? 'valid' : 'no'; echo PHP_EOL; And output: valid valid If you can isolate the issue into a small reproducible script it should be easier to find the problem. -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resort

Re: [fw-general] Re: Zend_Validate_Date returns false for dates between: 28/10/2038 and 19/03/2042

2010-10-08 Thread Hector Virgen
That's only 28 years into the future. I think it's perfectly valid to worry about those dates not working -- consider, for example, a mortgage company that signs 30-year loans. I'm sure they'd want to show the expected maturity date for a mortgage signed today. -- *He

Re: [fw-general] Re: Select object behaviour

2010-10-05 Thread Hector Virgen
eveloper's intentions as much as possible. -- Hector Virgen Sent from my Droid X

Re: [fw-general] Re: Select object behaviour

2010-10-05 Thread Hector Virgen
So zero equals infinity? Interesting... But with ZF being object-oriented, I think we can expect more intuitive behavior. -- Hector Virgen Sent from my Droid X On Oct 5, 2010 4:56 AM, "David Muir" > wrote:

Re: [fw-general] Select object behaviour

2010-10-04 Thread Hector Virgen
I agree; iterating over a "limit 0" result set should result in no more than 0 iterations. Have you filed a bug report? -- Hector Virgen Sent from my Droid X On Oct 4, 2010 2:17 AM, "Daniel Latter" wrote: > what i meant was if you do happen to pass a zero to the limit

Re: [fw-general] Specifying a Database Adapter and Zend_Application_Resource_Multidb

2010-10-02 Thread Hector Virgen
t extend a base class, and have that model instantiate the table(s) it needs. The model can then inject the correct db instance if necessary. -- Hector Virgen Sent from my Droid X On Oct 2, 2010 10:12 AM, "EvilThug" wrote:

Re: [fw-general] Select object behaviour

2010-10-02 Thread Hector Virgen
Regardless of how it actually works, I would expect limit null or limit false to remove the limit portion if the query, while limit 0 would do an actual limit 0. Having it do a limit 2.1 bajillion is just strange and unexpected behavior. Just my 2c. -- Hector Virgen Sent from my Droid X On Oct 2

Re: [fw-general] Select object behaviour

2010-10-02 Thread Hector Virgen
So limit 0 (or limit null, or limit false) would remove the limit portion if the query? -- Hector Virgen Sent from my Droid X On Oct 2, 2010 5:21 PM, "Daniel Latter" wrote: > or just throw away the limit part altogether? > > Daniel > > On 3 October 2010 01:17, Hector Vi

Re: [fw-general] Select object behaviour

2010-10-02 Thread Hector Virgen
Limit 0 us definitely an incorrect usage, so maybe an exception should be thrown? -- Hector Virgen Sent from my Droid X On Oct 2, 2010 5:15 PM, "Daniel Latter" wrote: > Hi, > > I know what your saying but my point is that, is this intended behaviour to > return a num

  1   2   3   4   5   >