News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen's Blog:
A form in your layout
October 11, 2010 @ 12:11:07

If you've ever wanted to have a form that stuck with every page of your Zend Framework application, Rob Allen might just have your solution in his latest blog post.

I recently received an email asking for my advice about how to handle a form that appears on every page. I want to add a newsletter sign up box to layout.phtml so it will appear on every page. The layout->content() comes from several different action controllers... So how do I handle the newsletter sign up? I thought that the answer is long-winded enough to be worth writing a blog post about. One way to do this is to use a action helper, so let's build a simple application to show this solution.

He walks you through the creation of the simplest part first - the form that will live inside of the view helper. He chose a signup type of form with a username, email and submit button. He helps you create an action helper and the view helpers to help inject the form into the layout of each page. Then, with a simple call to "$this->signupForm()" you can drop it in anywhere in the layout.

0 comments voice your opinion now!
form layout zendframework tutorial viewhelper actionhelper


Raphael Stolt's Blog:
Turning a Zend_Log log file into a RSS feed
June 26, 2007 @ 08:33:00

In a new post to his blog today, Raphael Stolt shows how to take the output from the Zend_Log component of the Zend Framework and, with a bit of custom coding, make it output an RSS feed.

Whilst touring the web I found an interesting project for turning Apache Web Server log files into RSS feeds. This approach can be adjusted to monitor the maintenance needs of a web application deployed on an assumed productive system. Therefor a XML capable Zend_Log instance will be set up and the resulting log file will be transformed into a RSS feed via a custom Action Helper wrapping a XSLT transfomation.

He sets up the XML logger first, using the Zend_Log, Zend_Log_Writer_Stream and Zend_Log_Formatter_Xml to create the XML output from the logging. Then, with the help of the custom helper - Recordshelf_Controller_Action_Helper_Xslt - he reformats the XML output into an RSS feed ready for public consumption. (There's even a screenshot of what it might look like in a feed reader).

0 comments voice your opinion now!
zendlog rss feed xml logger actionhelper xslt zendlog rss feed xml logger actionhelper xslt



Community Events





Don't see your event here?
Let us know!


language framework release voicesoftheelephpant install composer update opinion library package series security laravel podcast community version symfony introduction tool interview

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework