aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php30
-rw-r--r--phpBB/styles/prosilver/template/ucp_prefs_personal.html42
-rw-r--r--phpBB/styles/subsilver2/template/ucp_prefs_personal.html18
3 files changed, 62 insertions, 28 deletions
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index 17d7d23f02..19e1b45787 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -134,6 +134,33 @@ class ucp_prefs
}
$dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
+ // check for count of installed languages
+ $sql = 'SELECT lang_id
+ FROM ' . LANG_TABLE;
+ $result = $db->sql_query($sql);
+ if( $db->sql_affectedrows() > 1 )
+ {
+ $s_more_languages = true;
+ }
+ else
+ {
+ $s_more_languages = false;
+ }
+
+ // check for count of installed and active styles
+ $sql = 'SELECT style_id
+ FROM ' . STYLES_TABLE . '
+ WHERE style_active = 1';
+ $result = $db->sql_query($sql);
+ if( $db->sql_affectedrows() > 1 )
+ {
+ $s_more_styles = true;
+ }
+ else
+ {
+ $s_more_styles = false;
+ }
+
$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
@@ -155,6 +182,9 @@ class ucp_prefs
'DEFAULT_DATEFORMAT' => $config['default_dateformat'],
'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']),
+ 'S_MORE_LANGUAGES' => $s_more_languages,
+ 'S_MORE_STYLES' => $s_more_styles,
+
'S_LANG_OPTIONS' => language_select($data['lang']),
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']),
'S_TZ_OPTIONS' => tz_select($data['tz'], true),
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html
index 9022346627..416343e57d 100644
--- a/phpBB/styles/prosilver/template/ucp_prefs_personal.html
+++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html
@@ -12,21 +12,21 @@
<dl>
<dt><label for="viewemail0">{L_SHOW_EMAIL}:</label></dt>
<dd>
- <label for="viewemail1"><input type="radio" name="viewemail" id="viewemail1" value="1"<!-- IF S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="viewemail1"><input type="radio" name="viewemail" id="viewemail1" value="1"<!-- IF S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="viewemail0"><input type="radio" name="viewemail" id="viewemail0" value="0"<!-- IF not S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
<dt><label for="massemail1">{L_ADMIN_EMAIL}:</label></dt>
<dd>
- <label for="massemail1"><input type="radio" name="massemail" id="massemail1" value="1"<!-- IF S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="massemail1"><input type="radio" name="massemail" id="massemail1" value="1"<!-- IF S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="massemail0"><input type="radio" name="massemail" id="massemail0" value="0"<!-- IF not S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
<dt><label for="allowpm1">{L_ALLOW_PM}:</label><br /><span>{L_ALLOW_PM_EXPLAIN}</span></dt>
<dd>
- <label for="allowpm1"><input type="radio" name="allowpm" id="allowpm1" value="1"<!-- IF S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="allowpm1"><input type="radio" name="allowpm" id="allowpm1" value="1"<!-- IF S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="allowpm0"><input type="radio" name="allowpm" id="allowpm0" value="0"<!-- IF not S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
@@ -34,17 +34,17 @@
<dl>
<dt><label for="hideonline0">{L_HIDE_ONLINE}:</label><br /><span>{L_HIDE_ONLINE_EXPLAIN}</span></dt>
<dd>
- <label for="hideonline1"><input type="radio" name="hideonline" id="hideonline1" value="1"<!-- IF S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="hideonline1"><input type="radio" name="hideonline" id="hideonline1" value="1"<!-- IF S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="hideonline0"><input type="radio" name="hideonline" id="hideonline0" value="0"<!-- IF not S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
- <!-- ENDIF -->
+ <!-- ENDIF -->
<!-- IF S_SELECT_NOTIFY -->
<dl>
<dt><label for="notifymethod0">{L_NOTIFY_METHOD}:</label></dt>
<dd>
- <label for="notifymethod0"><input type="radio" name="notifymethod" id="notifymethod0" value="0"<!-- IF S_NOTIFY_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_EMAIL}</label>
- <label for="notifymethod1"><input type="radio" name="notifymethod" id="notifymethod1" value="1"<!-- IF S_NOTIFY_IM --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_IM}</label>
+ <label for="notifymethod0"><input type="radio" name="notifymethod" id="notifymethod0" value="0"<!-- IF S_NOTIFY_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_EMAIL}</label>
+ <label for="notifymethod1"><input type="radio" name="notifymethod" id="notifymethod1" value="1"<!-- IF S_NOTIFY_IM --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_IM}</label>
<label for="notifymethod2"><input type="radio" name="notifymethod" id="notifymethod2" value="2"<!-- IF S_NOTIFY_BOTH --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_BOTH}</label>
</dd>
</dl>
@@ -52,22 +52,24 @@
<dl>
<dt><label for="notifypm1">{L_NOTIFY_ON_PM}:</label></dt>
<dd>
- <label for="notifypm1"><input type="radio" name="notifypm" id="notifypm1" value="1"<!-- IF S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="notifypm1"><input type="radio" name="notifypm" id="notifypm1" value="1"<!-- IF S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="notifypm0"><input type="radio" name="notifypm" id="notifypm0" value="0"<!-- IF not S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
<dt><label for="popuppm0">{L_POPUP_ON_PM}:</label></dt>
<dd>
- <label for="popuppm1"><input type="radio" name="popuppm" id="popuppm1" value="1"<!-- IF S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="popuppm1"><input type="radio" name="popuppm" id="popuppm1" value="1"<!-- IF S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="popuppm0"><input type="radio" name="popuppm" id="popuppm0" value="0"<!-- IF not S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
- <dl>
- <dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt>
- <dd><select name="lang" id="lang">{S_LANG_OPTIONS}</select></dd>
- </dl>
- <!-- IF S_STYLE_OPTIONS -->
+ <!-- IF S_MORE_LANGUAGES -->
+ <dl>
+ <dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt>
+ <dd><select name="lang" id="lang">{S_LANG_OPTIONS}</select></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF S_STYLE_OPTIONS and S_MORE_STYLES -->
<dl>
<dt><label for="style">{L_BOARD_STYLE}:</label></dt>
<dd><select name="style" id="style">{S_STYLE_OPTIONS}</select></dd>
@@ -80,7 +82,7 @@
<dl>
<dt><label for="dst1">{L_BOARD_DST}:</label></dt>
<dd>
- <label for="dst1"><input type="radio" name="dst" id="dst1" value="1"<!-- IF S_DST --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="dst1"><input type="radio" name="dst" id="dst1" value="1"<!-- IF S_DST --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="dst0"><input type="radio" name="dst" id="dst0" value="0"<!-- IF not S_DST --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
@@ -97,9 +99,9 @@
<span class="corners-bottom"><span></span></span></div>
</div>
-
+
<fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
@@ -113,9 +115,9 @@
function customDates()
{
var e = document.getElementById('dateoptions');
-
+
e.selectedIndex = e.length - 1;
-
+
// Loop and match date_format in menu
for (var i = 0; i < e.length; i++)
{
@@ -125,7 +127,7 @@
break;
}
}
-
+
// Show/hide custom field
if (e.selectedIndex == e.length - 1)
{
diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
index e2266b7d38..c604671c5c 100644
--- a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
+++ b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
@@ -29,43 +29,45 @@
<td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
</tr>
<!-- ENDIF -->
-<tr>
+<tr>
<td class="row1" width="50%"><b class="genmed">{L_SHOW_EMAIL}:</b></td>
<td class="row2"><input type="radio" class="radio" name="viewemail" value="1"<!-- IF S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="viewemail" value="0"<!-- IF not S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
</tr>
-<tr>
+<tr>
<td class="row1" width="50%"><b class="genmed">{L_ADMIN_EMAIL}:</b></td>
<td class="row2"><input type="radio" class="radio" name="massemail" value="1"<!-- IF S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="massemail" value="0"<!-- IF not S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
</tr>
-<tr>
+<tr>
<td class="row1" width="50%"><b class="genmed">{L_ALLOW_PM}:</b><br /><span class="gensmall">{L_ALLOW_PM_EXPLAIN}</span></td>
<td class="row2"><input type="radio" class="radio" name="allowpm" value="1"<!-- IF S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="allowpm" value="0"<!-- IF not S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
</tr>
<!-- IF S_CAN_HIDE_ONLINE -->
- <tr>
+ <tr>
<td class="row1" width="50%"><b class="genmed">{L_HIDE_ONLINE}:</b><br /><span class="gensmall">{L_HIDE_ONLINE_EXPLAIN}</span></td>
<td class="row2"><input type="radio" class="radio" name="hideonline" value="1"<!-- IF S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="hideonline" value="0"<!-- IF not S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
</tr>
<!-- ENDIF -->
<!-- IF S_SELECT_NOTIFY -->
- <tr>
+ <tr>
<td class="row1" width="50%"><b class="genmed">{L_NOTIFY_METHOD}:</b><br /><span class="gensmall">{L_NOTIFY_METHOD_EXPLAIN}</span></td>
<td class="row2"><input type="radio" class="radio" name="notifymethod" value="0"<!-- IF S_NOTIFY_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NOTIFY_METHOD_EMAIL}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="notifymethod" value="1"<!-- IF S_NOTIFY_IM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NOTIFY_METHOD_IM}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="notifymethod" value="2"<!-- IF S_NOTIFY_BOTH --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NOTIFY_METHOD_BOTH}</span></td>
</tr>
<!-- ENDIF -->
-<tr>
+<tr>
<td class="row1" width="50%"><b class="genmed">{L_NOTIFY_ON_PM}:</b></td>
<td class="row2"><input type="radio" class="radio" name="notifypm" value="1"<!-- IF S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="notifypm" value="0"<!-- IF not S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
</tr>
-<tr>
+<tr>
<td class="row1" width="50%"><b class="genmed">{L_POPUP_ON_PM}:</b></td>
<td class="row2"><input type="radio" class="radio" name="popuppm" value="1"<!-- IF S_POPUP_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="popuppm" value="0"<!-- IF not S_POPUP_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
</tr>
+<!-- IF S_MORE_LANGUAGES -->
<tr>
<td class="row1" width="50%"><b class="genmed">{L_BOARD_LANGUAGE}:</b></td>
<td class="row2"><select name="lang">{S_LANG_OPTIONS}</select></td>
</tr>
-<!-- IF S_STYLE_OPTIONS -->
+<!-- ENDIF -->
+<!-- IF S_STYLE_OPTIONS and S_MORE_STYLES -->
<tr>
<td class="row1" width="50%"><b class="genmed">{L_BOARD_STYLE}:</b></td>
<td class="row2"><select name="style">{S_STYLE_OPTIONS}</select></td>