[fw-general] New Proposal: Zend_Db_NestedSet
Greetings and Salutations, If you are interested in an implementation of storing and retrieving hierarchical data as a nested set, please take a few minutes to review my new proposal[1]. I dusted off some old code and poked and prodded a little until it behaved somewhat as expected, there's a functioning prototype on GitHub[2] with some basic instructions in the README. As you probably guessed the algorithm is modified pre-order traversal, and the current working functionality is as follows * Store single trees or multiple trees in same table * Add, move delete individual tree nodes or tree branches * operate on result set nodes(getPath(),getSiblings(),getDescendants(), etc ) * Result-set as multi-dimensional associative array (Zend_Navigation) * Result-set as recursive iterator Cheers the noo, Graham [1]http://framework.zend.com/wiki/display/ZFPROP/Zend_Db_NestedSet+-+Graham+Anderson [2]http://github.com/gnanderson/ZF_NestedSet
Re: [fw-general] zend tool, enable layout
weierophinney wrote: -- chowming chowm...@dcemail.com wrote (on Friday, 15 January 2010, 05:09 PM -0800): When I tried zf enable layout it inserted in the config file: resources.layout.layoutPath = APPLICATION_PATH /layouts/scripts/ That created an error.When I change it to: resources.layout.layoutPath = APPLICATION_PATH /layouts/scripts/ It works. My system: Windows 7 PHP 5.3 Could be a bug or my system Bug -- there's extra quotes being generated, evidently. Could you please add an issue to the tracker for this? Thanks! -- Matthew Weier O'Phinney Project Lead| matt...@zend.com Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc http://framework.zend.com/issues/browse/ZF-8840 -- View this message in context: http://n4.nabble.com/zend-tool-enable-layout-tp1015449p1015737.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Navigation menu id
Paul-3 wrote: I saw this posted on another thread, but there was no resolution. Any chance, unless there is a way, to pass the id of the ul element when using the navigation menu view helper? We can already set the ul class, why not the id? Many javascript plugins/widgets rely on id's, and it would be nice to not have to create a partial just to set the id. This is the case for partials. Easy and customizable. If you wish, you may extend menu helper with your own default partial. Try setParams() or setUlClass(), should be enough. -- regards takeshin -- View this message in context: http://n4.nabble.com/Zend-Navigation-menu-id-tp1015320p1015768.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend Date
You can write a custom view helper which take a date in -MM-DD format but display it with another format like MM/DD/ : class Wiip_Date extends Zend_Date { const MYSQL_DATE = '-MM-dd'; const MYSQL_DATETIME = '-MM-dd HH:mm:ss'; } class Wiip_View_Helper_FormDate extends Zend_View_Helper_FormText { public function formDate($name, $value = '', $attribs = null) { if (!isset($attribs)) $attribs = array(); (isset($attribs['class'])) ? $attribs['class'] .= ' date' : $attribs['class'] = 'date'; if (!isset($attribs['maxlength'])) $attribs['maxlength'] = strlen(Zend_Date::DATE_SHORT); if (!isset($attribs['size'])) $attribs['size'] = strlen(Zend_Date::DATE_SHORT); if (Zend_Date::isDate($value, Wiip_Date::MYSQL_DATE)) { $date = new Zend_Date($value, Wiip_Date::MYSQL_DATE); $value = $date-get(Zend_Date::DATE_SHORT); } elseif ($value == '-00-00') { $value = ''; } return parent::formText($name, $value, $attribs); } }
[fw-general] is that bug?
Keywords: Zend_Navigation, Route, Mvc, Zend_Navigation_Page_Mvc. hi, when i use route like that: - resources.router.routes.category.route = /c/:id/:name resources.router.routes.category.defaults.controller=index resources.router.routes.category.defaults.action=products resources.router.routes.category.defaults.id=0 resources.router.routes.category.defaults.name=Categori - and navigation like that: - $page = new Zend_Navigation_Page_Mvc(array( 'id' = 'tree_' . $row-id, 'route' = 'category', 'label' = $row-name, * //'controller' = 'index', //'action' = 'products',* 'params' = array( 'id' = $row-id, 'name' = $row-name ) )); - at rendered menu there was not any active link. and breadcrumbs show noting. when i uncomment *//'controller' = 'index', //'action' = 'products', *then every thing was ok. but it should work witouth controller and action info, because i gave route name to Page object. but i thing it is a bug from Zend/Navigation/Page/Mvc.php at *function isActive()*. when i convert (Module, Controller, Action) - $front-getDefault*(); (at line 144, 150 and 156) - to - $front-getRequest()-get*Name(); - then there is not any problem also. i'm using 1.10.0beta1 version. PS. sorry for my english. -- Elvin Şiriyev http://siriyev.net