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
  #372  
Old 10-27-2002, 04:21 PM
poolking poolking is offline
 
Join Date: Aug 2002
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have got this hack working under 2.2.8

Now how do I get the away info from the user profile to also appear in the postbit template?
Reply With Quote
  #373  
Old 10-28-2002, 05:22 AM
Blago Blago is offline
 
Join Date: Oct 2002
Location: USA
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by poolking
I have got this hack working under 2.2.8

Now how do I get the away info from the user profile to also appear in the postbit template?
Reply With Quote
  #374  
Old 10-28-2002, 05:38 AM
poolking poolking is offline
 
Join Date: Aug 2002
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the modifyprofile template find

$birthday
$customtext

and after them add

$awaytext

Then the away fields will appear in the edit profile, It had me scratching my head why it wouldn't appear in any of my other styles.

Still waiting for an answer to the postbit question.
Reply With Quote
  #375  
Old 11-03-2002, 12:18 PM
adriandaz adriandaz is offline
 
Join Date: Apr 2002
Location: Hull, UK
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks, installed successfully on 2.2.8 no problems
Reply With Quote
  #376  
Old 11-13-2002, 12:12 AM
Webster Media Webster Media is offline
 
Join Date: Oct 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I keep getting a parse error on line 266 of admin/functions.php. I have read almost every thread in this post, and have not had any luck.

I am running vB version 2.2.8, and any help you guys could give me would be great.

Line 266 of functions.php is this:
Code:
} else {
Which shouldn't matter, but this is the part I am questioning:
Code:
if ($buddy['lastactivity'] > $datecut and (!$buddy['invisible'] or $bbuserinfo['usergroupid'] == 6) and $buddy['lastvisit'] != $buddy['lastactivity']) {
$onoff="on";
} else {
$onoff="off";
}
EDIT: Just installed the version made for 2.2.6, and this one did not work either. Got same error message.

Regards,
Nick B.
Reply With Quote
  #377  
Old 11-13-2002, 06:31 AM
Sho Sho is offline
 
Join Date: Nov 2001
Location: Berlin, Germany
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try https://vborg.vbsupport.ru/showthrea...606#post287606
Reply With Quote
  #378  
Old 11-13-2002, 10:14 AM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Follow the instructions carefully, this hack works fine on vB 2.2.8.
Reply With Quote
  #379  
Old 11-13-2002, 10:22 AM
Sho Sho is offline
 
Join Date: Nov 2001
Location: Berlin, Germany
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The original version certainly does not work on 2.2.6 and 2.2.7, which is why I re-released this hack with updated and corrected instructions. You can find a list of errors and their corrections both in this thread, as well as in the new. See link above.

(Edit: Whoa. Just noticed that both threads were merged.)
Reply With Quote
  #380  
Old 01-10-2003, 01:40 AM
SemperFidelis SemperFidelis is offline
 
Join Date: May 2002
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok
On vb 2.2.9 once applying Sho updated version of the hack, I am now getting a blank page returned when trying to access usercp.php

Here is a snippet of the code from there regarding the required changes:

Change #1
PHP Code:
// Leave Away Message in Profile (v1.2a) (Start Code Replaced)
// Here is the original :
//   $sql="SELECT userid,username,invisible,usertitle,lastactivity,lastvisit
//      FROM user
//      WHERE (user.userid='$buddyuserssql')
//      ORDER BY username";
// Here is its replacement :
   
$sql="SELECT userid,username,invisible,usertitle,away,lastactivity,lastvisit
      FROM user
      WHERE (user.userid='
$buddyuserssql')
      ORDER BY username"
;
// Leave Away Message in Profile (v1.2a) (End Code Replaced) 
Change #2
PHP Code:
// Leave Away Message in Profile (v1.2a) (Start Code Replaced)
// Here is the original :
//  if ($buddy['lastactivity'] > $datecut and (!$buddy['invisible'] or $bbuserinfo['usergroupid'] == 6) and $buddy['lastvisit'] != $buddy['lastactivity']) {
//  {
//    $onoff="on";
//  } else {
//    $onoff="off";
// Here is its replacement :
  
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.2a) (End Code Replaced) 

Any help with getting this sorted would be greatly appreciated.
Reply With Quote
  #381  
Old 01-13-2003, 08:20 AM
vLIMIT Sandman vLIMIT Sandman is offline
 
Join Date: Jul 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: SELECT userid
FROM user
WHERE username='Peter'
AND userid <>
mysql error: You have an error in your SQL syntax near '' at line 4

mysql error number: 1064

Date: Monday 13th of January 2003 05:13:39 AM
Script: http://www.inthebackground.com/forum...admin/user.php
Referer: http://www.inthebackground.com/forum...=edit&userid=6
That was what i got when trying to update someone from the admin cp.
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 05:32 AM.


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.09480 seconds
  • Memory Usage 2,317KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)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
  • (4)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