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 |
#22
|
||||
|
||||
ok, here are a couple of add-ons:
1) Cancel 'Away' status when user posts: Open newthread.php Find: Code:
$DB_site->query("UPDATE user SET ".iif ($foruminfo[countposts],"posts=posts+1,","")." $dotitle"."lastpost='".time()."' WHERE userid='$bbuserinfo[userid]'"); Code:
$DB_site->query("UPDATE user SET ".iif ($foruminfo[countposts],"posts=posts+1,","")." $dotitle"."lastpost='".time()."'[high],away=0,awaydate='',awayreason='',returndate=''[/high] WHERE userid='$bbuserinfo[userid]'"); Code:
$DB_site->query("UPDATE user SET ".iif ($foruminfo[countposts],"posts=posts+1,","")." $dotitle"."lastpost='".time()."' WHERE userid='$bbuserinfo[userid]'"); Code:
$DB_site->query("UPDATE user SET ".iif ($foruminfo[countposts],"posts=posts+1,","")." $dotitle"."lastpost='".time()."'[high],away=0,awaydate='',awayreason='',returndate=''[/high] WHERE userid='$bbuserinfo[userid]'"); This change will automatically cancel a user's 'away' status once he/she posts a new thread or a new reply. 2) Send auto-reply to PMs while a user is a way. This add-on will act like the "vacation" auto-reply most e-mail programs have. When you send a PM to a user who is away, you will immediately receive a PM with "Auto Reply:" in the subject line. The PM message body will say 'I'm away and will read your PM when I return', with the reason (if present) and the return date (if present). If you want to add this, open private.php and find: Code:
eval("standardredirect(\"".gettemplate("redirect_pmthanks")."\",\"private.php?s=$session[sessionhash]\");"); PHP Code:
create NEW template called email_pmautoreply and place in it: Quote:
p.s. Meta, I will add what you're asking for (Admin CP) tomorrow. I'm off to sleep now |
#23
|
|||
|
|||
Awesome!!!
|
#24
|
||||
|
||||
I don't have time to do this hack now, but I've saved it and have it queued... One question: Does the ZIP in the original post include the changes or additions from just above?
|
#25
|
|||
|
|||
very very sweet.
|
#26
|
||||
|
||||
Question:
Will you be incorporating all of the addon code you posted into the script? If so, I will just wait for the final. Looks very impressive. Thank You. |
#27
|
|||
|
|||
How about being able to set your own auto PM message.
|
#28
|
||||
|
||||
Very nice addons, installed all except one (auto-setting away back to 0 when posting, because people often login to check posts out and sometimes post while they're still away).
|
#29
|
||||
|
||||
Installed and working ... excellent work!
Just did some slight modifications to the getinfo template, but it works great. This is the 3rd or 4th straight hack from bira I am using, and all of them are just grrrrrreat |
#30
|
||||
|
||||
[QUOTE]Originally posted by Crinos
Just did some slight modifications to the getinfo template, but it works great. |
#31
|
|||
|
|||
Great Hack thanks. I installed this with no probs at all except The Icon in the postbit area (away.gif) does not show when a user is away. I didn't see anything in the install instructions about adding anything to the postbit template.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|