patched conf.pl to include theme_css support
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 2 Oct 2000 15:57:51 +0000 (15:57 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 2 Oct 2000 15:57:51 +0000 (15:57 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@773 7612ce4b-ef26-0410-bec9-ea0150e637f0

config/conf.pl

index 4b129cdf65c7317da8aa1d6bc9bb1282b979719a..0b5aac51b3a4d556f9b550617d5548a0297427e4 100755 (executable)
@@ -312,6 +312,7 @@ while (($command ne "q") && ($command ne "Q")) {
       for ($count = 0; $count <= $#theme_name; $count++) {
          print "    >  $theme_name[$count]\n";
       }
+      print "2.  CSS File : $WHT$theme_css$NRM\n";
       print "\n";
       print "R   Return to Main Menu\n";
    } elsif ($menu == 6) {
@@ -450,9 +451,8 @@ while (($command ne "q") && ($command ne "Q")) {
          elsif ($command == 3) { $attachment_dir     = command34 (); }
          elsif ($command == 4) { $default_left_size  = command35 (); }
       } elsif ($menu == 5) {
-         if ($command == 1) { 
-            command41 (); 
-         }
+         if    ($command == 1) { command41 (); }
+         elsif ($command == 2) { $theme_css = command42 (); }
       } elsif ($menu == 6) {
          if    ($command == 1) { command61(); }
          elsif ($command == 2) { command62(); }
@@ -1248,6 +1248,27 @@ sub command41 {
 }   
 
 
+# Theme - CSS file
+sub command42 {
+   print "You may specify a cascading style-sheet (CSS) file to be included\n";
+   print "on each html page generated by SquirrelMail. The CSS file is useful\n";
+   print "for specifying a site-wide font. If you're not familiar with CSS\n";
+   print "files, leave this blank.\n";
+   print "\n";
+   print "To clear out an existing value, just type a space for the input.\n";
+   print "\n";
+   print "[$WHT$theme_css$NRM]: $WHT";
+   $new_theme_css = <STDIN>;
+   if ($new_theme_css eq "\n") {
+      $new_theme_css = $theme_css;
+   } else {
+      $new_theme_css =~ s/[\r|\n]//g;
+   }
+   $new_theme_css =~ s/^\s*//;
+   return $new_theme_css;
+}
+
+
 sub command61 {
    print "You can now define different LDAP servers.\n";
    print "[ldap] command (?=help) > ";
@@ -1463,6 +1484,7 @@ sub save_data {
    
    print FILE "\n";
 
+   print FILE "\t\$theme_css = \"$theme_css\";\n";
    for ($count=0; $count <= $#theme_name; $count++) {
       print FILE "\t\$theme[$count][\"PATH\"] = \"$theme_path[$count]\";\n";
       print FILE "\t\$theme[$count][\"NAME\"] = \"$theme_name[$count]\";\n";