55.5. Look and Feel

All Webmin modules should have the same general color scheme, look, and feel, as defined by the following rules:

  1. All pages should be viewable on any browser that supports images, tables, and forms. Browser features such as frames, DHTML, Javascript, or Java should not be used unless there is no other option. It should be possible to use Webmin from browsers such as Netscape 1.1 or Pocket IE.

  2. All CGI programs that generate HTML output should call the header function. This ensures that a standard page heading is generated according to the theme in use. The only exception is a CGI that does not want any heading at all, such as one used in a pop-up selection window.

  3. The header function creates HTML tags setting the background, text, and link colors for the generated page based on the chosen theme and color scheme. The init_config function sets the global variables $tb and $cb, which should be used as the background color for table headers and body rows, respectively, as in this example:

    print "<table border width=100%>
    ";
    print "<tr $tb> <td><b>Foo</b></td> <td><b>Bar</b></td> </tr>
    ";
    print "<tr $cb> <td>some value</td> <td>another value</td> </tr>
    ";
    
  4. Try to avoid generating HTML forms that contain a large number of input fields. Some browsers (particularly Netscape on UNIX) slow down when rendering such pages.

  5. Your module's main page (usually index.cgi) should set the config and noindex parameters of the header function to 1, assuming that the module does have a config.info file. This ensures that a Module Config link appears on the main page and that the Module Index link does not.

  6. Other pages in the module should call header with the title parameter set to the title that you want to appear and the image parameter set to an empty string. This ensures that a conventional title is displayed and that a Module Config link back to the main page appears.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.99.19