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

0 Members and 1 Guest are viewing this topic.

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: Mini MOD: User GIS
« Reply #45 on: June 28, 2005, 01:30:34 AM »
hm... if even such a dumb*** like me was able to follow the steps Jens, then you will be surely able to manage that too...
Just try to check if you did follow the steps as written - last time I was asked how help with this mod it came out, that one important step was missed...
MAяTRIX


Offline Gulper

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Mini MOD: User GIS
« Reply #46 on: July 01, 2005, 09:14:37 AM »
Hmmmm... I did follow all steps.. two times now, but it is not working correctly. (when including the second part of the mod to enamble users to edit their gender settings)
I don't know much about php, but somehow the code gets confused with one part of it still using m,f,g as the values, while the other part uses numbers as the values to store in the DB for determing the users gender...
Can someone please rewrite this to one clean mod?

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: Mini MOD: User GIS
« Reply #47 on: January 11, 2006, 12:10:56 AM »
how the user gender show in image comments (before username )

{user_sex} username ???

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: Mini MOD: User GIS
« Reply #48 on: January 11, 2006, 12:43:45 PM »
Hum, I think it's the first time I post on this topic.

However, I found two unusual paths :

Quote

$user_sex = "<img src=\"templates/default/images/".htmlspecialchars($user_row['user_sex']).".gif\">".$var_name." ";


as a generic case, it should be like :

Quote

$user_sex = "<img src=\"".get_gallery_image(htmlspecialchars($user_row['user_sex'])).".gif\">".$var_name." ";


;)

There's also another "default" path pointed from above the first post on this topic (as well)

which is this one :

Quote

<img src="templates/default/images/{user_sex}.gif">


let's modify this line a little bit.

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. ;)

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: Mini MOD: User GIS
« Reply #49 on: January 12, 2006, 12:00:48 AM »
but i mean for image comments, not for member profile ....  :roll:

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: Mini MOD: User GIS
« Reply #50 on: January 12, 2006, 01:28:24 AM »
Did you tried with : {user_gender} ? ;)

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: Mini MOD: User GIS
« Reply #51 on: January 12, 2006, 03:13:51 AM »
yes i've :)

my doubts its about this is just about member.php and member_profile , for comments maybe details.php and comment_bit ???

 :?:

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: Mini MOD: User GIS
« Reply #52 on: February 20, 2006, 11:05:46 AM »
There's also another "default" path pointed from above the first post on this topic (as well)

You're doing a good job "ironing out" the paths in mods,
but remember, that some graphics are the same on different templates - therefore I have
all flags/gender signs etc. stored in the "default" template, no matter what
template is set actually...
MAяTRIX


Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: Mini MOD: User GIS
« Reply #53 on: February 26, 2006, 01:30:57 PM »
moved/

So, today a user of my site asked me about that, and i think too that this would be a good idea (when you have 20+ users online at the same time)

That would work of course just if user GIS mod is installed: Female usernames shown in red and male names in blue, so the orientation would be much better.

what do you think about that?

greetings

georgi

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: Mini MOD: User GIS
« Reply #54 on: February 26, 2006, 07:06:40 PM »
Lets see, asuming your have the default code for "whos online" section in includes/sessions.php. Then find:
Code: [Select]
  $sql = "SELECT s.session_user_id, s.session_lastaction, s.session_ip".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_invisible")."At the end of that line add:
Code: [Select]
, u.user_sex
The end result should be:[qcode]  $sql = "SELECT s.session_user_id, s.session_lastaction, s.session_ip".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_invisible").", u.user_sex[/qcode]

Then find:
Code: [Select]
          $user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\">".$username."</a>".$invisibleuser;Replace with:
Code: [Select]
          $user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\" class=\"wosex".$row['user_sex']."\">".$username."</a>".$invisibleuser;
Then in style.css stylesheet add three new classes with needed coolors and such:
Code: [Select]
.wosex { /*no sex*/
}
.wosexm { /* male */
  color: red;
}
.wosexw { /* female */
  color: blue;
}
In some cases because the stylesheed for links could override this style, you'll need use this type of naming instead:
.wosex:visited, .wosex:link, .wosex:active
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 trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: Mini MOD: User GIS
« Reply #55 on: February 26, 2006, 10:33:00 PM »
thanks for that addon, but when i make the changes, i have displayed 0 users and 0 guests online instead of th real number.
I have the countryflags mod installed, can there be the problem?

georgi

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: Mini MOD: User GIS
« Reply #56 on: February 26, 2006, 10:59:29 PM »
I have the countryflags mod installed, can there be the problem?
Most probably.
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 trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: Mini MOD: User GIS
« Reply #57 on: February 26, 2006, 11:01:09 PM »
o no, the problem was becaus the table is user_gender instead of user_sex , so now i have no errors, but also no colors. Stays always the same gray  :?
« Last Edit: February 27, 2006, 12:46:51 AM by trez »

Offline PartyPix

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Mini MOD: User GIS
« Reply #58 on: April 20, 2006, 01:52:43 PM »
Hi
i have 2 problems.
1.) I Have installed this mini MOD but if i go to the member_profile site. i see a mini black field with white border but not the images sex.

Here is a screen.




2.) In ACP I see only Ja / Nein (Yes / Not) for the gender and not weiblich / männlich (female / male)

How can i change this 2 problems ? I use 4images 1.7.2.



Here are the code that i have fill in the files.

db_field_definitions.php
Code: [Select]
$additional_user_fields['sex'] = array($lang['sex'], "radio", 1);


register_form.html
Code: [Select]
<tr>
            <td class="row2"><b>{lang_sex}</b></td>
            <td class="row2" width="20"><input type="radio" name="sex" value="m" checked />m&auml;nnlich&nbsp;&nbsp;&nbsp;
             <input type="radio" name="sex" value="w" />weiblich</td>
          </tr>

member_profile.html
Code: [Select]
<tr>
     <td class="row2"><nobr><b>{lang_sex}</b></nobr></td>
     <td class="row2"><img src="templates/default/images/{sex}.gif" width="14">
</td>
    </tr>


Here is a image of my databse entry,too but i think that is correct.



Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: Mini MOD: User GIS
« Reply #59 on: April 20, 2006, 04:38:35 PM »
1.) I Have installed this mini MOD but if i go to the member_profile site. i see a mini black field with white border but not the images sex.
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"
MAяTRIX