--- 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  = "<div align=\"center\">\n";
-  $output .= "<applet codebase=modules/pjirc/pjirc/ code=IRCApplet.class archive=\"irc.jar,pixx.jar\" width=500 height=400>\n";
+  $output .= "<applet codebase=modules/pjirc/pjirc/ code=IRCApplet.class archive=\"irc.jar,pixx.jar\" width=".$pjirc_room_width." height=".$pjirc_room_height.">\n"; 
   $output .= "<param name=\"CABINETS\" value=\"irc.cab,securedirc.cab,pixx.cab\">\n";
   $output .= "<param name=\"nick\" value=\"".$pjirc_nick."\">\n";
   $output .= "<param name=\"alternatenick\" value=\"".$pjirc_nick."???\">\n";
@@ -150,8 +206,8 @@ function pjirc_page() {
   $output .= "<param name=\"pixx:highlight\" value=\"true\">\n";
   $output .= "<param name=\"pixx:highlightnick\" value=\"true\">\n";
   $output .= "<param name=\"pixx:nickfield\" value=\"true\">\n";
-  $output .= "<param name=\"pixx:styleselector\" value=\"true\">\n";
-  $output .= "<param name=\"pixx:setfontonstyle\" value=\"true\">\n";
+  $output .= "<param name=\"pixx:styleselector\" value=\"".$pjirc_font_color."\">\n";
+  $output .= "<param name=\"pixx:setfontonstyle\" value=\"".$pjirc_font_type."\">\n";
   $output .= "</applet>\n";
   $output .= "<br /><br /><a href=\"http://www.java.com/en/download/\" target=\"_blank\">If the applet does not display then click here to download a Java client.</a>\n";
   $output .= "<br /><br />You can also connect using any IRC client (such as <a href=\"http://www.mirc.com/\">MIRC</a>) using the following:<br />\n";
