'Popup Test', 'page callback' => '_popups_test_popups', 'type' => MENU_CALLBACK, 'access callback' => TRUE, ); $items['popups/test/response'] = array( 'page callback' => '_popups_test_response', 'type' => MENU_CALLBACK, 'access callback' => TRUE, ); $items['popups/test/namechange'] = array( 'page callback' => 'drupal_get_form', 'page arguments' => array('_popups_test_namechange'), 'type' => MENU_CALLBACK, 'access callback' => TRUE, ); return $items; } /** * Implementation of hook_popups(). * * This implements hook_popups, defined in popups_get_popups. * See the comments in popups_add_popups for explination of the options. * Adding popup behavior to the core admin pages has been moved to popups_admin. * * @return: Array of link selectors to apply popup behavior to. * Keyed by path or form_id. */ function popups_test_popups() { return array( 'popups/test' => array( // test page. // '*' => array( // test page. '#test-popup' => array( 'additionalJavascript' => array('misc/collapse.js'), 'forceReturn' => 'node/add/story', ), ), ); } // ************************************************************************** // TESTING **************************************************************** // ************************************************************************** function _popups_test_popups() { // drupal_set_message('Popup Test Page: If you edit your page.tpl.php to wrap the print $messages in a div with id="popit", this message will popup on page load'); popups_add_popups(); $output = '"; return $output; } function _popups_test_response() { drupal_set_title("Popup Test Two"); return '
Hello World
Popup chaining test'; } function _popups_test_namechange() { drupal_set_title("New Name for Test Page"); $form = array(); $form['popups_popup_final_message'] = array( '#type' => 'submit', '#value' => t('Test Name Change'), ); return $form; }