Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by bira bira is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

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.

Cheers,

Bira

newest version by sho here:
https://vborg.vbsupport.ru/showthrea...606#post287606

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 12-10-2001, 03:26 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by bira
Yeah, I've actually been using it for my last 3 or 4 hacks. It's very good.

(Regarding that - I got a small surprise coming. But let me finish it first )
Reply With Quote
  #13  
Old 12-10-2001, 03:32 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I receive a parse error in admin/functions.php

Bira, you say in the install:
Step 1 of 1 FIND:


PHP Code:
if ($post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) {
            eval(
"\$onlinestatus = \"".gettemplate("postbit_online")."\";");
        } else {
            eval(
"\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
        } 
well, i'm using 2.03 and 2.0.3 dont have that part in functions.php so i'm looking for a similar code and i found this in my functions.php:

PHP Code:
if ($post[userid]!=0) {
        if (
$showonline) {
            unset(
$onlinestatus);
            if (
$post[sessionuserid]>0) {
                eval(
"\$onlinestatus = \"".gettemplate("postbit_online")."\";");
            } else {
                eval(
"\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
            }
        }
        if (
$post[avatarid]!=0) {
            
$avatarurl=$post[avatarpath];
        } else {
            if (
$post[hascustomavatar] and $avatarenabled) {
                
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
            } else {
                
$avatarurl="";
            }
        }
        if (
$avatarurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showavatars]))) {
            
$post[avatar]="";
        } else {
            eval(
"\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
        }
        if (
$post[customtitle]==2) {
            
$post[usertitle] = htmlspecialchars($post[usertitle]);
        } 
I changed the above code to:

PHP Code:
if ($post[away]=="1") {
            eval(
"\$onlinestatus = \"".gettemplate("postbit_away")."\";");
        } else {
    if (
$post[userid]!=0) {
        if (
$showonline) {
            unset(
$onlinestatus);
            if (
$post[sessionuserid]>0) {
                eval(
"\$onlinestatus = \"".gettemplate("postbit_online")."\";");
            } else {
                eval(
"\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
            }
        }
        }
        if (
$post[avatarid]!=0) {
            
$avatarurl=$post[avatarpath];
        } else {
            if (
$post[hascustomavatar] and $avatarenabled) {
                
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
            } else {
                
$avatarurl="";
            }
        }
        if (
$avatarurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showavatars]))) {
            
$post[avatar]="";
        } else {
            eval(
"\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
        }
        if (
$post[customtitle]==2) {
            
$post[usertitle] = htmlspecialchars($post[usertitle]);
        } 
but then i receive a parse error .


Hope u can help me out with this.
Reply With Quote
  #14  
Old 12-10-2001, 03:43 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lesane,

Revert back the code to what it was originally.

After that, find:

PHP Code:
if ($post[sessionuserid]>0) {
    eval(
"\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
     eval(
"\$onlinestatus = \"".gettemplate("postbit_offline")."\";");

And replace it with:

PHP Code:
            // Leave Away Message in Profile (v1.0)
            
if ($post[away]=="1") {
                eval(
"\$onlinestatus = \"".gettemplate("postbit_away")."\";");
            } else {
                if (
$post[sessionuserid]>0) {
                    eval(
"\$onlinestatus = \"".gettemplate("postbit_online")."\";");
                } else {
                    eval(
"\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
                }
            }
            
// Leave Away Message in Profile (v1.0) 
Reply With Quote
  #15  
Old 12-10-2001, 06:21 PM
Meta's Avatar
Meta Meta is offline
 
Join Date: Nov 2001
Location: Germany (north)
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for this very lovely hack, Bira!

Installed ... and works smooth without any problems ... a nice to have.
Reply With Quote
  #16  
Old 12-10-2001, 06:30 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Bira, it works perfect now.
Reply With Quote
  #17  
Old 12-10-2001, 06:35 PM
Meta's Avatar
Meta Meta is offline
 
Join Date: Nov 2001
Location: Germany (north)
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But ...

if you User don't gives a Return Date it says he will come back on 1. Januar 1970.

Is there a way to change that to something like "not quite sure" or something like that?

(And ... do somebody know where my hackcount has gone? I had five or six of them installed ... at least this one. And now it says none. Quite strange.)
Reply With Quote
  #18  
Old 12-10-2001, 06:45 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Meta
But ...


if you User don't gives a Return Date it says he will come back on 1. Januar 1970.

Is there a way to change that to something like "not quite sure" or something like that?
Reply With Quote
  #19  
Old 12-10-2001, 07:02 PM
Meta's Avatar
Meta Meta is offline
 
Join Date: Nov 2001
Location: Germany (north)
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yeah, you have a point.
It was a pleasure for me.

Quote:
The "hack:" under your username in posts is the number of hacks you released, not installed
Oh ... what a shame.

(Look ... thats because i'm a junior member and a newbie with only 10 Posts at all and ... oh, what a shame.)


Anyway ... thanks for your fast reply. I think, this will work. If not ... i'll be back.
Reply With Quote
  #20  
Old 12-10-2001, 07:15 PM
Meta's Avatar
Meta Meta is offline
 
Join Date: Nov 2001
Location: Germany (north)
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works like it should. Great! But ...

Now it would be nice, if the Admin could do this also for an user. The admin can enter a birthday for users ... why not the longer absence ...?

Would be nice.
Reply With Quote
  #21  
Old 12-10-2001, 07:24 PM
Crinos's Avatar
Crinos Crinos is offline
 
Join Date: Oct 2001
Location: Los Angeles, CA
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey bira, nice hack once again ...

but before I install it, I was wondering if this one had a pop-up or some sort of notification to remind a user who has been "away" if he or she wants to update their away info after they return ... I know that some users, once they set an away message and then come back a little early, will sometimes forget to to update their away status ... hence they will already be posting yet still be considered "away" until the date is reached.

Maybe, even automatically disable the away setting once the user posts a message before the date he stated he was gonne be back...

I dunno, just a suggestion ... I'll install the hack anyway
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04779 seconds
  • Memory Usage 2,355KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete