Hi there,
here's what I did to display the flag in memberlist:
Open memberlist.php and find
PHP Code:
if ($userinfo[receivepm]) {
eval("\$userinfo[pmlink] = \"".gettemplate("postbit_sendpm")."\";");
} else {
$userinfo[pmlink] = " ";
}
Just below it add
PHP Code:
// Country Hack
if (!$userinfo[country]) {
$flag = " ";
} else {
$Country=$post[country];
$Countryalt = str_replace("%20"," ",$Country);
$flag = "<img src=\"images/flags/$Country.gif\" alt=\"$Countryalt\" border=\"0\">";
}
// Country Hack End
Now you need to modify memberlist and memberlistbit template.
In the template memberlist you need to increase the colspan of the td tag to 7:
PHP Code:
<td bgcolor="{ categorybackcolor }" colspan="7"><normalfont color="{ categoryfontcolor }"><b>$bbtitle Members List</b></normalfont></td>
After you done that, insert
PHP Code:
<td bgcolor="{ tableheadbgcolor }" align="center"><smallfont color="{ tableheadtextcolor }"><b>Country Flag</b></smallfont></td>
wherever you like. Be sure the remember where it was since you need to insert it at the same place in memberlistbit. E.g. if you add it after Email you need to put the following
PHP Code:
<td bgcolor="{ firstaltcolor }">$flag</td>
just after
PHP Code:
<td bgcolor=" { secondaltcolor } ">$userinfo[useremail]</td>
Please omit the spaces around the {} brackets. You may need to change the order of first- and secondaltcolor to get alternating colors.
Alternatively, you could leave memberlist alone and insert only $userinfo[country]. This will display the countries name.