• [MOD] Select country and gender with gif when register 5 0 5 1
Currently:  

Author Topic: [MOD] Select country and gender with gif when register  (Read 143979 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Select country and gender with gif when register
« Reply #45 on: February 01, 2006, 02:31:14 AM »
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.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Select country and gender with gif when register
« Reply #46 on: February 01, 2006, 02:54:38 AM »
Fastian will be pleased.
Please stop the spam!
If you have nothing usefull to say, than say nothing.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] Select country and gender with gif when register
« Reply #47 on: February 17, 2006, 04:31:58 PM »
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.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] Select country and gender with gif when register
« Reply #48 on: February 17, 2006, 09:00:06 PM »
the other values don't need to be changed.

Did you already tried it, does it work as you wanted?
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline nutnick

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] Select country and gender with gif when register
« Reply #49 on: March 04, 2006, 10:13:20 PM »
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

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD] Select country and gender with gif when register
« Reply #50 on: March 05, 2006, 01:22:40 AM »
Quote
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)

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] Select country and gender with gif when register
« Reply #51 on: March 20, 2006, 05:03:38 PM »
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?
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] Select country and gender with gif when register
« Reply #52 on: March 20, 2006, 06:33:20 PM »
achso, das müsste einfach so gehen:
Code: [Select]
<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.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD] Select country and gender with gif when register
« Reply #53 on: March 20, 2006, 06:40:18 PM »
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

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] Select country and gender with gif when register
« Reply #54 on: March 20, 2006, 11:40:23 PM »
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.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] Select country and gender with gif when register
« Reply #55 on: March 21, 2006, 01:14:58 AM »
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:
Code: [Select]
$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:
Code: [Select]
$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:
Code: [Select]
$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.

Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline PartyPix

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: [MOD] Select country and gender with gif when register
« Reply #56 on: May 26, 2006, 02:12:32 PM »
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


Offline nfprehn

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • How to become a model
Re: [MOD] Select country and gender with gif when register
« Reply #58 on: July 02, 2006, 10:15:22 PM »
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]

Offline Bonze

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: [MOD] Select country and gender with gif when register
« Reply #59 on: July 26, 2006, 03:58:58 PM »
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?