diff -up kiosk5/kiosk.info kiosk6/kiosk.info --- kiosk5/kiosk.info 2009-10-16 12:08:59.000000000 -0500 +++ kiosk6/kiosk.info 2009-10-16 12:08:17.000000000 -0500 @@ -1,9 +1,6 @@ ; $Id: kiosk.info,v 1.1 2008/03/19 18:44:17 crell Exp $ name = Kiosk description = Allow selected computers to be put into 'kiosk' mode. - -; Information added by drupal.org packaging script on 2008-03-28 -version = "5.x-1.0" +version = "6.x-1.0" project = "kiosk" -datestamp = "1206716412" - +core = 6.x diff -up kiosk5/kiosk.install kiosk6/kiosk.install --- kiosk5/kiosk.install 2009-10-16 12:08:59.000000000 -0500 +++ kiosk6/kiosk.install 2009-10-16 12:08:17.000000000 -0500 @@ -1,6 +1,12 @@ 'admin/settings/kiosk', - 'title' => t('Kiosk mode'), - 'description' => t('Configure what clients will be considered "kisok mode".'), - 'callback' => 'drupal_get_form', - 'callback arguments' => array('kiosk_configure'), + + $items['admin/settings/kiosk'] = array( + 'title' => 'Kiosk mode', + 'description' => 'Configure what clients will be considered "kisok mode".', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('kiosk_configure'), 'type' => MENU_NORMAL_ITEM, - 'access' => user_access('administer kiosk settings'), + 'access arguments' => array('administer kiosk settings'), ); $items[] = array( - 'title' => t('By IP'), + 'title' => 'By IP', 'path' => 'admin/settings/kiosk/ip', 'type' => MENU_DEFAULT_LOCAL_TASK, - 'access' => user_access('administer kiosk settings'), + 'access arguments' => array('administer kiosk settings'), ); - $items[] = array( - 'path' => 'admin/settings/kiosk/cookie', - 'title' => t('Set computer'), - 'description' => t('Set a cookie on the current computer to force it into kiosk mode, regardless of IP address.'), - 'callback' => 'drupal_get_form', - 'callback arguments' => array('kiosk_configure_cookie'), + $items['admin/settings/kiosk/cookie'] = array( + 'title' => 'Set computer', + 'description' => 'Set a cookie on the current computer to force it into kiosk mode, regardless of IP address.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('kiosk_configure_cookie'), 'type' => MENU_LOCAL_TASK, - 'access' => user_access('administer kiosk settings'), + 'access arguments' => array('administer kiosk settings'), ); - } - else { - } return $items; } @@ -99,7 +95,7 @@ function kiosk_configure_cookie() { return $form; } -function kiosk_configure_cookie_submit($form_id, $form_values) { +function kiosk_configure_cookie_submit($form, &$form_state) { setcookie('drupal_kiosk_mode', 1, $expire, '/'); drupal_set_message(t('This computer has been set to kiosk mode. Clear your cookies in order to reset it.')); @@ -135,7 +131,7 @@ function kiosk_is_kiosk() { $ip_addresses = kiosk_parse_list_values(variable_get('kiosk_ip_addresses', '')); - return (in_array($_SERVER['REMOTE_ADDR'], $ip_addresses) || 1 == $_COOKIE['drupal_kiosk_mode']); + return (in_array(ip_address(), $ip_addresses) || 1 == $_COOKIE['drupal_kiosk_mode']); } /** diff -up kiosk5/README.txt kiosk6/README.txt --- kiosk5/README.txt 2009-10-16 12:08:59.000000000 -0500 +++ kiosk6/README.txt 2009-10-16 12:08:17.000000000 -0500 @@ -18,12 +18,12 @@ or not. That may result in a delay befo INSTALLATION -In Drupal 5, an extra theme step is required for the kiosk module. After +In Drupal 6, an extra theme step is required for the kiosk module. After installing the module normally, go to your theme and locate the -_phptemplate_variables() function in template.php. Add the following line -before the switch statement, so that it applies to all templates: +_phptemplate_preprocess_page() function in template.php. Add the following line +at the start of the function, so that it applies to all templates: -$vars['kiosk'] = kiosk_is_kiosk(); + $vars['kiosk'] = kiosk_is_kiosk(); The theme author can then put conditionals into the template like so: