Release 1.1 was meant to have a few more features, namely Google Drive support. However implementing all the basic functionality of the Google Drive protocol into a file browser backend was taking quite some time. So rather than hold up 1.1 with a feature that not many people will probably use, I have bumped the Google Drive support back to 1.3 (for now).
This new release comes with a few new features that I’m quite proud of. These are:
- jqWidgets integration using PHP wrapper classes.
- Custom error controllers (finally!)
- PHP-Tidy output support
jqWidgets
jqWidgets has been integrated using PHP wrapper classes that can be used via the ‘widget’ view helper which makes adding widgets to your views a very simple process. You can also use the classes directly if required. As an example, using the view helper you can add a calendar with two simple steps:
- Add the helper to your view
- Create and display a calendar widget
Here’s how. Add the helper in your controller:
protected function init(){
$this->view->addHelper('widget');
}
Then just use the helper to display a widget from your view file:
widget->calendar('myCal')->width(300)->height(250);
That’s it! There’s heaps more examples and documentation in the View Widgets sections of the documentation. Some widgets have a bare minimum of documentations (basically just an example of their usage) but some have more and more documentation is on the way.
Custom Error Controllers
It’s now possible to define a custom error controller. This will override the built-in error controller, allowing you to handle your own errors and display them using your own views and stylesheets. Doing this allows you to better integrate your error display with your application or website, instead of leaving your with the standard blue/red Hazaar error screen. (on a side note, the error screen styles will be updated soon). See the Error Controllers documentation for more information.
PHP-Tidy Support
PHP-Tidy support has been added so you can make your source HTML output pretty during development so that it is easier to diagnose issues. Just install the php5-tidy module and add:
app.tidy = true
to your application.ini file to enable it.