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
  #392  
Old 05-28-2003, 04:09 AM
DelFDgfd_gT DelFDgfd_gT is offline
 
Join Date: Oct 2001
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
Step 3/4.

========
||
FIND||
========

  if (
$posts=="") {
    
$posts=0;
  }
  
==================
||
ABOVE that ADD||
==================

// Leave Away Message in Profile (v1.2a)
  
if ($awaydate!="") {
    
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
  } else {
      
$awaydate="''";
  }
// Leave Away Message in Profile (v1.2a) 
Ok, basically, I cant find
PHP Code:
  if ($posts=="") {
    
$posts=0;
  } 
any thoughts?
Reply With Quote
  #393  
Old 06-23-2003, 07:28 PM
Splitfyre Splitfyre is offline
 
Join Date: Dec 2001
Location: Vancouver, BC Canada
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Received errors when hacking the user.php file.

Does this hack work in 2.30? Will be going through an uninstall for now and then re-hack at a later date when this function becomes fully stable on 2.30 :bunny:
Reply With Quote
  #394  
Old 06-27-2003, 09:59 PM
cYbercOsmOnauT's Avatar
cYbercOsmOnauT cYbercOsmOnauT is offline
 
Join Date: May 2003
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a cool hack! I will install it soon (first I need to translate the texts )
Reply With Quote
  #395  
Old 07-01-2003, 03:12 PM
Frozen Dreams's Avatar
Frozen Dreams Frozen Dreams is offline
 
Join Date: Apr 2003
Location: Germany
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]05-28-03 at 07:09 AM Ramsy de Vos said this in Post #391
PHP Code:
Step 3/4.

========
||
FIND||
========

  if (
$posts=="") {
    
$posts=0;
  }
  
==================
||
ABOVE that ADD||
==================

// Leave Away Message in Profile (v1.2a)
  
if ($awaydate!="") {
    
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
  } else {
      
$awaydate="''";
  }
// Leave Away Message in Profile (v1.2a) 
Ok, basically, I cant find
PHP Code:
  if ($posts=="") {
    
$posts=0;
  } 
any thoughts?
Reply With Quote
  #396  
Old 07-02-2003, 12:43 AM
C.Assassin C.Assassin is offline
 
Join Date: Nov 2001
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed on 2.3.0 no probs
Reply With Quote
  #397  
Old 07-05-2003, 04:01 PM
Christoff's Avatar
Christoff Christoff is offline
 
Join Date: May 2002
Location: Poland
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yup... on 2.3.0 no probs... i like it a lot.
So does m users.
Thread about being away was the biggest one.
Reply With Quote
  #398  
Old 07-08-2003, 01:09 AM
cYbercOsmOnauT's Avatar
cYbercOsmOnauT cYbercOsmOnauT is offline
 
Join Date: May 2003
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack!

/me clicks install.
Reply With Quote
  #399  
Old 07-08-2003, 06:54 PM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is awesome. Works wonderously.

Suggestions:
Filter the Away messages through the vBB filter system
Multiple away messages.
Admins can edit and/or lock an away message so it cannot be edited.
Add a "Start Date" option so people can set away status in advance. eg. I will be gone from xx-xx-xxx to xx-xx-xxxx.
Reply With Quote
  #400  
Old 07-24-2003, 09:21 PM
DarkDraco07's Avatar
DarkDraco07 DarkDraco07 is offline
 
Join Date: Apr 2002
Posts: 414
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i get this error

Database error in vBulletin 2.2.9:

Invalid SQL: UPDATE user SET element='2', birthday='1985-6-4',signature='',customtitle='1',usertitle='Admin / Web Master',email='darkdraco@darknemesis.com',parentem ail='',coppauser='0',homepage='http://www.darknemesis.com',icq='',aim='',yahoo='',usergr oupid='6', ,away='0',awaydate='',returndate='',awayreason='' WHERE userid='1', gender='2', rpgclass='11', rpgrace='13', alignment='3', rpgtype='2', rpggender='2' WHERE userid='1'
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'away='0',awaydate='',returndate='',awayreason='' WHERE userid='

mysql error number: 1064

Date: Thursday 24th of July 2003 03:22:36 PM
Script: http://www.darknemesis.com/forums/forums/member.php
Referer: http://www.darknemesis.com/forums/me...on=editprofile
Reply With Quote
  #401  
Old 07-28-2003, 12:07 AM
clamcrusher clamcrusher is offline
 
Join Date: Jul 2003
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i get this error:

Parse error: parse error, unexpected T_ELSE in /usr/local/psa/home/vhosts/chemical-conversions.com/httpdocs/member.php on line 1387



heres my code:

btw-the last "else{" is line 1387


PHP Code:
$refcount $DB_site->query_first("SELECT count(*) AS count
                                       FROM user
                                       WHERE referrerid = '
$userinfo[userid]'");
    
$referrals $refcount[count];
    eval(
"\$referrals = \"".gettemplate("getinfo_referrals")."\";");
  }
// 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)
 
 
else {
        
$referrals '';
    }

  
// get extra profile fields 
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 05:57 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.08691 seconds
  • Memory Usage 2,323KB
  • 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
  • (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