Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML//EN"> |
2 | <html> | |
3 | <head> | |
4 | <title>MHonArc Resources: ICONS</title> | |
5 | </head> | |
6 | <body> | |
7 | <!--x-rc-nav--> | |
8 | <table border=0><tr valign="top"> | |
9 | <td align="left" width="50%">[Prev: <a href="htmlext.html">HTMLEXT</a>]</td><td><nobr>[<a href="../resources.html#icons">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next: <a href="idxfname.html">IDXFNAME</a>]</td></tr></table> | |
10 | <!--/x-rc-nav--> | |
11 | <hr> | |
12 | <h1>ICONS</h1> | |
13 | ||
14 | <!-- *************************************************************** --> | |
15 | <hr> | |
16 | <h2>Syntax</h2> | |
17 | ||
18 | <dl> | |
19 | ||
20 | <dt><strong>Envariable</strong></dt> | |
21 | <dd><p>N/A | |
22 | </p> | |
23 | </dd> | |
24 | ||
25 | <dt><strong>Element</strong></dt> | |
26 | <dd><p> | |
27 | <code><ICONS><br></code> | |
28 | <var>icon-specification</var><br> | |
29 | <var>icon-specification</var><br> | |
30 | <var>...</var><br> | |
31 | <code></ICONS><br></code> | |
32 | </p> | |
33 | </dd> | |
34 | ||
35 | <dt><strong>Command-line Option</strong></dt> | |
36 | <dd><p>N/A | |
37 | </p> | |
38 | </dd> | |
39 | ||
40 | </dl> | |
41 | ||
42 | <!-- *************************************************************** --> | |
43 | <hr> | |
44 | <h2>Description</h2> | |
45 | ||
46 | <P>The ICONS resource is used to specify the icons that represent the | |
47 | different content-types of messages. This resource is used to | |
48 | define the possible expanded values of the | |
49 | <tt><a href="../rcvars.html#ICON">$ICON$</a></tt> resource variable. | |
50 | </p> | |
51 | ||
52 | <p>The ICON resource can only be defined via the resource file element. | |
53 | The format of each line in the <CODE>ICONS</CODE> element is as | |
54 | follows: | |
55 | </p> | |
56 | <pre> | |
57 | <var>content-type</var>:<var>url</var> | |
58 | </pre> | |
59 | ||
60 | <p>The definition of each item is a follows: | |
61 | ||
62 | <dl> | |
63 | ||
64 | <dt><var>content-type</var></dt> | |
65 | <dd><p>MIME content-type that an icon should be associated to. | |
66 | Examples: <tt>text/plain</tt>, <tt>image/jpeg</tt>. An icon | |
67 | can be associated to a base type by using a <tt>*</tt> as the | |
68 | sub-type. Examples: <tt>text/*</tt>, <tt>image/*</tt>. The | |
69 | default icon can be specified by using a content-type of | |
70 | <tt>*/*</tt>. | |
71 | </p> | |
72 | </dd> | |
73 | ||
74 | <dt><var>url</var></dt> | |
75 | <dd><p>The URL of the icon. Example: <tt>http://host/icons/text.gif</tt>, | |
76 | <tt>/icons/image.gif</tt>. | |
77 | </p> | |
78 | <p>The url can be prefixed with a | |
79 | width and height specification to provide rendering hints to | |
80 | browsers. The syntax for specify the width and height is | |
81 | as follows: <tt>[<var>W</var>x<var>H</var>]</tt>, where | |
82 | <var>W</var> is the width and <var>H</var> is the height. The | |
83 | following is an example URL setting with width and height specification: | |
84 | <tt>[20x22]/icons/image.gif</tt>. | |
85 | </p> | |
86 | <p>The width and height values map directly to the <tt>WIDTH</tt> | |
87 | and <tt>HEIGHT</tt> attributes of the HTML <tt>IMG</tt> element | |
88 | when <tt><a href="../rcvars.html#ICON">$ICON$</a></tt> is used. | |
89 | Specifying the width and height decreases the rendering time | |
90 | of a page since browsers do not have to wait to fetch the image | |
91 | to determine how much area to provide for rendering. | |
92 | </p> | |
93 | </dd> | |
94 | ||
95 | </dl> | |
96 | ||
97 | <P>In order to have icons appear in your pages, use the | |
98 | <tt><a href="../rcvars.html#ICON">$ICON$</a></tt> resource variable. | |
99 | For example: | |
100 | </p> | |
101 | ||
102 | <pre> | |
103 | <b><LiTemplate></b> | |
104 | $ICON$ <strong>$SUBJECT:40$</strong> | |
105 | <em>$FROMNAME$</em><br> | |
106 | <b></LiTemplate></b> | |
107 | </pre> | |
108 | ||
109 | <P>The <CODE>$ICON$</CODE> variable expands to the <CODE>IMG</CODE> | |
110 | HTML element with the appropriate URL in the <CODE>SRC</CODE> attribute | |
111 | to the icon. The <CODE>ALT</CODE> attribute of the <CODE>IMG</CODE> | |
112 | element contains the content-type of the message, surrounded by | |
113 | <CODE>[]</CODE>'s, for use with text based browsers. If the width | |
114 | and height values have been defined for the given URL as described | |
115 | earlier, they will map to the <tt>WIDTH</tt> and <tt>HEIGHT</tt> attributes. | |
116 | </P> | |
117 | ||
118 | <p>The <tt><a href="../rcvars.html#ICONURL">$ICONURL$</a></tt> resource | |
119 | variable may be used if you want redefine the format of the | |
120 | <CODE>IMG</CODE> element. For example: | |
121 | </p> | |
122 | ||
123 | <PRE> | |
124 | <b><LiTemplate></b> | |
125 | <img src="$ICONURL$" alt="*"> | |
126 | <strong>$SUBJECT:40$</strong> | |
127 | <em>$FROMNAME$</em><br> | |
128 | <b></LiTemplate></b> | |
129 | </PRE> | |
130 | ||
131 | <!-- *************************************************************** --> | |
132 | <hr> | |
133 | <h2>Default Setting</h2> | |
134 | ||
135 | <p>Nil. | |
136 | </p> | |
137 | ||
138 | <!-- *************************************************************** --> | |
139 | <hr> | |
140 | <h2>Resource Variables</h2> | |
141 | ||
142 | <p>N/A | |
143 | </p> | |
144 | ||
145 | <!-- *************************************************************** --> | |
146 | <hr> | |
147 | <h2>Examples</h2> | |
148 | ||
149 | <p>The following example works well if using the Apache HTTP server | |
150 | and the default set of icons that are provided with it: | |
151 | </p> | |
152 | <pre> | |
153 | <b><Icons></b> | |
154 | application/*;[20x22]/icons/generic.gif | |
155 | application/msword;[20x22]/icons/layout.gif | |
156 | application/postscript;[20x22]/icons/ps.gif | |
157 | application/rtf;[20x22]/icons/layout.gif | |
158 | application/x-csh;[20x22]/icons/script.gif | |
159 | application/x-dvi;[20x22]/icons/dvi.gif | |
160 | application/x-gtar;[20x22]/icons/tar.gif | |
161 | application/x-gzip;[20x22]/icons/compressed.gif | |
162 | application/x-ksh;[20x22]/icons/script.gif | |
163 | application/x-latex;[20x22]/icons/tex.gif | |
164 | application/octet-stream;[20x22]/icons/binary.gif | |
165 | application/x-patch;[20x22]/icons/patch.gif | |
166 | application/pdf;[20x22]/icons/pdf.gif | |
167 | application/x-script;[20x22]/icons/script.gif | |
168 | application/x-sh;[20x22]/icons/script.gif | |
169 | application/x-tar;[20x22]/icons/tar.gif | |
170 | application/x-tex;[20x22]/icons/tex.gif | |
171 | application/x-zip-compressed;[20x22]/icons/compressed.gif | |
172 | application/zip;[20x22]/icons/compressed.gif | |
173 | audio/*;[20x22]/icons/sound1.gif | |
174 | chemical/*;[20x22]/icons/sphere2.gif | |
175 | image/*;[20x22]/icons/image2.gif | |
176 | message/external-body;[20x22]/icons/link.gif | |
177 | multipart/*;[20x22]/icons/layout.gif | |
178 | text/*;[20x22]/icons/text.gif | |
179 | video/*;[20x22]/icons/movie.gif | |
180 | */*;[20x22]/icons/generic.gif | |
181 | <b></Icons></b> | |
182 | </pre> | |
183 | ||
184 | <!-- *************************************************************** --> | |
185 | <hr> | |
186 | <h2>Version</h2> | |
187 | ||
188 | <p>1.0 | |
189 | </p> | |
190 | ||
191 | <!-- *************************************************************** --> | |
192 | <hr> | |
193 | <h2>See Also</h2> | |
194 | ||
195 | <p> | |
196 | <tt><a href="../rcvars.html#ICON">$ICON$</a></tt>, | |
197 | <tt><a href="../rcvars.html#ICONURL">$ICONURL$</a></tt>, | |
198 | <a href="litemplate.html">LITEMPLATE</a>, | |
199 | <a href="tlitxt.html">TLITXT</a>, | |
200 | <a href="tsingletxt.html">TSINGLETXT</a>, | |
201 | <a href="ttopbegin.html">TTOPBEGIN</a> | |
202 | </p> | |
203 | <p>The | |
204 | <tt><a href="mimefilters.html#m2h_external">m2h_external::filter</a></tt> | |
205 | <a href="mimefilters.html">mime filter</a>. | |
206 | </p> | |
207 | ||
208 | <!-- *************************************************************** --> | |
209 | <hr> | |
210 | <!--x-rc-nav--> | |
211 | <table border=0><tr valign="top"> | |
212 | <td align="left" width="50%">[Prev: <a href="htmlext.html">HTMLEXT</a>]</td><td><nobr>[<a href="../resources.html#icons">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next: <a href="idxfname.html">IDXFNAME</a>]</td></tr></table> | |
213 | <!--/x-rc-nav--> | |
214 | <hr> | |
215 | <address> | |
216 | $Date: 2002/07/27 05:13:10 $ <br> | |
217 | <img align="top" src="../monicon.png" alt=""> | |
218 | <a href="http://www.mhonarc.org/"><strong>MHonArc</strong></a><br> | |
219 | Copyright © 1997-2001, <a href="http://www.earlhood.com/">Earl Hood</a>, <a href="mailto:mhonarc@mhonarc.org">mhonarc@mhonarc.org</a><br> | |
220 | </address> | |
221 | ||
222 | </body> | |
223 | </html> |