**********************************************************************************
the origin mod is from "amra"
info@sumotoy.com
http://www.sumotoy.com

this version is edited by ZOC, august 2006
**********************************************************************************
At first, upload the gifs in folder /images  !!
And you MUST install the infusion, for install the gender table in DB.

get_gender($data['user_id'],"text") for TEXT or
get_gender($data['user_id'],"icon") for an Icon

------------------------------------------------------
This Infusion/mod add a gender option to user profile.
It's function based to it's easy to add to your panels.


Basically it needs to include a file at the start of the file and call his functions.
This section will mod profile include for updating the gender table.


Open includes/update_profile_include.php
search for 

if (!iMEMBER) fallback("index.php");

Add this:
// gender mod
require_once INFUSIONS."gender/includes/mf_libs.php";


search for:

redirect("edit_profile.php?update_profile=ok");

just before, add this:

//gender mod
gender_update($_POST['user_gender'],$userdata['user_id']);

Now open edit_profile.php

Look for the first:

if (iMEMBER) {

add this:
// gender mod
require_once INFUSIONS."gender/includes/mf_libs.php";

Now look for:
	for ($i=1900;$i<=2004;$i++) echo "<option".($user_year == $i ? " selected" : "").">$i</option>\n";
echo "</select>
</td>
</tr>
<tr>

modify like this;

	for ($i=1900;$i<=2004;$i++) echo "<option".($user_year == $i ? " selected" : "").">$i</option>\n";
echo "</select>
</td>
</tr>";
set_gender("");
echo "
<tr>


If you want to show user gender in profile, you need to open profile.php and mod like this.

look for:

	if (!isset($lookup) || !isNum($lookup)) fallback("index.php");

add this:

	//mf_mod
	require_once INFUSIONS."gender/includes/mf_libs.php";

look for:

</table>\n";
	if ($data['user_groups']) {

write BEFORE </table:

<tr>
<td width='1%' class='tbl1' style='white-space:nowrap'><b>Geschlecht/Gender:</b></td>
<td class='tbl1'>".get_gender($data['user_id'],"text")."</td>
</tr>


If you want you gender in the board, for example under the avatar do this:

add this in the header in viewthread.php (by the other requires):
//mf_mod
require_once INFUSIONS."gender/includes/mf_libs.php";

and then search:
echo "<span class='alt'>".$locale['502']."</span> ".$data['user_posts']."<br>\n";

and change with this:
$resultgen = dbquery("SELECT gender FROM ".$db_prefix."gender WHERE user_id = ".$data['user_id']);
if (dbrows($resultgen) != 0) echo $locale['gender_input'].get_gender($data['user_id'],"icon")."";
echo "<br><br><br><span class='alt'>".$locale['502']."</span> ".$data['user_posts']."<br>\n";



ready!
