4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: ascanio on April 12, 2005, 11:04:05 PM
-
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.
:arrow: Screenshot templates/<your templates>/member_editprofile.html:
(http://members.cox.net/jaimeascanio/gendercountry.png)
Green :arrow: Gender Select upgrade
Orange :arrow: Country Select upgrade
:arrow: Files to edit:
includes/db_field_definitions.php
lang/<your language>/main.php
templates/<your templates>/member_profile.html
templates/<your templates>/register_form.html
templates/<your templates>/member_editprofile.html
To instal this MOD the dropdown for custom fields mod is required :arrow: http://www.4homepages.de/forum/index.php?topic=7112.0
:arrow: 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 save
Step 2 Open main.php
Country Select:
Add before ?> :
$lang['user_country'] = "Country:";
Gender Select:
Add before ?> :
$lang['user_gender'] = "Sex:";
Close and save
Step 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 save
Step 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 save
Step 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 save
ok, 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
-
Hi ascanio.
Nice Mod, but by "Kontrolcenter" is always "Afghanistan" marked. :cry:
-
You can do this:
Find:
<select name="user_country">
<option value="Afganistan">Afghanistan</option>
Replace:
<select name="user_country">
<option value="">Please select a country</option>
<option value="Afganistan">Afghanistan</option>
-
HI, thanks for fast reply
but I mean,
If you have save the country to each user(for example slovenia).
And the User go to "Control Panel" he will see "Afganistan".
(In mysql is the correct country data saved)
Greets Sicarius
-
And the User go to "Control Panel" he will see "Afganistan".
That's because it is the first option but what users seeon his profile? Afganistan or the country the he or she seleted?
-
afganistan
-
Hi,
one Problem.
When i select a country in my Profile and then i save it reload the side and then i don´t see the country. I see the field "Please selct a country".
What must i do that i can see my selected country in the Member Control Panel???
-
Hi,
one Problem.
When i select a country in my Profile and then i save it reload the side and then i don´t see the country. I see the field "Please selct a country".
What must i do that i can see my selected country in the Member Control Panel???
That's what I thought would happened actually. The only way I resolved this problem in the past was by implementing V@no's MOD where the additional user fields has been re-worked and expanded in the routines. Hopefully, it is still available in the new forum for you guys. ;)
Now, the reason why the information is not being entered correctly is because there are no query that specifies a NULL statement for this MOD. :)
-
Hi,
one Problem.
When i select a country in my Profile and then i save it reload the side and then i don´t see the country. I see the field "Please selct a country".
What must i do that i can see my selected country in the Member Control Panel???
That's what I thought would happened actually. The only way I resolved this problem in the past was by implementing V@no's MOD where the additional user fields has been re-worked and expanded in the routines. Hopefully, it is still available in the new forum for you guys. ;)
Now, the reason why the information is not being entered correctly is because there are no query that specifies a NULL statement for this MOD. :)
Hi i'm going to update this MOD, that was happening to me also but I repair it! with the [MOD] Dropdown options for custom database fields, if you go there u will see my discusion with V@no and maybe u can figure out what I did, I will post the modification that i did in a moment ;)
-
I don´t understand this. My Bad English :(
I have install the Mod Dropdown options for custom database fields....
-
[MOD] Dropdown options for custom database fields
That's the one I was talking about. Thanks for clarifying this. ;)
I have install the Mod Dropdown options for custom database fields....
If so, then only this field would need to be modified :
$additional_user_fields['user_country'] = array($lang['user_country'], "text", 1);
;)
-
I have change this
$additional_user_fields['user_country'] = array($lang['user_country'], "text", 1);
to this
$additional_user_fields['user_country'] = array($lang['user_country'], "text", 0);
Now the Country Field is not required yet. OK, thats good. But when a User change here profile they must on every time select the country new while in this field is the text "Select a country".
I want this: I select a country and save. Now i go the next time to my profile and will edit ist i will see in the country field my selected country.
But now i see "Select a country" when i visit in the next time my profile to edit it.....
Oh God, i hope you understand me....
-
seems like u didnt update the database:
:arrow: First: Open phpMyAdmin and create a new column called user_country inside of 4images_users I used tipe varchar (255).
-
I have change this
$additional_user_fields['user_country'] = array($lang['user_country'], "text", 1);
to this
$additional_user_fields['user_country'] = array($lang['user_country'], "text", 0);
Now the Country Field is not required yet. OK, thats good. But when a User change here profile they must on every time select the country new while in this field is the text "Select a country".
I want this: I select a country and save. Now i go the next time to my profile and will edit ist i will see in the country field my selected country.
But now i see "Select a country" when i visit in the next time my profile to edit it.....
Oh God, i hope you understand me....
I have update the first post, Delete the changes made on the page_header.php because u don't need them anymore and also you can delete the countries.html file
-
I have update the first post, Delete the changes made on the page_header.php because u don't need them anymore and also you can delete the countries.html file
I dont see any mention about another mod requiremen for your new version: "Dropdown for custom fields" ;)
-
$additional_user_fields['user_country'] = array($lang['user_country'], "dropdown", 0, $var, 0, 0, 0, 1);
I think that this [MOD] Dropdown options for custom database fields its requiered
-
$additional_user_fields['user_country'] = array($lang['user_country], "dropdown", 0, array("n" => "---", $lang['user_country'] => $lang['user_country']), 1, 0, 0, 0);
;)
-
I don't understang
$additional_user_fields['user_country'] = array($lang['user_country'], "dropdown", 0, $var, 0, 0, 0, 1);
This piece of code calls $var which is the list of countries so why did u put that?
-
I have make the Updates and now it works....Thanks a lot...
-
your welcome :)
-
hell tried this but i get this
SQL-query:
ALTER TABLE `4images_users` ADD `user_country ` VARCHAR( 255 )
MySQL said:
#1166 - Incorrect column name 'user_country '
when i try to set the db up any help please
-
u have a space after the field name.
this is the correct query:ALTER TABLE `4images_users` ADD `user_country` VARCHAR( 255 )
-
I can't see my country and can't change it on my CP.
-
http://www.clubas.net/1/mistake.GIF
Hellow, what I do wrong that where is no Country and sex field? How to fix this problem?
Thank`s Tom.
-
http://www.clubas.net/1/mistake.GIF
Hellow, what I do wrong that where is no Country and sex field? How to fix this problem?
Thank`s Tom.
I have the same problem
-
I think we will have remove this mod, because noboby can help us :roll:
-
I think we will have remove this mod, because noboby can help us :roll:
because two people cant make it right, we should remove the entire topic? :roll:
-
well not sure.. but its working for me.
-
I think we will have remove this mod, because noboby can help us :roll:
read this at the beginning:
To instal this MOD the dropdown for custom fields mod is required http://www.4homepages.de/forum/index.php?topic=7112.0
-
it's working for me.. fine..
but one question..
If a new user registers himself and makes an entry in country field, the registration is implemented immediately...
is there a solution for me?
-
Hi..How do i show user country(in text) in the comment page?
jamstave.
-
i've tried some similar on comments to show user gender (before username) under the country , both text+image ..without success..
Any ideias to make it work ??
:?:
-
Hi,
one Problem.
When i select a country in my Profile and then i save it reload the side and then i don´t see the country. I see the field "Please selct a country".
What must i do that i can see my selected country in the Member Control Panel???
That's what I thought would happened actually. The only way I resolved this problem in the past was by implementing V@no's MOD where the additional user fields has been re-worked and expanded in the routines. Hopefully, it is still available in the new forum for you guys. ;)
Now, the reason why the information is not being entered correctly is because there are no query that specifies a NULL statement for this MOD. :)
Hi
I am having exactly the same problem. In addition to thism i tried to add the county by using PHP my admin. But still i dont get anything in profile. The country filed remain blank.
I have " [MOD] Dropdown options for custom database fields " already woriking. My gender filed is working fine the only problem is with County.
So help me please.
@TheOracle Could u please tell me what mod u was talking about??
-
A little more info
This is what i have in my member_profile.html
<td class="row1"width="40%"><b>{lang_user_country}</b></td>
<td class="row1">{user_country}</td>
But when i see the "view source" of the page i get this
td class="row1" width="40%"><b>Country:</b></td>
<td class="row1"> </td>
That means, {user_country} is not showing anything. Although i have this filed in my Data base and i have manually added the country as well.
So where do i start looking for the problem ?
-
Although i have this filed in my Data base and i have manually added the country as well.
And when you go edit a member, country is showed there as well? (edit through ACP or from members edit profile page)
-
And when you go edit a member, country is showed there as well? (edit through ACP or from members edit profile page)
From ACP, I can only see gender field. No country option there.
As a user, in my profile I can see that country field with dropdown options. (In registration page it’s also there)
I just noticed one more thing. When as I user I change my country, It remains the same in Database (It remains the one I added before, Checked through PHP my admin)
-
Do I need to have this option in ACP ??
When I have a country XYZ for a user ABC set through phpMyAdmin, why i m not getting it when I place {user_country} n his profile.
Please help me. I want to add few other fields as well so waiting for this issue to be resolved.
-
1) make sure you have
$additional_user_fields['user_country'] = array($lang['user_country'], "dropdown", 0, $var, 0, 0, 0, 1);
in includes/db_field_definitions.php
2) if you dont see the dropdown in ACP, then you probably made a misstake while installing the "Dropdown for custom fields" mod.
-
1) make sure you have $additional_user_fields['user_country'] = array($lang['user_country'], "dropdown", 0, $var, 0, 0, 0, 1);
in
Yes I do have this part. I double checked everything and to me, if I m doing anything wrong its in member.php from
[MOD] Dropdown options for custom database fields Mainly with step 1. As stated it should be two times but i just have once. So I changed the closes one that i got.
I am attaching both files. (I tried with both) But still can’t see it in ACP. I can see the drop down in user profiled in both cases but it doesn’t work. The country field remains blank.
So if U can have a look and tell me what exactly i am missing. I dont have any doubt in any other file.
-
Any idea what I am missing or doing wrong??
After reading the whole thread I see that I am not the only one having trouble with country field. But I guess others somehow manage to get it to work but I am still trying.
V@no could u please tell me which member.php is correct from above two files.
-
Desperately need this working but still I can’t figure it out that what’s wrong with it. I have installed one other mod which is used to have date of birth of the member and its working fine.
Can someone help me here?? I have checked each step more than 3 times but I don’t know why it’s not working.
I need help here. Is there any other way getting this "Country filed" working??
-
Actually, I don't get this MOD myself ...
since user_gender and user_country field are involved.
Secondly, where's the $lang['user_sex'] from main.php file in the instructions ?
Third, since these fields shows as :
$additional_user_fields['user_country'] = array($lang['user_country'], "dropdown", 0, $var, 0, 0, 0, 1);
$additional_user_fields['user_gender'] = array($lang['user_gender'], "dropdown", 0, array("n" => "---","b" => "Bisex", "m" => "Male", "w" => "Female"), 1, 0, 0, 0);
and, since the SQL update should go for "each additional user fields", where's the :
$additional_user_fields['user_sex'] = array($lang['user_sex'], "dropdown", 0, array("n" => "---","b" => "Bisex", "m" => "Male", "w" => "Female"), 1, 0, 0, 0);
when :
UPDATE 4images_users SET user_sex = 'your default country'
I must say myself ... it is quite confusing. I could be wrong but there might be some missing instructions from the first post (or perhaps mistakes were involved). ;)
-
Actually, I don't get this MOD myself ...
since user_gender and user_country field are involved.
Secondly, where's the $lang['user_sex'] from main.php file in the instructions ?
I must say myself ... it is quite confusing. I could be wrong but there might be some missing instructions from the first post (or perhaps mistakes were involved). ;)
Throught this mod i m using user_gender and user_country filed. I can see the drop down while editing the profile but thecountry just dont show up in profile. When i checked through phpMyAdmin it appears that countryfield is not getting update.
The update code statements in first post have that mistake. Instead of user_gender thay are showing user_sex. But other than that i cant say whats wrong.
Currently, user_gender is working fine. The only problem is with Country field.
Can i have any other alternative ?? In case this mod is not working perfectly or missing few things as u said
-
To be honnest, I'd rather not install this MOD due to these unexpected errors. Sorry.
-
To be honnest, I'd rather not install this MOD due to these unexpected errors. Sorry.
I am also thinking the same.
I am going to drop the "Country" part of this module
I will add an additional user field and make it opitional so user can put their country if they want to. :)
-
since user_gender and user_country field are involved.
Secondly, where's the $lang['user_sex'] from main.php file in the instructions ?
user_sex field is only showed at the end of the tutorial, and it been used by a misstake, apperently left of from the previous version...
I've updated the original post.
-
Fastian will be pleased.
Please stop the spam!
If you have nothing usefull to say, than say nothing.
-
When i understand you right,
you want, that these field must be filled out?
[qcode]$additional_user_fields['user_country'] = array($lang['user_country'], "dropdown", 1, $var, 0, 0, 0, 1);[/qcode]
[qcode]$additional_user_fields['user_gender'] = array($lang['user_gender'], "dropdown", 1, array("n" => "---","b" => "Bisex", "m" => "Male", "w" => "Female"), 1, 0, 0, 0);[/qcode]
If yes, then i think you should in db_field_definitions.php these lines to this.
The red marked number is different compared to original code.
-
the other values don't need to be changed.
Did you already tried it, does it work as you wanted?
-
Hi help please help! I have installed the gender mod and it all works except when you set the field in the dropdown box and save it is there to see but when you go to the profile page it's not it's back to defult as if it's not saving the data and thats my problem! i'm not sure how to do this!
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.
im only useing the gender part
sorry to sound a bit thick but it's only my 3rd day of learning php but will to learn.
Many thanks
Nick
-
Hi help please help! I have installed the gender mod and it all works except when you set the field in the dropdown box and save it is there to see but when you go to the profile page it's not it's back to defult as if it's not saving the data and thats my problem! i'm not sure how to do this!
if you form from that sentence, three or four, maybe we can help you ;) I read it 3 times and really don't understand what you are trying to say.
(please post more clearly the problem thatat ou have / hat you want to change or do)
-
ich versteh deine frage nicht so ganz?
vllt bin ich heute auch nur mit dem falschen bein aufgestanden...^^
könntest du das nochmal für mich erläutern?
-
achso, das müsste einfach so gehen:
<td class="row1">{if user_gender}<img src="{template_url}/images/{user_gender}.gif">{endif user_gender}</td>
der if tag gibt immer nur als kondition an, ob entsprechender tag vorhanden ist,
d.h. wenn kein geschlecht gewählt wurde, dürfte {user_gender} an sich auch nicht gesetzt sein.
-
anyone can help me in make it work on old pms ? (i know this isn't maybe the best topic, but pms topic its locked) :( , i mean make it just work on inbox ...
on received messages :P
-
ok, hab das mir mal genauer angeschaut.
Das Problem liegt daran, dass wenn kein Geschlecht gewählt wurde,
dennoch ein Wert gesetzt wird.
Der Grund, warum bei dir ein Broken Link angeigt wird,
ist dass bei dir ein Bild fehlt, nämlich /templates/port/images/n.gif.
entweder du änderst den php code,
oder was einfacher ist, du erstellst das Bild.
Wenn nicht erscheinen soll, wenn kein Geschlecht gewählt wurde,
kopiere einfach die spacer.gif und bennenne die Kopie in n.gif um.
-
gern geschehen.
Hab den Mod nicht installiert,
sonst hätte ich dir gleich sagen können,
dass es daran liegt, und wir hätten das Problem gelöst, dafür haben die anderen jetzt was zum lesen..^^
Wenn das nächste Mal was ist,
kannst du mich auch gerne per PM anschreiben.
Um das Ganze mehrsprachig zu machen, folgendes ändern:
das hier:
$additional_user_fields['user_gender'] = array($lang['user_gender'], "dropdown", 1, array("n => "---","b" => "Bisex", "m" => "Male", "w" => "Female"), 1, 0, 0, 0);
in das ändern:
$additional_user_fields['user_gender'] = array($lang['user_gender'], "dropdown", 0, $lang['gender_array'], 1, 0, 0, 0);
nun kannst du in deiner main.php folgendes verwenden:
$lang['gender_array'] = array ("n" => "---","b" => "Bisex", "m" => "Man", "w" => "Woman");
wobei nur die werte die jeweils nach "=>" geändert werden dürfen, das dürfte ja aber klar sein.
-
Hi @ all
will be go this MOD in V 1.7.2 ,too ?? Please reply me!
///////////////////////////////////////////////////////////////
Hi @ alle
funktioniert dieser Mod auch in Version 1.7.2 ?? Bitte sagt mir bescheit damit ich weiß ob ich diesen installieren kann!
MFG
-
Does anyone know what changes are required to make this work in 1.7.2?
Many thanks
-
I (also) have the following problem, and could not find an answer in this forum:
[qcode] Re: [MOD] Select country and gender with gif when register
« Reply #29 on: November 07, 2005, 09:43:14 PM »
--------------------------------------------------------------------------------
it's working for me.. fine..
but one question..
If a new user registers himself and makes an entry in country field, the registration is implemented immediately...
is there a solution for me? [/qcode]
-
hab auch das "gender" feld eingebaut , funzt auch soweit jedoch bekomme ich im profil editieren bereich sobald ich mein geschlecht ausgewählt hab und abgespeichert hab nur das hier zu sehen ,..
http://img150.imageshack.us/img150/8923/genderbo0.jpg
sonst funktioniert alles normal,.
achso ich hab die version 1.7.3.
hat jemand ne idee was da nich stimmen könnte?
-
@ Bonze
... offensichtlich ist "gender" nicht in der DB gespeichert, und für "kein gender" liegt ja auch kein Bild vor ...
... von daher "---" und "redX" ...
... überprüfe den Eintrag in die DB mal PhpMyAdmin ob er vorhanden ist ...
-
ne sry fals du das falsch verstanden hast , es ist ein eintrag vorhanden und es wird auch etwas gespeichert weil ich wenn ich mein profil mit ?action=showprofile&user_id=1 anschaue , das entsprechende symbol für männlich angeziegt bekomme , nur halt im profil editieren bereich machts des nich , ..aus welchen gründen auch immer,.
-
ok habs problem gelöst hatte ein prob mit diesem drop down custom fiedl dingens:D
-
mhh das war anscheinend nur die ghälfte der lösung denn , wenn ich das kontrollzentrum aufrufe
sieht es so aus wie auf dem bild, gehe ich hin und wähle mein geschlecht aus und gehe dann auf speichern ist es so wie es sein sollte ees steht in der liste und nebendran mein bildchen ,.
-
mhh du wirsts mir nich glauben aba das hab ich schon gemacht,.
-
mhh ja das funktioniert ja jetzt auch , nur ists ein ganz anderes problem das schwer zu beschreiben ist , also ich öffne das kontrollcenter dann ist im dropdown feld --- ausgewählt und nebendran isn platzhalter
wähle ich jetzt male aus und speichere dies ab , wenn die seite refreshed wird, ist dann male ausgewählt und das passende bild wird nebendran angezeigt ,.
öffne ich dann das kontrolcenter wieder ists wieder wie am anfang , obwohl der datensatz male in der db steht,.
-
ok hab die member.php komplett neu mit alllen mods gemacht und dabei festgestellt das ich nen fehler drinhatte jetzt scheints irgendwie zu gehen ,
Aber : jetzt hab ich nen anderen fehler vielleicht kann von euch jemand mehr damit anfangen
DB Error: Bad SQL Query: UPDATE 4images_users SET user_email = 'fragger255@hotmail.com', user_showemail = 1, user_allowemails = 1, user_invisible = , user_homepage = '', user_icq = '154490947', user_gender = 'w', birthday = '1988-07-27' WHERE user_id = 1
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' user_homepage = '', user_icq = '154490947', user_gender = 'w', birthday = '1988' at line 2
-
Great mod thx. One thing is there a way to just list male ,female or bisexual instead of the gif showing up ? My users don't know what those mean thanks again
-
Hallo zusammen,
ich habe genau das Problem gehabt, das ich den MOD eingebaut hatte aber die "dropdown" nicht dargestellt urden.
Nach langem hin und her habe ich den Fehler gefunden.
Ich habe aus dem Mod [MOD] Dropdown options for custom database fields die Daten für die Member übernommen
(Step 1).
Jetzt funkt. der MOD einwandfrei ;-)
Thanks Darkness :lol:
-
:) works fine in 1.7.4
-
I would like country flags in view profile. how can I do that?
-
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.
how can i do this ? where is the option in phpmyadmin to create new columns ?
wie kann ich dies machen ? sorry bin vollnoob mit phpmyadmin
-
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.
how can i do this ? where is the option in phpmyadmin to create new columns ?
wie kann ich dies machen ? sorry bin vollnoob mit phpmyadmin
http://www.vielegruesse.com
If no get how use phpmyadmin - use this plugin:
http://www.4homepages.de/forum/index.php?topic=19254.0
Click: [ Expert mode] link - paste code in textarea and click submit button. ;)
ALTER TABLE `4images_users` ADD user_country varchar(255) NOT NULL;
ALTER TABLE `4images_users` ADD user_gender text NOT NULL;
(each submit - no same time) ;)
-
thx a lot , it works :lol:
-
hi
I do like to select the country not to change the field to complete the registration form. As a change in this part includes_functions.php
function get_dropdown_options($name, $options = array(), $value = "", $multi_dim = 1, $number = 0, $auto = 0, $keypress = 0, $extra = "", $class = "", $i_start = 0, $i_step = 1, $i_stop = 1) {
$keypress = ($keypress) ? " onkeypress=\"if(window.event.keyCode==13)this.form.submit();\"" : "";
$auto = ($auto) ? " onchange=\"this.form.submit();\"" : "";
$dropdown = "<SELECT name=\"".$name."\"".$auto.$keypress." class=\"".(($class) ? $class : "select")."\"".$extra.">\n";
$i = $i_start;
if (count($options)) {
foreach ($options as $key => $val) {
$what = (($number) ? $i : (($multi_dim) ? $key : $val));
$dropdown .= "<option value=\"".$what."\"".(($value == $what) ? " selected" : "").">".preg_replace (array("/{key}/siU", "/{val}/siU", "/{what}/siU", "/{value}/siU"), array($key, $val, $what, $value), $val)."</option>\n";
$i = $i + $i_step;
}
}else{
for ($i = $i_start; $i <= $i_stop; $i += $i_step) {
$dropdown .= "<option value=\"".$i."\"".(($value == $i) ? " selected" : "").">".$i."</option>\n";
}
}
$dropdown .= "</select>\n";
return $dropdown;
}
function get_db_fields_dropdown($key, $val, $value) {
return get_dropdown_options($key, $val[3], $value, $val[4], $val[5], $val[7], 1, "", "select", $val[6]);
}
thank
-
ok, 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
Das geht bei mir nicht, warum?
Folgende Fehler kommen:
Fehler
SQL-Befehl:
UPDATE 4images_users SET user_country = 'Germany'
MySQL meldet: Dokumentation
#1054 - Unknown column 'user_country' in 'field list'
und
Fehler
SQL-Befehl:
UPDATE 4images_users SET user_gender = 'm'
MySQL meldet: Dokumentation
#1054 - Unknown column 'user_country' in 'field list'
-
... wie es die Fehlermeldung bereits sagt, nur in englisch ...
... keine Spalte 'user_country' in der Tabelle '4images_users' angelegt ...
... und 'user_gender' dann sicher auch nicht ...
-
? Sorry, habe eine Frage gestellt!
Habe es aber herausbekommen wie man das macht! Bzw. hab ne PN bekommen und damit gings!
-
If a new user registers himself and makes an entry in country field, the registration is implemented immediately...
The new User as to fill again custom fields.
Thank you
-
Sorry, I don't understand
-
If I have 1.7.7 version installed, do I still have to install the Dropdown options for custom database fields MOD (http://www.4homepages.de/forum/index.php?topic=7112.0) first for it to run properly? :roll:
-
I want to make Dropdown option for country for upload photos.
What files i have to edit?
db_field_definitions.php
$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_image_fields['image_country'] = array($lang['image_country'], "dropdown", 0, $var, 0, 0, 0, 1);main.php
$lang['image_country'] = "Country:";
member_uploadform.html
<tr>
<td class="row2"><b>{lang_image_country}</b></td>
<td class="row2">{image_country_dropdown} </td>
</tr>
What else?
-
what to do to make dropdown in to radio buttons..
so during registration..they choose between radio buttons instead of dropdown list..??
-
what to do to make dropdown in to radio buttons..
so during registration..they choose between radio buttons instead of dropdown list..??
Sorry for the useless reply, but I really hope you are talking about genders selection only...
-
what to do to make dropdown in to radio buttons..
so during registration..they choose between radio buttons instead of dropdown list..??
Sorry for the useless reply, but I really hope you are talking about genders selection only...
No problem buddy..
yes i only want for gender selection..
That a user have to select thier gender by radio..not drop down..
-
Goodmorning.
i have a question.
you can check or change these options from the admin panel?
-
How formating element {user_country_dropdown} in css,
-
Hi,
mit dem Country Mod hab ich ein kleines Problem, er trägt mir in die DB nur zum Beispiel:
1
2
3
4
anstatt den Country-Namen (Deutschland, Österreich, Schweiz, usw.
Wer kann bitte helfen das Problem zu lösen ?!
Vielen Dank an Alle