Met deze mod zou het moeten lukken.
Code: Selecteer alles
#
# OPEN
#
viewtopic.php
#
# FIND
#
if ( !empty($HTTP_POST_VARS['postorder']) || !empty($HTTP_GET_VARS['postorder']) )
{
$post_order = (!empty($HTTP_POST_VARS['postorder'])) ? $HTTP_POST_VARS['postorder'] : $HTTP_GET_VARS['postorder'];
$post_time_order = ($post_order == "asc") ? "ASC" : "DESC";
}
else
{
$post_order = 'asc';
$post_time_order = 'ASC';
}
#
# REPLACE WITH
#
if ( !empty($HTTP_POST_VARS['postorder']) || !empty($HTTP_GET_VARS['postorder']) )
{
$post_order = (!empty($HTTP_POST_VARS['postorder'])) ? $HTTP_POST_VARS['postorder'] : $HTTP_GET_VARS['postorder'];
$post_time_order = ($post_order == "asc") ? "ASC" : "DESC";
}
else
{
$post_order = strtolower($userdata['user_orderpref']);
$post_time_order = $userdata['user_orderpref'];
}
#
# OPEN
#
admin/admin_users.php
#
# FIND
#
$user_style = ( $HTTP_POST_VARS['style'] ) ? intval( $HTTP_POST_VARS['style'] ) : $board_config['default_style'];
#
# AFTER, ADD
#
$orderpref = ( $HTTP_POST_VARS['orderpref'] ) ? trim($HTTP_POST_VARS['orderpref']) : 'ASC';
#
# FIND
#
$sql = "UPDATE " . USERS_TABLE . "
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . "
WHERE user_id = $user_id";
#
# FIND
#
, user_style = $user_style
#
# AFTER, ADD
#
, user_orderpref = '$orderpref'
#
# FIND
#
$user_style = $this_userdata['user_style'];
#
# AFTER, ADD
#
$orderpref = $this_userdata['user_orderpref'];
#
# FIND
#
$s_hidden_fields .= '<input type="hidden" name="style" value="' . $user_style . '" />';
#
# AFTER, ADD
#
$s_hidden_fields .= '<input type="hidden" name="orderpref" value="' . $orderpref . '" />';
#
# FIND
#
'STYLE_SELECT' => style_select($user_style, 'style'),
#
# AFTER, ADD
#
'ORDER_PREF_ASC' => ( $orderpref == 'ASC' ) ? ' checked="checked"' : '',
'ORDER_PREF_DESC' => ( $orderpref == 'DESC' ) ? ' checked="checked"' : '',
#
# FIND
#
'L_BOARD_STYLE' => $lang['Board_style'],
#
# AFTER, ADD
#
'L_ORDER_PREF' => $lang['Order_pref'],
'L_ASCENDING' => $lang['Sort_Ascending'],
'L_DESCENDING' => $lang['Sort_Ascending'],
#
# OPEN
#
includes/usercp_avatar.php
#
# FIND
#
function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$new_password, &$cur_password, &$password_confirm, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$popuppm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat, &$session_id)
#
# INLINE, FIND
#
, &$style
#
# AFTER, ADD
#
, &$orderpref
#
# FIND
#
$params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popuppm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');
#
# INLINE, FIND
#
, 'style'
#
# AFTER, ADD
#
, 'orderpref'
#
# OPEN
#
includes/usercp_register.php
#
# FIND
#
$user_style = ( isset($HTTP_POST_VARS['style']) ) ? intval($HTTP_POST_VARS['style']) : $board_config['default_style'];
#
# AFTER, ADD
#
$orderpref = ( isset($HTTP_POST_VARS['orderpref']) ) ? trim($HTTP_POST_VARS['orderpref']) : 'ASC';
#
# FIND
# $sql = "UPDATE " . USERS_TABLE . "
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "
WHERE user_id = $user_id";
#
# INLINE, FIND
#
, user_style = $user_style
#
# AFTER, ADD
#
, user_orderpref = '$orderpref'
#
# FIND
#
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
#
# INLINE, FIND
#
, user_style
#
# AFTER, ADD
#
, user_orderpref
#
# INLINE, FIND
, $user_style
#
# AFTER, ADD
#
, '$orderpref'
#
# FIND
#
$user_style = $userdata['user_style'];
#
# AFTER, ADD
#
$orderpref = $userdata['user_orderpref'];
#
# FIND
#
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, &$new_password, &$cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popuppm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);
#
# INLINE, FIND
#
, $user_style
#
# AFTER, ADD
#
, $orderpref
#
# FIND
#
'STYLE_SELECT' => style_select($user_style, 'style'),
#
# AFTER, ADD
#
'ORDER_PREF_ASC' => ( $orderpref == 'ASC' ) ? ' checked="checked"' : '',
'ORDER_PREF_DESC' => ( $orderpref == 'DESC' ) ? ' checked="checked"' : '',
#
# FIND
#
'L_BOARD_STYLE' => $lang['Board_style'],
#
# AFTER, ADD
#
'L_ORDER_PREF' => $lang['Order_pref'],
'L_ORDER_PREF_EXPLAIN' => $lang['Order_pref_explain'],
'L_ASCENDING' => $lang['Sort_Ascending'],
'L_DESCENDING' => $lang['Sort_Ascending'],
#
# OPEN
#
language/lang_english/lang_main.php
#
# FIND
#
//
// That's all Folks!
#
# BEFORE, ADD
#
$lang['Order_pref'] = 'Topics order preference';
$lang['Order_pref_explain'] = 'This setting will sort posts in topics in descending or ascending order.';
#
# OPEN
#
templates/subSilver/profile_add_body.tpl
#
# FIND
#
<tr>
<td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td>
<td class="row2"><span class="gensmall">{LANGUAGE_SELECT}</span></td>
</tr>
#
# BEFORE, ADD
#
<tr>
<td class="row1"><span class="gen">{L_ORDER_PREF}:</span><br /><span class="gensmall">{L_ORDER_PREF_EXPLAIN}</span></td>
<td class="row2"><span class="genmed"><input type="radio" name="orderpref" value="ASC"{ORDER_PREF_ASC} />{L_ASCENDING}&&<input type="radio" name="orderpref" value="DESC"{ORDER_PREF_DESC} />{L_DESCENDING}</span></td>
</tr>
#
# OPEN
#
templates/subSilver/admin/user_edit_body.tpl
#
# FIND
#
<tr>
<td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td>
<td class="row2">{LANGUAGE_SELECT}</td>
</tr>
#
# BEFORE, ADD
#
<tr>
<td class="row1"><span class="gen">{L_ORDER_PREF}:</span><br /><span class="gensmall">{L_ORDER_PREF_EXPLAIN}</span></td>
<td class="row2"><span class="gen"><input type="radio" name="orderpref" value="ASC"{ORDER_PREF_ASC} />{L_ASCENDING}&&<input type="radio" name="orderpref" value="DESC"{ORDER_PREF_DESC} />{L_DESCENDING}</span></td>
</tr>
Let op: dit is eigelijk een phpBB 2.0.4 mod, in 2.0.5 of later zou je mogelijk de
queries niet volledig kunnen vinden.