The best way to learn how to use the WebCore is by example. See the documentation for more information.
The requested URL is always shown first; if a page uses one or more WebCore templates, those are shown afterwards.
Source for: https://www.earthli.com/shared/browser.php
Uses WebCore template(s):
00 <?php
01 require_once ('webcore/init.php');
02 require_once ($Page->page_template_for ('webcore/pages/browser.php'));
03 ?>
Source for template: webcore/pages/browser.php
00 <?php
01
02 /****************************************************************************
03
04 Copyright (c) 2002-2014 Marco Von Ballmoos
05
06 This file is part of earthli WebCore.
07
08 earthli WebCore is free software; you can redistribute it and/or modify
09 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 earthli WebCore is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with earthli WebCore; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
22 For more information about the earthli WebCore, visit:
23
24 http://www.earthli.com/software/webcore
25 ****************************************************************************/
26
27 $Page->template_options->title = 'Browser';
28 $Page->title->subject = 'Browser support';
29 $Page->template_options->check_browser = false;
30
31 $browser = $Env->browser();
32
33 $class_name = $Page->final_class_name('SUBMIT_BROWSER_FORM', 'webcore/forms/submit_browser_form.php');
34 /** @var SUBMIT_BROWSER_FORM $form */
35 $form = new $class_name ($Page);
36 $form->process($browser);
37 if ($form->committed()) {
38 $Env->redirect_local('exception_submitted.php');
39 }
40
41 $Page->location->add_root_link();
42 $Page->location->append('Browser support');
43 $Page->start_display();
44 ?>
45 <div class="main-box">
46 <div class="columns text-flow">
47 <div>
48 <p>Any modern, standards-compliant browser will be able to display this web site nicely. See
49 the sidebar for download links.</p>
50 <p>The FAQ below answers these questions:</p>
51 <ul>
52 <li><a href="#unsupported_browser">Why do I see a warning at the top of the page?</a></li>
53 <li><a href="#what_cant_i_do">What kind of stuff won't I be able to do?</a></li>
54 <li><a href="#remove_warning">How do I get rid of the warning?</a></li>
55 <li><a href="#technologies">What does my browser need?</a></li>
56 <li><a href="#report_problem">How do I report a problem with browser detection?</a></li>
57 </ul>
58 <h2>FAQ</h2>
59 <div>
60 <p class="quote-block" id="unsupported_browser">
61 Why do I see a warning at the top of the page?
62 </p>
63 <p>If your browser's not on this list (yeah, I'm looking at you, Internet Explorer), you'll see
64 this message at the top of the page.</p>
65
66 <?php
67 $Page->show_message('Your browser may have trouble rendering this page. [...]', 'warning');
68 ?>
69 <p>While this site degrades gracefully under older browsers, it won't look as nice as it could.</p>
70 </div>
71 <div>
72 <p class="quote-block" id="what_cant_i_do">
73 What kind of stuff won't I be able to do?
74 </p>
75 <p>If your browser doesn't support alpha-PNGs (see <a href="#your_browser">chart</a> to the right), GIFs are
76 used instead.
77 This means that the icons will only look good on lighter backgrounds, so you won't be able
78 to use all of the themes.</p>
79
80 <p>If your browser doesn't have DOM/DHTML support, all content has to be rendered statically.
81 This takes more space and makes for poorer usability. Lack of CSS2 support causes similar
82 problems, resulting in less flexible layouts.</p>
83
84 <p>The default theme has been carefully designed so that it looks nice even on non-compliant
85 browsers.</p>
86 </div>
87 <div>
88 <p class="quote-block" id="remove_warning">
89 How do I get rid of the warning?
90 </p>
91 <p>You can get rid of the warning by using one of the
92 <a href="#downloads">browsers</a> in the downloads sidebar. Or you can just check the "Do not show this message
93 again." box.</p>
94 </div>
95 <div>
96 <p class="quote-block" id="technologies">
97 What does my browser need?
98 </p>
99 <p><a href="http://earthli.com/software/webcore/">earthli WebCore</a> web sites make
100 use of and are fully compliant with the following web standards:</p>
101 <ul>
102 <li><a href="http://www.w3.org/TR/html4/">HTML 4.01</a> (strict)</li>
103 <li><a href="http://www.w3.org/TR/CSS21/">CSS 2.1</a></li>
104 <li><a href="http://www.w3.org/TR/css3-multicol/">CSS 3 columns</a></li>
105 <li><a href="http://www.w3c.org/DOM/">DOM</a> (levels 1 and 2)</li>
106 <li><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMAScript</a> (aka
107 JavaScript)
108 </li>
109 <li><a href="http://www.libpng.org/pub/png/">PNG graphics</a> (with alpha blending)</li>
110 <li><a href="http://www.faqs.org/rfcs/rfc2965.html">Cookies</a> must be enabled</li>
111 </ul>
112 <p>Your browser's capabilities are listed in the <a href="#your_browser">your browser</a> box above.</p>
113 </div>
114 <div>
115 <p class="quote-block" id="report_problem">
116 How do I report a problem with browser detection?
117 </p>
118 <p id="report_form">If you think you shouldn't be getting a warning (e.g. all technologies listed above
119 are supported) or if there is some other problem, you can:</p>
120 <ul>
121 <li><a href="#" onclick="<?php echo $form->js_form_name(); ?>.submit(); return false;">send</a> just your
122 browser information
123 </li>
124 <li>fill out the form below to provide more information</li>
125 </ul>
126 <?php
127 $form->allow_focus = false;
128 $form->action_anchor = 'report_form';
129 $form->display();
130 ?>
131 </div>
132 </div>
133 <div class="right-sidebar">
134 <h2 id="your_browser">Your browser</h2>
135 <?php
136 $class_name = $Page->final_class_name('BROWSER_RENDERER', 'webcore/gui/browser_renderer.php');
137 /** @var BROWSER_RENDERER $renderer */
138 $renderer = new $class_name ($Page);
139 $renderer->display_as_html($browser);
140 ?>
141 <div class="info-box-bottom">
142 <p>Calculated by the <a href="http://earthli.com/software/browser_detector/">earthli Browser Detector</a>.</p>
143 <p>Something look wrong? <a href="#report_problem">Report it</a>.</p>
144 </div>
145 <h2 id="downloads">
146 <?php echo $Page->get_icon_with_text('{icons}buttons/download_to_hd', Thirty_two_px, 'Download'); ?>
147 </h2>
148 <p>For a better browsing experience, try one of these:</p>
149 <?php
150 $Page->start_icon_container('{icons}logos/browsers/opera1_t', Thirty_two_px);
151 ?>
152 <h3><a href="http://opera.com">Opera</a></h3>
153 <p class="detail">Free (Mac/Windows/Linux)</p>
154 <?php
155 $Page->finish_icon_container();
156 ?>
157 <?php
158 $Page->start_icon_container('{icons}logos/browsers/chrome', Thirty_two_px);
159 ?>
160 <h3><a href="http://google.com/chrome/">Chrome</a></h3>
161 <p class="detail">Free (Mac/Windows/Linux)</p>
162 <?php
163 $Page->finish_icon_container();
164 ?>
165 <?php
166 $Page->start_icon_container('{icons}logos/browsers/firefox', Thirty_two_px);
167 ?>
168 <h3><a href="http://mozilla.org/products/firefox/">Firefox</a></h3>
169 <p class="detail">Free (Mac/Windows/Linux)</p>
170 <?php
171 $Page->finish_icon_container();
172 ?>
173 <?php
174 $Page->start_icon_container('{icons}logos/browsers/safari', Thirty_two_px);
175 ?>
176 <h3><a href="http://apple.com/safari">Safari</a></h3>
177 <p class="detail">Free (Mac)</p>
178 <?php
179 $Page->finish_icon_container();
180 ?>
181 </div>
182 </div>
183 </div>
184 <?php
185 $Page->finish_display();
186 ?>