The way it will be done is by users typing the languages they speak separated by commas (ie.
cn,it,il)
I haven't tested it, so I have no way of knowing if it works. So you will need to try it and let me know. The user goes into the user control panel, adds the languages (as mentioned in the line above), submits... then look at a viewtopic page and see if the flags appear.
In the profile_add_body.tpl file, FIND:
Code: Select all
<tr>
<td class="row1"><span class="explaintitle">{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>
AFTER ADD:
Code: Select all
<tr>
<td class="row1"><span class="explaintitle">{L_USERFLAGS}:</span></td>
<td class="row2">
<input type="text" class="post" style="width: 200px" name="flagslang" size="35" maxlength="150" value="{USERFLAGS}" />
</td>
</tr>
OPEN includes/usercp_register.php (around line 511)
FIND
Code: Select all
user_interests = '" . str_replace("\'", "''", $interests) . "',
AFTER ADD
Code: Select all
user_flagslang = '" . str_replace("\'", "''", $HTTP_POST_VARS['flagslang']) . "',
FIND (around line 1038)
AFTER ADD
Code: Select all
'USERFLAGS' => $userdata['user_flagslang'],
FIND (around line 1086)
Code: Select all
'L_OCCUPATION' => $lang['Occupation'],
AFTER ADD
Code: Select all
'L_USERFLAGS' => $lang['Userflags'],
OPEN language/lang_english/lang_main.php
FIND
Code: Select all
//
// That's all, Folks!
// -------------------------------------------------
BEFORE ADD
Code: Select all
$lang['Userflags'] = 'Enter the languages you speak, separating each language by commas. These are the abbreviations you need to use: (Chinese: cn, German: de, Spanish: es, Greek: gr, Hebrew: il, Italian: it)';
OPEN viewtopic.php
FIND
Code: Select all
$poster_from = ( $postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : '';
AFTER ADD
Code: Select all
$poster_userflags = ( $postrow[$i]['user_flagslang'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? str_replace(array('cn', 'de', 'es', 'gr', 'il', 'it', ','), array('<img src="http://centerian.free.fr/langdawson/images/languages/cn.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/de.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/es.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/gr.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/il.png" />', '<img src="http://centerian.free.fr/langdawson/images/languages/it.png" />', ''), $postrow[$i]['user_flagslang']) : '';
FIND (around line 1166)
AFTER ADD
Code: Select all
'POSTER_USERFLAGS' => $poster_userflags,
OPEN templates/FISubice/viewtopic_body.html
FIND
AFTER ADD
Code: Select all
<br /><br />{postrow.POSTER_USERFLAGS}
Done.