gecko-dev/cck/CCKDocs/advanced_cck.htm

813 строки
34 KiB
HTML

<html>
<!--This html file is XHTML complaint, as set forth in the
w3c recommendations except for the following:
Lists work as they do in older versions on HTML and not as
directed in XHTML.
The <a name=" "> tags have targets that use spaces. -->
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<meta name="templatebase" content="Authored in FrameMaker. Converted to HTML in WebWorks Publisher. manual wdt 1.6" />
<title> Guide to Customizing and Distributing Mozilla 1.4.1: Chapter&#32;12Advanced Mozilla Customizations</title>
<!--The following is a javascript which determines whether the client
is on a Windows machine, or is on another type of operating system. Once
the operating system is determined, either a windows or other operating
system cascading style sheet is used. -->
<script type="text/JavaScript">
<!-- Start hiding
window.onerror=null;
var client=navigator.userAgent.toLowerCase();
var WinStyle = "<STYLE NAME=WINDOWS>\n" +
"body,p {font-family: helvetica,arial,sans-serif; font-size:10pt; margin-bottom: 10; margin-top: 0; } \n" +
"th,tr,td,br,li,dl,dd,ul,ol,li {font-family: helvetica,arial,sans-serif; font-size:10pt; } \n" +
".bartext {font-family: helvetica,arial,sans-serif; font-weight: bold; color: #666666; margin-bottom: 0; margin-top: 0; font-size:14pt;} \n" +
".callout {font-family: helvetica,arial,sans-serif; font-size: 8pt;} \n" +
".calloutlarge {font-family: helvetica,arial,sans-serif; font-size: 9pt;} \n" +
".calloutlargebold {font-family: helvetica,arial,sans-serif; font-size: 9pt; font-weight: bold;} \n" +
".calloutsmall {font-family: helvetica,arial,sans-serif; font-size: 7pt; font-weight: normal;} \n" +
".caption {font-family: helvetica,arial,sans-serif; font-weight: bold; color: black; margin-bottom: 5; margin-top: 0; font-size: 11pt;} \n" +
".caution {font-family: helvetica,arial,sans-serif; font-size:10pt; font-weight: bold; margin-bottom: 0; margin-top: 0; } \n" +
"code {font-family: courier,couriernew,monospaced; font-size: 10pt; margin-bottom: 0; margin-bottom:0; margin-top: 0;} \n" +
".copy {align: center; font-family: helvetica,arial,sans-serif; font-size:8pt; margin-bottom: 0; margin-top: 0;} \n" +
".footnote {font-family: helvetica,arial,sans-serif; font-size:10pt; } \n" +
".gloss {font-family: helvetica,arial,sans-serif; font-size:10pt; margin-bottom: 10; margin-top: 0; } \n" +
".grouptitleix {font-family: helvetica,arial,sans-serif; font-weight: bold; color: black; margin-bottom: 10; margin-top: 20pt; font-size: 14pt;} \n" +
".h1 {font-family: helvetica,arial,sans-serif; font-weight: normal; color: black; margin-bottom: 0; margin-top: 30pt; font-size: 18pt;} \n" +
".h2 {font-family: helvetica,arial,sans-serif; font-weight: normal; color: black; margin-bottom: 10; margin-top: 30pt; font-size: 16pt;} \n" +
".h3 {font-family: helvetica,arial,sans-serif; font-weight: bold; color: black; margin-bottom: 10; margin-top: 20pt; font-size: 14pt;} \n" +
".h4 {font-family: helvetica,arial,sans-serif; font-style: italic; font-color: black;margin-bottom: 0; margin-top: 16pt; font-size: 11pt;} \n" +
".h5 {font-family: helvetica,arial,sans-serif; font-weight: normal; color: black; margin-bottom: 0; margin-top: 0; font-size: 8pt;} \n" +
".navigation {font-family: helvetica,arial,sans-serif; font-weight: bold; color: #993300; margin-bottom: 0; margin-top: 0; font-size:10pt;} \n" +
".note {font-family: helvetica,arial,sans-serif; font-size:10pt; font-weight: bold; margin-bottom: 0; margin-top: 0; } \n" +
".list1 {font-family: helvetica,arial,sans-serif; font-size:10pt; margin-bottom: 10; margin-top: 0; margin-left: 12pt; list-style-position: outside; } \n" +
".list2 {font-family: helvetica,arial,sans-serif; font-size:10pt; margin-bottom: 10; margin-top: 0; text-indent: 12pt; margin-left: 18pt; } \n" +
".list3 {font-family: helvetica,arial,sans-serif; font-size:10pt; margin-bottom: 10; margin-top: 0; text-indent: 18pt; margin-left: 24pt; } \n" +
".para1 {font-family: helvetica,arial,sans-serif; font-size:10pt; margin-bottom: 10; margin-top: 0; margin-left: 12pt; } \n" +
".para2 {font-family: helvetica,arial,sans-serif; font-size:10pt; margin-bottom: 10; margin-top: 0; margin-left: 18pt; } \n" +
".para3 {font-family: helvetica,arial,sans-serif; font-size:10pt; margin-bottom: 10; margin-top: 0; margin-left: 24pt; } \n" +
"pre {font-family: courier,couriernew,monospaced; font-size: 10pt; margin-bottom: 0; } \n" +
".refh1 {font-family: palatino,times,timesnewroman,serif; font-weight: normal; color: black;margin-bottom: 10; margin-top: 30pt; font-size: 18pt;} \n" +
".refh2 {font-family: palatino,times,timesnewroman,serif; font-weight: normal; color: black; margin-bottom: 10; margin-top: 30pt; font-size: 16pt;} \n" +
".refhead {font-family: helvetica,arial,sans-serif; font-weight: bold; color: black; margin-bottom: 4; margin-top: 15pt; font-size: 11pt;} \n" +
".tabletext {font-family: helvetica,arial,sans-serif; font-size:10pt; margin-bottom: 10; margin-top: 0; } \n" +
".tablehead {text-align: left;font-family: helvetica,arial,sans-serif; font-weight: bold; font-size:10pt; margin-bottom: 4; margin-top: 0; } \n" +
".text {font-family: helvetica,arial,sans-serif; font-size:10pt; margin-bottom: 10; margin-top: 0; } \n" +
".tip {font-family: helvetica,arial,sans-serif; font-size:10pt; font-weight: bold; margin-bottom: 0; margin-top: 0; } \n" +
".title {font-family: helvetica,arial,sans-serif; font-weight: bold; color: black;margin-bottom: 30pt; margin-top: 16pt; font-size: 16pt;} \n" +
".toc1 {font-family: helvetica,arial,sans-serif; font-size: 11pt; font-weight: bold; margin-bottom: 0; margin-top: 30; text-indent: 20;} \n" +
".tocc {font-family: helvetica,arial,sans-serif; font-size: 11pt; font-weight: bold; margin-bottom: 0; margin-top: 7; text-indent: 20;} \n" +
".tochead1 {font-family: helvetica,arial,sans-serif; font-size: 10pt; font-weight: normal; margin-bottom: 0; margin-top: 2; text-indent: 20;} \n" +
".tochead2 {font-family: helvetica,arial,sans-serif; font-size: 10pt; font-weight: normal; margin-bottom: 0; margin-top: 2; text-indent: 40;} \n" +
".tochead3 {font-family: helvetica,arial,sans-serif; font-size: 10pt; font-weight: normal; margin-bottom: 0; margin-top: 2; text-indent: 60;} \n" +
".tocnontoc {font-family: helvetica,arial,sans-serif; font-size: 10pt; font-weight: normal; text-indent: 0;} \n" +
".tocpart {font-family: helvetica,arial,sans-serif; font-size:13pt; font-weight: bold; margin-bottom: 0; margin-top: 20;} \n" +
".update {text-align: right; font-family: helvetica,arial,sans-serif; font-size:8pt; margin-bottom: 0; margin-top: 0;} \n" +
"</style>";
var OtherStyle = "<style name=NOTWINDOWS>\n" +
"body,p {font-family: helvetica,arial,sans-serif; font-size:12pt; margin-bottom: 10; margin-top: 0; } \n" +
"th,tr,td,br,li,dl,dd,ul,ol,li {font-family: helvetica,arial,sans-serif; font-size:12pt; } \n" +
".bartext {font-family: helvetica,arial,sans-serif; font-weight: bold; color: #666666; margin-bottom: 0; margin-top: 0; font-size:17pt;} \n" +
".callout {font-family: helvetica,arial,sans-serif; font-size: 10pt;} \n" +
".calloutlarge {font-family: helvetica,arial,sans-serif; font-size: 11pt;} \n" +
".calloutlargebold {font-family: helvetica,arial,sans-serif; font-size: 11pt; font-weight: bold;} \n" +
".calloutsmall {font-family: helvetica,arial,sans-serif; font-size: 8pt; font-weight: normal;} \n" +
".caption {font-family: helvetica,arial,sans-serif; font-weight: bold; color: black; margin-bottom: 5; margin-top: 0; font-size: 13pt;} \n" +
".caution {font-family: helvetica,arial,sans-serif; font-size:12pt; font-weight: bold; margin-bottom: 0; margin-top: 0; } \n" +
"code {font-family: courier,couriernew,monospaced; font-size: 12pt; margin-bottom: 0; margin-bottom:0; margin-top: 0;} \n" +
".copy {align: center; font-family: helvetica,arial,sans-serif; font-size:10pt; margin-bottom: 0; margin-top: 0;} \n" +
".footnote {font-family: helvetica,arial,sans-serif; font-size:12pt; } \n" +
".gloss {font-family: helvetica,arial,sans-serif; font-size:12pt; margin-bottom: 10; margin-top: 0; } \n" +
".grouptitleix {font-family: helvetica,arial,sans-serif; font-weight: bold; color: black; margin-bottom: 10; margin-top: 20pt; font-size: 17pt;} \n" +
".h1 {font-family: helvetica,arial,sans-serif; font-weight: normal; color: black; margin-bottom: 0; margin-top: 30pt; font-size: 22pt;} \n" +
".h2 {font-family: helvetica,arial,sans-serif; font-weight: normal; color: black; margin-bottom: 10; margin-top: 30pt; font-size: 19pt;} \n" +
".h3 {font-family: helvetica,arial,sans-serif; font-weight: bold; color: black; margin-bottom: 10; margin-top: 20pt; font-size: 17pt;} \n" +
".h4 {font-family: helvetica,arial,sans-serif; font-style: italic; font-color: black;margin-bottom: 0; margin-top: 16pt; font-size: 14pt;} \n" +
".h5 {font-family: helvetica,arial,sans-serif; font-weight: normal; color: black; margin-bottom: 0; margin-top: 0; font-size: 10pt;} \n" +
".navigation {font-family: helvetica,arial,sans-serif; font-weight: bold; color: #993300; margin-bottom: 0; margin-top: 0; font-size:12pt;} \n" +
".note {font-family: helvetica,arial,sans-serif; font-size:12pt; font-weight: bold; margin-bottom: 0; margin-top: 0; } \n" +
".list1 {font-family: helvetica,arial,sans-serif; font-size:12pt; margin-bottom: 10; margin-top: 0; margin-left: 12pt; list-style-position: outside; } \n" +
".list2 {font-family: helvetica,arial,sans-serif; font-size:12pt; margin-bottom: 10; margin-top: 0; text-indent: 12pt; margin-left: 18pt; } \n" +
".list3 {font-family: helvetica,arial,sans-serif; font-size:12pt; margin-bottom: 10; margin-top: 0; text-indent: 18pt; margin-left: 24pt; } \n" +
".para1 {font-family: helvetica,arial,sans-serif; font-size:12pt; margin-bottom: 10; margin-top: 0; margin-left: 12pt; } \n" +
".para2 {font-family: helvetica,arial,sans-serif; font-size:12pt; margin-bottom: 10; margin-top: 0; margin-left: 18pt; } \n" +
".para3 {font-family: helvetica,arial,sans-serif; font-size:12pt; margin-bottom: 10; margin-top: 0; margin-left: 24pt; } \n" +
"pre {font-family: courier,couriernew,monospaced; font-size: 12pt; margin-bottom: 0; } \n" +
".refh1 {font-family: palatino,times,timesnewroman,serif; font-weight: normal; color: black;margin-bottom: 10; margin-top: 30pt; font-size: 22pt;} \n" +
".refh2 {font-family: palatino,times,timesnewroman,serif; font-weight: normal; color: black; margin-bottom: 10; margin-top: 30pt; font-size: 19pt;} \n" +
".refhead {font-family: helvetica,arial,sans-serif; font-weight: bold; color: black; margin-bottom: 4; margin-top: 15pt; font-size: 13pt;} \n" +
".tabletext {font-family: helvetica,arial,sans-serif; font-size:12pt; margin-bottom: 10; margin-top: 0; } \n" +
".tablehead {text-align: left;font-family: helvetica,arial,sans-serif; font-weight: bold; font-size:12pt; margin-bottom: 4; margin-top: 0; } \n" +
".text {font-family: helvetica,arial,sans-serif; font-size:12pt; margin-bottom: 10; margin-top: 0; } \n" +
".tip {font-family: helvetica,arial,sans-serif; font-size:12pt; font-weight: bold; margin-bottom: 0; margin-top: 0; } \n" +
".title {font-family: helvetica,arial,sans-serif; font-weight: bold; color: black;margin-bottom: 30pt; margin-top: 16pt; font-size: 19pt;} \n" +
".toc1 {font-family: helvetica,arial,sans-serif; font-size: 13pt; font-weight: bold; margin-bottom: 0; margin-top: 30; text-indent: 20;} \n" +
".tocc {font-family: helvetica,arial,sans-serif; font-size: 13pt; font-weight: bold; margin-bottom: 0; margin-top: 7; text-indent: 20;} \n" +
".tochead1 {font-family: helvetica,arial,sans-serif; font-size: 12pt; font-weight: normal; margin-bottom: 0; margin-top: 2; text-indent: 20;} \n" +
".tochead2 {font-family: helvetica,arial,sans-serif; font-size: 12pt; font-weight: normal; margin-bottom: 0; margin-top: 2; text-indent: 40;} \n" +
".tochead3 {font-family: helvetica,arial,sans-serif; font-size: 12pt; font-weight: normal; margin-bottom: 0; margin-top: 2; text-indent: 60;} \n" +
".tocnontoc {font-family: helvetica,arial,sans-serif; font-size: 12pt; font-weight: normal; text-indent: 0;} \n" +
".tocpart {font-family: helvetica,arial,sans-serif; font-size:15pt; font-weight: bold; margin-bottom: 0; margin-top: 20;} \n" +
".update {text-align: right; font-family: helvetica,arial,sans-serif; font-size:10pt; margin-bottom: 0; margin-top: 0;} \n" +
"</style>";
if ( client.indexOf("win") != -1 ){
document.write( WinStyle );
}else{
document.write( OtherStyle );
}
// End hiding -->
</script>
</head>
<body text="#000000" link="#666699" vlink="#666699" alink="#333366" bgcolor="#FFFFFF">
<!--maincontent defines everything between the body tags -->
<!--start maincontent-->
<!--navigationcontent defines the top row of links and the banner -->
<!--start navigationcontent-->
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom" width="67">
<img src="netscape48.gif" height="48" width="48" border="0" alt="Netscape logo" />
</td>
<td valign="middle">
<span class="bartext"> <br />Guide to Customizing and Distributing Mozilla
1.4.1
</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<hr size="4" noshade="noshade" />
<span class="navigation">
<a style="text-decoration: none" href="cd_man_cck.htm">
Previous
</a>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<span class="navigation">
<a style="text-decoration: none" href="guide.html">
Contents
</a>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<span class="navigation">
<a style="text-decoration: none" href="mac_linux_cck.htm">
Next
</a>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
</table>
<!--end navigationcontent-->
<!--bookcontent defines the actual content of the file, sans headers and footers -->
<!--start bookcontent-->
<blockquote>
<br />
<p class="title">
<a name="13832"> </a>
<a name=""> </a>
<font color="#666666">
Chapter&#32;12
&nbsp;
</font>
<a name="13833"> </a>
<a name="Advanced Mozilla Customizations"> </a>
Advanced Mozilla Customizations
</p><p class="text">
<a name="14293"> </a>
After you've run the CCK tool, produced an installer, and made any manual customizations you may require for the CD autorun screen, you can perform additional manual customizations before distributing the installer to your users. This chapter provides an overview of the preferences architecture and the general procedure for manual customization. It also provides detailed, step-by-step instructions for some of the most common manual customizations.
</p>
<p class="text">
<a name="14524"> </a>
This chapter contains these sections:
</p>
<p class="text">
<a name="14525"> </a>
<a href="advanced_cck.htm#14297" >Understanding How Manual Customization Works</a><br /><a href="advanced_cck.htm#14329" >Understanding the Preferences Architecture</a><br /><a href="advanced_cck.htm#14373" >Before You Start</a><br /><a href="advanced_cck.htm#14386" >Editing a Configuration File with a Text Editor</a><br /><a href="advanced_cck.htm#16078" >Instructions for Common Manual Customizations</a>
</p>
<p class="h1">
<a name="14297"> </a>
<a name="Understanding How Manual Customization Works"> </a>
Understanding How Manual Customization Works
<hr size="2" noshade="noshade" />
</p>
<p class="text">
<a name="14299"> </a>
Mozilla is shipped with many preferences and user-interface items preset as "factory defaults." After Mozilla is installed, these settings are stored in special Javascript files called configuration files.
</p>
<p class="text">
<a name="14301"> </a>
You can edit configuration files to customize the default settings for your users. For example, you can manually customize:
</p>
<ul>
<li>
The Welcome page that appears at startup
<a name="15465"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li>
Proxy settings
<a name="14563"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li>
Any items that appear in the Help menu in Mozilla (both text and URLs)
<a name="14304"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li>
Password requirements, such as whether an email password is remembered or needed for each session
<a name="14305"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
</ul>
<p class="text">
<a name="14307"> </a>
To create a customized Mozilla installer by using a combination of the CCK tool and manual customizations, you follow this general procedure:
</p>
<ol type="1">
<li value="1">
Complete all customizations that can be performed with the CCK tool and use the tool to build the installer. The installation files will be located in the directory
<a name="14309"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<dl><dl><p>
<code>
<a name="14311"></a>
CCKTool\Configs\configuration_name\Output\<br />
&nbsp;
</code>
</p></dl></dl> <dl>
<dt> <a name="14313"> </a>
where <em>configuration_name</em> is the configuration name you specified (or selected) for your customized configuration in the first screen of the CCK tool.
<br />&nbsp;</dt> </dl>
<li value="2">
Verify your customizations and run the CCK tool again, if necessary, to adjust them.
<a name="14596"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li value="3">
Identify the preferences you want to change and the Javascript files that specify them. Table 1 below specifies the main Javascript files involved. Detailed information on specific preference entries within those files will be available online at a later time; see <!--<a href="http://home.netscape.com/eng/mozilla/ns62/relnotes/cck.html"-->Mozilla 1.4.1 Client Customization Kit Release Notes<!--</a--> for the most current information. XXX we need to host docs like this at www.mozilla.org
<a name="14314"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li value="4">
Identify the xpi files in the installation files produced by the CCK Tool that contain the JavaScript files you want to change. (Table 1 below specifies the which xpi files contain which JavaScript files.)
<a name="14316"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li value="5">
For each xpi file involved:
<a name="14318"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<ul>
<li>
Use a utility such as WinZip to extract the entire xpi file into some convenient temporary directory.
<a name="14319"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li>
<li>
Locate the JavaScript files that you want to modify in the extracted files.
<a name="14320"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li>
<li>
Use a text editor to modify the JavaScript files.
<a name="14321"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li>
<li>
Use a utility such as WinZip to zip up all the files you extracted from the xpi, including the ones you modified.
<a name="14322"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li>
<li>
Replace the old xpi file with your new xpi file.<br /><font face="fontsansserif" SIZE="+2" COLOR="red">&nbsp;</font>
<a name="14323"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li> </ul>
<li value="6">
After you have modified the necessary JavaScript files and replaced the old xpi files with the revised xpi files, run the installer and test the resulting Mozilla installation to ensure that your customizations have taken effect.
<a name="14325"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
</ol>
<p class="text">
<a name="14327"> </a>
For step-by-step instructions describing this procedure more precisely for specific manual customizations, see single change to a JavaScript file, see <a href="advanced_cck.htm#16078" >Instructions for Common Manual Customizations</a>.
</p>
<p class="h1">
<a name="14329"> </a>
<a name="Understanding the Preferences Architecture"> </a>
Understanding the Preferences Architecture
<hr size="2" noshade="noshade" />
</p>
<p class="text">
<a name="14331"> </a>
Factory defaults are set in <code>.js</code> files, which are in turn located in zipped <code>.xpi</code> files in the directory
</p>
<dl><dl><p>
<code>
<a name="16313"></a>
CCKTool\Configs\<em>my_config</em>\Output\Core
</code>
</p></dl></dl><p class="text">
<a name="16314"> </a>
The primary <code>.js</code> file is <code>all-ns.js</code>, which is located in the file <code>browser.xpi</code>.
</p>
<p class="text">
<a name="14685"> </a>
<b>Note:</b> If you make changes to preferences stored (after installation) in the <code>prefs.js</code> file, where the user-configurable customizations are stored, you run the risk of overwriting the bookmarks, address books, and other settings that your users may have set in their existing profiles.
</p>
<p class="text">
<a name="14336"> </a>
<br />
<p class="caption">
<a name="14706"> </a>
<a name="JavaScript files to edit"> </a>
Table 12-1 &nbsp;&nbsp; JavaScript files to edit
</p>
<br/>
<table width="90%" border="1" cellspacing="0" cellpadding="4">
<tr bgcolor="#CCCCCC" align="left" valign="top">
<th valign="top" align="left">
<p class="tablehead">
<a name="14712"> </a>
Filename
</p>
</th>
<th valign="top" align="left">
<p class="tablehead">
<a name="14714"> </a>
XPI file that contains preferences file
</p>
</th>
<th valign="top" align="left">
<p class="tablehead">
<a name="14716"> </a>
Contents
</p>
</th>
</tr>
<tr>
<td valign="top">
<p class="tabletext">
<a name="14718"> </a>
<code>all-ns.js </code>
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14720"> </a>
<code>browser.xpi</code>
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14722"> </a>
general preferences and those not covered specifically by other <code>.js</code> files
</p></td>
</tr>
<tr>
<td valign="top">
<p class="tabletext">
<a name="14724"> </a>
<code>config.js </code>
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14726"> </a>
<code>browser.xpi </code>
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14728"> </a>
chrome-related preferences
</p></td>
</tr>
<tr>
<td valign="top">
<p class="tabletext">
<a name="14730"> </a>
<code>editor.js</code>
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14732"> </a>
<code>browser.xpi</code>
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14734"> </a>
preferences related to composer
</p></td>
</tr>
<tr>
<td valign="top">
<p class="tabletext">
<a name="14736"> </a>
<code>mailnews.js</code>
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14738"> </a>
<code>browser.xpi</code>
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14740"> </a>
mail and news preferences
</p></td>
</tr>
<tr>
<td valign="top">
<p class="tabletext">
<a name="14742"> </a>
<code>prefs.js</code>
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14744"> </a>
The contents of <code>prefs.js</code> are created from the contents of the files <code>all-ns.js</code> and <code>all.js</code> in <code>browser.xpi</code>.
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14746"> </a>
user-configurable customizations
</p></td>
</tr>
<tr>
<td valign="top">
<p class="tabletext">
<a name="14748"> </a>
<code>security-prefs.js</code>
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14750"> </a>
<code>browser.xpi</code>
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14752"> </a>
security preferences
</p></td>
</tr>
<tr>
<td valign="top">
<p class="tabletext">
<a name="16124"> </a>
Windows: <code>winpref.js</code>
</p><p class="tabletext">
<a name="16125"> </a>
Unix/Linux: <code>unix.js</code>
</p><p class="tabletext">
<a name="14754"> </a>
Macintosh: <code>macprefs.js</code>
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14756"> </a>
<code>browser.xpi</code>
</p></td>
<td valign="top">
<p class="tabletext">
<a name="14758"> </a>
fonts for each platform
</p></td>
</tr>
</table>
</p>
<p class="text">
<a name="14360"> </a>
Setting a preference in one of the <code>.js</code> files will create a default value that can be changed by the user by choosing Preferences from the Edit menu. Not all preferences are initialized at startup via these <code>.js</code> files. In addition, some settings are stored in RDF files that live in the operating system's directory after the user installs Mozilla. For example, for Windows NT, the path would be:
</p>
<dl><dl><p>
<code>
<a name="14361"></a>
C:\Winnt\Profiles\user_name\Application
Data\Mozilla\Profiles\<em>profile_name</em>\
</code>
</p></dl></dl><p class="h2">
<a name="14363"> </a>
<a name="Important Legal Restrictions"> </a>
Important Legal Restrictions
</p>
<p class="text">
<a name="14963"> </a>
The license that ships with the CCK tool imposes restrictions on certain kinds of customizations. In particular, under the terms of the license agreement, you may NOT perform any of the following customizations:
</p>
<ul>
<li>
Remove the Search and Directory folder from its location in the Bookmarks menu when you open a new profile with Mozilla 1.4.1.
<a name="14365"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li>
Remove or modify the contents of the Search and Directory folder in the Bookmarks menu.
<a name="14366"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li>
Change the My Sidebar tab that is open by default when you open a new profile with Mozilla 1.4.1 (currently the News tab).
<a name="14367"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li>
Remove the Search or Today's Tips sidebar tabs from the My Sidebar tabs shown by default when you open a new profile with Mozilla 1.4.1.
<a name="14368"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li>
Remove any of the My Sidebar tabs from the list of tabs available to an end user in the default drop-down list of sidebar tabs available when you open a new profile with Mozilla 1.4.1. (It's OK to add additional tabs).
<a name="14369"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li>
Change the default Search service to which the Location Bar Search button and other search services are linked.
<a name="14370"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li>
Change the page that opens by default when Mail starts up.
<a name="14371"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
</ul>
<p class="h1">
<a name="14373"> </a>
<a name="Before You Start"> </a>
Before You Start
<hr size="2" noshade="noshade" />
</p>
<p class="text">
<a name="14375"> </a>
The CCK tool allows you to customize specific aspects of the look and feel of Mozilla. In addition, by editing <code>all.js</code> and other configuration files, you can customize almost any aspect of Mozilla. You'll need to familiarize yourself with the Mozilla user interface and associated preferences to assess how to customize Mozilla for your needs. You'll also need to identify:
</p>
<ul>
<li>
The configuration file (typically a JavaScript file) involved
<a name="14377"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li>
The name of the preference within that configuration file.
<a name="14378"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li>
The <code>.xpi</code> file where the configuration file is located in the installation files produced by the CCK tool.
<a name="14379"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
</ul>
<p class="text">
<a name="14381"> </a>
More details about names of specific preferences and the configuration files where they are stored will be provided online. See the <!--a href="http://home.netscape.com/eng/mozilla/ns62/relnotes/cck.html"-->Mozilla 1.4.1 Client Customization Kit Release Notes<!--</a--> for the most current information. XXX - need mozilla.org equiv
</p>
<p class="text">
<a name="14383"> </a>
Some Mozilla features or attributes are under user control, but only indirectly. Such features include whether certain toolbars are displayed, and also settings that Mozilla remembers automatically, such as window size and position. Such settings are not "preferences" in the typical sense, because they cannot be set from a user-selected window or dialog box. Instead, these features are referred to as Mozilla "states."
</p>
<p class="text">
<a name="14385"> </a>
In addition to the preferences that you can set, you can alter Mozilla configuration settings that are not under direct or indirect user control, such as the items that appear in the Help menu.
</p>
<p class="h1">
<a name="14386"> </a>
<a name="Editing a Configuration File with a Text Editor"> </a>
Editing a Configuration File with a Text Editor
<hr size="2" noshade="noshade" />
</p>
<p class="text">
<a name="14388"> </a>
By editing <code>all-ns.js</code> and other configuration files directly, you can modify Mozilla in a variety of ways. You should use a simple text editor (one that doesn't do any formatting) to modify a configuration file. For example, you can use NotePad for Windows, SimpleText for Mac OS, or vi for X-Motif. If you use a word processor to edit the configuration file, make sure you save the edited configuration file as plain (ASCII) text. If formatted characters are used, the configuration file may not be created correctly.
</p>
<p class="text">
<a name="14390"> </a>
As described above under <a href="advanced_cck.htm#14297" >Understanding How Manual Customization Works</a>, once you have extracted the <code>.js</code> file that you want to modify from the xpi file, you can edit it with a text editor. To do so, you must determine the value type that the preference takes (numeric, string, or boolean) and make the required change to produce the default setting that you want.
</p>
<p class="text">
<a name="14392"> </a>
<b>Important:</b> Don't use Mozilla Composer to edit configuration files. Composer adds characters to the file that can interfere with its use as a configuration file.
</p>
<p class="h1">
<a name="16078"> </a>
<a name="Instructions for Common Manual Customizations"> </a>
Instructions for Common Manual Customizations
<hr size="2" noshade="noshade" />
</p>
<p class="h2">
<a name="14470"> </a>
<a name="Customizing the Welcome Page"> </a>
Customizing the Welcome Page
</p>
<p class="text">
<a name="15886"> </a>
The Welcome page appears when the user starts up a new profile for the first time. You may want to customize it so you can provide up-to-date information for new users when they first launch Mozilla.
</p>
<p class="text">
<a name="15937"> </a>
Follow these steps to manually customize the URL specified for the Welcome page:
</p>
<ol type="1">
<li value="1">
Locate this file:
<a name="15938"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<dl><dl><p>
<code>
<a name="15956"></a>
CCKTool\Configs\my_config\Core\browser.xpi<br />
&nbsp;
</code>
</p></dl></dl>
<li value="2">
Unzip the entire file <code>browser.xpi </code>into a convenient empty directory.
<a name="15888"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li value="3">
In the directory containing the extracted files, locate the file <code>bin/defaults/pref/all-ns.js</code>.
<a name="15890"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li value="4">
Open <code>all-ns.js</code> with a text editor.
<a name="15892"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li value="5">
Locate this line:
<a name="15894"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<dl><dl><p>
<code>
<a name="15896"></a>
pref("browser.startup.homepage",
"chrome://navigator-region/locale/region.properties");<br />
&nbsp;
</code>
</p></dl></dl>
<li value="6">
Change the URL to the URL for your own welcome page and save the file.
<a name="15898"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li value="7">
Zip up the entire <code>bin</code> directory again into a new file called <code>browser.xpi</code>.
<a name="15900"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li value="8">
Replace the original <code>browser.xpi</code> file in <code>CCKTool\Configs\my_config\Core\</code> with the new <code>browser.xpi</code>.
<a name="15902"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
<li value="9">
Test your customization.
<a name="15904"> </a>
<img src="pixel.gif" align="top" height="22" alt="" />
</li><br>
</ol>
</blockquote>
<!--end bookcontent-->
<!--footercontent defines the bottom navigation and the copyright. It also includes
the revision date-->
<!--start footercontent-->
<blockquote>
<br />
<br />
<span class="navigation">
<a style="text-decoration: none" href="cd_man_cck.htm">
Previous
</a>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<span class="navigation">
<a style="text-decoration: none" href="guide.html">
Contents
</a>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<span class="navigation">
<a style="text-decoration: none" href="mac_linux_cck.htm">
Next
</a>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<hr noshade="noshade" size="1" />
<p class="copy">Copyright &#169; 2003 Netscape Communications Corp. All rights reserved.</p>
<br />
<p class="update">Last Updated <b>July 30, 2003</b></p>
</blockquote>
<!--end footercontent-->
<!--end maincontent-->
</body>
</html>