The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
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. Cheers, Bira newest version by sho here: https://vborg.vbsupport.ru/showthrea...606#post287606 Show Your Support
|
Comments |
#42
|
||||
|
||||
[QUOTE]Originally posted by FireFly
Members could abuse and put offending messages as the away reason, so it's important to have the ability to change it. Also bira while you're at it, censor the reason before it's saved. |
#43
|
||||
|
||||
OK,
I'm going to upload a new installer, which includes: 1) 'Away' auto-cancel when a user posts (optional) 2) Auto-reply to PMs while away (optional) 3) 'Away' details editable in the user's page in Admin CP If you haven't installed the hack yet, then ignore this post and simply download the zip from the first post If you already installed the hack, here's what you need to do to add the Admin CP bit: Open admin/user.php Find: Code:
$user=$DB_site->query_first("SELECT *,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost, Code:
$user=$DB_site->query_first("SELECT *,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,[high]FROM_UNIXTIME(awaydate) AS awaydate,[/high] Code:
makeinputcode("IP Address","aipaddress",$user[ipaddress]); PHP Code:
Code:
if ($posts=="") { $posts=0; } PHP Code:
Code:
$DB_site->query("UPDATE user SET birthday='$birthday' Code:
$DB_site->query("UPDATE user SET [high]away=$away,awaydate=$awaydate,returndate='$returndate',awayreason='".addslashes(htmlspecialchars($awayreason))."',[/high]birthday='$birthday' |
#44
|
||||
|
||||
JJR512 & Hooper: I uploaded a new zipfile to the 1st post. If you haven't installed the hack yet, then download the zipfile again (and make sure you don't get a cached version of the zip file -- the file should be called awayuser_v_12.zip when you are prompted to save it).
|
#45
|
||||
|
||||
Works as expected. Wonderful. Thank you so much for your help!
|
#46
|
|||
|
|||
[QUOTE]Originally posted by bira
OK, I'm going to upload a new installer, which includes: 1) 'Away' auto-cancel when a user posts (optional) 2) Auto-reply to PMs while away (optional) 3) 'Away' details editable in the user's page in Admin CP If you haven't installed the hack yet, then ignore this post and simply download the zip from the first post If you already installed the hack, here's what you need to do to add the Admin CP bit: Open admin/user.php Find: Code:
$user=$DB_site->query_first("SELECT *,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost Code:
$user=$DB_site->query_first("SELECT *,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost[high],FROM_UNIXTIME(awaydate) AS awaydate[/high] Code:
makeinputcode("IP Address","aipaddress",$user[ipaddress]); PHP Code:
Code:
if ($posts=="") { $posts=0; } PHP Code:
Code:
$DB_site->query("UPDATE user SET birthday='$birthday' Code:
$DB_site->query("UPDATE user SET [high]away=$away,awaydate=$awaydate,returndate='$returndate',awayreason='".addslashes(htmlspecialchars($awayreason))."',[/high]birthday='$birthday' |
#47
|
||||
|
||||
e-mail me your user.php to goren@atlasf1.com and I'll take a look
|
#48
|
|||
|
|||
You got mail Buddy.
Everything is working great for me so far, exept for the user.php3 I am using 2.2.1 Thanks for taking the time. |
#49
|
||||
|
||||
Beadhead, found your error.
Open your user.php3 and find: Code:
SELECT *,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,FROM_UNIXTIME(awaydate) AS awaydate avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar FROM user LEFT JOIN avatar ON avatar.avatarid=user.avatarid LEFT JOIN customavatar ON customavatar.userid=user.userid WHERE user.userid=$userid"); Code:
$user=$DB_site->query_first("SELECT *,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,FROM_UNIXTIME(awaydate) AS awaydate avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar FROM user LEFT JOIN avatar ON avatar.avatarid=user.avatarid LEFT JOIN customavatar ON customavatar.userid=user.userid WHERE user.userid=$userid"); |
#50
|
|||
|
|||
Thanks,
I can now access the control panel but now I am getting the following: There seems to have been a slight problem with the My Site database. Please try again by pressing the refresh button in your browser. An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists. We apologise for any inconvenience. Database error in vBulletin Control Panel 2.2.1: Invalid SQL: SELECT *,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,FROM_UNIXTIME(awaydate) AS awaydate avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar FROM user LEFT JOIN avatar ON avatar.avatarid=user.avatarid LEFT JOIN customavatar ON customavatar.userid=user.userid WHERE user.userid=1 mysql error: You have an error in your SQL syntax near 'avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar ' at line 2 mysql error number: 1064 Date: Tuesday 11th of December 2001 06:41:12 AM Script: http://www.mysite.com/forum Referer: http://www.mysite.com/forum/admin/index.php3 |
#51
|
||||
|
||||
sorry, try adding a coma , after "FROM_UNIXTIME(awaydate) AS awaydate"
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|