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 |
#92
|
||||
|
||||
hehe aight
TheComputerGuy, were you drunk or something? |
#93
|
||||
|
||||
[QUOTE]Originally posted by Tarion
Bira: how can I get a complet list of the members who has marked as away??? like the staff list or in the memberlist with an extra link in the navbar. Can you explane me how can i do that! THX for this great hack. |
#94
|
||||
|
||||
[QUOTE]Originally posted by bira
1) If you want an extra link in the memberlist's navbar, then open memberlist.php and find: Code:
if ($what=="datejoined") { $orderby="joindate"; $direction="DESC"; } Code:
if ($what=="away") { $condition.="away='1'"; } |
#95
|
||||
|
||||
Lesane, that's not the only possible condition though. So the dot is necessary. It wasn't a mistake.
|
#96
|
||||
|
||||
Strange because with the dot i receive this error:
Database error in vBulletin: Invalid SQL: SELECT COUNT(*) AS users FROM user,userfield WHERE 1=1away='1' AND user.userid = userfield.userid AND usergroupid NOT IN (1,3,4) mysql error: Unknown column '1away' in 'where clause' mysql error number: 1054 Date: Friday 14th of December 2001 04:04:42 PM Script: /board/memberlist.php?what=away Without the dot it works perfect |
#97
|
||||
|
||||
A-ha! That's cos it is missing the space AND space
Code:
if ($what=="away") { $condition.="[high] AND [/high]away='1'"; } |
#98
|
||||
|
||||
haha
but it works good without the dot |
#99
|
||||
|
||||
well yes, because without the dot it diminishes the rest of the conditions, which means there's no need for an AND and spaces.
A dot is a connector. PHP Code:
|
#100
|
||||
|
||||
haha, cool
Thanks, learned something day |
#101
|
||||
|
||||
Bira, your hack, albeit really nice, is killer to making a backup of a database. For me, at least.
I installed your hack, then later on I added the Admin Panel bit so that I could check everyone's status in the AP and change it, and then I took the test. I made a backup dump through the Admin Panel, all settings to Yes (as the default is), saved it as vbulletin.sql - then I made a new directory (this is all on my personal computer, not online or anything), threw the files of vBulletin in there, installed it again (on a new database, completely empty, fresh install), added the files of all my hacks, installed the Away user hack again (ran the install_awayusers.php script) but didn't yet add the Admin Panel bit, then I went into phpMyAdmin and clicked on the new database with a fresh install of vB (but overwrote the files with the hacked php files from the already customized board where everything's working), and below the textfield "Run Queries on database ....:" I entered the location of the vbulletin.sql (the one where you're supposed to enter .sql files) and hit GO. At first, it started inserting the dump file nicely into the database, but then the user table came and it quit at the second entry. Why not the first? The first is my own entry, which was on Away status for 10 or so days when I made the dump. The second entry wasn't. The input process errored out saying: "MySQL says: column 'awaydate' cannot be NULL!" Now, how can I fix this? If I look at the working database and working version where I installed this hack and many others, all the users that haven't put themselves on Away status (i.e. everyone except for myself, because this is an offline board only for hacking and preparing) all their values in the AWAYDATE column in the user table are NULL - but when I want to update the database with a backup dump, MySQL says that the value CANNOT be null!! Please help! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|