'yui_editor_flickr', 'access callback' => 'user_access', 'access arguments' => array('Access YUI editor'), 'type' => MENU_CALLBACK, ); } function yui_editor_flickr_settings(&$form, &$profile) { $form['plugins']['flickr'] = array( '#type' => 'checkbox', '#title' => t('Flickr image insert'), '#default_value' => $profile['flickr'], '#description' => t('Allows flickr images to be browsed and inserted.'), ); $form['plugins']['flickr_api_key'] = array( '#type' => 'textfield', '#title' => t('Flickr API key'), '#default_value' => $profile['flickr_api_key'], '#size' => 20, '#description' => t('Enter your flickr API key if you turned on the \'flickr image insert\' feature.'), ); } function yui_editor_flickr_render(&$profile) { if ($profile['flickr'] == 1) { drupal_add_js(drupal_get_path('module', 'yui_editor') .'/plugins/flickr.js', 'module', 'footer'); drupal_add_css(drupal_get_path('module', 'yui_editor') .'/plugins/flickr.css'); } }