t('YUI logger settings'), 'page callback' => 'drupal_get_form', 'page arguments' => array('yui_logger_settings_form'), 'access callback' => 'user_access', 'access arguments' => array('administer site configuration'), 'description' => t("View/Modify YUI logger settings"), ); return $items; } /* * implementation of hook_perm(). */ function yui_logger_perm() { $array = array('Access YUI logger'); return $array; } function yui_logger_init() { render_logger(); } /* *The settings page. */ function yui_logger_settings_form() { $form = array(); return system_settings_form($form); } /* * Add the javascript/CSS needed to render the logger */ function render_logger() { if (!user_access('Access YUI logger')) { return; } $yui_source = variable_get('yui_source','http://yui.yahooapis.com/2.5.2'); yui_add_css('logger', $yui_source, '/build/fonts/fonts-min.css'); yui_add_css('logger', $yui_source, '/build/logger/assets/skins/sam/logger.css'); yui_add_js('logger', $yui_source, '/build/yahoo-dom-event/yahoo-dom-event.js'); yui_add_js('logger', $yui_source, '/build/build/dragdrop/dragdrop-min.js'); yui_add_js('logger', $yui_source, '/build/logger/logger-min.js'); drupal_add_js(" YAHOO.util.Event.onDOMReady(function() { var myLogReader = new YAHOO.widget.LogReader(); });", "inline", "footer"); }