Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_official / html / modules / categories [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
29 Jul 2002 09:45:52 | postnuke_official/html/modules/categories | pnvisualapi.php,1.3,1.4 | Mike |
add description of makeselect and treearray - probably most useful for other modules |
Update of /home/cvsroot/postnuke_official/html/modules/categories In directory ns7.hostnuke.net:/tmp/cvs-serv7266 Modified Files: pnvisualapi.php Log Message: add description of makeselect and treearray - probably most useful for other modules Index: pnvisualapi.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/modules/categories/pnvisualapi.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pnvisualapi.php 27 Jul 2002 23:47:37 -0000 1.3 --- pnvisualapi.php 29 Jul 2002 09:45:49 -0000 1.4 *************** *** 147,150 **** --- 147,175 ---- } + /** + * Make a <select> box with tree of categories ( --+ style) + * e.g. for use in your own admin pages to select root categories for your + * module, choose a particular subcategory for an item etc. + * + * -- INPUT -- + * @param $args['cid'] optional ID of the root category used for the tree + * (if not specified, the whole tree is shown) + * @param $args['eid'] optional ID to exclude from the tree (probably not + * very useful in this context) + * @param $args['multiple'] optional flag (1) to have a multiple select box + * @param $args['values'] optional array $values[$id] = 1 to mark option $id + * as selected + * + * -- OUTPUT -- + * @returns string + * @return select box for categories : + * + * <select name="cids[]"> (or <select name="cids[]" multiple>) + * <option value="123"> --+ My Cat 123 + * <option value="124" selected> + My Cat 123 + * ... + * </select> + * + */ function categories_visualapi_makeselect ($args) { *************** *** 190,193 **** --- 215,231 ---- } + /** + * Build array with visual tree of categories ( --+ style) + * for use in <select> or table display + * + * -- INPUT -- + * @param $args['cid'] The ID of the root category used for the tree + * @param $args['eid'] optional ID to exclude from the tree (e.g. the ID of + * your current category) + * + * -- OUTPUT -- + * @returns array + * @return array of array('id' => 123, 'name' => ' --+ My Cat') + */ function categories_visualapi_treearray ($args) {
View Statistics - Next Notice - Previous Notice
Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |