t('YUI treeview settings'), 'page callback' => 'drupal_get_form', 'page arguments' => array('yui_treeview_settings_form'), 'access callback' => 'user_access', 'access arguments' => array('administer site configuration'), 'description' => t("View/Modify YUI treeview settings"), ); $items['yui_treeview/sample'] = array( 'page callback' => 'yui_treeview_sample', 'access callback' => 'user_access', 'access arguments' => array('Access YUI treeview'), 'type' => MENU_CALLBACK ); return $items; } /* * implementation of hook_perm(). */ function yui_treeview_perm() { $array = array('Access YUI treeview'); return $array; } /* *The settings page. */ function yui_treeview_settings_form() { $form = array(); return system_settings_form($form); } function yui_treeview_sample() { $nodes[] = (object)array('parent' => 0, 'id' => 1, 'label' => 'YUI', 'href' => 'http://developer.yahoo.com/yui'); $nodes[] = (object)array('parent' => 1, 'id' => 2, 'label' => 'Editor', 'href' => 'http://developer.yahoo.com/yui/editor'); $nodes[] = (object)array('parent' => 1, 'id' => 3, 'label' => 'Button', 'href' => 'http://developer.yahoo.com/yui/button'); $id = build_treeview($nodes); return '