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
  #152  
Old 12-24-2001, 01:43 AM
DelusionalMind's Avatar
DelusionalMind DelusionalMind is offline
 
Join Date: Dec 2001
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

gonna be installing this in a few

awesome hack. thanks a lot I'm sure this will be used frequently on my teen forum :up:
Reply With Quote
  #153  
Old 12-25-2001, 06:03 PM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bira:

I hope you don't mind but I have added a couple of things to the main script and the control panel script

Where you have:

// Leave Away Message in Profile (v1.0)
if ($away=="1") {
$awaysql = ",away='$away',awaydate='".time()."',returndate='" .$awayyear."-".$awaymonth."-".$awayday."',awayreason='".addslashes(htmlspecial chars(censortext($awayreason)))."'";
} else {
$awaysql = ",away='0',awaydate='',returndate='',awayreason='' ";
}
// Leave Away Message in Profile (v1.0)

in the member.php file change this to:

// Leave Away Message in Profile (v1.0)
if ($away=="1") {
$awaysql = ",away='$away',awaydate='".time()."',returndate='" .$awayyear."-".$awaymonth."-".$awayday."',awayreason='".addslashes(htmlspecial chars(censortext($awayreason)))."'";
$showemail=0;
} else {
$awaysql = ",away='0',awaydate='',returndate='',awayreason='' ";
$showemail=1;
}
// Leave Away Message in Profile (v1.0)

and then in the user.php file

where you have:

if ($awaydate!="") {
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate) ."')";
} else {
$awaydate="";
}

just below this put

if ($away==1) {
$showemail=0;
} else {
$showemail=1;
}

The changes to the member.php file I highlighted and user.php file is just the add on.

Both will set the showemail option to either one or zero if they are away or back. That way people can't email them if they are away.

Parker
Reply With Quote
  #154  
Old 12-25-2001, 07:25 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Parker,

The problem with your add-on is that it forces the change on the user, and without his knowledge.

Example: say you have showemail=0 by default. You set yourself away, it stays 0. You return, and it changes it to 1 without you knowing...

Likewise, if you WANT to continue getting e-mails while you're away, you're not gonna be able to, and you won't even know that it's disabled.

Cheers,

Bira
Reply With Quote
  #155  
Old 12-25-2001, 09:26 PM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bira:

Hmm.....I will have to work on this.

Thanks,
Parker
Reply With Quote
  #156  
Old 12-27-2001, 04:18 AM
SirSteve SirSteve is offline
 
Join Date: Oct 2001
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This isn't a big deal but when a user is away and the Buddy List alt tag message says "User is Away-line"
Reply With Quote
  #157  
Old 01-21-2002, 10:49 AM
Dex Dex is offline
 
Join Date: Dec 2001
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The installation went well and I did all the manual changes by the letter. Yet I get the following error message when I try to access the admin panel in order to do the necessary template changes:

"Parse error: parse error in /home/*****/public_html/memberarea/admin/functions.php on line 242

Fatal error: Call to undefined function: getuserinfo() in /home/*****/public_html/memberarea/admin/sessions.php on line 108"

Dex
Reply With Quote
  #158  
Old 01-21-2002, 02:31 PM
Shenlong's Avatar
Shenlong Shenlong is offline
 
Join Date: Nov 2001
Location: Manhattan, New York
Posts: 167
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

mines just plainly not showing up.....heres a screenshot

http://teleblaze.com/asp/HackNotShowing.jpg
Reply With Quote
  #159  
Old 01-21-2002, 08:23 PM
nuke nuke is offline
 
Join Date: Dec 2001
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FUNKTION.PHP

Find

if ($post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}

REPLACE that with:

// Leave Away Message in Profile (v1.2)
if ($post[away]=="1") {
eval("\$onlinestatus = \"".gettemplate("postbit_away")."\";");
} else {
if ($post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
}
// Leave Away Message in Profile (v1.2)

By this Code Pharsen Error in Funktions.php

Pleas Help

MFG

PS: Very God HAck
Reply With Quote
  #160  
Old 01-22-2002, 05:04 AM
Joshua Clinard Joshua Clinard is offline
 
Join Date: Nov 2001
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bira, did you add all the addons, including the_sisko's cpanel addon to the zip?
Reply With Quote
  #161  
Old 01-22-2002, 01:45 PM
Wolf42's Avatar
Wolf42 Wolf42 is offline
 
Join Date: Nov 2001
Location: Vienna, Austria, Europe
Posts: 150
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thx, great hack, ...

but one question: What changes do I have to make in the "showgroups.php" to the forum-staff is away or not?
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 09:37 AM.


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.05072 seconds
  • Memory Usage 2,311KB
  • 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
  • (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_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