Bonjour,
Un peu lourd la programmation
if ($message['member']['allods']['race'] == 1) {echo '',$txt['allods_race_1'],'';}
else if ($message['member']['allods']['race'] == 2) {echo '',$txt['allods_race_2'],'';}
else if ($message['member']['allods']['race'] == 3) {echo '',$txt['allods_race_3'],'';}
else if ($message['member']['allods']['race'] == 4) {echo '',$txt['allods_race_4'],'';}
else if ($message['member']['allods']['race'] == 5) {echo '',$txt['allods_race_5'],'';}
else if ($message['member']['allods']['race'] == 6) {echo '',$txt['allods_race_6'],'';}
else {echo '-';}
Remplace par
if (isset($message['member']['allods']['race']))
echo $txt['allods_race_'.$message['member']['allods']['race']]';
else
echo '-';
Faire pareil pour les autres conditions ça permet de n'avoir que le fichier de langue à retoucher si tu veux ajouter des paramètres.
<select name="allods_race" id="allods_race">
<option value="0"', $context['member']['allods']['race'] == 0 ? ' selected' : '' ,'>-</option>
<option value="1"', $context['member']['allods']['race'] == 1 ? ' selected' : '' ,'>'.$txt['allods_race_1'].'</option>
<option value="2"', $context['member']['allods']['race'] == 2 ? ' selected' : '' ,'>'.$txt['allods_race_2'].'</option>
<option value="3"', $context['member']['allods']['race'] == 3 ? ' selected' : '' ,'>'.$txt['allods_race_3'].'</option>
<option value="4"', $context['member']['allods']['race'] == 4 ? ' selected' : '' ,'>'.$txt['allods_race_4'].'</option>
<option value="5"', $context['member']['allods']['race'] == 5 ? ' selected' : '' ,'>'.$txt['allods_race_5'].'</option>
<option value="6"', $context['member']['allods']['race'] == 6 ? ' selected' : '' ,'>'.$txt['allods_race_6'].'</option>
Remplace par
<select name="allods_race" id="allods_race">';
For($i=1;$i<7;$i++)
echo '<option value="'.$i.'"'. ($context['member']['allods']['race'] == $i ? ' selected' : '') .'>'.($i == 0 ? '-' : $txt['allods_race_'.$i]).'-</option>';
Faire de même pour le reste et penser à utiliser les tableaux multi-dim serait encore mieux!