Bira:
I hope you don't mind but I have added a couple of things to the main script and the control panel script
Where you have:
// Leave Away Message in Profile (v1.0)
if ($away=="1") {
$awaysql = ",away='$away',awaydate='".time()."',returndate='" .$awayyear."-".$awaymonth."-".$awayday."',awayreason='".addslashes(htmlspecial chars(censortext($awayreason)))."'";
} else {
$awaysql = ",away='0',awaydate='',returndate='',awayreason='' ";
}
// Leave Away Message in Profile (v1.0)
in the member.php file change this to:
// Leave Away Message in Profile (v1.0)
if ($away=="1") {
$awaysql = ",away='$away',awaydate='".time()."',returndate='" .$awayyear."-".$awaymonth."-".$awayday."',awayreason='".addslashes(htmlspecial chars(censortext($awayreason)))."'";
$showemail=0;
} else {
$awaysql = ",away='0',awaydate='',returndate='',awayreason='' ";
$showemail=1;
}
// Leave Away Message in Profile (v1.0)
and then in the user.php file
where you have:
if ($awaydate!="") {
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate) ."')";
} else {
$awaydate="";
}
just below this put
if ($away==1) {
$showemail=0;
} else {
$showemail=1;
}
The changes to the member.php file I highlighted and user.php file is just the add on.
Both will set the showemail option to either one or zero if they are away or back. That way people can't email them if they are away.
Parker
|