Version: , by bira
Developer Last Online: Jun 2013
Version: 2.2.x
Rating:
Released: 12-09-2001
Last Update: Never
Installs: 109
No support by the author.
Hi,
This is something that is common in IRC - /me is away
In BBs, a user is either online or offline (or invisible).
But, on my Bulletin Board, the folks created such a community that every time someone goes on a holiday or goes offline for a while, he/she posts a new thread to annouce they're 'away.
So, I wrote a hack allowing a user to change his/her status to "away", including a return date and an away reason which will show up in their profile.
Likewise, the online/offline icon in postbit and buddy list will change to an away icon (a very faded version of the 'offline' one).
Some demo captures:
The Edit Profile screen, when a user is NOT away:
The Edit Profile screen when a user IS away:
The Get Info (User Profile) screen when a user IS away:
The Get Info (User Profile) screen when a user is NOT away:
The postbit icon when a user is away:
How to install:
Download the attached zip file. Upload away.gif to your images dir (or create your own away.gif).
Upload install_awayuser.php to your admin dir and follow the instructions.
The original version certainly does not work on 2.2.6 and 2.2.7, which is why I re-released this hack with updated and corrected instructions. You can find a list of errors and their corrections both in this thread, as well as in the new. See link above.
(Edit: Whoa. Just noticed that both threads were merged.)
Ok
On vb 2.2.9 once applying Sho updated version of the hack, I am now getting a blank page returned when trying to access usercp.php
Here is a snippet of the code from there regarding the required changes:
Change #1
PHP Code:
// Leave Away Message in Profile (v1.2a) (Start Code Replaced)
// Here is the original :
// $sql="SELECT userid,username,invisible,usertitle,lastactivity,lastvisit
// FROM user
// WHERE (user.userid='$buddyuserssql')
// ORDER BY username";
// Here is its replacement :
$sql="SELECT userid,username,invisible,usertitle,away,lastactivity,lastvisit
FROM user
WHERE (user.userid='$buddyuserssql')
ORDER BY username";
// Leave Away Message in Profile (v1.2a) (End Code Replaced)
Change #2
PHP Code:
// Leave Away Message in Profile (v1.2a) (Start Code Replaced)
// Here is the original :
// if ($buddy['lastactivity'] > $datecut and (!$buddy['invisible'] or $bbuserinfo['usergroupid'] == 6) and $buddy['lastvisit'] != $buddy['lastactivity']) {
// {
// $onoff="on";
// } else {
// $onoff="off";
// Here is its replacement :
if ($buddy[away]=="1") {
$onoff="away";
} else {
if ($buddy['lastactivity'] > $datecut and (!$buddy['invisible'] or $bbuserinfo['usergroupid'] == 6) and $buddy['lastvisit'] != $buddy['lastactivity']) {
$onoff="on";
} else {
$onoff="off";
}
}
// Leave Away Message in Profile (v1.2a) (End Code Replaced)
Any help with getting this sorted would be greatly appreciated.