The BoardMod Project
 The Project | News | Downloads | Mods | FAQ | Templates | Chat | Forum
BoardMod Support Forum
[ Home | Help | Search | Login | Register ]  

21.05.13 at 05:17:15, Welcome, Guest. Please Login or Register

Choose Language:
Pages: 1 2 3 4
Adding fields to registration page SP1.1 (Read 6953 times)
Michael Prager
Mod God
*****
Offline

Germany, Hessen, Germany
Posts: 6331



09.05.02 at 10:35:35  
Thanks to T-Master for this tutorial Smiley

Oh btw the german version of this tutorial is attached as a .txt file Wink
--------------------------------------------------------------------------------



In the following you can read how to add new fields to the registration page and how to display the inputs in the profile and im's.


It's just following the instructions alternately and is just a cuted mod-file - but pay attention to the following 3 things:
- "MyFieldText" is to replace with the text which u want to display next to the value of the new field ( in profil, posts and im's )
- you have to increase the 20 in "$userprofile{$user}->[20]" as high as u have already new entries in the user-files ($member.dat)
 This could also happen throw mods. So plz check before if an other mod added something to the Userfile!
- "name="myinput"" is to replace with a new indentifying name, which is not yet used in your script. (this means: for one new field, one new name)


OK let's go...


To Display the new input next to a post or an im
Code:
<edit file> 
Sources/Load.pl
</edit>

<search for>
$userprofile{$user}->[9] = $userprofile{$user}->[9] ? qq~<a href="aim:goim?screenname=$userprofile{$user}->[9]&message=Hi.+Are+you+there?"><img src="$imagesdir/aim.gif" alt="$userprofile{$user}->[9]" border="0"></a>~ : '';
</search>

<add after>
$userprofile{$user}->[20] = $userprofile{$user}->[20] ? qq~<font size="1">MyFieldText: $userprofile{$user}->[20]<br>~ : '';
</add>



To Display in profil while modifying:
Code:
<edit file> 
Sources/Profile.pl
</edit>

<search for>
<td width="320"><font size=2><b>$txt{'35'}: </b></font></td>
<td><font size=2><input type="hidden" name="username" value="$INFO{'username'}">$INFO{'username'}</font></td>
</tr><tr>
</search>

<add before>
<td width="320"><font size=2><b>MyFieldText: </b></font></td>
<td><font size=2><input type="text" name="myinput" size="25" value="$memsettings[20]"></font></td> </tr>
<tr>
</add>



To allow special characters in the new field, conversion of the input-text to html and writing into the Userfile.
In this example there are only alphanumeric characters allowed! In case of submitting an input with not allowed characters there will be displayed an error message ( which you should edited Wink ).
( the following will be executed while modifying the profil )
Code:
<search for> 
&fatal_error("$txt{'75'}") if($member{'name'} eq '');
&fatal_error("$txt{'242'}") if($member{'name'} !~ /^[\s0-9A-Za-z\[\]#%+,-|\.:=?@^_]+$/);
</search>

<add after>
&fatal_error("Please ENTER something into the Field MyFieldText") if($member{'myinput'} eq '');
&fatal_error("Please ENTER only characters into the Field MyFieldText") if($member{'myinput'} =~ /[^a-zA-Z. ]/);
</add>

<search for>
&ToHTML($member{'name'});
</search>

<add after>
&ToHTML($member{'myinput'});
</add>

<search for>
print FILE "$FORM{'hideemail'}\n";
</search>

<add after>
print FILE "$member{'myinput'}\n";
</add>


If you want that a user needn't to insert something in MyField, delete the whole line with "eq ''" out of the add-after-tag.
If you want to allow more or/and other characters, the following sites would be useful:
( adding search criteries / Regular Expressions )
http://www.linuxuniversity.org/dev_track/perl-class/week5/lesson5.html
http://www.perldoc.com/perl5.6/pod/perlre.html#Regular-Expressions
http://stein.cshl.org/WWW/software/CGI/


To display while viewing the profile
Code:
<search for> 
<td><font size=2><b>$txt{'68'}: </b></font></td>
<td><font size=2>$memsettings[1]</font></td>
</search>

<replace>
<td><font size=2><b>MyFieldText: </b></font></td>
<td><font size=2>$memsettings[20]</font></td>
</tr><tr>
<td><font size=2><b>$txt{'35'}: </b></font></td>
<td><font size=2>$memsettings[1]</font></td>
</replace>



To display at the registration ( here it'll be displayed after the password fields )
Code:
<edit file> 
Sources/Register.pl
</edit>

<search for>
<td width="40%"><font size=2>* <b>$txt{'82'}:</b></font></td>
<td><font size=2><input type=password maxlength="30" name=passwrd2 size=30></font></td>
</tr>
</search>

<add after>
<tr>
<td width="40%"><font size=2>* <b>MyFieldText:</b></font></td>
<td><input type=text name=myinput size=20 maxlength=25></td>
</tr>
</add>


maxlength for the input field can be modified.


Here will be checked also for the allowed characters in the new field and if it's allowed to insert nothing.
Code:
<search for> 
&fatal_error("($member{'username'}) $txt{'37'}") if($member{'username'} eq '');
&fatal_error("($member{'username'}) $txt{'99'}") if($member{'username'} eq '_' || $member{'username'} eq '|');
</search>

<add after>
&fatal_error("Please ENTER something into the Field MyFieldText") if($member{'myinput'} eq '');
&fatal_error("Please ENTER only characters into the Field MyFieldText") if($member{'myinput'} =~ /[^a-zA-Z. ]/);
</add>

<search for>
print FILE "$FORM{'hideemail'}\n";
</search>

<add after>
print FILE "$member{'myfield'}\n";
fclose(FILE);
</add>





So i hope that was all  *g*

Btw: If you want to use this in one of your mods you should replace all displayed texts with variables and to declare them in the language-file!
Perhaps it's also better to write the data in new (extra) files instead of adding them to the userfile. This increases the compatibily with other mods!


Greetings
T-Master

PS: In case of problems please post here so i can modify the tutorial above! Smiley
 
IP Logged
 

tutorial_german.txt (5 KB | 130 )


...  
 _____                   _  _____         _
| __  | ___  ___  ___  _| ||     | ___  _| |
| __ -|| . || .'||  _|| . || | | || . || . |
|_____||___||__,||_|  |___||_|_|_||___||___|
Dave Baughman
VIP
*****
Offline

Murfreesboro, Tennessee, USA
Posts: 2039



Reply #1 - 09.05.02 at 14:40:32  
Just remember adding new values to the member.dat files changes the file structure, so you risk incompatibility with future YaBB official upgrades. If you can create, store, and open information from a seperate username.ext (with ext being any extension you want that is not already taken), that would be best.

Thanks for the tutorial.
 
IP Logged
 

I'm not sure if it's ignorance or apathy, but I don't know and I don't care.
Shoeb Omar
Moderator
*****
Offline

San Diego, California, USA
Posts: 5665



Reply #2 - 09.05.02 at 23:27:06  
a nicething is if someone could look at bhras adding fields mod thingey and modify it for profiles Grin
 
IP Logged
 

YaBB SP2 BETA!
Now taking pay jobs in PHP or Perl.  Contact me for details.
Devil
Bloody Novice
*
Offline

Posts: 10



Reply #3 - 25.05.02 at 17:09:25  
Did You Make A Mod That Has All This Options Or Only The One With Illegal Characters I Need It ?
 
IP Logged
 
LukeA
Bloody Novice
*
Offline

Posts: 12



Reply #4 - 29.05.02 at 02:55:38  
Is there a way to make certain fields that you add in the registration hidden to all members except admins?  

Thanks for any help!

Luke
 
IP Logged
 
Christer Alexander
Moderator
*****
Offline

Lethbridge, Alberta, Canada
Posts: 3443



Reply #5 - 30.05.02 at 15:55:48  
yep, instead of Code:

<add before>  
<td width="320"><font size=2><b>MyFieldText: </b></font></td>  
<td><font size=2><input type="text" name="myinput" size="25" value="$memsettings[20]"></font></td> </tr>  
<tr>  
</add>

you add: Code:

<add before>  
~;
if($settings[7] eq 'Administrator') {
$yymain .= qq~ <td width="320"><font size=2><b>MyFieldText: </b></font></td>  
<td><font size=2><input type="text" name="myinput" size="25" value="$memsettings[20]"></font></td> </tr>  
<tr> ~; }
$yymain .= qq~
</add>
 
IP Logged
 

Code:
 
unless(0) { stab("LoonyPandora"); next; }
LukeA
Bloody Novice
*
Offline

Posts: 12



Reply #6 - 03.06.02 at 23:09:46  
I tried the code you posted above to hide it from everyone except admins, and it didn't work.  It just displays that code on the html page and you still see the fields that are supposed to be hidden.

Any ideas?

Thanks, Luke
 
IP Logged
 
LukeA
Bloody Novice
*
Offline

Posts: 12



Reply #7 - 15.06.02 at 22:21:10  
Can anyone help me hide some of the fields I added into the profile from anyone except admins?  
Thanks, Luke
 
IP Logged
 
Tea-Master
Mod God
*****
Offline

north germany, Schleswig-Holstein, Germany
Posts: 1944




BoardMod Developer
Reply #8 - 18.06.02 at 21:55:14  
should work... or what output do u want to be hidden?
the code above will hide the field if u tries to display the profile. should work... be sure that u have logged out before trying.

if you can't find it out then post the url to your forum and perhaps the relavent source files.
 
IP Logged
 
LukeA
Bloody Novice
*
Offline

Posts: 12



Reply #9 - 21.06.02 at 05:46:52  
Here is the html code I added into profile.pl:

Code:
 
<tr>
~;
if($settings[7] eq 'Administrator') {
$yymain .= qq~ <td width="320"><font size=2><b>Address: </b></font></td>
<td><font size=2><input type="text" name="address" size="25" value="$memsettings[30]"></font></td> </tr>
<tr> ~; }
$yymain .= qq~ <td width="320"><font size=2><b>City: </b></font></td>
<td><font size=2><input type="text" name="city" size="25" value="$memsettings[31]"></font></td> </tr>
<tr>


Here is the URL of one of the profiles I created to test it.  All the fields are visable, where above the code should be hiding the Address field from all guests/members.

http://www.wakefieldworldwide.com/cgi-bin/st/YaBB.pl?action=viewprofile&username...

Any help would be greatly appreciated.  Thanks!

-Luke
 
IP Logged
 
Tea-Master
Mod God
*****
Offline

north germany, Schleswig-Holstein, Germany
Posts: 1944




BoardMod Developer
Reply #10 - 21.06.02 at 14:30:04  
hm... that's curious. where did u place that? or better - post your complete profile.pl plz.
 
IP Logged
 
LukeA
Bloody Novice
*
Offline

Posts: 12



Reply #11 - 21.06.02 at 18:28:25  
Profile.pl

Code:

###############################################################################
# Profile.pl #
###############################################################################
# YaBB: Yet another Bulletin Board #
# Open-Source Project started by Zef Hemel (zef@zefnet.com) #
# Software Version: YaBB 1 Gold - Release #
# =========================================================================== #
# Software Distributed by: http://yabb.xnull.com #
# Support, News, Updates at: http://yabb.xnull.com/community/ #
# =========================================================================== #
# Copyright (c) 2000-2001 X-Null - All Rights Reserved #
# Software by: The YaBB Development Team #
###############################################################################

$profileplver="1 Gold - Release";

sub ModifyProfile {
if ($INFO{'username'} =~ m~/~){ &fatal_error($txt{'224'}); }
if ($INFO{'username'} =~ m~\\~){ &fatal_error($txt{'225'}); }
if($username ne $INFO{'username'} && $settings[7] ne 'Administrator') {
&fatal_error($txt{'80'});
}
opendir(DIR, "$facesdir") || fatal_error("$txt{'230'} ($facesdir)!<BR>$txt{'681'}");
closedir(DIR);

$yytitle = $txt{'79'};
fopen(FILE, "$memberdir/$INFO{'username'}.dat");
@memsettings=<FILE>;
fclose(FILE);
foreach (@memsettings) {
$_ =~ s~[\n\r]~~g;
}
$dr = $memsettings[14] ? $memsettings[14] : $txt{'470'};
if ($memsettings[11] eq 'Male') {
$GenderMale = ' selected';
}
if ($memsettings[11] eq 'Female') {
$GenderFemale = ' selected';
}
$signature = $memsettings[5];
$signature =~ s/\&\&/\n/g;
$signature =~ s/\&lt;/</g;
$signature =~ s/\&gt;/>/g;
&CalcAge("parse"); # Let's get the birthdate
$memsettings[9] =~ tr/+/ /;

if ($memsettings[17] == 6) { $tsl6 = ' selected'; }
elsif ($memsettings[17] == 5) { $tsl5 = ' selected'; }
elsif($memsettings[17] == 4) { $tsl4 = ' selected'; }
elsif ($memsettings[17] == 3) { $tsl3 = ' selected'; }
elsif ($memsettings[17] == 2) { $tsl2 = ' selected'; }
elsif ($memsettings[17] == 1) { $tsl1 = ' selected'; }
elsif ($timeselected == 6) { $tsl6 = ' selected'; }
elsif ($timeselected == 5) { $tsl5 = ' selected'; }
elsif ($timeselected == 4) { $tsl4 = ' selected'; }
elsif ($timeselected == 3) { $tsl3 = ' selected'; }
elsif ($timeselected == 2) { $tsl2 = ' selected'; }
else { $tsl1 = ' selected'; }

&header;


$oldformat = $date;
$oldmonth = substr($oldformat,0,2);
$oldday = substr($oldformat,3,2);
$oldyear = ("20".substr($oldformat,6,2)) - 1900;
$oldhour = substr($oldformat,-8,2);
$oldminute = substr($oldformat,-5,2);
$oldsecond = substr($oldformat,-2,2);
use Time::Local 'timelocal';
eval { $oldtime = timelocal($oldsecond,$oldminute,$oldhour,$oldday,$oldmonth-1,$oldyear); };
my ($psec,$pmin,$phour,$dummy,$dummy,$dummy,$dummy,$dummy,$dummy) = localtime($oldtime);
if ($phour < 10) { $phour = "0$phour" };
if ($pmin < 10) { $pmin = "0$pmin" };
if ($psec < 10) { $psec = "0$psec" };
$proftime = $phour.":".$pmin.":".$psec;
$ampm = $phour > 11 ? 'pm' : 'am';
$phour = $phour % 12 || 12;
$proftime = qq~$phour:$pmin:$psec$ampm~;

print <<"EOT";
<form action="$cgi&action=profile2" method="POST" name="creator">
<table border=0 width=720 cellspacing=1 bgcolor="$color{'bordercolor'}" class="bordercolor" align="center">
<tr>
<td class="titlebg" bgcolor="$color{'titlebg'}" height="30">
&nbsp;<img src="$imagesdir/profile_sm.gif" alt="" border="0">&nbsp;
<font size=2 class="text1" color="$color{'titletext'}"><b>$txt{'79'}</b></font></td>
</tr><tr>
<td class="windowbg" bgcolor="$color{'windowbg'}" height="25"><BR><font size=1>$txt{'698'}</font><BR><BR></td>
</tr><tr>
<td class="catbg" bgcolor="$color{'catbg'}" height="25"><font size=2><b>$txt{'517'}</b></font></td>
</tr><tr>
<td class="windowbg" bgcolor="$color{'windowbg'}"><font size=2>
<table border=0 width="100%" cellpadding="3">
<tr>
<td width="320"><font size=2><b>Real Name: </b></font></td>
<td><font size=2><input type="text" name="truename" size="25" value="$memsettings[22]"></font></td> </tr>
<tr>
~;
if($settings[7] eq 'Administrator') {
$yymain .= qq~ <td width="320"><font size=2><b>Address: </b></font></td>
<td><font size=2><input type="text" name="address" size="25" value="$memsettings[30]"></font></td> </tr>
<tr> ~; }
$yymain .= qq~ <td width="320"><font size=2><b>City: </b></font></td>
<td><font size=2><input type="text" name="city" size="25" value="$memsettings[31]"></font></td> </tr>
<tr>
<td width="320"><font size=2><b>Zip Code: </b></font></td>
<td><font size=2><input type="text" name="zip" size="25" value="$memsettings[32]"></font></td> </tr>
<tr>
<td width="320"><font size=2><b>Phone Number: </b></font></td>
<td><font size=2><input type="text" name="phone" size="25" value="$memsettings[33]"></font></td> </tr>
<tr>
<td width="320"><font size=2><b>$txt{'35'}: </b></font></td>
<td><font size=2><input type="hidden" name="username" value="$INFO{'username'}">$INFO{'username'}</font></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'81'}: </b></font><BR>
<font size=1>$txt{'596'}</font></td>
<td><input type="password" name="passwrd1" size="20" value="$memsettings[0]"></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'82'}: </b></font></td>
<td><input type="password" name="passwrd2" size="20" value="$memsettings[0]"></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'68'}: </b></font><BR>
<font size=1>$txt{'518'}</font></td>
<td><input type="text" name="name" size="30" value="$memsettings[1]"></font></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'69'}: </b></font><BR>
<font size="1">$txt{'679'}</font></td>
<td><input type="text" name="email" size="30" value="$memsettings[2]"></td>
</tr>
<tr>
<td width="320"><font size=2><b>$txt{'755'}: </b></font><BR>
<font size="1">$txt{'756'}</font></td>
<td><input type="text" name="secretquestion" size="30" value="$memsettings[20]"></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'757'}: </b></font><BR></td>
<td><input type="password" name="secretanswer" size="30" value="$memsettings[21]"></td>
</tr>
</table><BR>
</td>
</tr><tr>
<td class="catbg" bgcolor="$color{'catbg'}" height="25"><font size=2><b>$txt{'597'}</b></font></td>
</tr><tr>
<td class="windowbg" bgcolor="$color{'windowbg'}">
<table border=0 width="100%" cellpadding="3">
<tr>
<td width="320"><font size=2><b>$txt{'231'}: </b></font></td>
<td>
<select name="gender" size="1">
<option value=""></option>
<option value="Male"$GenderMale>$txt{'238'}</option>
<option value="Female"$GenderFemale>$txt{'239'}</option>
</select>
</td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'563'}:</b></font></td>
<td><font size=1>$txt{'564'}<input type="text" name="bday1" size="2" maxlength="2" value="$umonth">$txt{'565'}<input type="text" name="bday2" size="2" maxlength="2" value="$uday">$txt{'566'}<input type="text" name="bday3" size="4" maxlength="4" value="$uyear"></font></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'227'}: </b></font></td>
<td><font size=2><input type="text" name="location" size="50" value="$memsettings[15]"></font></td>
</tr><tr>
<td colspan=2>
<BR><hr width="100%" size="1" color="$color{'windowbg3'}" class="windowbg3"></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'83'}: </b></font><BR>
<font size=1>$txt{'598'}</font></td>
<td><font size=2><input type=text name=websitetitle size=50 value="$memsettings[3]"></font></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'84'}: </b></font><BR>
<font size=1>$txt{'599'}</font></td>
<td><font size=2><input type=text name=websiteurl size=50 value="$memsettings[4]"></font></td>
</tr><tr>
<td colspan=2>
<BR><hr width="100%" size="1" color="$color{'windowbg3'}" class="windowbg3"></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'513'}: </b></font><BR>
<font size=1>$txt{'600'}</font></td>
<td><font size=2><input type=text name=icq size=20 value="$memsettings[8]"></font></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'603'}: </b></font><BR>
<font size=1>$txt{'601'}</font></td>
<td><font size=2><input type=text name=aim size=20 value="$memsettings[9]"></font></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'604'}: </b></font><BR>
<font size=1>$txt{'602'}</font></td>
<td><font size=2><input type=text name=yim size=20 value="$memsettings[10]"></font></td>
</tr><tr>
<td colspan=2>
<BR><hr width="100%" size="1" color="$color{'windowbg3'}" class="windowbg3"></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'228'}: </b></font></td>
<td><font size=2><input type=text name=usertext size=50 value="$memsettings[12]"></font></td>
</tr>
EOT
if($allowpics) {
opendir(DIR, "$facesdir") || fatal_error("$txt{'230'} ($facesdir)!<BR>$txt{'681'}");
@contents = readdir(DIR);
closedir(DIR);
$images = "";
foreach $line (sort @contents){
($name, $extension) = split (/\./, $line);
$checked = "";
if ($line eq $memsettings[13]) { $checked = ' selected'; }
if ($memsettings[13] =~ m~\Ahttp://~ && $line eq 'blank.gif') { $checked = ' selected'; }
if ($extension =~ /gif/i || $extension =~ /jpg/i || $extension =~ /jpeg/i || $extension =~ /png/i ){
if ($line eq 'blank.gif') { $name = $txt{'422'}; }
$images .= qq~<option value="$line"$checked>$name\n~;
}
}
if ($memsettings[13] =~ m~\Ahttp://~) {
$pic = 'blank.gif';
$checked = ' checked';
$tmp = $memsettings[13];
}
else {
$pic = $memsettings[13];
$tmp = 'http://';
}

print <<"EOT";
<tr>
<td width="320"><b><font size=2>$txt{'229'}:</B></font><BR>
<font size=1>$txt{'474'} $userpic_limits</font></td>
<td>
<script language="JavaScript1.2" type="text/javascript">
function showimage()
{
document.images.icons.src="$facesurl/"+document.creator.userpic.options[document.creator.userpic.selectedIndex].value;
}
</script>
<select name="userpic" size=6 onChange="showimage()">$images</select>
&nbsp;&nbsp;<img src="$facesurl/$pic" name="icons" border=0 hspace=15>
</td>
</tr><tr>
<td width="320"><font size="2"><B>$txt{'475'}</B></font></td>
<td><input type="checkbox" name="userpicpersonalcheck"$checked>
<input type="text" name="userpicpersonal" size="45" value="$tmp"></td>
</tr>
EOT
}
print <<EOT;
</table><BR>
</td>
</tr><tr>
<td class="catbg" bgcolor="$color{'catbg'}" height="25"><font size=2><b>$txt{'605'}</b></font></td>
</tr><tr>
<td class="windowbg" bgcolor="$color{'windowbg'}"><font size=2>
<table border=0 cellpadding="3" cellspacing="0">
EOT
if ($allow_hide_email == 1) { print <<"EOT";
<tr>
<td width="320"><font size=2><b>$txt{'721'}</b></font></td>
<td><input type="checkbox" name="hideemail" value="checked" $memsettings[19]></td>
</tr>
EOT
}
print <<"EOT";
<tr>
<td width="320"><font size=2><b>$txt{'486'}:</b></font><BR>
<font size=1>$txt{'479'}</font></td>
<td width="50">
<select name="usertimeselect" size=1>
<option value="1"$tsl1>$txt{'480'}
<option value="5"$tsl5>$txt{'484'}
<option value="4"$tsl4>$txt{'483'}
<option value="2"$tsl2>$txt{'481'}
<option value="3"$tsl3>$txt{'482'}
<option value="6"$tsl6>$txt{'485'}
</select>
</td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'371'}:</b></font><BR>
<font size=1>$txt{'519'}</font></td>
<td><font size=1>
<input name=usertimeoffset size=5 maxlength=5 value=$memsettings[18]>
<BR>$txt{'741'}: <i>$proftime</i></font></td>
</tr><tr>
<td colspan=2><hr width="100%" size="1" color="$color{'windowbg3'}" class="windowbg3"></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'85'}:</b></font><BR>
<font size=1>$txt{'606'}</font></td>
<td><font size=2><textarea name="signature" rows="4" cols="50" wrap="virtual">$signature</textarea><BR>
<FONT SIZE="1">$txt{'664'} <input value="$MaxSigLen" size="3" name="msgCL" disabled></FONT><BR><BR></font></td></tr>
<script language="JavaScript">
<!--
var supportsKeys = false
function tick() {
calcCharLeft(document.forms[0])
if (!supportsKeys) timerID = setTimeout("tick()",$MaxSigLen)
}

function calcCharLeft(sig) {
clipped = false
maxLength = $MaxSigLen
if (document.creator.signature.value.length > maxLength) {
document.creator.signature.value = document.creator.signature.value.substring(0,maxLength)
charleft = 0
clipped = true
} else {
charleft = maxLength - document.creator.signature.value.length
}
document.creator.msgCL.value = charleft
return clipped
}

tick();
//-->
</script>
EOT
if($settings[7] eq "Administrator") {
if($memsettings[7] eq 'Administrator') { $tt = $MemStatAdmin; }
elsif ($memsettings[7] eq 'Global Moderator') { $tt = $MemStatGMod; }
elsif ($memsettings[7] eq 'Moderator') { $tt = $MemStatMod; }
else { $tt = $memsettings[7]; }
print <<"EOT";
<tr>
<td colspan=2><hr width="100%" size="1" color="$color{'windowbg3'}" class="windowbg3"></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'86'}: </b></font></td>
<td><font size=2><input type=text name=settings6 size=4 value="$memsettings[6]"></font></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'87'}: </b></font></td>
<td><font size=2><select name="settings7">
<option value="$tt">$tt
<option value="$memsettings[7]">---------------
<option value="">
EOT
$position='';
$z=0;
print qq~<option value="Administrator">$MemStatAdmin~;
print qq~<option value="Global Moderator">$MemStatGMod~;
print qq~<option value="$MemStatNewbie">$MemStatNewbie~;
while($MemStat[$z]) {
$position= qq~<option value="$MemStat[$z]">$MemStat[$z]~;
++$z;
print qq~$position~;
}
print <<"EOT";
</select></font></td>
</tr><tr>
<td width="320"><font size=2><b>$txt{'233'}:</b><BR>
<font size=1>$txt{'421'}</font></td>
<td><input type="text" name="dr" size="20" value="$dr"></td></tr>
EOT
}
print <<"EOT";
<tr><td align="center" colspan="2"><BR><input type=submit name=moda value="$txt{'88'}">
<input type=submit name=moda value="$txt{'89'}"><BR><BR>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
EOT
&footer;
exit;
}

sub ModifyProfile2 {
my( %member, $key, $value, $newpassemail, @memberlist, $a, @check_settings, @reserve, $matchword, $matchcase, $matchuser, $matchname, $namecheck, $reserved, $reservecheck, @dirdata, $filename, @entries, $entry, $umail, @members, $tempname );
$FORM{'signature'} =~ s~\n~\&\&~g;
while( ($key,$value) = each(%FORM) ) {
$value =~ s~\A\s+~~;
$value =~ s~\s+\Z~~;
$value =~ s~[\n\r]~~g;
$member{$key} = $value;
}

# make sure this person has access to this profile
if($username ne $member{'username'} && $settings[7] ne 'Administrator') {
&fatal_error($txt{'80'});
}
if( $settings[7] ne 'Administrator' ) {
$member{'username'} = $username;
$member{'settings6'} = $settings[6];
$member{'settings7'} = $settings[7];
}
if($member{'settings6'} !~ /\A[0-9]+\Z/) { &fatal_error("$txt{'749'}"); }
if ($member{'username'} =~ /\//){ &fatal_error($txt{'224'}); }
if ($member{'username'} =~ /\\/){ &fatal_error($txt{'225'}); }
$INFO{'username'} = $member{'username'};
if( $member{'userpicpersonalcheck'} && ( $member{'userpicpersonal'} =~ m/\.gif\Z/i || $member{'userpicpersonal'} =~ m/\.jpg\Z/i || $member{'userpicpersonal'} =~ m/\.jpeg\Z/i || $member{'userpicpersonal'} =~ m/\.png\Z/i ) ) {
$member{'userpic'} = $member{'userpicpersonal'};
}
if($member{'userpic'} eq "") { $member{'userpic'} = "blank.gif"; }
&fatal_error("$txt{'592'}") if($member{'userpic'} !~ m^\A[0-9a-zA-Z_\.\#\%\-\:\+\?\$\&\~\.\,\@/]+\Z^);
if(!$allowpics) { $member{'userpic'} = "blank.gif"; }
if( $emailnewpass && lc $member{'email'} ne lc $settings[2] && $settings[7] ne 'Administrator') {
srand();
$member{'passwrd1'} = int( rand(100) );
$member{'passwrd1'} =~ tr/0123456789/ymifxupbck/;
$_ = int( rand(77) );
$_ =~ tr/0123456789/q8dv7w4jm3/;
$member{'passwrd1'} .= $_;
$_ = int( rand(89) );
$_ =~ tr/0123456789/y6uivpkcxw/;
$member{'passwrd1'} .= $_;
$_ = int( rand(188) );
$_ =~ tr/0123456789/poiuytrewq/;
$member{'passwrd1'} .= $_;
$_ = int( rand(65) );
$_ =~ tr/0123456789/lkjhgfdaut/;
$member{'passwrd1'} .= $_;
$newpassemail = 1;
} else {
&fatal_error("($member{'username'}) $txt{'213'}") if($member{'passwrd1'} ne $member{'passwrd2'});
&fatal_error("($member{'username'}) $txt{'91'}") if($member{'passwrd1'} eq '');
&fatal_error("$txt{'241'}") if($member{'passwrd1'} !~ /\A[\s0-9A-Za-z!@#$%\^&*\(\)_\+|`~\-=\\:;'",\.\/?\[\]\{\}]+\Z/);
}
&fatal_error("$txt{'75'}") if($member{'name'} eq '');
&fatal_error("$txt{'242'}") if($member{'name'} !~ /^[\s0-9A-Za-z\[\]#%+,-|\.:=?@^_]+$/);
&fatal_error("Please ENTER something into the Address field") if($member{'address'} eq '');
&fatal_error("Please ENTER only characters into the Address field") if($member{'address'} =~ /[^0-9a-zA-Z. ]/);
&fatal_error("Please ENTER something into the City field") if($member{'city'} eq '');
&fatal_error("Please ENTER only characters into the City field") if($member{'city'} =~ /[^0-9a-zA-Z. ]/);
&fatal_error("Please ENTER something into the Zip field") if($member{'zip'} eq '');
&fatal_error("Please ENTER only characters into the Zip field") if($member{'zip'} =~ /[^0-9]/);
&fatal_error("Please ENTER something into the Phone # field") if($member{'zip'} eq '');
&fatal_error("Please ENTER only characters into the Phone # field") if($member{'zip'} =~ /[^0-9]/);
&fatal_error("Please ENTER your REAL NAME") if($member{'truename'} eq '');
&fatal_error("Please ENTER your NAME Properly") if($member{'truename'} =~ /[^a-zA-Z. ]/);
&fatal_error("$txt{'75'}") if($member{'name'} eq '|');
&fatal_error("$txt{'568'}") if(length($member{'name'}) > 20);
&fatal_error("$txt{'76'}") if($member{'email'} eq '');
&fatal_error("$txt{'243'}") if($member{'email'} !~ /^[0-9A-Za-z@\._\-]+$/);
&fatal_error("$txt{'500'}") if(($member{'email'} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)|(\.$)/) || ($member{'email'} !~ /^.+@\[?(\w|[-.])+\.[a-zA-Z]{2,4}|[0-9]{1,4}\]?$/));
&fatal_error("$txt{'758'}") if($member{'secretquestion'} eq '');
&fatal_error("$txt{'759'}") if($member{'secretanswer'} eq '');
if( $member{'bday1'} ne "" || $member{'bday1'} ne "" || $member{'bday1'} ne "" ) {
&fatal_error("$txt{'567'}") if( $member{'bday1'} !~ /^[0-9]+$/ || $member{'bday2'} !~ /^[0-9]+$/ || $member{'bday3'} !~ /^[0-9]+$/ || length($member{'bday3'}) < 4 );
&fatal_error("$txt{'567'}") if( $member{'bday1'} < 1 || $member{'bday1'} > 12 || $member{'bday2'} < 1 || $member{'bday2'} > 31 || $member{'bday3'} < 1901 || $member{'bday3'} > $year-5 );
}
&fatal_error("$txt{'680'}") if ($member{'username'} eq "admin" && $member{'settings7'} ne "Administrator");

if($member{'moda'} eq $txt{'88'}) {
if (length($member{'signature'}) > $MaxSigLen) { $member{'signature'} = substr($member{'signature'},0,$MaxSigLen); }
$member{'icq'} =~ s/[^0-9]//g;
$member{'bday1'} =~ s/[^0-9]//g;
$member{'bday2'} =~ s/[^0-9]//g;
$member{'bday3'} =~ s/[^0-9]//g;
if($member{'bday1'}) { $member{'bday'} = "$member{'bday1'}/$member{'bday2'}/$member{'bday3'}"; }
else { $member{'bday'} = ''; }
$member{'signature'} =~ s/</&lt;/g;
$member{'signature'} =~ s/</&gt;/g;
$member{'aim'} =~ s/ /\+/g;
$member{'yim'} =~ s/ /\+/g;
if($settings[7] ne "Administrator") { $member{'dr'} = $settings[14]; }
# store the name temorarily so we can restore any _'s later
$tempname = $member{'name'};
$member{'name'} =~ s/\_/ /g;

&ToHTML($member{'location'});
&ToHTML($member{'aim'});
&ToHTML($member{'yim'});
&ToHTML($member{'gender'});
&ToHTML($member{'usertext'});
&ToHTML($member{'websiteurl'});
&ToHTML($member{'websitetitle'});
&ToHTML($member{'email'});
&ToHTML($FORM{'hideemail'});
&ToHTML($member{'name'});
&ToHTML($member{'address'});
&ToHTML($member{'city'});
&ToHTML($member{'zip'});
&ToHTML($member{'phone'});
&ToHTML($member{'truename'});

&FromHTML($member{'usertext'});
$member{'usertext'} =~ s~(\S{15})(?=\S)~$1 ~g;
&ToHTML($member{'usertext'});

if ( length $member{'signature'} > 1000 ) { $member{'signature'} = substr( $member{'signature'}, 0, 1000 ); }
$member{'usertimeoffset'} =~ tr/,/./;
$member{'usertimeoffset'} =~ s/[^\d*|\.|\-|w*]//g;
if (( $member{'usertimeoffset'} < -23.5) || ( $member{'usertimeoffset'} > 23.5)) { &fatal_error($txt{'487'}); }

fopen(FILE, "$memberdir/memberlist.txt");
@memberlist = <FILE>;
fclose(FILE);
$testname = lc $member{'name'};
for ($a = 0; $a < @memberlist; $a++) {
chomp $memberlist[$a];
$membername = lc $memberlist[$a];
if( fopen(FILE2, "$memberdir/$memberlist[$a].dat") ) {
# Load users and check email
if( !$yyUDLoaded{$memberlist[$a]} && -e("$memberdir/$memberlist[$a].dat") && $memberlist[$a] ne $member{'username'}) {
# If user is not in memory, s/he must be loaded.
&LoadUser($memberlist[$a]);
if($userprofile{$memberlist[$a]}->[2] eq $member{'email'}) { &fatal_error("$txt{'730'} ($member{'email'}) $txt{'731'}"); }
}
$tmpa = <FILE2>;
$realnametemp = <FILE2>;
fclose(FILE2);
chomp $realnametemp;
$realnametemp = lc $realnametemp;
if ($realnametemp eq $testname && $memberlist[$a] ne $username && $settings[7] ne 'Administrator') { &fatal_error("($member{'name'}) $txt{'473'}"); }
}
}

fopen(FILE, "$vardir/reserve.txt") || &fatal_error("$txt{'23'} reserve.txt");
@reserve = <FILE>;
fclose(FILE);
fopen(FILE, "$vardir/reservecfg.txt") || &fatal_error("$txt{'23'} reservecfg.txt");
@reservecfg = <FILE>;
fclose(FILE);
for( $a = 0; $a < @reservecfg; $a++ ) {
chomp $reservecfg[$a];
}
$matchword = $reservecfg[0] eq 'checked';
$matchcase = $reservecfg[1] eq 'checked';
$matchuser = $reservecfg[2] eq 'checked';
$matchname = $reservecfg[3] eq 'checked';
$namecheck = $matchcase eq 'checked' ? $member{'name'} : lc $member{'name'};

foreach $reserved (@reserve) {
chomp $reserved;
$reservecheck = $matchcase ? $reserved : lc $reserved;
if ($matchname) {
if ($matchword) {
if ($namecheck eq $reservecheck) { &fatal_error("$txt{'244'} $reserved"); }
}
else {
if ($namecheck =~ $reservecheck) { &fatal_error("$txt{'244'} $reserved"); }
}
}
}

# let's restore the name now
&ToHTML($tempname);
$member{'name'} = $tempname;

fopen(SETTINGS, "$memberdir/$member{'username'}.dat");
@userProfileSettings = <SETTINGS>;
fclose(SETTINGS);
chomp $userProfileSettings[0];
chomp $userProfileSettings[21];

if ($member{'passwrd1'} eq $userProfileSettings[0]) {

$cryptpass = $member{'passwrd1'};
}
else {
$cryptpass = crypt("$member{'passwrd1'}",$pwseed);
}
if ($member{'secretanswer'} eq $userProfileSettings[21]) {
$cryptanswer = $member{'secretanswer'};
}
else {
$cryptanswer = crypt("$member{'secretanswer'}",$pwseed);
}

fopen( FILE, ">$memberdir/$member{'username'}.dat", 1);
print FILE "$cryptpass\n";
print FILE "$member{'name'}\n";
print FILE "$member{'email'}\n";
print FILE "$member{'websitetitle'}\n";
print FILE "$member{'websiteurl'}\n";
print FILE "$member{'signature'}\n";
print FILE "$member{'settings6'}\n";
print FILE "$member{'settings7'}\n";
print FILE "$member{'icq'}\n";
print FILE "$member{'aim'}\n";
print FILE "$member{'yim'}\n";
print FILE "$member{'gender'}\n";
print FILE "$member{'usertext'}\n";
print FILE "$member{'userpic'}\n";
print FILE "$member{'dr'}\n";
print FILE "$member{'location'}\n";
print FILE "$member{'bday'}\n";
print FILE "$member{'usertimeselect'}\n";
print FILE "$member{'usertimeoffset'}\n";
if ($FORM{'hideemail'} ne "checked") { $FORM{'hideemail'} = ""; }
print FILE "$FORM{'hideemail'}\n";
print FILE "$member{'address'}\n";
print FILE "$member{'city'}\n";
print FILE "$member{'zip'}\n";
print FILE "$member{'phone'}\n";
print FILE "$member{'secretquestion'}\n";
print FILE "$cryptanswer\n";
print FILE "$member{'truename'}\n";
fclose(FILE);

if($newpassemail) {

# Write log
fopen(LOG, "$vardir/log.txt");
@entries = <LOG>;
fclose(LOG);
fopen(LOG, ">$vardir/log.txt", 1);
$field="$username";
foreach $curentry (@entries) {
$curentry =~ s/\n//g;
($name, $value) = split(/\|/, $curentry);
if($name ne "$field") {
print LOG "$curentry\n";
}
}
fclose(LOG);

$yySetCookies = qq~Set-Cookie: $cookieusername=; expires=Thu, 01-Jan-1970 00:00:00 GMT;\n~;
$yySetCookies .= qq~Set-Cookie: $cookiepassword=; expires=Thu, 01-Jan-1970 00:00:00 GMT;\n~;
$yySetCookies .= qq~Set-Cookie: $cookieusername=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT;\n~;
$yySetCookies .= qq~Set-Cookie: $cookiepassword=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT;\n~;
$username = 'Guest';
$password = '';
@settings = ();
$realname = '';
$realemail = '';
$ENV{'HTTP_COOKIE'} = '';

&FormatUserName($member{'username'});
$yytitle="$txt{'245'}";
&header;

&sendmail($member{'email'},qq~$txt{'700'} $mbname~, "$txt{'733'} $member{'passwrd1'} $txt{'734'} $member{'username'}.\n\n$txt{'701'} $scripturl?action=profile&username=$useraccount{$member{'username'}}\n\n$txt{'130'}");
print <<"EOT";
<BR>
<table border=0 width=100% cellspacing=1 bgcolor="$color{'bordercolor'}" class="bordercolor" align="center">
<tr>
<td class="titlebg" bgcolor="$color{'titlebg'}"><font size=2 class="text1" color="$color{'titletext'}"><b>$txt{'97'}</b></font></td>
</tr><tr>
<td class="windowbg" bgcolor="$color{'windowbg'}" align="left" cellpadding=3><font size=2>$txt{'638'}</font></td>
</tr><tr>
<td class="windowbg" bgcolor="$color{'windowbg2'}" valign=top><form action="$cgi&action=login2" method="POST">
<table border=0>
<tr>
<td><font size=2><b>$txt{'35'}:</b></font></td>
<td><font size=2><input type=text name="username" size=15 value="$member{'username'}"></font></td>
<td><font size=2><b>$txt{'36'}:</b></font></td>
<td><font size=2><input type=password name="passwrd" size=15></font> &nbsp;</td>
<td><font size=2><b>$txt{'497'}:</b></font></td>
<td><font size=2><input type=text name="cookielength" size=4 value="$Cookie_Length">
<td><font size=2><b>$txt{'508'}:</B></font></td>
<td><font size=2><input type=checkbox name="cookieneverexp"></font></td> &nbsp;</font></td>
<td align=center colspan=2><input type=submit value="$txt{'34'}"></td>
</tr>
</table>
</td>
</tr>
</table>
EOT
&footer;
exit;
}
else {
if ( $member{'username'} eq $username ) {
$Cookie_Exp_Date = 'Sun, 17-Jan-2038 00:00:00 GMT';
$password = $cryptpass;

$yySetCookies = qq~Set-Cookie: $cookieusername=$username; path=/; expires=$Cookie_Exp_Date;\n~;
$yySetCookies .= qq~Set-Cookie: $cookiepassword=$password; path=/; expires=$Cookie_Exp_Date;\n~;

&LoadUserSettings;
&WriteLog;
}
&ViewProfile;
}
} else {

if($settings[7] eq 'Administrator') {
unlink("$memberdir/$member{'username'}.dat");
unlink("$memberdir/$member{'username'}.msg");
unlink("$memberdir/$member{'username'}.log");
unlink("$memberdir/$member{'username'}.outbox");
unlink("$memberdir/$member{'username'}.imconfig");
}
elsif( $member{'username'} eq $username ) {
unlink("$memberdir/$username.dat");
unlink("$memberdir/$username.msg");
unlink("$memberdir/$username.log");
unlink("$memberdir/$username.outbox");
unlink("$memberdir/$username.imconfig");
}

opendir (DIRECTORY,"$datadir");
@dirdata = readdir(DIRECTORY);
closedir (DIRECTORY);

if($settings[7] eq 'Administrator') {
$umail=$member{'email'};
} else {
$umail=$settings[2];
}
foreach $filename (@dirdata) {
unless( $filename =~ m~mail\A~ ) { next; }
fopen(FILE, "$datadir/$filename");
@entries = <FILE>;
fclose(FILE);

fopen(FILE, ">$datadir/$filename");
foreach $entry (@entries) {
$entry =~ s/[\n\r]//g;
if ($entry ne $umail) {
print FILE "$entry\n";
}
}
fclose(FILE);

}

fopen(FILE, "$memberdir/memberlist.txt");
@members = <FILE>;
fclose(FILE);
fopen(FILE, ">$memberdir/memberlist.txt", 1);
my $memberfound = 0;
my $lastvalidmember = '';
foreach $curmem (@members) {
chomp $curmem;
if($curmem ne $member{'username'}) { print FILE "$curmem\n"; $lastvalidmember = $curmem; }
else { ++$memberfound; }
}
fclose(FILE);
my $membershiptotal = @members - $memberfound;
fopen(FILE, "+>$memberdir/members.ttl");
print FILE qq~$membershiptotal|$lastvalidmember~;
fclose(FILE);
if($settings[7] ne 'Administrator') {
require "$sourcedir/LogInOut.pl"; &Logout;
}
$yySetLocation = qq~$scripturl~;
&redirectexit;
}
exit;
}

sub ViewProfile {

if (-e "$memberdir/$INFO{'username'}.ref") {
fopen(FILE, "$memberdir/$INFO{'username'}.ref");
@names=<FILE>;
$numbercount = @names;
fclose(FILE);
}
if($names[0] eq "0") {$names[0] eq "(not referred)"}
$number = $numbercount - 1;
if ($number < 0) { $number = 0; }


if ($INFO{'username'} =~ /\//){ &fatal_error("$txt{'224'}" ); }
if ($INFO{'username'} =~ /\\/){ &fatal_error("$txt{'225'}" ); }
if(!-e ("$memberdir/$INFO{'username'}.dat")){ &fatal_error("$txt{'453'} -- $INFO{'username'}"); }

my($memberinfo, $modify, $email, $gender, $pic);

$yytitle = "$txt{'92'} $INFO{'username'}";
&header;

# get the member's info
fopen(FILE, "$memberdir/$INFO{'username'}.dat");
@memsettings=<FILE>;
fclose(FILE);
chomp @memsettings;

$icq = $memsettings[8];
$memsettings[9] =~ tr/+/ /;
$dr = "";
if ($memsettings[14] eq "") { $dr = "$txt{'470'}"; }
else { $dr = "$memsettings[14]"; $dr = &timeformat($dr); }
&CalcAge("calc"); # How old is he/she?
&CalcAge("isbday"); # is it the bday?
if($isbday) { $isbday = "<img src=\"$imagesdir/bdaycake.gif\" width=40>"; }
$memsettings[9] =~ s/\+/ /g;

my ($msstatcount);
$msstatcount=0;
if ($memsettings[7]) { $memberinfo = "$memsettings[7]"; } else {
if( $memsettings[6] >= $MemPostNewbie) { $memberinfo = "$MemStatNewbie"; }
while($MemStat[$msstatcount] && $MemPostNum[$msstatcount] ne "x") {
if( $memsettings[6] >= $MemPostNum[$msstatcount] ) { $memberinfo = "$MemStat[$msstatcount]"; }
++$msstatcount;
}
}

&FormatUserName($INFO{'username'});
if ($username eq $INFO{'username'} || $settings[7] eq "Administrator") {
$modify = qq~&#171; <a href="$cgi&action=profile&username=$useraccount{$INFO{'username'}}"><font size=2 class="text1" color="$color{'titletext'}">$txt{'17'}</font></a> &#187;~;
}
### BUGFIX OWN EMAIL SHOWN IF HIDE IS ACTIVATED ###

if ($memsettings[19] ne "checked" || $settings[7] eq "Administrator" || $settings[7] eq "Moderator" || $allow_hide_email ne 1 || $username eq $INFO{'username'}) {
$email = qq~<a href="mailto:$memsettings[2]">$memsettings[2]</a>~;

### END - BUGFIX OWN EMAIL SHOWN IF HIDE IS ACTIVATED ###
}
else { $email = qq~<i>$txt{'722'}</i>~; }
$gender = "";
if ($memsettings[11] eq "Male") { $gender = qq~$txt{'238'}~; }
if ($memsettings[11] eq "Female") { $gender = qq~$txt{'239'}~; }
if($allowpics) {
if ($memsettings[13] =~ /^\http:\/\// ) {
if ($userpic_width ne 0) { $tmp_width = "width=$userpic_width"; } else { $tmp_width=""; }
if ($userpic_height ne 0) { $tmp_height = "height=$userpic_height"; } else { $tmp_height=""; }
$pic = qq~<a href="$memsettings[13]" target="_blank" onClick="window.fopen('$memsettings[13]', 'ppic$INFO{username}', 'resizable,width=200,height=200'); return false;">~;
$pic = qq~<img src="$memsettings[13]" $tmp_width $tmp_height border=0></a>~;
}
else {
$pic = qq~<a href="$facesurl/$memsettings[13]" target="_blank" onClick="window.fopen('$facesurl/$memsettings[13]', 'ppic$INFO{username}', 'resizable,width=200,height=200'); return false;">~;
$pic = qq~<img src="$facesurl/$memsettings[13]" border=0></a>~;
}
}

$online = "$txt{'113'} ?";
fopen(FILE, "$vardir/log.txt");
@entries = <FILE>;
fclose(FILE);
foreach $curentry (@entries) {
chomp $curentry;
($name, $value) = split(/\|/, $curentry);
if( $name ) {
&LoadUser($name);
if( $useraccount{$name} eq $INFO{'username'}) {
$online =~ s~\?~<i>$txt{'686'}</i>.~;
}
}
}
$online =~ s~\?~<i>$txt{'687'}</i>.~;
if($memsettings[6] > 100000) { $memsettings[6] = "$txt{'683'}"; }

print <<"EOT";
<table border="0" cellpadding="4" cellspacing="1" bgcolor="$color{'bordercolor'}" class="bordercolor" align="center">
<tr>
<td class="titlebg" colspan="2" bgcolor="$color{'titlebg'}">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr height="30">
<td width="220">
<img src="$imagesdir/profile_sm.gif" alt="" border="0">&nbsp;
<font size=2 class="text1" color="$color{'titletext'}"><B>$txt{'35'}: $INFO{'username'}</b></font></td>
<td align="center" width="200">
<font size=2 class="text1" color="$color{'titletext'}">$modify</font></td>
<td align="center" width="150">
<font size=2 class="text1" color="$color{'titletext'}">$txt{'232'}</font></td>
</tr>
</table>
</td>
</tr><tr>
<td bgcolor="$color{'windowbg'}" class="windowbg" width="420">
<table border=0 cellspacing="0" cellpadding="2" width="100%">
<tr>
<td><font size=2><b>Real Name: </b></font></td>
<td><font size=2 color=yellow>$memsettings[22]</font></td>
</tr><tr>
<td><font size=2><b>Address: </b></font></td>
<td><font size=2>$memsettings[30]</font></td>
</tr><tr>
<td><font size=2><b>City: </b></font></td>
<td><font size=2>$memsettings[31]</font></td>
</tr><tr> <br>
<td><font size=2><b>Zip Code: </b></font></td>
<td><font size=2>$memsettings[32]</font></td>
</tr><tr> <br>
<td><font size=2><b>Phone Number: </b></font></td>
<td><font size=2>$memsettings[33]</font></td>
</tr><tr>
<td><font size=2><b>$txt{'35'}: </b></font></td>
<td><font size=2>$memsettings[1]</font></td>
</tr><tr>
<td><font size=2><b>$txt{'86'}: </b></font></td>
<td><font size=2>$memsettings[6]</font></td>
</tr><tr>
<td><font size=2><b>$txt{'87'}: </b></font></td>
<td><font size=2>$memberinfo</font></td>
</tr><tr>
<td><font size=2><b>$txt{'233'}: </b></font></td>
<td><font size=2>$dr</font></td>
</tr><tr>
<td colspan="2"><hr size="1" width="100%" color="$color{'windowbg3'}" class="windowbg3"></td>
</tr><tr>
<td><font size=2><b>$txt{'513'}:</b></font></td>
<td><font size=2><a href="$cgi&action=icqpager&UIN=$icq" target=_blank>$memsettings[8]</a></font></td>
</tr><tr>
<td><font size=2><b>$txt{'603'}: </b></font></td>
<td><font size=2>$memsettings[9]</font></td>
</tr><tr>
<td><font size=2><b>$txt{'604'}: </b></font></td>
<td><font size=2>$memsettings[10]</font></td>
</tr><tr>
<td><font size=2><b>$txt{'69'}: </b></font></td>
<td><font size=2>$email</font></td>
</tr><tr>
<td><font size=2><b>$txt{'96'}: </b></font></td>
<td><font size=2><a href="$memsettings[4]" target=_blank>$memsettings[3]</a></font></td>
</tr><tr>
<td colspan="2"><hr size="1" width="100%" color="$color{'windowbg3'}" class="windowbg3"></td>
</tr><tr>
<td><font size=2><b>$txt{'231'}: </b></font></td>
<td><font size=2>$gender</font></td>
</tr><tr>
<td><font size=2><b>$txt{'420'}:</b></font></td>
<td><font size=2>$age</font> &nbsp; $isbday</td>
</tr><tr>
<td><font size=2><b>$txt{'227'}: </b></font></td>
<td><font size=2>$memsettings[15]</font></td>
</tr>
EOT

## REFER HACK ##
if(-e "$memberdir/$INFO{'username'}.ref") {
fopen(FILE, "$memberdir/$INFO{'username'}.ref");
@referred = <FILE>;
fclose(FILE);
$referredby = $referred[0];
} else {
$referredby = "(not referred)";
}
if (($enable_memrefers) || ($settings[7] eq 'Administrator') && ($enable_refers)) {
print<<"EOT";
<tr>
<td><font size=2><b>$reftxt{'02'}</b></font></td>
<td><font size=2>$referredby</font></td>
</tr>
<tr>
<td><font size=2><b>$reftxt{'03'}</b></font></td>
<td><font size=2>$number</font></td>
</tr>
<tr>
<td valign="top"><font size=2><b>$reftxt{'04'}</b></font></td>
<td><font size=2><a target="_blank" href="$scripturl?action=namelist&username=$INFO{'username'}">$reftxt{'05'}</a></font></td>
</tr>
<tr>
<td valign="top"><font size=2><b>$reftxt{'12'}</b></font></td>
<td><font size=2><a href="$scripturl?action=reflist">$reftxt{'12'}</a></font></td>
</tr>
EOT
}


## END REFER HACK ##
print<<"EOT";
</table>
</td>
<td bgcolor="$color{'windowbg'}" class="windowbg" valign="middle" align="center" width="150">
$pic<BR><BR>
<font size=2>$memsettings[12]</font></td>
</tr><tr height="25">
<td class="titlebg" bgcolor="$color{'titlebg'}" colspan="2">
&nbsp;<font size=2 class="text1" color="$color{'titletext'}"><b>$txt{'459'}:</b></font></td>
</tr><tr>
<td colspan="2" bgcolor="$color{'windowbg2'}" class="windowbg2" valign="middle">
<form action="$cgi&action=usersrecentposts&username=$useraccount{$INFO{'username'}}" method="POST">
<font size=2>
$online<BR><BR>
<a href="$cgi&action=imsend&to=$useraccount{$INFO{'username'}}">$txt{'688'}</a>.<BR><BR>
$txt{'460'} <select name="viewscount" size="1">
<option value="5">5</option>
<option value="10" selected>10</option>
<option value="50">50</option>
<option value="0">$txt{'190'}</option>
</select> $txt{'461'}. <input type=submit value="$txt{'462'}">
</font></td>
</tr>
</table>
</form>
EOT
&footer;
exit;
}

sub usersrecentposts {
my $curuser = $INFO{'username'};
&FormatUserName($curuser);
if ($curuser =~ m~/~){ &fatal_error($txt{'224'}); }
if ($curuser =~ m~\\~){ &fatal_error($txt{'225'}); }
my $display = $FORM{'viewscount'};
if( $display =~ /\D/ ) { &fatal_error($txt{'337'}); }
$display ||= 999999999;
my( @memset, @categories, %data, %cat, $numfound, $oldestfound, $curcat, %catname, %cataccess, %catboards, $openmemgr, @membergroups, $tmpa, %openmemgr, $curboard, @threads, @boardinfo, $i, $c, @messages, $tnum, $tsub, $tname, $temail, $tdate, $treplies, $tusername, $ticon, $tstate, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $mns, $mtime, $counter, $board, $notify );

fopen(FILE, "$memberdir/$curuser.dat") || &fatal_error("$txt{'23'} $curuser.txt");
@memset = <FILE>;
fclose(FILE);

@categories = ();
fopen(FILE, "$vardir/cat.txt");
@categories = <FILE>;
fclose(FILE);

# Load Censor List
&LoadCensorList;

$oldestfound = stringtotime("01/10/37 $txt{'107'} 00:00:00");

foreach $curcat (@categories) {
chomp $curcat;
fopen(FILE, "$boardsdir/$curcat.cat");
$catname{$curcat} = <FILE>;
chomp $catname{$curcat};
$cataccess{$curcat} = <FILE>;
chomp $cataccess{$curcat};
@{$catboards{$curcat}} = <FILE>;
fclose(FILE);
$openmemgr{$curcat} = 0;
@membergroups = split( /,/, $cataccess{$curcat} );
foreach $tmpa (@membergroups) {
if( $tmpa eq $settings[7]) { $openmemgr{$curcat} = 1; last; }
}
if( ! $cataccess{$curcat} || $settings[7] eq 'Administrator' ) {
$openmemgr{$curcat} = 1;
}
unless( $openmemgr{$curcat} ) { next; }
boardcheck: foreach $curboard (@{$catboards{$curcat}}) {
chomp $curboard;
fopen(FILE, "$boardsdir/$curboard.txt");
@threads = <FILE>;
fclose(FILE);

fopen(FILE, "$boardsdir/$curboard.dat");
@boardinfo = <FILE>;
fclose(FILE);
foreach (@boardinfo) {
chomp;
}
@{$boardinfo{$curboard}} = @boardinfo;
$cat{$curboard} = $curcat;

threadcheck: for ($i = 0; $i < @threads; $i++) {
chomp $threads[$i];
($tnum, $tsub, $tname, $temail, $tdate, $treplies, $tusername, $ticon, $tstate) = split( /\|/, $threads[$i] );
fopen(FILE, "$datadir/$tnum.txt") || next;
@messages = <FILE>;
fclose(FILE);

for ($c = 0; $c < @messages; $c++) {
chomp $messages[$c];
($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns) = split(/\|/,$messages[$c]);
if ($curuser eq $musername) {
$mtime = stringtotime($mdate);
if( $numfound >= $display && $mtime <= $oldestfound ) {
next boardcheck;
}
else {
$data{$mtime} = [$curboard, $tnum, $c, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns];
if( $mtime < $oldestfound ) { $oldestfound = $mtime; }
++$numfound;
}
}
}
}
}
}

$yytitle = "$txt{'458'} $memset[1]";
&header;
print<<"EOT";
<p align=left><a href="$cgi&action=viewprofile&username=$useraccount{$curuser}"><font size=2><b>$txt{'92'} $memset[1]</b></font></a></p>
EOT
@messages = sort {$b <=> $a } keys %data;
if( @messages > $display ) { $#messages = $display - 1; }
$counter = 1;
for( $i = 0; $i < @messages; $i++ ) {
($board, $tnum, $c, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns) = @{ $data{$messages[$i]} };
foreach (@censored) {
($tmpa,$tmpb) = @{$_};
$message =~ s~\Q$tmpa\E~$tmpb~gi;
$msub =~ s~\Q$tmpa\E~$tmpb~gi;
}
if($enable_ubbc) { $ns = $mns; &DoUBBC; }
if($enable_notification) {
$notify = qq~$menusep<a href="$scripturl?board=$board&action=notify&thread=$tnum&start=$c">$img{'notify'}</a>~;
}
print <<"EOT";
<table border=0 width=100% cellspacing=1 $color{'bordercolor'}>
<tr>
<td align=left bgcolor="$color{'titlebg'}"><font class="text1" color="$color{'titletext'}" size=2>&nbsp;$counter&nbsp;</font></td>
<td width=75% bgcolor="$color{'titlebg'}"><font class="text1" color="$color{'titletext'}" size=2><b>&nbsp;$catname{$cat{$board}} / $boardinfo{$board}->[0] / <a href="$scripturl?board=$board&action=display&num=$tnum&start=$c"><font class="text1" color="$color{'titletext'}" size=2>$msub</font></a></b></font></td>
<td align=right bgcolor="$color{'titlebg'}"><nobr>&nbsp;<font class="text1" color="$color{'titletext'}" size=2>$txt{'30'}: $mdate&nbsp;</font></nobr></td>
</tr>
<tr height=80>
<td colspan=3 bgcolor="$color{'windowbg2'}" valign=top><font size=2>$message</font></td>
</tr>
<tr>
<td colspan=3 bgcolor="$color{'catbg'}"><font size=2>
&nbsp;<a href="$scripturl?board=$board&action=post&num=$tnum&start=$c&title=Post+reply">$img{'reply'}</a>$menusep<a href="$scripturl?board=$board&action=post&num=$tnum&quote=$c&title=Post+reply">$img{'replyquote'}</a>$notify
</font></td>
</tr>
</table><br>
EOT
++$counter;
}

print <<"EOT";
<p align=left><a href="$cgi&action=viewprofile&username=$useraccount{$curuser}"><font size=2><b>$txt{'92'} $memset[1]</b></font></a></p></font>
EOT
&footer;
exit;
}
sub NameList {

if (-e "$memberdir/$INFO{'username'}.ref") {
fopen(FILE, "$memberdir/$INFO{'username'}.ref");
@names=<FILE>;
$number = @names;
fclose(FILE);
for ($i = 1; $i < @names; $i++) {
$namelist .= "<a href=\"$scripturl?action=viewprofile&username=$names[$i]\">$names[$i]<br>";
$namelist .= "</a>";
}
}
$name1 = $names[0];
if($namelist eq "") {
$namelist = "$reftxt{'06'}";
}
&header;

print <<"EOT";

<table border=0 width="40%" cellspacing=1 bgcolor="$color{'bordercolor'}" class="bordercolor" align="center" cellpadding="4">
<tr>
<td class="titlebg" bgcolor="$color{'titlebg'}"><font size=2 class="text1" color="$color{'titletext'}"><b>$reftxt{'07'}</b></font></td>
</tr><tr>
<td class="windowbg" bgcolor="$color{'windowbg'}"><BR><center><font size=2 face="Vardana, Helvetica, sans-serif">$namelist</font></center><BR><BR></td>
</tr>
</table>

EOT

&footer;
exit;
}
1;
 
IP Logged
 
Tea-Master
Mod God
*****
Offline

north germany, Schleswig-Holstein, Germany
Posts: 1944




BoardMod Developer
Reply #12 - 21.06.02 at 21:35:47  
k - u changed the wrong code lines Tongue

u changed that in ModifyProfile (this sub will be executed if u MODIFY the profile) - it has to be in the ViewProfile sub.

So change
Code:

<tr>
<td><font size=2><b>Address: </b></font></td>  
<td><font size=2>$memsettings[30]</font></td>
</tr>

to
Code:

<tr>  
~;
if($settings[7] eq 'Administrator') {
$yymain .= qq~ <td><font size=2><b>Address: </b></font></td>  
<td><font size=2>$memsettings[30]</font></td> </tr>  
<tr> ~; }
 
IP Logged
 
LukeA
Bloody Novice
*
Offline

Posts: 12



Reply #13 - 25.06.02 at 07:08:28  
I added the code where you told me too, but still not luck.  The address field is still viewable to guests.  Here is the view profile part of profile.pl:

Code:


sub ViewProfile {

if (-e "$memberdir/$INFO{'username'}.ref") {
fopen(FILE, "$memberdir/$INFO{'username'}.ref");
@names=<FILE>;
$numbercount = @names;
fclose(FILE);
}
if($names[0] eq "0") {$names[0] eq "(not referred)"}
$number = $numbercount - 1;
if ($number < 0) { $number = 0; }


if ($INFO{'username'} =~ /\//){ &fatal_error("$txt{'224'}" ); }
if ($INFO{'username'} =~ /\\/){ &fatal_error("$txt{'225'}" ); }
if(!-e ("$memberdir/$INFO{'username'}.dat")){ &fatal_error("$txt{'453'} -- $INFO{'username'}"); }

my($memberinfo, $modify, $email, $gender, $pic);

$yytitle = "$txt{'92'} $INFO{'username'}";
&header;

# get the member's info
fopen(FILE, "$memberdir/$INFO{'username'}.dat");
@memsettings=<FILE>;
fclose(FILE);
chomp @memsettings;

$icq = $memsettings[8];
$memsettings[9] =~ tr/+/ /;
$dr = "";
if ($memsettings[14] eq "") { $dr = "$txt{'470'}"; }
else { $dr = "$memsettings[14]"; $dr = &timeformat($dr); }
&CalcAge("calc"); # How old is he/she?
&CalcAge("isbday"); # is it the bday?
if($isbday) { $isbday = "<img src=\"$imagesdir/bdaycake.gif\" width=40>"; }
$memsettings[9] =~ s/\+/ /g;

my ($msstatcount);
$msstatcount=0;
if ($memsettings[7]) { $memberinfo = "$memsettings[7]"; } else {
if( $memsettings[6] >= $MemPostNewbie) { $memberinfo = "$MemStatNewbie"; }
while($MemStat[$msstatcount] && $MemPostNum[$msstatcount] ne "x") {
if( $memsettings[6] >= $MemPostNum[$msstatcount] ) { $memberinfo = "$MemStat[$msstatcount]"; }
++$msstatcount;
}
}

&FormatUserName($INFO{'username'});
if ($username eq $INFO{'username'} || $settings[7] eq "Administrator") {
$modify = qq~&#171; <a href="$cgi&action=profile&username=$useraccount{$INFO{'username'}}"><font size=2 class="text1" color="$color{'titletext'}">$txt{'17'}</font></a> &#187;~;
}
### BUGFIX OWN EMAIL SHOWN IF HIDE IS ACTIVATED ###

if ($memsettings[19] ne "checked" || $settings[7] eq "Administrator" || $settings[7] eq "Moderator" || $allow_hide_email ne 1 || $username eq $INFO{'username'}) {
$email = qq~<a href="mailto:$memsettings[2]">$memsettings[2]</a>~;

### END - BUGFIX OWN EMAIL SHOWN IF HIDE IS ACTIVATED ###
}
else { $email = qq~<i>$txt{'722'}</i>~; }
$gender = "";
if ($memsettings[11] eq "Male") { $gender = qq~$txt{'238'}~; }
if ($memsettings[11] eq "Female") { $gender = qq~$txt{'239'}~; }
if($allowpics) {
if ($memsettings[13] =~ /^\http:\/\// ) {
if ($userpic_width ne 0) { $tmp_width = "width=$userpic_width"; } else { $tmp_width=""; }
if ($userpic_height ne 0) { $tmp_height = "height=$userpic_height"; } else { $tmp_height=""; }
$pic = qq~<a href="$memsettings[13]" target="_blank" onClick="window.fopen('$memsettings[13]', 'ppic$INFO{username}', 'resizable,width=200,height=200'); return false;">~;
$pic = qq~<img src="$memsettings[13]" $tmp_width $tmp_height border=0></a>~;
}
else {
$pic = qq~<a href="$facesurl/$memsettings[13]" target="_blank" onClick="window.fopen('$facesurl/$memsettings[13]', 'ppic$INFO{username}', 'resizable,width=200,height=200'); return false;">~;
$pic = qq~<img src="$facesurl/$memsettings[13]" border=0></a>~;
}
}

$online = "$txt{'113'} ?";
fopen(FILE, "$vardir/log.txt");
@entries = <FILE>;
fclose(FILE);
foreach $curentry (@entries) {
chomp $curentry;
($name, $value) = split(/\|/, $curentry);
if( $name ) {
&LoadUser($name);
if( $useraccount{$name} eq $INFO{'username'}) {
$online =~ s~\?~<i>$txt{'686'}</i>.~;
}
}
}
$online =~ s~\?~<i>$txt{'687'}</i>.~;
if($memsettings[6] > 100000) { $memsettings[6] = "$txt{'683'}"; }

print <<"EOT";
<table border="0" cellpadding="4" cellspacing="1" bgcolor="$color{'bordercolor'}" class="bordercolor" align="center">
<tr>
<td class="titlebg" colspan="2" bgcolor="$color{'titlebg'}">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr height="30">
<td width="220">
<img src="$imagesdir/profile_sm.gif" alt="" border="0">&nbsp;
<font size=2 class="text1" color="$color{'titletext'}"><B>$txt{'35'}: $INFO{'username'}</b></font></td>
<td align="center" width="200">
<font size=2 class="text1" color="$color{'titletext'}">$modify</font></td>
<td align="center" width="150">
<font size=2 class="text1" color="$color{'titletext'}">$txt{'232'}</font></td>
</tr>
</table>
</td>
</tr><tr>
<td bgcolor="$color{'windowbg'}" class="windowbg" width="420">
<table border=0 cellspacing="0" cellpadding="2" width="100%">
<tr>
<td><font size=2><b>Real Name: </b></font></td>
<td><font size=2 color=yellow>$memsettings[22]</font></td>
</tr><tr>
~;
if($settings[7] eq 'Administrator') {
$yymain .= qq~ <td><font size=2><b>Address: </b></font></td>
<td><font size=2>$memsettings[30]</font></td>
</tr><tr> ~; }
<td><font size=2><b>City: </b></font></td>
<td><font size=2>$memsettings[31]</font></td>
</tr><tr> <br>
<td><font size=2><b>Zip Code: </b></font></td>
<td><font size=2>$memsettings[32]</font></td>
</tr><tr> <br>
<td><font size=2><b>Phone Number: </b></font></td>
<td><font size=2>$memsettings[33]</font></td>
</tr><tr>
<td><font size=2><b>$txt{'35'}: </b></font></td>
<td><font size=2>$memsettings[1]</font></td>
</tr><tr>
<td><font size=2><b>$txt{'86'}: </b></font></td>
<td><font size=2>$memsettings[6]</font></td>
</tr><tr>
<td><font size=2><b>$txt{'87'}: </b></font></td>
<td><font size=2>$memberinfo</font></td>
</tr><tr>
<td><font size=2><b>$txt{'233'}: </b></font></td>
<td><font size=2>$dr</font></td>
</tr><tr>
<td colspan="2"><hr size="1" width="100%" color="$color{'windowbg3'}" class="windowbg3"></td>
</tr><tr>
<td><font size=2><b>$txt{'513'}:</b></font></td>
<td><font size=2><a href="$cgi&action=icqpager&UIN=$icq" target=_blank>$memsettings[8]</a></font></td>
</tr><tr>
<td><font size=2><b>$txt{'603'}: </b></font></td>
<td><font size=2>$memsettings[9]</font></td>
</tr><tr>
<td><font size=2><b>$txt{'604'}: </b></font></td>
<td><font size=2>$memsettings[10]</font></td>
</tr><tr>
<td><font size=2><b>$txt{'69'}: </b></font></td>
<td><font size=2>$email</font></td>
</tr><tr>
<td><font size=2><b>$txt{'96'}: </b></font></td>
<td><font size=2><a href="$memsettings[4]" target=_blank>$memsettings[3]</a></font></td>
</tr><tr>
<td colspan="2"><hr size="1" width="100%" color="$color{'windowbg3'}" class="windowbg3"></td>
</tr><tr>
<td><font size=2><b>$txt{'231'}: </b></font></td>
<td><font size=2>$gender</font></td>
</tr><tr>
<td><font size=2><b>$txt{'420'}:</b></font></td>
<td><font size=2>$age</font> &nbsp; $isbday</td>
</tr><tr>
<td><font size=2><b>$txt{'227'}: </b></font></td>
<td><font size=2>$memsettings[15]</font></td>
</tr>
EOT

## REFER HACK ##
if(-e "$memberdir/$INFO{'username'}.ref") {
fopen(FILE, "$memberdir/$INFO{'username'}.ref");
@referred = <FILE>;
fclose(FILE);
$referredby = $referred[0];
} else {
$referredby = "(not referred)";
}
if (($enable_memrefers) || ($settings[7] eq 'Administrator') && ($enable_refers)) {
print<<"EOT";
<tr>
<td><font size=2><b>$reftxt{'02'}</b></font></td>
<td><font size=2>$referredby</font></td>
</tr>
<tr>
<td><font size=2><b>$reftxt{'03'}</b></font></td>
<td><font size=2>$number</font></td>
</tr>
<tr>
<td valign="top"><font size=2><b>$reftxt{'04'}</b></font></td>
<td><font size=2><a target="_blank" href="$scripturl?action=namelist&username=$INFO{'username'}">$reftxt{'05'}</a></font></td>
</tr>
<tr>
<td valign="top"><font size=2><b>$reftxt{'12'}</b></font></td>
<td><font size=2><a href="$scripturl?action=reflist">$reftxt{'12'}</a></font></td>
</tr>
EOT
}


## END REFER HACK ##
print<<"EOT";
</table>
</td>
<td bgcolor="$color{'windowbg'}" class="windowbg" valign="middle" align="center" width="150">
$pic<BR><BR>
<font size=2>$memsettings[12]</font></td>
</tr><tr height="25">
<td class="titlebg" bgcolor="$color{'titlebg'}" colspan="2">
&nbsp;<font size=2 class="text1" color="$color{'titletext'}"><b>$txt{'459'}:</b></font></td>
</tr><tr>
<td colspan="2" bgcolor="$color{'windowbg2'}" class="windowbg2" valign="middle">
<form action="$cgi&action=usersrecentposts&username=$useraccount{$INFO{'username'}}" method="POST">
<font size=2>
$online<BR><BR>
<a href="$cgi&action=imsend&to=$useraccount{$INFO{'username'}}">$txt{'688'}</a>.<BR><BR>
$txt{'460'} <select name="viewscount" size="1">
<option value="5">5</option>
<option value="10" selected>10</option>
<option value="50">50</option>
<option value="0">$txt{'190'}</option>
</select> $txt{'461'}. <input type=submit value="$txt{'462'}">
</font></td>
</tr>
</table>
</form>
EOT
&footer;
exit;
}




Any ideas?  Thanks, Luke
 
IP Logged
 
Tea-Master
Mod God
*****
Offline

north germany, Schleswig-Holstein, Germany
Posts: 1944




BoardMod Developer
Reply #14 - 25.06.02 at 16:52:09  
then u didn't upload the file new - cause there's a little error.
i have forgotten the last "$yymain .= qq~"... :-P

so it has to be
Code:

<tr>
~;
if($settings[7] eq 'Administrator') {
$yymain .= qq~ <td><font size=2><b>Address: </b></font></td>
<td><font size=2>$memsettings[30]</font></td> </tr>
<tr> ~; }
$yymain .= qq~

mention the last line!

and plz - attach the profile.pl next time instead of posting the code... it's very hard to read
 
IP Logged
 
Pages: 1 2 3 4
© 2000-2012 by - All rights reserved.

Project website hosting proudly sponsored and provided by UK2 Hosting
 The Project | News | Downloads | Mods | FAQ | Templates | Chat | Forum