zend-framework

Unable to create actions different from index

When I create a view different from index action (for example the action video/add) the page is without css and layout. For index action is everything ok. Any helps? ...

AJAX signout with Zend Framework and jQuery

When a logged user click the signout link I'd like to call the logout action without refresh the page or redirect. Any helps? Thanks! ...

Zend_Search_Lucene search in array

Is there a way to store an array as a document field and then query that array? I've got a collection of items, which are tagged. I'd like to be able to search all items that match for example tags 55 and 67. How would I achieve this? ...

Unit testing Zend controllers with mock models and services

I've read a lot of Zend controller testing tutorials but I can't find one that explains how to test a controller that uses models and mocking those models. I have the following controller action:- function indexAction(){ // Get the cache used by the application $cache = $this->getCache(); // Get the index service client and mod...

Add an attribute to HTML Purifier filter?

I'm trying to allow rel attribute in a elements within HTML Purifier filter. I'm following this guide http://htmlpurifier.org/docs/enduser-customize.html and here is my code: $config = HTMLPurifier_Config::createDefault(); $config->set('HTML.Doctype', 'XHTML 1.0 Strict'); $config->set('HTM...

Zend Framework / MVC: What type of objects to push to the View?

Hey guys - here's a question on Zend Framework or better on MVC in general: I am asking myself for a quiet a long time now, if it is a good idea to push business objects (User, Team, etc.) to my views or if it would be better just to push dump data containers such as arrays to the view for rendering. When pushing business objects to m...

jquery autocomplete and datepicker compatability issue?

Hi, I have a form that is constructed using ZendX_JQuery_Form, the form contains 2 auto complete inputs and 4 datepickers. The datepickers all worked absolutely fine until I added in the autocomplete fields as well, the autocomplete fields (linking to a backend php action in zend framework) work fine as well but they seem to break the d...

Subdomain Routing Rules (using chaining) Broke after upgrading to Zend Framework 1.9.5, but only for the subdomain itself, not for pages in the subdomain

I asked a similar question months ago (see How do I write Routing Chains for a Subdomain in Zend Framework in a routing INI file?), on how to write chaining rules in an app.ini format. The answer to this question worked wonderfully! Now, however, I have upgraded to the latest version of the Zend Framework 1.9.5 (I needed to upgrade for a...

Magento checkout

Is it possible to redirect the browser to nth step in the onepage checkout? If so, how would one go about doing it? I'm working on a payment module and have a sort of "cancel" action that i would like to return the user to the step in checkout where you choose the payment method. I currently return the user to the first step of the che...

jQuery/Ajax with Zend Framework

I've been tinkering around with Zend-Framework and Jquery for a month or so, and finally started tinkering with them together using ZendX_JQuery. It seems I've ran into something that at first seemed it should be simple, So maybe I'm just missing something here. I have a view along the lines of: $this->ajaxLink( $this->escape($var->...

Zend_Db_Table subquery

Hi, I have a some SQL that I want to use with ZendFW, but I can't get it working and it's driving me crazy. I get the correct result with this query: SELECT DISTINCT e.festival_id FROM entries AS e, mail_log as m WHERE e.status = 1 AND e.festival_id NOT IN (SELECT m.entry_id FROM entries AS e, mail_log as m WHERE m.entry_id = e.festi...

Automatic quoting MySQL queries doubts in Zend Framework

I've got few doubts regarding quoting mysql queries in Zend framework. Though this question has helped me a bit but few things are still confusing: 1) $table is Zend_Db_Table. Trying to fetch a row from the table. $where[] = $db->quoteInto('id = ?', $id); $where[] = $db->quoteInto('user_id = ?', $user_id); $row = $table->fetchRow($wher...

AS3 - pass multiple parameters to php using the Zend framework

In AS3 I can retrieve data via Zend just fine using this: nc.call("Service.addNewService", responder); But I'm having trouble when I want to ADD data to the database. To do so I need to pass in parameters to the php class. I can't find any documentation on how to pass multiple parameters. var params = new Array("one", "two", "etc"); ...

Zend Framework: Authentication, MySQL errors when switching from SQLite

I'm switching my app from using SQLite to MySQL. It works with SQLite and it's not working now that I've changed it to use MySQL. Here's the error message I'm getting: Message: SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using old authentication What does this mean? Note: I'm running this locally running Snow Leopard,...

Zend Framework: How can I tap into the final view output before it's sent to the browser?

Hi there, I'm trying to access the final xhtml output right before it's sent to the browser as a string. The postDispatch() methods of the actions and plugins seem to be too early to do this. When I step through Zend_Controller_Front::dispatch() method using a debugger, I can access the desired output as a string right before $this->_re...

Getting started with a project using Zend Framework

Ok, I've got Zend all set up and my hello world pages working. Personally, I'd rather code this from scratch, but I'm trying to find out how to use Zend to save time when making similar projects over and over again. I want to: Admin: Create multiple admin accounts Have database-stored admin options that will be available on all php ...

Zend Framework: How to create controller in WINXP on command line

I am using zend framework with windows XP and WAMP server. I have created zend project using following DOS commands: SET PATH=%PATH%;C:\wamp\bin\php\php5.3.0 C:\>wamp\www> C:\wamp\www\ZendFramework\bin\zf.bat create project test and my project is created at: C:\wamp\www\test Now I have two questions. Q.1: In which folder I wil...

Zend_framework - relative paths of images

When i am developing a web application on Zend_framework (php) i have to include images (css files, js files, etc). The solution for inclusion was to specify the absolute paths each time i needed an image (i was storing in "global like" parameter with my host and concatenated it with the relative path of the image on the host). As i un...

Zend Framework, routing problem with IE8

I have a strange problem.The routing of my zend framework site is ok with Mozilla, Chrome, Safari, but isn't with Explorer. For example: in Mozilla this helper linkTo(null,'nameController');?> generate a link to localhost/siteName/nameController/indexAction and it is ok. But with Explorer the same helper generate a link to: localhost/nam...

What is the "right" Way to Provide a Zend Application With a Database Handler

Assuming you're hewing closely to the conventions of a ZendApplication, where should you be setting up a database handler for application developers to access? I know how to setup a ZendDb adapter. What I want to know is, in the context of the Zend Framework, how should developers be instantiating their DB handlers so they don't have t...