Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #302  
Old 08-19-2002, 11:29 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No. Im still using 2.2.5 (with the security updates), but I have seen many peopple say it works on 2.2.6 just fine. What is it doing or not doing? I'll see if I can help you figure it out.

[QUOTE]Originally posted by Sho
Still can't get it to work on 2.2.6. Hmhm. Boofo, do you use 2.2.6?
Reply With Quote
  #303  
Old 08-19-2002, 11:36 PM
Sho Sho is offline
 
Join Date: Nov 2001
Location: Berlin, Germany
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The installer orders you to replace code that is not there anymore: usercp.php step 2/2, user.php step 1/4. Now talon3dhq told us on page 18 (&perpage=15, post 262) how the new 2.2.6 code snippets looks like. I found them and applied bira's changes - not by replacing, but by complementing as seemed logical to me. Result: parse errors. Unfortunately, my PHP knowledge is limited. I'm looking for someone who goes over it, maybe even re-releases this hack for 2.2.6 - bira didn't visit this board since the beginning of the year.

As always, sorry for my clumsy English. And thanks a lot for showing interest!
Reply With Quote
  #304  
Old 08-19-2002, 11:45 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, pm me the code taht needs to be changed or added and the code BEFORE you changed it and I will have a look at it. I'm sure it can't be too hard to fix.

[QUOTE]Originally posted by Sho
The installer orders you to replace code that is not there anymore: usercp.php step 2/2, user.php step 1/4. Now talon3dhq told us on page 18 (&perpage=15, post 262) how the new 2.2.6 code snippets looks like. I found them and applied bira's changes - not by replacing, but by complementing as seemed logical to me. Result: parse errors. Unfortunately, my PHP knowledge is limited. I'm looking for someone who goes over it, maybe even re-releases this hack for 2.2.6 - bira didn't visit this board since the beginning of the year.

As always, sorry for my clumsy English. And thanks a lot for showing interest!
Reply With Quote
  #305  
Old 08-19-2002, 11:55 PM
Sho Sho is offline
 
Join Date: Nov 2001
Location: Berlin, Germany
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PM is on its way. Thanks again!
Reply With Quote
  #306  
Old 08-20-2002, 01:10 AM
Sho Sho is offline
 
Join Date: Nov 2001
Location: Berlin, Germany
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How to get this hack to work with 2.2.6 starting with the original installer:

Now here's how to get past the problems with usercp.php step 2/2 and user.php step 1/4 when installing for vB 2.2.6. All credit goes to Boofo (who provided the final replacements) and talon3dhq (who found the right code in 2.2.6's files)! Here we go:

a) usercp.php, step 2/2:

Bira wants us to find:

PHP Code:
if ((!$buddy[invisible] or $bbuserinfo['usergroupid']==6) and $buddy[lastactivity]>$datecut) {
    
$onoff="on";
  } else {
    
$onoff="off";
  } 
Instead, search for (thanks talon3dhq!):

PHP Code:
if ($buddy['lastactivity'] > $datecut and (!$buddy['invisible'] or $bbuserinfo['usergroupid'] == 6) and $buddy['lastvisit'] != $buddy['lastactivity']) {
$onoff="on";
} else {
$onoff="off";

And replace it with (thanks Boofo!):

PHP Code:
// Leave Away Message in Profile (v1.2)
  
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.2) 
b) user.php, step 1/4:

Bira wants us to find:

PHP 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 
Instead, search for (thanks talon3dhq!):

PHP Code:
$user=$DB_site->query_first("SELECT user.*,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost, 
And replace it with (thanks, Boofo!):

PHP Code:
  $user=$DB_site->query_first("SELECT user.*,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, 
--- snip ---

Besides, I ran into some minor problems most of you won't have a problem with. Anyway, here we go again:

a) usercp.php, step 1/2:

Bira wants us to find:

PHP Code:
$sql="SELECT userid,username,invisible,lastactivity 
You will find:

PHP Code:
$sql="SELECT userid,username,invisible,lastactivity,lastvisit 
Replace it with:

PHP Code:
$sql="SELECT userid,username,invisible,away,lastactivity,lastvisit 
b) user.php, step 4/4:

Bira wants us to find:

PHP Code:
$DB_site->query("UPDATE user SET birthday='$birthday
You will find:

PHP Code:
$DB_site->query("UPDATE user SET birthday='$birthday',options='$options',usergroupid='$usergroupid',username='".addslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlspecialchars($email))."',styleid='$userstyleid',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser=$coppauser,homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',signature='".addslashes($signature)."',adminemail=$adminemail,showemail=$showemail,invisible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$customtitle,joindate=$joindate,cookieuser=$cookieuser,nosessionhash=$nosessionhash,daysprune='$daysprune',lastvisit=$lastvisit,lastactivity=$lastactivity,lastpost=$lastpost,posts='$posts',timezoneoffset='$timezoneoffset',emailnotification=$emailnotification,receivepm='$receivepm',emailonpm='$emailonpm',ipaddress='".addslashes($aipaddress)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid"); 
Change it to:

PHP Code:
$DB_site->query("UPDATE user SET away='$away',awaydate=$awaydate,returndate='$returndate',awayreason='".addslashes(htmlspecialchars($awayreason))."',birthday='$birthday',options='$options',usergroupid='$usergroupid',username='".addslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlspecialchars($email))."',styleid='$userstyleid',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser=$coppauser,homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',signature='".addslashes($signature)."',adminemail=$adminemail,showemail=$showemail,invisible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$customtitle,joindate=$joindate,cookieuser=$cookieuser,nosessionhash=$nosessionhash,daysprune='$daysprune',lastvisit=$lastvisit,lastactivity=$lastactivity,lastpost=$lastpost,posts='$posts',timezoneoffset='$timezoneoffset',emailnotification=$emailnotification,receivepm='$receivepm',emailonpm='$emailonpm',ipaddress='".addslashes($aipaddress)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid"); 
--- snip ---

Don't forget, the installer has another error! Thanks to Birdie501 for pointing this out to us.

a) member.php, step 4/4:

Bira wants us to find:

PHP Code:
    eval("\$referrals = \"".gettemplate("getinfo_referrals")."\";");
  } 
And place this after it:

PHP Code:
// Leave Away Message in Profile (v1.2)
  
if ($userinfo[away]=="1") {
      
$sincedate vbdate($dateformat$userinfo[awaydate]);
    if (
$userinfo[returndate]=="0000-00-00") {
        
$returndate "Unknown";
    } else {
          
$returnaway explode("-"$userinfo[returndate]);
          
$returndate vbdate($dateformatmktime(0,0,0,$returnaway[1],$returnaway[2],$returnaway[0]));
      }
      eval(
"\$away .= \"".gettemplate("getinfo_away")."\";");
  } else {
      
$away "";
  }
// Leave Away Message in Profile (v1.2) 
Instead, place it after:

PHP Code:
eval("\$referrals = \"".gettemplate("getinfo_referrals")."\";");
  }
else {
        
$referrals '';
    } 
Reply With Quote
  #307  
Old 08-20-2002, 01:35 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about coming out with a text file for the full install now (for 2.2.5 AND 2.2.6)?
Reply With Quote
  #308  
Old 08-20-2002, 01:39 AM
Sho Sho is offline
 
Join Date: Nov 2001
Location: Berlin, Germany
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am currently working to get my board open again, afterwards - an hour or so - I'm going to write a new text installer for vB 2.2.6 that includes the templates. I am considering to re-release it. Of course with full credit to bira and you guys!
Reply With Quote
  #309  
Old 08-20-2002, 03:28 AM
Sho Sho is offline
 
Join Date: Nov 2001
Location: Berlin, Germany
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Note: This hack works with 2.2.7 *and* 2.2.6!

This hack is a re-release of "Away" message for users by bira - now it works with vB 2.2.6/2.2.7. (He/She didn't visit this board since the beginning of 2001 and didn't react to PM and mail, too; I hope this re-release is fine with him/her.) In addition to changing the instructions to make them valid for 2.2.6/2.2.7, other errors in the original installer were fixed. All I did was compiling the new text-based installer; code was kindly provided by Boofo, talon3dhq and Birdie501.

Now I am going to quote what bira told us about her hack:

[QUOTE]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).
Reply With Quote
  #310  
Old 08-20-2002, 03:29 AM
Sho Sho is offline
 
Join Date: Nov 2001
Location: Berlin, Germany
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I re-released this hack for vBulletin 2.2.6.

Look here: https://vborg.vbsupport.ru/showthrea...threadid=42520

Thanks to all who contributed!
Reply With Quote
  #311  
Old 08-20-2002, 03:32 AM
joeboo's Avatar
joeboo joeboo is offline
 
Join Date: Jun 2002
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

...re-release? I installed the first release on my board (vB 2.2.6) and had no errors, or problems what so ever.
Reply With Quote
Reply

Thread Tools

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 07:17 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05069 seconds
  • Memory Usage 2,376KB
  • Queries Executed 27 (?)
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
  • (15)bbcode_php
  • (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
  • (4)pagenav_pagelink
  • (2)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_postinfo_query
  • fetch_postinfo
  • 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