now here’s my take on the Zend_Navigation and routes. Normally you can set a resource class to do this, but I rather do it in the bootstrap. kinda the same thing in my opinion, i decided not to use a xml config but a ini config type, this way you don’t have to worry if your tags are closed properly. if it works for you awesome.
protected function _initNavigation() {
// set up navigation
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/navigation.ini','navi');
$navigation = new Zend_Navigation($config);
$view->navigation($navigation);
return $view;
}
protected function _initRoutes() {
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/navigation.ini', 'routes');
$front = Zend_Controller_Front::getInstance();
$router = $front->getRouter();
$router->addConfig($config,'routes');
$front->setRouter($router);
return $router;
}sample ini file
;put routes here.
[routes]
routes.dashboard.route = "/dashboard"
routes.dashboard.defaults.controller = index
routes.dashboard.defaults.action = dashboard
;navigation
[navi]
dashboard.route = "dashboard"
dashboard.controller = index
dashboard.action = dashboard
dashboard.label = dashboard
dashboard.class = dashboard
Reserved Words in Javascript (good to keep documented)
JavaScript Reserved Words
JavaScript Reserved Words break continue do for import new this void case default else function in return typeof while comment delete export if label switch var with
Java Keywords (Reserved by JavaScript) abstract implements protected boolean instanceOf public byte int short char interface static double long synchronized false native throws final null transient float package true goto private
ECMAScipt Reserved Words catch enum throw class extends try const finally debugger super
Other JavaScript Keywords alert eval Link outerHeight scrollTo Anchor FileUpload location outerWidth Select Area find Location Packages self arguments focus locationbar pageXoffset setInterval Array Form Math pageYoffset setTimeout assign Frame menubar parent status blur frames MimeType parseFloat statusbar Boolean Function moveBy parseInt stop Button getClass moveTo Password String callee Hidden name personalbar Submit caller history NaN Plugin sun captureEvents History navigate taint Checkbox home navigator prompt Text clearInterval Image Navigator prototype Textarea clearTimeout Infinity netscape Radio toolbar close innerHeight Number ref top closed innerWidth Object RegExp toString confirm isFinite onBlur releaseEvents unescape constructor isNan onError Reset untaint Date java onFocus resizeBy unwatch defaultStatus JavaArray onLoad resizeTo valueOf document JavaClass onUnload routeEvent watch Document JavaObject open scroll window Element JavaPackage opener scrollbars Window escape length Option scrollBy
this is a cool website. Done with the Canvas element in HTML5
here’s flowerpoop drawn out.
if you draw some stuff we’ll host it here.
Installing ImageMagick, and pecl imagick
I needed ImageMagick to do some image manipulation, i ran across this very cool php extension. instead of using GD. you may run into some small snafus while trying to install it. my system is fedora core 12
first thing you do is install ImageMagick, and ImageMagick-devel
then you run pecl
if you run into any problems like re2c not being up to date. pull the latest RPM, and install.
the cool thing about this extension is when you want to resize images on the fly its as easy as this
header(‘Content-type: image/jpeg’);
$image = new Imagick(‘image.jpg’);
// If 0 is provided as a width or height parameter,
// aspect ratio is maintained
$image->thumbnailImage(100, 0);
echo $image;
?>
Zend Framework redirect within plugin
if you ever need to redirect w/in a plugin
$redirector->gotoUrl(‘url’);


