zend-framework

How can I extend Zend_Controller_Action to make a function universal in all controllers

I want to extend Zend_Controller_Action so I can have messaging be universal. Right now in the preDispatch() I am setting all the error and warning messages. How can I make the AddMessage (see code) and preDispatch functions be universal throughout all controllers? <?php class PlaygroundController extends Zend_Controller_Action { pub...

Zend Avoid submit button value in GET parameters in url

Hi, I have a form, created with Zend_Form, with method = GET used for searching records with elements as below: [form] user name [input type="text" name="uname"] [input type="submit" value="Search" name="search"] [/form] After form is submitted all the GET parameters along with submit button value are appearing in the url. http://my...

Best way to send an email to a dynamic group of addresses with Outlook

I am developing an intranet application in PHP with the Zend Framework. One of the features the client would like to have is the ability to click a link and have Outlook open a new message window addressed to everyone in a specific group. So far I have been using a mailto link and comma separating the addresses, but this doesn't work i...

how can I download a file with Zend_Http_Client or other library

I am trying to find a solution to get directly the file like wget does instead of reading from the stream and writing to another file, but I am not sure if this is possible. Any suggestions? ...

What are the best practices to generate "widgetized" content in Rails

On my previous projects built with usage of Zend Framework I extensively used Zend_view's "Action View" helper. It basically allows to initiate a separate cycle of request->dispatch ti action->view_rendering from a view script. Here is the link to an appropriate page of zend framework reference guide (search for "Action View Helper"). ...

Zend_Form password confirmation with .ini config - Can it be done?

I set out writing a ZF (v1.10.3) application and chose to use Zend_Config_Ini to generate my Zend_Form objects. This was all well and good until I had to test for identical password inputs. This is the part that's misbehaving right now: elements.password.type = password elements.password2.type = password elements.password2.options.va...

Zend Framework slow connect to Mysql

Using Zend_Db_Profiler_Firebug and FirePHP to profile our code, all other queries after the connect is fast, but it seems to take forever for Zend Framework to establish a connection to mysql, I've googled the problem and others suggest using table metadata cache which I did, but the problem still persists. ZendDbTableAbstract::setDefau...

Zend Form File, How to indicate to the user that a file was previously uploaded?

Hello, I have a zend form that lets the user fill out attributes of an object. For example, a music artist. The form has basic information about the artist, things like name, phone number, address, and what not, but it also has a file upload field. If the user uploads a file, its stored with this instance of the object in the database ...

Zend Framework: How to make view from bootstrap.php

For example i have echo $this->escape($this->test); in index.phtml and in controller $this->view->test = 'test message';, but i want to do this from bootstrap, becouse i want to show Form in every page (controller). ...

Zend Framework Admin Module structure

I am creating a large web application with Zend Framework 1.10. A am new in Zend Framework(1 month experiance). Can you explain me how to create a admin module in the best way?(with own authentication). How to make this with good security? Thanks a lot. ...

Zend Framework: Data streaming

My understanding is that Zend HTTP Client is the best way to send (possibly) large files to the user; can any confirm this and show me an example? Or a better solution. ...

Zend_Mail sent email is treated as SPAM

Please tell me what I am doing wrong. I am sending an email using the Zend_Mail class like this: $message = <<<STR You have a new invoice! Sign in to your clientarea to see it. Best regards, Company name STR; $mail = new Zend_Mail(); $mail->setBodyText($message); $mail->setFrom('[email protected]', 'Company.com'); $mail->addTo('cl...

Zend Plugin works only in one module

I have created a plugin, that ckecks authorization status and gives access for using application. This plugin works fine, but in whole project. I want to make it works only in admin module. How can I do this? I have defined plugin in application.ini: resources.frontController.plugins.authcheck = Application_Plugin_AuthCheck Thanks for...

Autoloading of class in MVC Zend Framework doesnt work

Hello, I finished my first web application in MVC zend framework and everything works great on my localhost. So I upload it on server and there is problem with autoloading my class. I get error message when i wanna create object from my class in indexcontroller: $this->view->bottomCache = new Application_Model_Cache($this->cacheTime,...

why is my route defined in a .ini file not working?

In my Bootstrap.php I have the following code which defines a route: $router = Zend_Controller_Front::getInstance()->getRouter(); $router->addRoute('pageDetails', new Zend_Controller_Router_Route('page-details/:uid/:title', array( 'module' => 'default', 'controller' => 'list', 'action' =...

A CMS on 2 DIFFERENT frameworks?

I'm not sure if this is possible, but let's say you want to build a CMS, but you're torn between 2 frameworks because each has some features that you like. Is it possible to create the CMS with both framewoks? Does this approach have merits or pitfalls? ...

Zend Framework URL rewire problem zend_route

Hello, I am using zend framework in my one of the project. I want to redirect a link www.example.com/xyz to www.example.com/pqr/lmn so I have added following link in index.php file $router = $frontController->getRouter(); $router->addRoute('newroutnae',new Zend_Controller_Router_Route_Static('/xyz/',array('controller' => 'pqr','actio...

Inserting dates to Oracle database through Zend_Db

Hello, I am trying to add an entry to an Oracle table which has a date field. So far, I've only been able to do it like this: $createdDate = $entry->createdDate->toString('yyyy-MM-dd'); $data = array( 'ID' => $entry->id, 'STATE' => $entry->state, 'CREATED_DATE' => new Zend_Db_Expr("to_date('$createdDate', 'YYYY-MM-D...

Zend_Forms Errors Decorator - remove html tags

Error decorator input errors such way: <ul class="error"> <li>Error message</li> </ul> How can i remove this tags and leave only error message text? ...

Granting user access

We're developing a web app using the Zend framework and Mysql. Currently, accounts are unique by email address. We want to be able to allow the admin of an account to grant access to the admin of another account. This person would then be a "user" of the linked account. The account holder would then log into their admin account and then...