-
Jan III Sobieski

- Posty: 9421
- Rejestracja: 21 kwie 2013, o 16:16
- Beczki: 138
-
Kontaktowanie:
Post #259616 autor: Jan III Sobieski » 27 lut 2016, o 19:22
To jest poradnik jak zainstalować mod TruNik na forumenie.
Kod: Zaznacz cały
TruNik
Cartman
Poziom trudności: Jołki połki izi pizi
Czas potrzebny na instalacje: 5min
Pliki do zmiany : 5
Tajm tu plej de gejm
Otwórz plik includes\usercp_viewprofile.php
-
[+] Pokaż
Kod: Zaznacz cały
za
$username = $profiledata['username'];
z linii 50
dodaj to
$trunick = $profiledata['trunick'];
Kod: Zaznacz cały
za
'USERNAME' => $username,
z linii 670
dodaj to
'TRUNICK' => $trunick,
Kod: Zaznacz cały
To w linii 736
'L_VIEWING_PROFILE' => sprintf($lang['Viewing_user_profile'], $username . $gender_image),
zamień na
'L_VIEWING_PROFILE' => ($username == $trunick or $trunick == null) ? sprintf($lang['Viewing_user_profile'], $username . $gender_image) : sprintf($lang['Viewing_user_profile'], $username . " aka " . $trunick . $gender_image),
Plik admin\admin_users.php
-
[+] Pokaż
Kod: Zaznacz cały
Za
$username = ( !empty($HTTP_POST_VARS['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
w linii 129 dodaj to
$trunick = ( !empty($HTTP_POST_VARS['trunick']) ) ? phpbb_clean_username($HTTP_POST_VARS['trunick']) : '';
Kod: Zaznacz cały
za
$username = stripslashes($username);
w linii 208 dodaj to
$trunick = stripslashes($trunick);
Kod: Zaznacz cały
za
if (stripslashes($username) != $this_userdata['username'])
{
unset($rename_user);
if ( stripslashes(strtolower($username)) != strtolower($this_userdata['username']) )
{
$result = validate_username($username);
if ( $result['error'] )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result['error_msg'];
}
else if ( strtolower(str_replace("\\'", "''", $username)) == strtolower($userdata['username']) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Username_taken'];
}
}
if (!$error)
{
$username_sql = "username = '" . str_replace("\\'", "''", $username) . "', ";
$rename_user = $username; // Used for renaming usergroup
}
}
Kod: Zaznacz cały
wstaw to
if (stripslashes($trunick) != $this_userdata['trunick'])
{
unset($rename_trunick);
if ( stripslashes(strtolower($trunick)) != strtolower($this_userdata['trunick']) )
{
$result = validate_username($trunick);
if ( $result['error'] )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result['error_msg'];
}
else if ( strtolower(str_replace("\\'", "''", $trunick)) == strtolower($userdata['trunick']) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Username_taken'];
}
}
if (!$error)
{
$trunick_sql = "trunick = '" . str_replace("\\'", "''", $trunick) . "', ";
$rename_trunick = $trunick; // Used for renaming usergroup
}
}
Kod: Zaznacz cały
obok . $username_sql w linii 947 wstaw to
. $trunick_sql .
Kod: Zaznacz cały
za $username = xhtmlspecialchars(stripslashes($username)); w linii 1007 wstaw to
$trunick = xhtmlspecialchars(stripslashes($trunick));
Kod: Zaznacz cały
za $username = $this_userdata['username']; w linii 1061 wstaw to
$trunick = $this_userdata['trunick'];
Kod: Zaznacz cały
za
$s_hidden_fields .= '<input type="hidden" name="username" value="' . str_replace("\"", """, $username) . '" />';
wstaw
$s_hidden_fields .= '<input type="hidden" name="trunick" value="' . str_replace("\"", """, $trunick) . '" />';
Kod: Zaznacz cały
za 'L_USERNAME' => $lang['Username'],
wstaw
'L_TRUNICK' => $lang['Trunick'],
Kod: Zaznacz cały
za 'USERNAME' => $username,
wstaw
'TRUNICK' => $trunick,
za = poniżej
Koniec parta 1.
_________________
Znowu jakieś bajki piszesz, kurwa Hans Kartman Blaklordsen się znalazł
~Ridż
To jest poradnik jak zainstalować mod TruNik na forumenie.
[code]TruNik
Cartman
Poziom trudności: Jołki połki izi pizi
Czas potrzebny na instalacje: 5min
Pliki do zmiany : 5
[/code]
Tajm tu plej de gejm
Otwórz plik includes\usercp_viewprofile.php
[spoiler][code]za
$username = $profiledata['username'];
z linii 50
dodaj to
$trunick = $profiledata['trunick'];[/code]
[code]za
'USERNAME' => $username,
z linii 670
dodaj to
'TRUNICK' => $trunick, [/code]
[code]To w linii 736
'L_VIEWING_PROFILE' => sprintf($lang['Viewing_user_profile'], $username . $gender_image),
zamień na
'L_VIEWING_PROFILE' => ($username == $trunick or $trunick == null) ? sprintf($lang['Viewing_user_profile'], $username . $gender_image) : sprintf($lang['Viewing_user_profile'], $username . " aka " . $trunick . $gender_image),[/code][/spoiler]
Plik admin\admin_users.php
[spoiler][code]
Za
$username = ( !empty($HTTP_POST_VARS['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
w linii 129 dodaj to
$trunick = ( !empty($HTTP_POST_VARS['trunick']) ) ? phpbb_clean_username($HTTP_POST_VARS['trunick']) : '';[/code]
[code]za
$username = stripslashes($username);
w linii 208 dodaj to
$trunick = stripslashes($trunick);[/code]
[code]za
if (stripslashes($username) != $this_userdata['username'])
{
unset($rename_user);
if ( stripslashes(strtolower($username)) != strtolower($this_userdata['username']) )
{
$result = validate_username($username);
if ( $result['error'] )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result['error_msg'];
}
else if ( strtolower(str_replace("\\'", "''", $username)) == strtolower($userdata['username']) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Username_taken'];
}
}
if (!$error)
{
$username_sql = "username = '" . str_replace("\\'", "''", $username) . "', ";
$rename_user = $username; // Used for renaming usergroup
}
}[/code]
[code]wstaw to
if (stripslashes($trunick) != $this_userdata['trunick'])
{
unset($rename_trunick);
if ( stripslashes(strtolower($trunick)) != strtolower($this_userdata['trunick']) )
{
$result = validate_username($trunick);
if ( $result['error'] )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result['error_msg'];
}
else if ( strtolower(str_replace("\\'", "''", $trunick)) == strtolower($userdata['trunick']) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Username_taken'];
}
}
if (!$error)
{
$trunick_sql = "trunick = '" . str_replace("\\'", "''", $trunick) . "', ";
$rename_trunick = $trunick; // Used for renaming usergroup
}
}[/code]
[code]obok . $username_sql w linii 947 wstaw to
. $trunick_sql .[/code]
[code]za $username = xhtmlspecialchars(stripslashes($username)); w linii 1007 wstaw to
$trunick = xhtmlspecialchars(stripslashes($trunick));[/code]
[code]za $username = $this_userdata['username']; w linii 1061 wstaw to
$trunick = $this_userdata['trunick'];[/code]
[code]za
$s_hidden_fields .= '<input type="hidden" name="username" value="' . str_replace("\"", """, $username) . '" />';
wstaw
$s_hidden_fields .= '<input type="hidden" name="trunick" value="' . str_replace("\"", """, $trunick) . '" />';[/code]
[code]za 'L_USERNAME' => $lang['Username'],
wstaw
'L_TRUNICK' => $lang['Trunick'],[/code]
[code]za 'USERNAME' => $username,
wstaw
'TRUNICK' => $trunick,[/code][/spoiler]
za = poniżej
Koniec parta 1.
-
Jan III Sobieski

- Posty: 9421
- Rejestracja: 21 kwie 2013, o 16:16
- Beczki: 138
-
Kontaktowanie:
Post #259618 autor: Jan III Sobieski » 27 lut 2016, o 19:31
Part 2
plik templates\szablon\admin\user_edit_body.tpl
-
[+] Pokaż
Kod: Zaznacz cały
za
<tr>
<td class="row1"><span class="gen">{L_CONFIRM_PASSWORD}: * </span><br>
<span class="gensmall">{L_PASSWORD_CONFIRM_IF_CHANGED}</span></td>
<td class="row2">
<input type="password" class="post" name="password_confirm" size="35" maxlength="100" value="">
</td>
</tr>
Kod: Zaznacz cały
dodaj
<tr>
<td class="row1" width="48%"><span class="gen">{L_TRUNICK}: *</span></td>
<td class="row2">
<input type="text" class="post" name="trunick" size="35" maxlength="40" value="{TRUNICK}">
</td>
</tr>
Plik includes\usercp_register.php
-
[+] Pokaż
Kod: Zaznacz cały
to
$sql = "INSERT INTO " . USERS_TABLE . " (username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_interests, user_from, " . $sql_custom_fields . " user_sig, user_sig_bbcode_uid, user_sig_image, user_avatar, user_avatar_type, user_viewemail, user_viewaim, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_gg, user_notify_pm, user_popup_pm, user_timezone, user_lang, user_custom_color, user_custom_rank, user_style, user_gender, allowpm, user_level, user_allow_pm, user_ip, user_ip_login_check, user_active, user_actkey)
VALUES ('" . str_replace("\'", "''", $username). "', " . CR_TIME . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $location) . "', " . $sql_custom_values . " '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $signature_sql, $avatar_sql, $viewemail, $viewaim, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $user_notify_gg, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_lang) . "', '" . str_replace("\'", "''", $custom_color) . "', '" . str_replace("\'", "''", $custom_rank) . "', $user_style, '$gender', $allowpm, 0, 1, '$user_ip', $user_ip_login_check, ";
Kod: Zaznacz cały
zamień na
$sql = "INSERT INTO " . USERS_TABLE . " (username, trunick, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_interests, user_from, " . $sql_custom_fields . " user_sig, user_sig_bbcode_uid, user_sig_image, user_avatar, user_avatar_type, user_viewemail, user_viewaim, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_gg, user_notify_pm, user_popup_pm, user_timezone, user_lang, user_custom_color, user_custom_rank, user_style, user_gender, allowpm, user_level, user_allow_pm, user_ip, user_ip_login_check, user_active, user_actkey)
VALUES ('" . str_replace("\'", "''", $username) . "', '" . str_replace("\'", "''", $username) . "', " . CR_TIME . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $location) . "', " . $sql_custom_values . " '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $signature_sql, $avatar_sql, $viewemail, $viewaim, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $user_notify_gg, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_lang) . "', '" . str_replace("\'", "''", $custom_color) . "', '" . str_replace("\'", "''", $custom_rank) . "', $user_style, '$gender', $allowpm, 0, 1, '$user_ip', $user_ip_login_check, ";
Plik lang\polish\lang_main.php
-
[+] Pokaż
Kod: Zaznacz cały
za
$lang['Username'] = 'Użytkownik';
wstaw
$lang['Trunick'] = 'Prawdziwy nick';
That's All Foks!
Dodano: 27-02-2016, 19:31Finczy pisze:Co to jest TruNik? nie znam się.
Taki fajny mod, jak ricz wprowadzi to sam zobaczysz.
Ostatnio zmieniony 27 lut 2016, o 19:34 przez
Jan III Sobieski, łącznie zmieniany 1 raz.
_________________
Znowu jakieś bajki piszesz, kurwa Hans Kartman Blaklordsen się znalazł
~Ridż
Part 2
plik templates\szablon\admin\user_edit_body.tpl
[spoiler][code]za
<tr>
<td class="row1"><span class="gen">{L_CONFIRM_PASSWORD}: * </span><br>
<span class="gensmall">{L_PASSWORD_CONFIRM_IF_CHANGED}</span></td>
<td class="row2">
<input type="password" class="post" name="password_confirm" size="35" maxlength="100" value="">
</td>
</tr>[/code]
[code]dodaj
<tr>
<td class="row1" width="48%"><span class="gen">{L_TRUNICK}: *</span></td>
<td class="row2">
<input type="text" class="post" name="trunick" size="35" maxlength="40" value="{TRUNICK}">
</td>
</tr>[/code][/spoiler]
Plik includes\usercp_register.php
[spoiler][code]to
$sql = "INSERT INTO " . USERS_TABLE . " (username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_interests, user_from, " . $sql_custom_fields . " user_sig, user_sig_bbcode_uid, user_sig_image, user_avatar, user_avatar_type, user_viewemail, user_viewaim, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_gg, user_notify_pm, user_popup_pm, user_timezone, user_lang, user_custom_color, user_custom_rank, user_style, user_gender, allowpm, user_level, user_allow_pm, user_ip, user_ip_login_check, user_active, user_actkey)
VALUES ('" . str_replace("\'", "''", $username). "', " . CR_TIME . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $location) . "', " . $sql_custom_values . " '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $signature_sql, $avatar_sql, $viewemail, $viewaim, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $user_notify_gg, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_lang) . "', '" . str_replace("\'", "''", $custom_color) . "', '" . str_replace("\'", "''", $custom_rank) . "', $user_style, '$gender', $allowpm, 0, 1, '$user_ip', $user_ip_login_check, ";
[/code]
[code]zamień na
$sql = "INSERT INTO " . USERS_TABLE . " (username, trunick, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_interests, user_from, " . $sql_custom_fields . " user_sig, user_sig_bbcode_uid, user_sig_image, user_avatar, user_avatar_type, user_viewemail, user_viewaim, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_gg, user_notify_pm, user_popup_pm, user_timezone, user_lang, user_custom_color, user_custom_rank, user_style, user_gender, allowpm, user_level, user_allow_pm, user_ip, user_ip_login_check, user_active, user_actkey)
VALUES ('" . str_replace("\'", "''", $username) . "', '" . str_replace("\'", "''", $username) . "', " . CR_TIME . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $location) . "', " . $sql_custom_values . " '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $signature_sql, $avatar_sql, $viewemail, $viewaim, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $user_notify_gg, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_lang) . "', '" . str_replace("\'", "''", $custom_color) . "', '" . str_replace("\'", "''", $custom_rank) . "', $user_style, '$gender', $allowpm, 0, 1, '$user_ip', $user_ip_login_check, ";
[/code][/spoiler]
Plik lang\polish\lang_main.php
[spoiler][code]za
$lang['Username'] = 'Użytkownik';
wstaw
$lang['Trunick'] = 'Prawdziwy nick';[/code][/spoiler]
That's All Foks!
[size=117][color=#555555] [b]Dodano: 27-02-2016, 19:31[/b][/color][/size]
[quote="Finczy"]Co to jest TruNik? nie znam się.[/quote]
Taki fajny mod, jak ricz wprowadzi to sam zobaczysz.