--- pjirc.module 2007-03-23 14:42:30.000000000 -0700 +++ pjirc_display.module 2007-05-28 20:31:03.000000000 -0700 @@ -33,16 +33,26 @@ function pjirc_perm() */ function pjirc_admin() { + $form['pjirc_nav_link'] = array( '#type' => 'textfield', '#title' => t('Navigation link text'), '#default_value' => variable_get('pjirc_nav_link','chatroom'), '#size' => 80, + '#weight' => -5, '#maxlength' => 300, '#description' => t('The text that will be shown in the navigation link'), ); - $form['pjirc_nick'] = array( + $form['pjirc_connection_settings'] = array( + '#type' => 'fieldset', + '#title' => t('IRC connection settings'), + '#weight' => -4, + '#collapsible' => TRUE, + '#collapsed' => FALSE + ); + + $form['pjirc_connection_settings']['pjirc_nick'] = array( '#type' => 'textfield', '#title' => t('Guest Nick Name'), '#default_value' => variable_get('pjirc_nick','Guest'), @@ -51,7 +61,7 @@ function pjirc_admin() { '#description' => t('The username assigned to guests who have not logged into Drupal'), ); - $form['pjirc_server'] = array( + $form['pjirc_connection_settings']['pjirc_server'] = array( '#type' => 'textfield', '#title' => t('IRC Server'), '#default_value' => variable_get('pjirc_server','irc.freenode.net'), @@ -60,7 +70,7 @@ function pjirc_admin() { '#description' => t('The IP address or hostname of the IRC server you are connecting to.'), ); - $form['pjirc_room'] = array( + $form['pjirc_connection_settings']['pjirc_room'] = array( '#type' => 'textfield', '#title' => t('IRC Room'), '#default_value' => variable_get('pjirc_room', ''), @@ -68,11 +78,53 @@ function pjirc_admin() { '#maxlength' => 255, '#description' => t('The IRC room you want to join initially. Should start with a # (eg: #myroom).'), ); + + $form['pjirc_pixx_settings'] = array( + '#type' => 'fieldset', + '#title' => t('pixx GUI settings'), + '#weight' => -3, + '#collapsible' => TRUE, + '#collapsed' => TRUE + ); + +$form['pjirc_pixx_settings']['pjirc_room_width'] = array( + '#type' => 'textfield', + '#title' => t('Applet Width'), + '#default_value' => variable_get('pjirc_room_width', ''), + '#size' => 4, + '#maxlength' => 4, + '#description' => t('Specify the width (in px) of the applet.'), + ); + +$form['pjirc_pixx_settings']['pjirc_room_height'] = array( + '#type' => 'textfield', + '#title' => t('Applet Height'), + '#default_value' => variable_get('pjirc_room_height', ''), + '#size' => 4, + '#maxlength' => 4, + '#description' => t('Specify the height (in px) of the applet.'), + ); + +$form['pjirc_pixx_settings']['pjirc_font_color'] = array( + '#type' => 'select', + '#title' => t('Font color selection'), + '#default_value' => variable_get('pjirc_font_color', 'true'), + '#options' => array('false' => t('disabled'), 'true' => t('enabled')), + ); + +$form['pjirc_pixx_settings']['pjirc_font_type'] = array( + '#type' => 'select', + '#title' => t('Font type selection'), + '#default_value' => variable_get('pjirc_font_type', 'true'), + '#options' => array('false' => t('disabled'), 'true' => t('enabled')), + '#description' => t('Font color must be enabled'), + ); return system_settings_form($form); } + /** * Implementation of hook_menu(). */ @@ -107,8 +159,12 @@ function pjirc_page() { $pjirc_nick = $user->uid ? $user->name : variable_get('pjirc_nick','Guest'); $pjirc_server = variable_get('pjirc_server',''); $pjirc_room = variable_get('pjirc_room',''); + $pjirc_room_width = variable_get('pjirc_room_width','500'); + $pjirc_room_height = variable_get('pjirc_room_height','400'); + $pjirc_font_color = variable_get('pjirc_font_color',''); + $pjirc_font_type = variable_get('pjirc_font_type',''); $output = "
\n"; - $output .= "\n"; + $output .= "\n"; $output .= "\n"; $output .= "\n"; $output .= "\n"; @@ -150,8 +206,8 @@ function pjirc_page() { $output .= "\n"; $output .= "\n"; $output .= "\n"; - $output .= "\n"; - $output .= "\n"; + $output .= "\n"; + $output .= "\n"; $output .= "\n"; $output .= "

If the applet does not display then click here to download a Java client.\n"; $output .= "

You can also connect using any IRC client (such as MIRC) using the following:
\n";