source: trunk/admin/themes/default/template/install.tpl @ 8311

Last change on this file since 8311 was 8311, checked in by plg, 13 years ago

feature 2087 added: use a checkbox in the installation screen for newsletter subscription

  • Property svn:eol-style set to LF
File size: 10.2 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2"http://www.w3.org/TR/html4/strict.dtd">
3<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset={$T_CONTENT_ENCODING}">
6<meta http-equiv="Content-script-type" content="text/javascript">
7<meta http-equiv="Content-Style-Type" content="text/css">
8<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
9
10{get_combined_css}
11{foreach from=$themes item=theme}
12{if $theme.load_css}
13{combine_css path="admin/themes/`$theme.id`/theme.css" order=-10}
14{/if}
15{/foreach}
16
17<!-- BEGIN get_combined_scripts -->
18{get_combined_scripts load='header'}
19<!-- END get_combined_scripts -->
20
21{combine_script id='jquery' path='themes/default/js/jquery.min.js'}
22{literal}
23<script type="text/javascript">
24$(function() {
25    $option_selected = $('#dblayer option:selected').attr('value');
26    if ($option_selected=='sqlite' || $option_selected=='pdo-sqlite') {
27       $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide();
28    }
29    if ($option_selected=='mysql') {
30        $('#experimentalDbEngines').hide();
31    }
32
33    $('#dblayer').change(function() {
34        $db = this;
35        if ($db.value=='sqlite' || $db.value=='pdo-sqlite') {
36           $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide();
37        } else {
38           $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().show();
39        }
40
41        if ($db.value=='mysql') {
42            $('#experimentalDbEngines').hide();
43        }
44        else {
45            $('#experimentalDbEngines').show();
46        }
47      });
48  });
49
50$(document).ready(function() {
51  $("a.externalLink").click(function() {
52    window.open($(this).attr("href"));
53    return false;
54  });
55
56  $("#admin_mail").keyup(function() {
57    $(".adminEmail").text($(this).val());
58  });
59});
60
61</script>
62
63<style type="text/css">
64body {
65  font-size:12px;
66}
67
68.content {
69 width: 800px;
70 margin: auto;
71 text-align: center;
72 padding:0;
73 background-color:transparent !important;
74 border:none;
75}
76
77#theHeader {
78  display: block;
79  background:url("admin/themes/clear/images/piwigo_logo_big.png") no-repeat scroll center 20px transparent;
80  height:100px;
81}
82
83fieldset {
84  margin-top:20px;
85  background-color:#f1f1f1;
86}
87
88legend {
89  font-weight:bold;
90  letter-spacing:2px;
91}
92
93.content h2 {
94  display:block;
95  font-size:20px;
96  text-align:center;
97  /* margin-top:5px; */
98}
99
100table.table2 {
101  width: 100%;
102  border:0;
103}
104
105table.table2 td {
106  text-align: left;
107  padding: 5px 2px;
108}
109
110table.table2 td.fieldname {
111  font-weight:normal;
112}
113
114table.table2 td.fielddesc {
115  padding-left:10px;
116  font-style:italic;
117}
118
119input[type="submit"], input[type="button"] {
120  font-size:14px;
121  font-weight:bold;
122  letter-spacing:2px;
123  border:none;
124  background-color:#666666;
125  color:#fff;
126  padding:5px;
127  -moz-border-radius:5px;
128}
129
130input[type="submit"]:hover, input[type="button"]:hover {
131  background-color:#ff7700;
132  color:white;
133}
134
135input[type="text"], input[type="password"], select {
136  background-color:#ddd;
137  border:2px solid #ccc;
138  -moz-border-radius:5px;
139  padding:2px;
140}
141
142input[type="text"]:focus, input[type="password"]:focus, select:focus {
143  background-color:#fff;
144  border:2px solid #ff7700;
145}
146
147.sql_content, .infos a {
148  color: #ff3363;
149}
150
151.errors {
152  padding-bottom:5px;
153}
154
155</style>
156{/literal}
157
158{combine_script id='jquery.cluetip' load='async' require='jquery' path='themes/default/js/plugins/jquery.cluetip.packed.js'}
159
160{footer_script require='jquery.cluetip'}
161jQuery().ready(function(){ldelim}
162        jQuery('.cluetip').cluetip({ldelim}
163                width: 300,
164                splitTitle: '|',
165                positionBy: 'bottomTop'
166        });
167});
168{/footer_script}
169
170
171<title>Piwigo {$RELEASE} - {'Installation'|@translate}</title>
172</head>
173
174<body>
175<div id="the_page">
176<div id="theHeader"></div>
177<div id="content" class="content">
178
179<h2>{'Version'|@translate} {$RELEASE} - {'Installation'|@translate}</h2>
180
181{if isset($config_creation_failed)}
182<div class="errors">
183  <p style="margin-left:30px;">
184    <strong>{'Creation of config file local/config/database.inc.php failed.'|@translate}</strong>
185  </p>
186  <ul>
187    <li>
188      <p>{'You can download the config file and upload it to local/config directory of your installation.'|@translate}</p>
189      <p style="text-align:center">
190          <input type="button" value="{'Download the config file'|@translate}" onClick="window.open('{$config_url}');">
191      </p>
192    </li>
193    <li>
194      <p>{'An alternate solution is to copy the text in the box above and paste it into the file "local/config/database.inc.php" (Warning : database.inc.php must only contain what is in the textarea, no line return or space character)'|@translate}</p>
195      <textarea rows="15" cols="70">{$config_file_content}</textarea>
196    </li>
197  </ul>
198</div>
199{/if}
200
201{if isset($errors)}
202<div class="errors">
203  <ul>
204    {foreach from=$errors item=error}
205    <li>{$error}</li>
206    {/foreach}
207  </ul>
208</div>
209{/if}
210
211{if isset($infos)}
212<div class="infos">
213  <ul>
214    {foreach from=$infos item=info}
215    <li>{$info}</li>
216    {/foreach}
217  </ul>
218</div>
219{/if}
220
221{if isset($install)}
222<form method="POST" action="{$F_ACTION}" name="install_form">
223
224<fieldset>
225  <legend>{'Basic configuration'|@translate}</legend>
226
227  <table class="table2">
228    <tr>
229      <td style="width: 30%">{'Default gallery language'|@translate}</td>
230      <td>
231    <select name="language" onchange="document.location = 'install.php?language='+this.options[this.selectedIndex].value;">
232    {html_options options=$language_options selected=$language_selection}
233    </select>
234      </td>
235    </tr>
236  </table>
237</fieldset>
238
239<fieldset>
240  <legend>{'Database configuration'|@translate}</legend>
241
242  <table class="table2">
243    {if count($F_DB_ENGINES)>1}
244    <tr>
245      <td style="width: 30%;" class="fieldname">{'Database type'|@translate}</td>
246      <td>
247        <select name="dblayer" id="dblayer">
248          {foreach from=$F_DB_ENGINES key=k item=v}
249          <option value="{$k}"
250                  {if $k==$F_DB_LAYER and $v.available} selected="selected"{/if}
251                  {if !$v.available} disabled="disabled"{/if}
252                  >{$v.label}</option>
253          {/foreach}
254        </select>   
255      </td>
256      <td class="fielddesc">{'The type of database your piwigo data will be store in'|@translate}</td>
257    {else}
258    <td colspan="3">
259    <input type="hidden" name="dbengine" value="{$F_DB_LAYER}">
260    </td>
261    {/if}
262    </tr>
263    <tr id="experimentalDbEngines">
264      <td colspan="3">
265<div class="warnings">
266      {'SQLite and PostgreSQL are currently in experimental state.'|@translate}
267      <a href="http://piwigo.org/forum/viewtopic.php?id=15927" class="externalLink">{'Learn more'|@translate}</a>
268</div>
269      </td>
270    </tr>
271    <tr>
272      <td style="width: 30%;" class="fieldname">{'Host'|@translate}</td>
273      <td><input type="text" name="dbhost" value="{$F_DB_HOST}"></td>
274      <td class="fielddesc">{'localhost, sql.multimania.com, toto.freesurf.fr'|@translate}</td>
275    </tr>
276    <tr>
277      <td class="fieldname">{'User'|@translate}</td>
278      <td><input type="text" name="dbuser" value="{$F_DB_USER}"></td>
279      <td class="fielddesc">{'user login given by your host provider'|@translate}</td>
280    </tr>
281    <tr>
282      <td class="fieldname">{'Password'|@translate}</td>
283      <td><input type="password" name="dbpasswd" value=""></td>
284      <td class="fielddesc">{'user password given by your host provider'|@translate}</td>
285    </tr>
286    <tr>
287      <td class="fieldname">{'Database name'|@translate}</td>
288      <td><input type="text" name="dbname" value="{$F_DB_NAME}"></td>
289      <td class="fielddesc">{'also given by your host provider'|@translate}</td>
290    </tr>
291    <tr>
292      <td class="fieldname">{'Database table prefix'|@translate}</td>
293      <td><input type="text" name="prefix" value="{$F_DB_PREFIX}"></td>
294      <td class="fielddesc">{'database tables names will be prefixed with it (enables you to manage better your tables)'|@translate}</td>
295    </tr>
296  </table>
297
298</fieldset>
299<fieldset>
300  <legend>{'Admin configuration'|@translate}</legend>
301
302  <table class="table2">
303    <tr>
304      <td style="width: 30%;" class="fieldname">{'Webmaster login'|@translate}</td>
305      <td><input type="text" name="admin_name" value="{$F_ADMIN}"></td>
306      <td class="fielddesc">{'It will be shown to the visitors. It is necessary for website administration'|@translate}</td>
307    </tr>
308    <tr>
309      <td class="fieldname">{'Webmaster password'|@translate}</td>
310      <td><input type="password" name="admin_pass1" value=""></td>
311      <td class="fielddesc">{'Keep it confidential, it enables you to access administration panel'|@translate}</td>
312    </tr>
313    <tr>
314      <td class="fieldname">{'Password [confirm]'|@translate}</td>
315      <td><input type="password" name="admin_pass2" value=""></td>
316      <td class="fielddesc">{'verification'|@translate}</td>
317    </tr>
318    <tr>
319      <td class="fieldname">{'Webmaster mail address'|@translate}</td>
320      <td><input type="text" name="admin_mail" id="admin_mail" value="{$F_ADMIN_EMAIL}"></td>
321      <td class="fielddesc">{'Visitors will be able to contact site administrator with this mail'|@translate}</td>
322    </tr>
323    <tr>
324      <td>{'Options'|@translate}</options>
325      <td colspan="2">
326<label>
327<input type="checkbox" name="newsletter_subscribe"{if $F_NEWSLETTER_SUBSCRIBE} checked="checked"{/if}>
328<span class="cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|htmlspecialchars|nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</span>
329</label>
330<br>
331      </td>
332    </tr>
333  </table>
334
335</fieldset>
336
337  <div style="text-align:center; margin:20px 0 10px 0">
338    <input class="submit" type="submit" name="install" value="{'Start Install'|@translate}">
339  </div>
340</form>
341{else}
342<p>
343  <input type="button" name="Home" value="{'Visit Gallery'|@translate}" onClick="window.open('index.php');">
344</p>
345{/if}
346</div> {* content *}
347<div style="text-align: center">{$L_INSTALL_HELP}</div>
348</div> {* the_page *}
349
350<!-- BEGIN get_combined_scripts -->
351{get_combined_scripts load='footer'}
352<!-- END get_combined_scripts -->
353
354</body>
355</html>
Note: See TracBrowser for help on using the repository browser.