Author Topic: [MOD] User GIS  (Read 88324 times)

0 Members and 1 Guest are viewing this topic.

Offline PartyPix

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Mini MOD: User GIS
« Reply #60 on: April 21, 2006, 11:49:11 AM »
Quote
Did you set the gender-entry in the MySQL database for "Marcel W" and all other users?
If not, see here, how to do that.
Check also the path to the "broken" image - if it isn't coded to a inexisting file or if it isnt just smt like ".../.gif"

Hey that reply help me but it show only male symbols and if i got to the admin area, search for users when stand there:

gender :     yes    no x

(x mean that is checked)

When i click on yes i have the same problem how in the past. When i click in no after i click on yes i have the problem,too. Only if i make the step how V@no describe on a other post it will be go.

What is the problem ? And why stand in the ACP yes / no and not male / female ?

Offline PartyPix

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Mini MOD: User GIS
« Reply #61 on: May 08, 2006, 07:02:11 PM »
Hi all again.   

//// ENGLISH \\\\
I have my problem every,too. Please Help me. I try so much but it dont will be work. I try to explain again.

First when i make a new additinonal field i cant make user_xxxx. It dont will be work. So i try onlly xxxx and it will work. that is not the problem i think, but now. When i register a user and will check m i think it will go, but when i check w (female)  the script write in the database 0 and no image will be show in the member_profile. I have make the Update at first,too. So when i try to make the value in the radio buttons (in teh register page) to set 0 for w and 1 for m. But it dont will be go. Another little problem is that in the ACP it will be show Yes or Not and NOT Male / Female. Please Help me. I use version 1.7.2.


//// DEUTSCH \\\\

Hallo ich versuche nochmal mein Problem zu beschreiben. Als erstes Problem habe ich das ich nicht in einem additional field the table prefix user_sex machen kann sondern nur sex. (    $additional_user_fields['sex'] = array($lang['sex'], "radio", 1);   ). Das ist nicht das Problem, da es bei den anderen Feldern auch so funktioniert hat ohne dem user_. Nun zum eigentlichen Problem. When ich einen neunen User registriere und auf männlich klicke zeigt er meistens das männliche Symbol richtig an. Kllicke ich nun aber auf weiblich speichert er in der DB eine 0 und zeigt nur ein kleines Kästchen an. Nun dachte ich änder ich einfach den value wert in der register_form page statt für männlich value="m" habe ich value="1" und für weiblich value="0" geschrieben. Ging aber auch nicht. Habe auch die Bilder 0 udn 1 genannt. Ging alles nicht. Langsam weiß ich echt nicht merh weiter. Desweiteren (das kleinste Problem) wird im ACP nir unter Usereinstellungen männlich / weiblich angezeigt sondern nur Ja / Nein. Hat irgendjemand eine Idee woran das lieg? Hatte jemand auch diese Problem ? Bitte helft mir ! Ich benutze Version 1.7.2

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: Mini MOD: User GIS
« Reply #62 on: May 21, 2006, 02:04:35 PM »
im ACP sollte eigentlich nich "ja/nein" stehen, sondern männlich weiblich... oder besser nur der text m/w(/b falls hermafroditen erlaubt sin ;) )
  • Ist in der DB der das feld auch richtig eingestellt (also für texteinträge)?
  • Hast du überall im code "user_sex" durch "sex" ersetzt (also db_field_definitions, register_form, usw)?

MAяTRIX


Offline PartyPix

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Mini MOD: User GIS
« Reply #63 on: May 26, 2006, 10:52:02 AM »
Hallo matrix

Sorry war bis heute im Krankenhaus und konnte nicht antworten. Ja in der DB ist alles swoeit richtig eingestellt und ich habe auch alles auf "sex" geändert. Könntest du dir das eventuell anschauen und mir bei diesem Problem helfen ?
Wäre echt nett ;)


Offline Sir Sky-Walker

  • Full Member
  • ***
  • Posts: 107
    • View Profile
Re: Mini MOD: User GIS
« Reply #64 on: May 26, 2006, 01:08:11 PM »
Hi,

I have Installed the Mod. When I put in Database manuell m or w all works fine.
Butt when I make a new user, the mod set auto the user_sex field with"0". Not "m" or "w".

Can anybody help me?

----------------------

Hallo,

Habe gerade den Mod installiert. Funktionier soweit alles bestens. Wenn ich in der Datenbank selbst "m" oder "w" beim user eingebe, wird alles perfekt angezeigt.

Sobal ich mich aber neu anmelde auf meiner Seite, also ein neuer User erstellt wird, setzt er in der Datenbank das Feld user_sex auf "0" und das gibs ja nciht!

warum ???

Offline ccsakuweb

  • Sr. Member
  • ****
  • Posts: 498
  • Patri
    • View Profile
    • My Art
Re: Mini MOD: User GIS
« Reply #65 on: August 29, 2006, 10:48:56 PM »
Thanks! This mod is too great!!

In your member.php file,

find :

Quote

if ($config['account_activation'] == 2 && $user_info['user_level'] != ADMIN) {
    $edit_profile_msg .= $lang['edit_profile_email_msg_admin'];
  }

  $site_template->register_vars(array(
    "user_name" => htmlspecialchars(stripslashes($user_name)),   


add "right" below :

Code: [Select]

"user_sex_image" = get_gallery_image(htmlspecialchars($user_row['user_sex'])).".gif;


Then, replace the original line from your member_profile.html file

with this one :

Code: [Select]

{if user_sex_image}<img src="{user_sex_image}">{endif user_sex_image}


Now, you can use this tag with "all your templates" rather than just the default template. ;)

If i do this changes my memberprofile have an error, i see all it in white colour.. I think that it is because I have in my member.php the next code :
Code: [Select]
$site_template->register_vars(array(
    "user_name" => format_text(stripslashes($user_name), 2),
and not the next that i can to find..
Code: [Select]
    "user_name" => htmlspecialchars(stripslashes($user_name)),    maybe i could add below something like the next code???  I don't know php so please help me :(
Code: [Select]
"user_sex_image" = get_gallery_image(format_text(stripslashes($user_row['user_sex'], 2).".gif;),     
:arrow: 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more

Offline keksoid

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: Mini MOD: User GIS
« Reply #66 on: October 23, 2006, 12:56:08 PM »
At me a problem, has made all as was написанно in the instruction, but alas does not work.

I have version 1.7.1.

Here what mistake{error} turns out

DB Error: Bad SQL Query: UPDATE 4images_users SET user_email = ' konkor2001@mail.ru ', user_showemail = 1, user_allowemails = 1, user_invisible = 0, user_homepage = ' http://my-mobiles.net ', user_icq = ' 76833206 ', = ' 2 ', birthday = ' 2006-02-22 ', user_pm_email = ' 1 ', user_pm_popup = ' 1 ' WHERE user_id = 995
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 ' = ' 2 ', birthday = ' 2006-02-22 ', user_pm_email = ' 1 ', user_pm_popup = ' 1 ' ' at line 2

Whether correctly I have written this line

$sql = "UPDATE" .USERS_TABLE. "
            SET " .get_user_table_field (" "," user_email "). " = ' $user_email ', " .get_user_table_field (" "," user_showemail "). " = $user_showemail, " .get_user_table_field (" "," user_allowemails "). " = $user_allowemails, " .get_user_table_field (" "," user_invisible "). " = $user_invisible, " .get_user_table_field (" "," user_homepage "). " = ' $user_homepage ', " .get_user_table_field (" "," user_icq "). " = ' $user_icq ', " .get_user_table_field (" "," user_sex "). " = ' $user_gender ' ". $additional_sql. "

Offline UFOSWORLD

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: Mini MOD: User GIS
« Reply #67 on: June 12, 2007, 09:42:31 PM »
Könnte man die Änderungserweiterung nochmal so zusammenfassen, das nicht jeden dritten Post eine besser Version aufgezeigt wird...

wollte das nämlich einbauen und nicht 15 mal jede Dati editieren, weil drei posts später eine kürzere Version kommt... 

desweiteren wäre eventl hilfreich in welchen Dateien die Änderungen zu erfolgen haben... hiervon steht nämlich nichts dabei

grüsse

Offline sidharth186

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: Mini MOD: User GIS
« Reply #68 on: August 09, 2008, 01:54:30 AM »
Hi !!

I am a newbie to 4images but can still understand your MOD for user gender.

I appreciate your MOD ...

But I am stuck up at this point:

"But if you use MOD Memberlist, try this too:"

Can you please tell me what this means and where should I find the Code next to this?

I wanted to see the Gender of the users in the Admin Control Panel as well, which is not visible after completion of the steps till this point. So I think I need to carry out some more steps.

Please help me out on this , I would be highly thankful to you :)

Sidharth

Offline sidharth186

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: Mini MOD: User GIS
« Reply #69 on: August 10, 2008, 10:48:57 AM »
Post updated on: 19 June 2003, 03:21am
Quote from: spoiledRHOtten
Hi!

Okay...my question is this...if we set the user to default as "male" is there a way for them to change it?
There is but it's going to require a few changes to the original mod.

First open: includes/db_field_definitions.php

Find:
Code: [Select]
$additional_user_fields['user_sex'] = array($lang['user_sex'], "radio", 1);Change to:
Code: [Select]
$additional_user_fields['user_sex'] = array($lang['user_sex'], "text", 0);
Open: member.php

Find:
Code: [Select]
   else {
      $user_icq_button = REPLACE_EMPTY;
    }
Below add:
Code: [Select]
// User Gender Switch
$gender_array = array("Male", "Female", "None Specified");
$user_gender = $gender_array[$user_row['user_sex']]." <img src=\"".TEMPLATE_PATH."/images/gender".$user_row['user_sex'].".gif\">";
Rename images to gender0.gif = male gender1.gif = female and gender3.gif = blank (nothing)

Find:
Code: [Select]
     "lang_email" => $lang['email'],
      "lang_homepage" => $lang['homepage'],
      "lang_icq" => $lang['icq']
Change to:
Code: [Select]
     "lang_email" => $lang['email'],
      "lang_homepage" => $lang['homepage'],
      "lang_icq" => $lang['icq'],
 "user_gender" => $user_gender,
Find:
Code: [Select]
   $sql = "UPDATE ".USERS_TABLE."
            SET ".get_user_table_field("", "user_email")." = '$user_email', ".get_user_table_field("", "user_showemail")." = $user_showemail, ".get_user_table_field("", "user_allowemails")." = $user_allowemails, ".get_user_table_field("", "user_invisible")." = $user_invisible, ".get_user_table_field("", "user_homepage")." = '$user_homepage', ".get_user_table_field("", "user_icq")." = '$user_icq'
Change to:
Code: [Select]
   $sql = "UPDATE ".USERS_TABLE."
            SET ".get_user_table_field("", "user_email")." = '$user_email', ".get_user_table_field("", "user_showemail")." = $user_showemail, ".get_user_table_field("", "user_allowemails")." = $user_allowemails, ".get_user_table_field("", "user_invisible")." = $user_invisible, ".get_user_table_field("", "user_homepage")." = '$user_homepage', ".get_user_table_field("", "user_icq")." = '$user_icq', user_sex = '$user_gender'
Find:
Code: [Select]
 if ($config['account_activation'] == 2 && $user_info['user_level'] != ADMIN) {
    $edit_profile_msg .= $lang['edit_profile_email_msg_admin'];
  }
Below add:
Code: [Select]
// User Gender Switch
if($user_info['user_sex'] == 1){
$user_gender = "<input type=\"radio\" name=\"user_gender\" value=\"1\" checked />
              male&nbsp;&nbsp;&nbsp;
              <input type=\"radio\" name=\"user_gender\" value=\"2\" />
              female</font>";
} else if($user_info['user_sex'] == 2){
$user_gender = "<input type=\"radio\" name=\"user_gender\" value=\"1\"/>
              male&nbsp;&nbsp;&nbsp;
              <input type=\"radio\" name=\"user_gender\" value=\"2\" checked  />
              female</font>";
} else {
$user_gender = "<input type=\"radio\" name=\"user_gender\" value=\"1\"/>
              male&nbsp;&nbsp;&nbsp;
              <input type=\"radio\" name=\"user_gender\" value=\"2\"/>
              female</font>";
}
Find:
Code: [Select]
   "lang_edit_profile_msg" => $edit_profile_msg,
    "lang_yes" => $lang['yes'],
    "lang_no" => $lang['no']
Replace with:
Code: [Select]
   "lang_edit_profile_msg" => $edit_profile_msg,
    "lang_yes" => $lang['yes'],
    "lang_no" => $lang['no'],
"user_gender" => $user_gender,
Open: templates/default/member_editprofile.html

Find:
Code: [Select]
         <tr>
            <td class="row1"><b>{lang_invisible}</b></td>
            <td class="row1"> <input type="radio" name="user_invisible" value="1"{user_invisible_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp; <input type="radio" name="user_invisible" value="0"{user_invisible_no} />
              {lang_no} </td>
          </tr>
Below add:
Code: [Select]
         <tr>
            <td class="row2"><b>Gender</b></td>
            <td class="row2">{user_gender}</td>
          </tr>
Open: templates/default/member_profile

Find:
Code: [Select]
<img src="templates/default/images/{user_sex}.gif">Remove it.

Find:
Code: [Select]
       <tr>
          <td class="row2"><b>{lang_icq}</b></td>
          <td class="row2">{if user_icq}<a href="http://wwp.icq.com/scripts/search.dll?to={user_icq}">{user_icq}</a>
            (<b>{user_icq_status}</b>){endif user_icq}</td>
        </tr>
Below add:
Code: [Select]
       <tr>
          <td class="row1"><b>Gender</b></td>
          <td class="row1">{user_gender}</td>
        </tr>

Thats about it I think, Save and close the files. I have tested on a fresh install of 4images and it works great.

Please inform me of any problems.

Carl

Please help I have completed all the instructions succesfully but the ACP still shows Yes and No instead of Male, Female, Both