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

2012-01-25 Thread Hector Virgen
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
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 Google+ https://plus.google.com

Re: [fw-general] Naming controllers

2011-08-15 Thread Hector Virgen
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] Re: Views error 404 in XP using Zend Server + apache

2011-08-15 Thread Hector Virgen
will 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] Best practice with routes management using separate .ini

2011-08-15 Thread Hector Virgen
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 kaiohken1...@hotmail.comwrote: Hi all, in my ZF project I have lots of different routes that now are defined within

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

2011-07-07 Thread Hector Virgen
$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 whis...@maktoob.com wrote: Hi, try { $opts = new Zend_Console_Getopt(array( 'id=i' = 'id option

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] 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] 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] Module Bootstrap

2011-05-05 Thread Hector Virgen
: 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 Developer http://www.virgentech.com On Thu, May 5, 2011 at 4:35 AM, Simon

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] 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 at 10:15 AM, ratclot rat_c

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 rat_c...@hotmail.com wrote: the same error: Fatal error: Class 'Plugin_Layout' not found

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. Web

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 ctoo...@gmail.com wrote: Hi, my team and I are new to ZF and have

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] 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* Sr. Web

Re: [fw-general] after submit form event

2011-03-28 Thread Hector Virgen
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 l...@eduardocury.net 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

[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! -- *Hector

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

2011-03-22 Thread Hector Virgen
) 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

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

2011-03-18 Thread Hector Virgen
= 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
-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 suffix -- *Hector Virgen

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

2011-03-17 Thread Hector Virgen
. If you decide to keep this code in _initSettings instead of using application.ini, move these lines towards the top of this method (before calling $view-navigation()). $view-doctype('HTML5'); } -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com

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] 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 djvir...@gmail.com wrote: $newsletter-setLabel('Subscribe to Newsletter')*; // -- remove this semi-colon* -setCheckedValue('1') *-- remove

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

2011-03-16 Thread Hector Virgen
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] Hiding the default controller in modular layout

2011-03-15 Thread Hector Virgen
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
/tests/phpunit.xml --group models -- Hector Virgen Sent from my Droid X On Mar 12, 2011 11:11 AM, tonystamp tonyst...@hotmail.co.uk 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
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 tonyst...@hotmail.co.uk wrote: Hi, finally managed to get phpunit configured all nice and happy with that, but i'm

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

2011-03-09 Thread Hector Virgen
() 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] Re: Zend_Db_Select with multiple from's

2011-03-09 Thread Hector Virgen
On Wed, Mar 9, 2011 at 4:30 PM, gelform co...@gelform.com 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 guru advise on how to build a secure function - could we make a proposal out of this ?

2011-03-08 Thread Hector Virgen
, escaping mechanisms, 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] 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] Re: Newbie : Message: Invalid controller specified

2011-03-07 Thread Hector Virgen
/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
', '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
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). -- *Hector Virgen

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

2011-03-03 Thread Hector Virgen
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 default)? -- *Hector Virgen* Sr. Web Developer http

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

2011-03-03 Thread Hector Virgen
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/manual/en/zend.navigation.pages.html -- *Hector Virgen* Sr. Web Developer http

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

2011-03-01 Thread Hector Virgen
the docs for 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] Problem accessing view helpers in the default (layout) within modules other than default.

2011-03-01 Thread Hector Virgen
= 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 asthral...@gmail.comwrote: Hey Aaron, I am having a bit of trouble with a view helper. I call a view helper in my

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 Developer http

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

2011-02-11 Thread Hector Virgen
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: How can I inlude flashMessenger messages in JSON context

2011-02-11 Thread Hector Virgen
hope this helps! -- *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
I believe the correct approach is to assign those to $this-layout(), for example: ## views/scripts/index/index.phtml ?php $this-layout()-foo = Foo! ? ## layouts/scripts/layout.phtml ?php echo $this-layout()-foo ? -- *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 goes

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

2011-01-27 Thread Hector Virgen
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 opp20071...@gmail.com wrote: I don't beleive that using Zend_Db

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

2011-01-27 Thread Hector Virgen
= 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 this helps! -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Thu, Jan 27, 2011 at 3:12 PM

Re: [fw-general] Zend_Mail enable/disable

2011-01-04 Thread Hector Virgen
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 i...@antoniocaccese.itwrote: Hi, exist a way to enable/disable email sending, for example in application.ini? Thank

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

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

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 kaiohken1

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, benoit

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

2010-12-07 Thread Hector Virgen
/zend.db.adapter.html -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Mon, Dec 6, 2010 at 11:59 AM, Fred Garlov fredgarlo...@googlemail.comwrote: Hello, is there any reason for not having auto quoting of query parameters for delete() and update() methods? $this-update($data, $this-getAdapter

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

2010-12-06 Thread Hector Virgen
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] 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 some issues with Zend Test

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: Thanks for the reply

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:32 PM

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 davidkmuir+z...@gmail.comdavidkmuir%2bz...@gmail.com wrote: Throwing it on a slight tangent, but maybe storing the objects

Re: [fw-general] singleton models

2010-11-29 Thread Hector Virgen
it. I hope this helps :) -- Hector Virgen Sent from my Droid X On Nov 29, 2010 6:28 AM, Serkan Temizel serkantemi...@gmail.com 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 controller, in some plugins

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 navanitach...@gmail.com wrote: Dear Folks, I have a problem with meta tags being rendered

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 my Droid X On Nov

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 gadeyneb...@gmail.com wrote: Thank you for your answer! However, I think I already do what you propose here. Here's the first method from my bootstrap file

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

2010-11-28 Thread Hector Virgen
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 gadeyneb...@gmail.com wrote: Offcourse! Here's

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 Droid X On Nov

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

2010-11-24 Thread Hector Virgen
. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Wed, Nov 24, 2010 at 7:50 AM, benoit benoit.delpo...@gmail.com 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 could

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

2010-11-24 Thread Hector Virgen
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 http://www.virgentech.com

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

2010-11-18 Thread Hector Virgen
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 jmbertu...@gmail.com wrote: Hi Bill, First, thank you very much for your response as well as your contributions

[fw-general] Zend_Form and Custom Error Messages

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

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

2010-11-10 Thread Hector Virgen
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 djvir...@gmail.com wrote: Hello, What is the most straight-forward way to mark an element as invalid and display

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 Sent from my Droid X On Nov 4

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, 2010

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 Developer http

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 debussy...@gmail.com

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 Online http

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 robert.m...@gmail.com wrote: Hi, I'd

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
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

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

2010-10-22 Thread Hector Virgen
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
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 jmbertu...@gmail.com wrote: As a follow up to myself, I've found that the View Helper Url() works pretty well, with one

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

2010-10-20 Thread Hector Virgen
Named parameters (such as module, controller and action in the default route) should not be affected by the ksort, but anything that is handled by * should (in your case, the name1 and name2 keys). Again, I didn't test the code, but if it doesn't work that way I'd be surprised. -- *Hector Virgen

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

2010-10-20 Thread Hector Virgen
/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 Virgen djvir...@gmail.com wrote: Named parameters (such as module, controller and action in the default

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 On Wed

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 http

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

2010-10-18 Thread Hector Virgen
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 davidkmuir+z...@gmail.comdavidkmuir%2bz...@gmail.com wrote

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 ryanchan...@gmail.com 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 link or img 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

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. -- *Hector Virgen* Sr. Web

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
' : '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 Resorts Online http://www.virgentech.com On Fri, Oct 8, 2010 at 3:01 PM, Daniel

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 davidkmuir+z...@gmail.comdavidkmuir%2bz...@gmail.com wrote:

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

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

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 dan.lat...@gmail.com wrote: what i meant was if you do happen to pass a zero to the limit method

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 dan.lat...@gmail.com wrote: Hi, I know what your saying but my point is that, is this intended behaviour to return a number so large

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 dan.lat...@gmail.com wrote: or just throw away the limit part altogether? Daniel On 3 October 2010 01:17, Hector Virgen djvir

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] Specifying a Database Adapter and Zend_Application_Resource_Multidb

2010-10-02 Thread Hector Virgen
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 evilt...@tr-kdl.com wrote:

Re: [fw-general] How to run an application installer?

2010-09-30 Thread Hector Virgen
. '/configs/application.ini'); $bootstrap = $application-getBootstrap(); $bootstrap-bootstrap('frontcontroller'); $bootstrap-bootstrap('view'); $bootstrap-bootstrap('router'); $application-run(); -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com

Re: [fw-general] includes are slow - wrong set_include_path ?

2010-09-30 Thread Hector Virgen
script. Therefore it's a good idea to keep the number of paths down to a minimum if possible. -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com On Thu, Sep 30, 2010 at 11:06 AM, debussy007 debussy...@gmail.com wrote: Hi, I profiled my

Re: [fw-general] Zend_Cache and dynamic backend location ?

2010-09-23 Thread Hector Virgen
cache for the task at hand and not deal with specifying directories all the time. -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com On Thu, Sep 23, 2010 at 1:17 PM, debussy007 debussy...@gmail.com wrote: Hi, I want to store the cache files

Re: [fw-general] Zend_Auth storing special characters

2010-09-16 Thread Hector Virgen
Which auth storage adapter are you using? If you're storing in the session, are you using a custom session storage adapter or file-based? -- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com On Thu, Sep 16, 2010 at 7:30 AM, Bradley Holt bradley.h

  1   2   3   4   5   >