There are some MODs similar to this one in the forum but I found them confusing and I don't get them to work. This one it is really easy to install.
This MOD will allow to your users to select a Country and a gender when they Register. But if u don't do the
step 3 it your user will have the option to select the country and the gender and the show that in their profiles.
If you just want one of these features either Select Country or Select Gender just do what it is after this words.
Screenshot templates/<your templates>/
member_editprofile.html:
Green Gender Select upgradeOrange Country Select upgrade Files to edit:
includes/
db_field_definitions.phplang/<your language>/
main.phptemplates/<your templates>/
member_profile.htmltemplates/<your templates>/
register_form.htmltemplates/<your templates>/
member_editprofile.htmlTo instal this MOD the dropdown for custom fields mod is required
http://www.4homepages.de/forum/index.php?topic=7112.0 First: Open phpMyAdmin and create a new column called
user_country inside of
4images_users I used type varchar (255).
And another for the gender call
user_gender inside of
4images_users I used type text.
Step 1 Open
db_field_definitions.php:
Country Select:Add
before ?> :
$var = array("------------",
"---Africa---",
"Ethiopia",
"Somalia",
"South Africa",
"Other",
"---Middle East---",
"Egypt",
"Iran",
"Israel",
"Kuwait",
"Lebanon",
"Morocco",
"Saudi Arabia",
"Syria",
"Turkey",
"U. A. Emirates",
"Other",
"---Asia---",
"Armenia",
"Bangladesh",
"Cambodia",
"China",
"India",
"Indonesia",
"Japan",
"Malaysia",
"Myanmar",
"Nepal",
"Pakistan",
"Philippines",
"Singapore",
"South Korea",
"Sri Lanka",
"Taiwan",
"Thailand",
"Uzbekistan",
"Vietnam",
"Other",
"---Europe---",
"Albania",
"Austria",
"Belarus",
"Belgium",
"Bosnia",
"Bulgaria",
"Croatia",
"Cyprus",
"Czech Rep.",
"Denmark",
"Estonia",
"Finland",
"France",
"Germany",
"Greece",
"Hungary",
"Iceland",
"Ireland",
"Italy",
"Latvia",
"Liechtenstein",
"Lithuania",
"Luxembourg",
"Macedonia",
"Malta",
"Monaco",
"Netherlands",
"Norway",
"Poland",
"Portugal",
"Romania",
"Russia",
"Slovakia",
"Slovenia",
"Spain",
"Sweden",
"Switzerland",
"Ukraine",
"United Kingdom",
"Other",
"Australia",
"Australia",
"New Zealand",
"Other",
"---Latin America---",
"Costa Rica",
"Cuba",
"El Salvador",
"Guatemala",
"Haiti",
"Jamaica",
"Mexico",
"Panama",
"Other",
"---North America---",
"Canada",
"USA",
"Other",
"---South America---",
"Argentina",
"Bolivia",
"Brazil",
"Chile",
"Colombia",
"Ecuador",
"Paraguay",
"Peru",
"Suriname",
"Uruguay",
"Venezuela",
"Other"
);
$additional_user_fields['user_country'] = array($lang['user_country'], "dropdown", 0, $var, 0, 0, 0, 1);
Gender Select:$additional_user_fields['user_gender'] = array($lang['user_gender'], "dropdown", 0, array("n" => "---","b" => "Bisex", "m" => "Male", "w" => "Female"), 1, 0, 0, 0);
Close and saveStep 2 Open
main.phpCountry Select:Add
before ?> :
$lang['user_country'] = "Country:";
Gender Select:Add
before ?> :
$lang['user_gender'] = "Sex:";
Close and saveStep 3 Open
register_form.html:
Country Select:Find:
<tr>
<td class="row1"><b>{lang_email}</b></td>
<td class="row1"><input type="text" name="user_email" size="30" class="input" value="{user_email}" /></td>
</tr>
Add
after:
<tr>
<td class="row1"><b>{lang_user_country}</b></td>
<td class="row1">{user_country_dropdown} </td>
</tr>
Gender Select:Add this:
<tr>
<td class="row2"><b>{lang_user_gender}</b></td>b
<td class="row2"> <b>{user_gender_dropdown} </b> </td>>
</tr>
Close and saveStep 4 Open
member_editprofile.html:
This step is optional only if you want that the users change their country once the are register.Country Select:Find:
<tr>
<td class="row2"><b>{lang_email_confirm}</b></td>
<td class="row2"><input type="text" name="user_email2" size="30" value="{user_email2}" class="input" /></td>
</tr>
Add
after:
<tr>
<td class="row1"><b>{lang_user_country}</b></td>
<td class="row1">{user_country_dropdown} </td>
</tr>
Gender Select:Add this:
<tr>
<td class="row2"><b>{lang_user_gender}</b></td>
<td class="row2"> <b>{user_gender_dropdown} </b> <img src="{template_url}/images/{user_gender}.gif"></td>>
</tr>
Close and saveStep 5 Open
member_profile.html:
Country Select:Find:
<tr>
<td class="row1"width="40%"><b>{lang_email}</b></td>
<td class="row1">{if user_email}<a href="{user_mailform_link}">{user_email_save}</a>{endif user_email}</td>
</tr>
Add
after:
<tr>
<td class="row2"width="40%"><b>{lang_user_country}</b></td>
<td class="row2">{user_country}</td>
</tr>
Gender Select:Add this:
<tr>
<td class="row2" width="21%"><b>{lang_user_gender}</b></td>
<td class="row2" width="77%"> <img src="{template_url}/images/{user_gender}.gif"></td>
</tr>
Close and saveok, here you have finished, if you just have installed your gallery 4images and u don't have to much member your are fine
But if u have a lot member registered and u want to show a defualt country and gender then u can run these SQL query:
For Gender Select this will show all the users as Males if u change the 'm' for a 'w' it will show the female symbol
UPDATE 4images_users SET user_gender = 'm'
For Country Select UPDATE 4images_users SET user_country = 'your default country'
Upload all the files to your server, and the gif to templates/<your template>/images
That's it!!.
Update: May 5, 2005, 2:42 PM
Save in data base bug solve
Update: May 6, 2005, 4:48 PM
Gender Select upgrade