Voilà , j'ai un soucis... j'ai beau avoir tout essayé, je n'y arrive pas...
Comment rendre un fichier .txt compatible avec easymod... Juste un seul fichier.... j'ai tout testé (mettre dans un dossier, mettre en anglais, etc...) mais rien à faire, je dois louper un truc...
Donc si tu pouvais me dire exactement ce que je dois faire, ce serai vraiment chouet!!!
Merci mille fois !!!
Voici en l'occurence le fichier que je souhiaterai effectuer par EM :
Code : Tout sélectionner
###################################################################################
##
## Titre du Hack : Add new field to profile
## Version du Hack : 1.0.6 (ex phpbb 2.0.4)
## Auteur Acid
## Support: https://www.phpbbhacks.com/forums
## Traduction: Weboac (weboac@yahoo.fr)
##
## Description: Juste un petit MOD pour ajouter un champ au profil. "music" peut Ătre
## changĂ en "n'importe quoi" bien spur mais attention, mettez la mĂme
## chose ⥠chaque fois que vous voyez "music", "MUSIC" ou encore
## "user_music".
## Traduction en franĂais: "music" = "musique", changer aussi celui-l⥠!
## Si vous voulez crĂer plus de champs, il suffit de reproduire
## les Ătapes et de changer "music".
##
## Fichiers ⥠Ăditer: 9
## admin/admin_users.php
## language/lang_english/lang_main.php
## language/lang_french/lang_main.php
## includes/usercp_viewprofile.php
## includes/usercp_register.php
## includes/usercp_avatar.php
## templates/xxx/admin/user_edit_body.tpl
## templates/xxx/profile_add_body.tpl
## templates/xxx/profile_view_body.tpl
##
##
###################################################################################
##
## Installation/Note de l'auteur:
## Toujours faire une sauvegarde des fichiers que vous allez Ăditer.
##
## Ce hacks va crĂer une nouvelle collone dans votre 'user' table.
##
###################################################################################
#
#-----[ SQL ]-------------------------------------------
#
# Vous devez changer le prĂfixe de votre database.
ALTER TABLE test_users ADD user_music VARCHAR(255);
## Vous pouvez utiliser table_update.php pour modifier votre database automatiquement.
## (Simplement, uploader le fichier et le lancer)
#
#-----[ UPLOADER ]------------------------------------------
#
/table_update.php ...pour modifier la database
/table_delete.php ...pour annuler la modification
## Ces fichiers doivent Ătre deletĂs aprĂs utilisation.
#
#-----[ OUVRIR ]------------------------------------------
#
# language/lang_english/lang_main.php
#
#-----[ TROUVER ]---------------------------------------------------
#
//
// That's all Folks!
#
#-----[ AVANT, AJOUTER ]---------------------------------------------------
#
$lang['Music'] = "Music";
#
#-----[ OUVRIR ]------------------------------------------
#
# language/lang_french/lang_main.php
#
#-----[ TROUVER ]---------------------------------------------------
#
//
// That's all Folks!
#
#-----[ AVANT, AJOUTER ]---------------------------------------------------
#
$lang['Music'] = "Musique";
#
#-----[ OUVRIR ]------------------------------------------
#
# includes/usercp_viewprofile.php
#
#-----[ TROUVER ]---------------------------------------------------
#
'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
'MUSIC' => ( $profiledata['user_music'] ) ? $profiledata['user_music'] : ' ',
#
#-----[ TROUVER ]---------------------------------------------------
#
'L_INTERESTS' => $lang['Interests'],
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
'L_MUSIC' => $lang['Music'],
#
#-----[ OUVRIR ]------------------------------------------
#
# includes/usercp_register.php
#
#-----[ TROUVER ]---------------------------------------------------
#
$strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests');
#
#-----[ DANS LA LIGNE, TROUVER ]---------------------------------------------------
#
'interests'
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
, 'music' => 'music'
#
#-----[ TROUVER ]---------------------------------------------------
#
validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature);
#
#-----[ DANS LA LIGNE, TROUVER ]---------------------------------------------------
#
$interests
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
, $music
#
#-----[ TROUVER ]---------------------------------------------------
#
$interests = stripslashes($interests);
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
$music = stripslashes($music);
#
#-----[ TROUVER ]---------------------------------------------------
#
$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 . "
#
#-----[ DANS LA LIGNE, TROUVER ]---------------------------------------------------
#
$interests) . "'
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
, user_music = '" . str_replace("\'", "''", $music) . "'
#
#-----[ TROUVER ]---------------------------------------------------
#
$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("\'", "''", $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, ";
#
#-----[ DANS LA LIGNE, TROUVER ]---------------------------------------------------
#
user_interests
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
, user_music
#
#-----[ DANS LA LIGNE, TROUVER ]---------------------------------------------------
#
$interests) . "'
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
, '" . str_replace("\'", "''", $music) . "'
#
#-----[ TROUVER ]---------------------------------------------------
#
$interests = stripslashes($interests);
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
$music = stripslashes($music);
#
#-----[ TROUVER ]---------------------------------------------------
#
$interests = $userdata['user_interests'];
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
$music = $userdata['user_music'];
#
#-----[ TROUVER ]---------------------------------------------------
#
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']);
#
#-----[ DANS LA LIGNE, TROUVER ]---------------------------------------------------
#
$user_dateformat
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
, $music
#
#-----[ TROUVER (cherchez juste la derniĂre ligne) ]--------------------------
#
$template->assign_vars(array(
.
.
.
.
'INTERESTS' => $interests,
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
'MUSIC' => $music,
#
#-----[ TROUVER ]---------------------------------------------------
#
'L_INTERESTS' => $lang['Interests'],
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
'L_MUSIC' => $lang['Music'],
#
#-----[ OUVRIR ]------------------------------------------
#
# includes/usercp_avatar.php
#
#-----[ TROUVER ]---------------------------------------------------
#
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)
#
#-----[ DANS LA LIGNE, TROUVER ]---------------------------------------------------
#
&$dateformat
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
, &$music
#
#-----[ TROUVER ]---------------------------------------------------
#
$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');
#
#-----[ DANS LA LIGNE, TROUVER ]---------------------------------------------------
#
'dateformat'
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
, 'music'
#
#-----[ OUVRIR ]------------------------------------------
#
# admin/admin_users.php
#
#-----[ TROUVER ]---------------------------------------------------
#
$interests = ( !empty($HTTP_POST_VARS['interests']) ) ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : '';
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
$music = ( !empty($HTTP_POST_VARS['music']) ) ? trim(strip_tags( $HTTP_POST_VARS['music'] ) ) : '';
#
#-----[ TROUVER ]---------------------------------------------------
#
validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature);
#
#-----[ DANS LA LIGNE, TROUVER ]---------------------------------------------------
#
$interests
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
, $music
#
#-----[ TROUVER (1Ăre apparition) ]--------------------------------------------
#
$interests = htmlspecialchars(stripslashes($interests));
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
$music = htmlspecialchars(stripslashes($music));
#
#-----[ TROUVER ]---------------------------------------------------
#
$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 . "
#
#-----[ DANS LA LIGNE, TROUVER ]---------------------------------------------------
#
$interests) . "'
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
, user_music = '" . str_replace("\'", "''", $music) . "'
#
#-----[ TROUVER (2Ăme apparition) ]-------------------------------------------
#
$interests = htmlspecialchars(stripslashes($interests));
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
$music = htmlspecialchars(stripslashes($music));
#
#-----[ TROUVER ]---------------------------------------------------
#
$interests = htmlspecialchars($this_userdata['user_interests']);
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
$music = htmlspecialchars($this_userdata['user_music']);
#
#-----[ TROUVER ]---------------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="interests" value="' . str_replace("\"", """, $interests) . '" />';
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="music" value="' . str_replace("\"", """, $music) . '" />';
#
#-----[ TROUVER ]---------------------------------------------------
#
'INTERESTS' => $interests,
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
'MUSIC' => $music,
#
#-----[ TROUVER ]---------------------------------------------------
#
'L_INTERESTS' => $lang['Interests'],
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
'L_MUSIC' => $lang['Music'],
#
#-----[ OUVRIR ]------------------------------------------
#
# templates/xxx/profile_add_body.tpl
#
#-----[ TROUVER ]---------------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_INTERESTS}:</span></td>
<td class="row2">
<input type="text" class="post"style="width: 200px" name="interests" size="35" maxlength="150" value="{INTERESTS}" />
</td>
</tr>
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_MUSIC}:</span></td>
<td class="row2">
<input type="text" class="post"style="width: 200px" name="music" size="35" maxlength="150" value="{MUSIC}" />
</td>
</tr>
#
#-----[ OUVRIR ]------------------------------------------
#
# templates/xxx/profile_view_body.tpl
#
#-----[ TROUVER ]---------------------------------------------------
#
<tr>
<td valign="top" align="right"><span class="gen">{L_INTERESTS}:</span></td>
<td> <b><span class="gen">{INTERESTS}</span></b></td>
</tr>
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
<tr>
<td valign="top" align="right"><span class="gen">{L_MUSIC}:</span></td>
<td> <b><span class="gen">{MUSIC}</span></b></td>
</tr>
#
#-----[ OUVRIR ]------------------------------------------
#
# templates/xxx/admin/user_edit_body.tpl
#
#-----[ TROUVER ]---------------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_INTERESTS}</span></td>
<td class="row2">
<input type="text" name="interests" size="35" maxlength="150" value="{INTERESTS}" />
</td>
</tr>
#
#-----[ APRES, AJOUTER ]---------------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_MUSIC}</span></td>
<td class="row2">
<input class="post" type="text" name="music" size="35" maxlength="50" value="{MUSIC}" />
</td>
</tr>
#############################################################################################################################################################################################
#############################################################################################################################################################################################
#############################################################################################################################################################################################
Encore merci
