Made templates modular
[privoxy.git] / templates / blocked
1 ##########################################################
2 #
3 # "Blocked" Error Output template for Privoxy.
4 #
5 #  NOTE: UNLIKE THE OTHER TEMPLATES, THIS ONE USES
6 #  JavaScript write() TO GENERATE THE PAGE IN JS_AWARE
7 #  BROWSERS. SYMBOL SUBSTITUTIONS THAT RESULT IN MULTILINE
8 #  STRINGS WILL BREAK THE JavaScript SYNTAX.
9 #  USE WITH CAUTION.
10 #
11 # USING HTML TEMPLATES:
12 # ---------------------
13 #
14 # Template files are written in plain HTML, with a few
15 # additions:
16
17 # - Lines that start with a '#' character like this one
18 #   are ignored
19 #
20 # - Each item in the below list of exported symbols will
21 #   be replaced by dynamically generated text, if they
22 #   are enclosed in '@'-characters. E.g. The string @version@
23 #   will be replaced by the version number of Privoxy.
24 #
25 # - One special application of this is to make whole blocks
26 #   of the HTML template disappear if the condition <name>
27 #   is not given. Simply enclose the block between the two
28 #   strings @if-<name>start and if-<name>-end@. The strings
29 #   should be placed in HTML comments (<!-- -->), so the
30 #   html structure won't be messed when the magic happens.
31 #   
32 # USABLE SYMBOLS IN THIS TEMPLATE:
33 # --------------------------------
34 #
35 #  my-ip-addr:
36 #    The IP-address that the client used to reach this proxy
37 #  my-hostname:
38 #    The hostname associated with my-ip-addr
39 #  admin-address:
40 #    The email address of the pxoxy's administrator, as configured
41 #    in the config file
42 #  default-cgi:
43 #    The URL for the "main menu" builtin CGI of this proxy
44 #  menu:
45 #    List of <li> elements linking to the other available CGIs
46 #  version:
47 #    The version number of the proxy software
48 #  code-status:
49 #    The development status of the proxy software: "alpha", "beta",
50 #    or "stable".
51 #  homepage:
52 #    The URL of the SourceForge ijbswa project, who maintains this
53 #    software.
54 #
55 #  protocol:
56 #    The request's protocol: http:// or https://
57 #  hostport:
58 #    The host and port part of the request that lead to this problem
59 #  path:
60 #    The path part of the request that lead to this problem
61 #
62 #
63 # CONDITIONAL SYMBOLS FOR THIS TEMPLATE AND THEIR DEPANDANT SYMBOLS:
64 # ------------------------------------------------------------------
65 #
66 #  unstable:
67 #    This is an alpha or beta release of the proxy software
68 #  have-adminaddr-info:
69 #    An e-mail address for the local Privoxy adminstrator has
70 #    been specified and is available through the "admin-address"
71 #    symbol
72 #  have-proxy-info:
73 #    A URL for online documentation about this proxy has been
74 #    specified and is available through the "proxy-info-url"
75 #    symbol
76 #  have-help-info:
77 #    If either have-proxy-info is true or have-adminaddr-info is
78 #    true, have-help-info is true.  Used to conditionally include
79 #    a grey box for any and all help info.
80 #  force-support:
81 #    Privoxy has been compiled with support for forced loading
82 #    of blocked content. In that case, the symbol "force-prefix" is
83 #    avaiable, which translates to the FORCE_PREFIX  
84 #
85 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
86 <html>
87  <head>
88   <title>Request blocked (Privoxy@@my-hostname@)</title>
89   <meta http-equiv="Content-Style-Type" content="text/css">
90   <meta http-equiv="Content-Script-Type" content="text/javascript">
91   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
92   <meta name="robots" content="noindex,nofollow">
93   <link rel="stylesheet" type="text/css" href="@default-cgi@send-stylesheet">
94   <script type="text/javascript" language="javascript">
95   <!--
96     /*
97      * Is this window or frame too small
98      * for the full-blown "blocked" page?
99      */
100     function isSmallFrame()
101     {
102        minWidth  = 650;
103        minHeight = 330;
104
105        /* 
106         * Navigator, Mozilla, Opera
107         */
108        if (window.innerWidth 
109            && (window.innerWidth >= minWidth) 
110            && (window.innerHeight >= minHeight))
111        {
112           return false;
113        }
114  
115        /* 
116         * MSIE
117         */
118        else if (document.body && document.body.clientWidth 
119                 && (document.body.clientWidth >= minWidth)
120                 && (document.body.clientHeight >= minHeight))
121        {
122           return false;
123        }
124
125        /*
126         * Small window or unsupported browser
127         */
128        return true;
129    }
130   //-->
131   </script>
132  </head>
133  <body>
134   <script type="text/javascript" language="javascript">
135   <!--
136 #   Note: The same small version is used at the bottom
137 #         of this file in the <noscript> context. If you
138 #         make changes here, keep the other version in sync!
139
140   if (isSmallFrame())
141   {
142      document.write('\
143    <p class="small" align="center"> \
144     <a href="@default-cgi@" target="_blank">Privoxy</a> blocked <b>@protocol@@hostport@@path@</b>. \
145     <br><a href="@default-cgi@show-url-info?url=@hostport@@path@" target="_blank">See why</a> \
146     <!-- @if-force-support-start --> \
147     or <a href="http://@hostport@@force-prefix@@path@">go there anyway</a>. \
148     <!-- if-force-support-end@ --> \
149    </p> \
150    ');
151
152   }
153   else
154   {
155      document.write('\
156   <table cellpadding="20" cellspacing="10" border="0" width="100%">\
157     <tr> \
158       <td class="status"> \
159         BLOCKED \
160       </td> \
161       <td class="title" width=100%> \
162          <h1> \
163           This is <a href="@homepage@">Privoxy</a> @version@ on @my-hostname@ (@my-ip-address@), port @my-port@, \
164           @if-enabled-display-then@enabled@else-not-enabled-display@disabled@endif-enabled-display@ \
165         </h1> \
166       </td> \
167     </tr> \
168  \
169 <!-- @if-unstable-start --> \
170 # This will only appear if CODE_STATUS is "alpha" or "beta". See configure.in \
171     <tr> \
172       <td class="warning" colspan="2"> \
173         <h2>Warning:</h2> \
174         <p> \
175           <b>Please note that this <font color=red>@code-status@</font> release \
176           of the proxy software is not intended for production systems! \
177           <br>Use at your own risk. See the <a href="http://www.gnu.org/copyleft/gpl.html">license</a> for details.</b> \
178         </p> \
179       </td> \
180     </tr> \
181 <!-- if-unstable-end@ --> \
182  \
183     <tr> \
184       <td class="box" colspan="2"> \
185         <h2>Request for blocked URL</h2> \
186         <p>Your request for <b>@protocol@@hostport@@path@</b> was blocked. \
187           <br><a href="@default-cgi@show-url-info?url=@hostport@@path@">See why</a> \
188     <!-- @if-force-support-start --> \
189           or <a href="http://@hostport@@force-prefix@@path@">go there anyway</a>. \
190 <!-- if-force-support-end@ --> \
191         </p> \
192       </td> \
193     </tr> \
194  \
195     <tr> \
196       <td class="box" colspan="2"> \
197         <h2>More Privoxy:</h2> \
198         <ul>@menu@</ul> \
199       </td> \
200     </tr> \
201  \
202     <tr> \
203       <td class="info" colspan="2"> \
204         <big><b>Support and Service via Sourceforge:</b></big> \
205         <p> \
206           We value your feedback. To provide you with the best support, \
207           we ask that you: \
208         </p> \
209         <ul> \
210           <li> \
211             use the <a href="http://sourceforge.net/tracker/?group_id=11118&amp;atid=211118">support forum</a> or (better) the \
212             <a href="http://sourceforge.net/mail/?group_id=11118">mailing lists</a> to get help. \
213           </li> \
214           <li> \
215             submit banners and all problems with the actions file only through the \
216             <a href="javascript:void(window.open(\'http://www.privoxy.org/actions\',\'Feedback\',\'width=600,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no\').focus());">actions \
217             file feedback system</a>. \
218           </li> \
219           <li> \
220             submit bugs only through our <a href="http://sourceforge.net/tracker/?group_id=11118&amp;atid=111118">bug tracker</a>. \
221             Make sure that the bug has not yet been submitted. \
222           </li> \
223           <li> \
224             submit feature requests only through our <a href="http://sourceforge.net/tracker/?atid=361118&amp;group_id=11118&amp;func=browse">feature \
225             request tracker</a>. \
226           </li> \
227         </ul> \
228       </td> \
229     </tr> \
230  \
231 <!-- @if-have-help-info-start --> \
232     <tr> \
233       <td class="info" colspan="2"> \
234         <h2>Local Privoxy support:</h2> \
235  \
236 <!-- @if-have-proxy-info-start --> \
237         <p>You can consult the <a href="@proxy-info-url@">online documentation</a> for more information about this Privoxy installation.</p> \
238 <!-- if-have-proxy-info-end@ --> \
239  \
240 <!-- @if-have-adminaddr-info-start --> \
241         <p>Address e-mail questions about this service to \
242           <a href="mailto:@admin-address@"><code>@admin-address@</code></a>, \
243           who will be glad to help you. \
244         </p> \
245 <!-- if-have-adminaddr-info-end@ --> \
246       </td> \
247     </tr> \
248 <!-- if-have-help-info-end@ --> \
249  \
250   </table> \
251      ');
252   }
253   //-->
254   </script>
255
256 #   Note: The same small version is used above via JavaScript
257 #         If you make changes here, keep the other version in sync!
258
259   <noscript>
260    <p class="small" align="center">
261     <a href="@default-cgi@" target="_blank">Privoxy</a> blocked <b>@protocol@@hostport@@path@</b>.
262     <br><a href="@default-cgi@show-url-info?url=@hostport@@path@" target="_blank">See why</a>
263     <!-- @if-force-support-start -->
264     or <a href="http://@hostport@@force-prefix@@path@">go there anyway</a>.
265     <!-- if-force-support-end@ -->
266    </p>
267   </noscript>
268
269  </body>
270 </html>