UBB.Dev
Posted By: Brett [6.7] [beta] Gender Hack - 04/02/2004 12:13 PM
Modification Name: Gender Hack

Author(s): Brett

Description: Adds a field in where a user can identify his/her own gender, to be displayed in the topic and profile

Demo: http://www.pavioni.com/cgi-bin/ubbcgi/ultimatebb.cgi/topic/1/1.html

Requirements: UBB 6.7

Download Link: https://www.ubbdev.com/ubb/upload/00006378/Gender6.7.zip

Shoutouts: Gizzy for the gfx and inspiration laugh
Posted By: Gizmo Re: [6.7] [beta] Gender Hack - 04/02/2004 12:33 PM
I make the GFX and force you to make it and no shouts? lol smile
Posted By: d-talk Re: [6.7] [beta] Gender Hack - 04/03/2004 5:38 PM
I get 2 Errors!

1. The hack will not safe the profilfield "68" at my user.cgi (00000001.cgi) at the members directory

2. When I klick at my name I get the following:

(RequireCodeNoINC) NonCGIPath/Templates/public_display_profile.pl: Global symbol "$gender_display" requires explicit package name at NonCGIPath/Templates/public_display_profile.pl line 214.
Compilation failed in require at CGIPath/ubb_lib.cgi line 930.

What can I do?

My Board:

http://www.d-talk.tv/cgi-bin/ultimatebb.cgi
Posted By: Brett Re: [6.7] [beta] Gender Hack - 04/04/2004 11:43 AM
1) make sure you made the change in ubb_lib.cgi
$vars_config{'MaxMemFields'} = 43;

->

$vars_config{'MaxMemFields'} = 71;

(Make sure the modified ubb_lib.cgi is uploaded wink ).

2) The main thing is to make sure

my $profile_display = "";

appears above the added information in public_display_profile.pl. If this is added then tell me.
Posted By: d-talk Re: [6.7] [beta] Gender Hack - 04/04/2004 12:23 PM
Hi Brett,

that the code at public_display_profile.pl

Code
$user_profile[7] ||= 0;
my $profile_display = "";
if($user_profile[68] eq '1' || $user_profile[68] eq '2') {
my $img = 'female.gif';
if($user_profile[68] eq '2') {$img = 'male.gif'}
$profile_display = qq!
<tr bgcolor="$vars_style{AltColumnColor1}">
<td valign="top">
<font size="$vars_style{TextSize}" face="$vars_style{FontFace}">
<b>$vars_wordlets_mods{'gender-_-title'}</b>
</font>
</td>
<td>
<font size="$vars_style{TextSize}" face="$vars_style{FontFace}">
<img src="$vars_config{NonCGIURL}/$img" alt="$vars_wordlets_mods{'gender-_-opt_$user_profile[68]'}" />
</font>
</td>
</tr>!;
} # end gender
ubb_lib.cgi is correct I think
Posted By: Brett Re: [6.7] [beta] Gender Hack - 04/04/2004 12:42 PM
oh my, i just found the reason why it's giving you the error. Change $gender_display to $profile_display

you probably have ubb_lib correct, but could i have you just reupload it, just to make sure?

(Zip file updated per typo above)
Posted By: d-talk Re: [6.7] [beta] Gender Hack - 04/04/2004 1:56 PM
Hehe, were can I find $gender_display??
Posted By: Brett Re: [6.7] [beta] Gender Hack - 04/04/2004 2:04 PM
Sorry, public_display_profile.pl wink
Posted By: Gizmo Re: [6.7] [beta] Gender Hack - 04/04/2004 3:25 PM
Hey Brett, why not wordlet the locations of male.gif and female.gif so users can point them to other locations?
Posted By: d-talk Re: [6.7] [beta] Gender Hack - 04/04/2004 10:19 PM
Hi Brett,

the profilpage now works, but if I go to my profile edit gender to male and safe nothing happends! It will not be safed, what can I do...
Posted By: Ian Spence Re: [6.7] [beta] Gender Hack - 04/04/2004 11:09 PM
In ubb_profile.cgi

Instead of:
Code
######## 
# find #
########

&WriteMemberProfile($user_number, @user_profile);

#############
# add ABOVE #
#############

$user_profile[68] = $in{gender};
do

Code
###############################
# find THE SECOND INSTANCE OF #
###############################

&WriteMemberProfile($user_number, @user_profile);

#############
# add ABOVE #
#############

$user_profile[68] = $in{gender};
Posted By: d-talk Re: [6.7] [beta] Gender Hack - 04/05/2004 3:18 PM
Thank you Ian! Now it works!
Posted By: Felix 10 Re: [6.7] [beta] Gender Hack - 04/05/2004 5:31 PM
would this work on 6.3.1.1?
I was looking for something like this.

Thank you
Posted By: Ian Spence Re: [6.7] [beta] Gender Hack - 04/05/2004 8:20 PM
Quote
Originally posted by Felix 10:

would this work on 6.3.1.1?
I was looking for something like this.

Thank you

nope smile
Posted By: Gizmo Re: [6.7] [beta] Gender Hack - 04/05/2004 8:25 PM
upgrade wink ..
Posted By: Felix 10 Re: [6.7] [beta] Gender Hack - 04/07/2004 6:18 AM
I am afraid... smile is not the money. its all the modifications I have in there, scared sheetless** that I wont make them work again.

hey Ian, can you give it a try for 6.3.1.1 ?
Posted By: Ian Spence Re: [6.7] [beta] Gender Hack - 04/07/2004 6:19 AM
where would I get a 6.3.1.1 zip without any violations of the license agreement.


smile Upgrade
Posted By: Gizmo Re: [6.7] [beta] Gender Hack - 04/07/2004 9:28 AM
Ian, according to Ted, so long as you own a current license you can request back copies (according to what he told me on the last chat I was on)
Posted By: Charles Capps Re: [6.7] [beta] Gender Hack - 04/07/2004 11:28 AM
s/current license/current member area subscription/ for a more accurate phrase.
Posted By: Gizmo Re: [6.7] [beta] Gender Hack - 04/07/2004 11:37 AM
Ok, so I'm right then? If you have a current member access sub you can request past versions from members?

I'm asking cas I was talkin to ted about acient versions and he said to ask on UBBDev :x...
Posted By: LK Re: [6.7] [beta] Gender Hack - 04/07/2004 2:21 PM
http://www.lkworld.com/OldBB/BBlogin.html laugh
Posted By: Ian Spence Re: [6.7] [beta] Gender Hack - 04/07/2004 2:30 PM
oooh! then I want 1.5 like LK!
Posted By: LK Re: [6.7] [beta] Gender Hack - 04/07/2004 2:33 PM
ya didn't even register frown
Posted By: Gizmo Re: [6.7] [beta] Gender Hack - 04/07/2004 2:47 PM
LK, can I have your 1.5 frown ...
Posted By: Gizmo Re: [6.7] [beta] Gender Hack - 04/13/2004 3:28 AM
Code
########################################################
###Open ubb_registration.cgi
########################################################

########
# find #
########

&WriteMemberProfile($next_number, @thismemarray);

##############
# add BEFORE #
##############

$thismearray[68] = $in{gender};
spews out an error for new registrations.

Also, I want to require this option through "Profile Settings" if I remove the option to select none, how would I go about this?
Posted By: Gizmo Re: [6.7] [beta] Gender Hack - 04/13/2004 3:30 AM
Also, for some reason my gender won't show via my profile... care to take a look?
Posted By: Ian Spence Re: [6.7] [beta] Gender Hack - 04/13/2004 3:35 AM
change it to $thismemarray[68]

MEM, not ME

<- made the mistake many times
Posted By: Gizmo Re: [6.7] [beta] Gender Hack - 04/13/2004 3:45 AM
Well then, that solved the registration page error... Now why doesn't gender show in the profile?
Posted By: Brett Re: [6.7] [beta] Gender Hack - 04/13/2004 8:23 AM
Updated zip file on ubb_registeration typo.

Gizzy's issue was that, as Ian said earlier. The modification in ubb_profile, needs to go before the second WriteMemberProfile line.
Posted By: Gizmo Re: [6.7] [beta] Gender Hack - 04/13/2004 9:09 AM
yeh yeh, I figured since I DL'd the mod directly from your site today that it'd be updated wink ...
Posted By: GzR Re: [6.7] [beta] Gender Hack - 10/19/2004 12:28 PM
Hi,
would this work on 6.7.2?

Regards
GzR
Posted By: Gizmo Re: [6.7] [beta] Gender Hack - 10/19/2004 12:57 PM
Any 6.7 mod should work just fine on its bugfix releases (6.7.0-6.7.2)
© UBB.Developers