mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 14:48:53 +00:00
[ticket/11103] Re-add notify method to the UCP preferences
I've noticed that this is used in other areas still in phpBB, so it should not be removed. PHPBB3-11103
This commit is contained in:
parent
bc18e368c3
commit
4874226b6e
3 changed files with 27 additions and 0 deletions
|
@ -37,6 +37,7 @@ class ucp_prefs
|
||||||
case 'personal':
|
case 'personal':
|
||||||
add_form_key('ucp_prefs_personal');
|
add_form_key('ucp_prefs_personal');
|
||||||
$data = array(
|
$data = array(
|
||||||
|
'notifymethod' => request_var('notifymethod', $user->data['user_notify_type']),
|
||||||
'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true),
|
'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true),
|
||||||
'lang' => basename(request_var('lang', $user->data['user_lang'])),
|
'lang' => basename(request_var('lang', $user->data['user_lang'])),
|
||||||
'style' => request_var('style', (int) $user->data['user_style']),
|
'style' => request_var('style', (int) $user->data['user_style']),
|
||||||
|
@ -48,6 +49,12 @@ class ucp_prefs
|
||||||
'allowpm' => request_var('allowpm', (bool) $user->data['user_allow_pm']),
|
'allowpm' => request_var('allowpm', (bool) $user->data['user_allow_pm']),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($data['notifymethod'] == NOTIFY_IM && (!$config['jab_enable'] || !$user->data['user_jabber'] || !@extension_loaded('xml')))
|
||||||
|
{
|
||||||
|
// Jabber isnt enabled, or no jabber field filled in. Update the users table to be sure its correct.
|
||||||
|
$data['notifymethod'] = NOTIFY_BOTH;
|
||||||
|
}
|
||||||
|
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
if ($config['override_user_style'])
|
if ($config['override_user_style'])
|
||||||
|
@ -77,6 +84,7 @@ class ucp_prefs
|
||||||
'user_allow_viewemail' => $data['viewemail'],
|
'user_allow_viewemail' => $data['viewemail'],
|
||||||
'user_allow_massemail' => $data['massemail'],
|
'user_allow_massemail' => $data['massemail'],
|
||||||
'user_allow_viewonline' => ($auth->acl_get('u_hideonline')) ? !$data['hideonline'] : $user->data['user_allow_viewonline'],
|
'user_allow_viewonline' => ($auth->acl_get('u_hideonline')) ? !$data['hideonline'] : $user->data['user_allow_viewonline'],
|
||||||
|
'user_notify_type' => $data['notifymethod'],
|
||||||
'user_options' => $user->data['user_options'],
|
'user_options' => $user->data['user_options'],
|
||||||
|
|
||||||
'user_dateformat' => $data['dateformat'],
|
'user_dateformat' => $data['dateformat'],
|
||||||
|
@ -122,6 +130,9 @@ class ucp_prefs
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
|
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||||
|
|
||||||
|
'S_NOTIFY_EMAIL' => ($data['notifymethod'] == NOTIFY_EMAIL) ? true : false,
|
||||||
|
'S_NOTIFY_IM' => ($data['notifymethod'] == NOTIFY_IM) ? true : false,
|
||||||
|
'S_NOTIFY_BOTH' => ($data['notifymethod'] == NOTIFY_BOTH) ? true : false,
|
||||||
'S_VIEW_EMAIL' => $data['viewemail'],
|
'S_VIEW_EMAIL' => $data['viewemail'],
|
||||||
'S_MASS_EMAIL' => $data['massemail'],
|
'S_MASS_EMAIL' => $data['massemail'],
|
||||||
'S_ALLOW_PM' => $data['allowpm'],
|
'S_ALLOW_PM' => $data['allowpm'],
|
||||||
|
|
|
@ -39,6 +39,16 @@
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</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="notifymethod2"><input type="radio" name="notifymethod" id="notifymethod2" value="2"<!-- IF S_NOTIFY_BOTH --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_BOTH}</label>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<!-- ENDIF -->
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt>
|
<dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt>
|
||||||
<dd><select name="lang" id="lang">{S_LANG_OPTIONS}</select></dd>
|
<dd><select name="lang" id="lang">{S_LANG_OPTIONS}</select></dd>
|
||||||
|
|
|
@ -47,6 +47,12 @@
|
||||||
<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> <input type="radio" class="radio" name="hideonline" value="0"<!-- IF not S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</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> <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>
|
</tr>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
<!-- IF S_SELECT_NOTIFY -->
|
||||||
|
<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> <input type="radio" class="radio" name="notifymethod" value="1"<!-- IF S_NOTIFY_IM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NOTIFY_METHOD_IM}</span> <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_BOARD_LANGUAGE}:</b></td>
|
<td class="row1" width="50%"><b class="genmed">{L_BOARD_LANGUAGE}:</b></td>
|
||||||
<td class="row2"><select name="lang">{S_LANG_OPTIONS}</select></td>
|
<td class="row2"><select name="lang">{S_LANG_OPTIONS}</select></td>
|
||||||
|
|
Loading…
Add table
Reference in a new issue