User_Status
1.3 (SP1)
This mod adds an ICQ type status to your profile & posts (in the signature).
**************************************************************************
BASED ON : Mute User by cae and Ip-Option by Drue Pautz
AUTHOR : Sonic
***************************************************************************
Version 1.3
- Now all users can edit their Status as the old versions were only able to change by Admins. Used the Mute User coding which is only visable by Admins!!
- User Status is now turned on when you install it! (Forgot to do it!) :)
- Show User Status in 'View Profile' page
(See it working here - http://www.scotsonphones.co.uk/Test/cgi-bin/YaBB/YaBB.pl?action=viewprofile;username=Test)
Version 1.2
- Ability for Admins to turn off feature
Version 1.1
- User can now choose if they want their status showing or not.
Version 1.0b :
- Beta version.
Note:
Uninstall ANY previous version before installing the current version!!
Remember to backup English.lng, Profile.pl & Display.pl (safety 1st!!).
Problems :
- Not currently compatible with Last Login. See http://boardmod.xnull.com/yabb/YaBB.pl?board=newssp&action=display&num=1010764104 for details.
- You may get an 'Abort or Ignore' error if you have uninstalled this mod & reinstalled it. Just ignore it.
Future Updates :
- Icons instead of text when text menu is not selected
Sonic
www.scotsonphones.co.uk/YaBB
Sources/Profile.pl
fopen(FILE, "$memberdir/$INFO{'username'}.dat");
@memsettings=;
fclose(FILE);
if ($showstatus) {
fopen(FILE, "$memberdir/$INFO{'username'}.status");
@statussettings=;
fclose(FILE);
if (@statussettings[0] eq '0') { $Status1 = ' selected'; }
if (@statussettings[0] eq '1') { $Status2 = ' selected'; }
if (@statussettings[0] eq '2') { $Status3 = ' selected'; }
if (@statussettings[0] eq '9') { $Status9 = ' selected'; }
}
~;
############################
## My Status Mod by Sonic ##
############################
if ($showstatus) {
$yymain .= qq~
$status{'1'}:
$status{'2'}
~;
}
################################
## / My Status Mod by Sonic / ##
################################
$yymain .= qq~
$online
$online
~;
if ($showstatus) {
fopen(FILE, "$memberdir/$INFO{'username'}.status");
@statussettings=;
fclose(FILE);
$mystatus=@statussettings[0];
if ($mystatus eq '0') { $memstatus = $status{'4'} ; }
elsif ($mystatus eq '1') { $memstatus = $status{'5'} ; }
elsif ($mystatus eq '2') { $memstatus = $status{'6'} ; }
else { $memstatus = $status{'7'} ; }
if ($memstatus ne $status{'7'}) {$yymain .= qq~$status{'3'} $memstatus ~; }
}
$yymain .= qq~
if($newpassemail) {
fopen(FILE, ">$memberdir/$member{'username'}.status", 1);
print FILE "$member{'status'}";
fclose(FILE);
english.lng
1;
$status{'1'} = "My Status :";
$status{'2'} = "Select your current status.";
$status{'3'} = "Current User Status : ";
$status{'4'} = "Available";
$status{'5'} = "Busy";
$status{'6'} = "Away";
$status{'7'} = "None / Disabled";
1;
Sources/Display.pl
my(@userprofile,@messages,@bgcolors);
my($mystatus);
my(@statussettings);
if ($mstate != 1)
############################
## My Status Mod by Sonic ##
############################
if ($showstatus) {
fopen(FILE, "$memberdir/$musername.status");
@statussettings=;
fclose(FILE);
$mystatus=@statussettings[0];
if ($mystatus eq '0') { $memstatus =$status{'4'} ; }
elsif ($mystatus eq '1') { $memstatus =$status{'5'} ; }
elsif ($mystatus eq '2') { $memstatus =$status{'6'} ; }
else { $memstatus =$status{'7'} ; }
if ($memstatus ne $status{'7'}) {
$userprofile[5]=qq~$status{'3'} $memstatus$userprofile[5]~; }
else {
$userprofile[5]=qq~$userprofile[5]~;
}
}
################################
## / My Status Mod by Sonic / ##
################################
Settings.pl
########## Layout ##########
$showstatus = 1; # Set to 1 to show User Status
Sources\AdminEdit.pl
$txt{'740'}
Show User Status?
if ($showyabbcbutt) { $syabbcchecked = "checked" }
if ($showstatus) { $statuschecked = "checked" }
\$showyabbcbutt = $showyabbcbutt; # Set to 1 to display the yabbc buttons on Posting and IM Send Pages
\$showstatus = $showstatus; # Set to 1 to display User Status
# Set as 0 or 1 if box was checked or not
my $fi;
push @onoff, 'showstatus';