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
  #122  
Old 12-17-2001, 10:06 AM
Tarion's Avatar
Tarion Tarion is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by bira


Hi Tarion,

that requires an extra condition - so it depends where you want it.

1) If you want an extra link in the memberlist's navbar, then open memberlist.php and find:

Code:
  if ($what=="datejoined") {
    $orderby="joindate";
    $direction="DESC";
  }
AFTER it ADD

Code:
  if ($what=="away") {
  	$condition.=" AND away='1'";
  }
The open the memberlist template and add a link to memberlist.php?s=$session[sessionhash]&what=away

2) if you want to add the away to the ADVANCED SEARCH in the member's list,

Find:

Code:
    if ($postsupper!="") {
      $condition.=" AND posts<'$postsupper'";
    }
AFTER it ADD

Code:
    if ($away=="1") {
    	$condition.=" AND away='1'";
    } elseif ($away=="2") {
    	$condition.=" AND away='0'";
    }
Open template memberlistsearch, and find:

Code:
<tr>
	<td bgcolor="#F1F1F1"><normalfont><b>and Number of Posts is less than</b></normalfont></td>
	<td bgcolor="#F1F1F1"><normalfont><input type="text" class="bginput" size="35" name="postsupper" value=""></normalfont></td>
</tr>
AFTER it ADD:

Code:
<tr>
	<td bgcolor="#DFDFDF"><normalfont><b>and user is away or not</b></normalfont></td>
	<td bgcolor="#DFDFDF"><normalfont><select name="away">
    <option value=""></option>
    <option value="2">user is NOT away</option>
    <option value="1">user IS away</option>
    </select></normalfont></td>
</tr>
Reply With Quote
  #123  
Old 12-17-2001, 12:14 PM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, those hacks do exist. They don't have to exist plentifully; all you need is one, that modified just one line that another later hack also wants to modify. One such very extensive hack is ethank's persistent mark forum read hack.

And yes, you can search for just a part of the line. The potential problem with that is that as you make your search less specific, the chances increase of you finding what you're searching for more than once. In that event, you can either look at the text around each hit, and see if it looks close enough to what you're supposed to be looking for that you can reasonably decide you've found it. Alternatively, line numbers would make that process a lot easier; you would just have to find the partial search terms at or near the specified line number.

Please understand, I am not saying that line numbers are the ultimate best solution. There are multiple ways for handling any situation here, and what might be best for you, might not be best for some (anybody feel like singing the theme song from Diff'rent Strokes? ).
Reply With Quote
  #124  
Old 12-17-2001, 12:33 PM
Hooper's Avatar
Hooper Hooper is offline
 
Join Date: Oct 2001
Location: St. Louis, Mo
Posts: 286
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Amen JJ,

I'll sing different strokes with you!
Reply With Quote
  #125  
Old 12-17-2001, 01:48 PM
ptbyjason's Avatar
ptbyjason ptbyjason is offline
 
Join Date: Dec 2001
Location: TX
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think this is a great hack, and I can't wait to use it. I ran into a problem installing it though. I am running version 2.03 and when I look in my usercp.php I cannot find any code that matches the two I am suppose to find.
Reply With Quote
  #126  
Old 12-17-2001, 02:21 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, check again because i'm using also 2.0.3 and the code matched.
Reply With Quote
  #127  
Old 12-17-2001, 02:59 PM
ptbyjason's Avatar
ptbyjason ptbyjason is offline
 
Join Date: Dec 2001
Location: TX
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've tried it several times now and I just tried it again. I have used my search command and I have even searched for just part of the string in case my code is messed up. The code is still the original without modification, so I don't know why it wouldn't be in there. I saw the code that you had help with on the first page for functions.php and I couldn't find the original code in the download nor the code bira suggested. Functions.php and usercp.php are the only ones that I am having problems with. Everything else was found easily.
Reply With Quote
  #128  
Old 12-17-2001, 03:11 PM
Remi Remi is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Bira

It is me, again

what can I do, I love your hacks

Is this hack compatable with tha Random Password hack.

I noticed this in the /root/member.php

$bbuserinfo[usergroupid]'$changepw $awaysql WHERE userid='$bbuserinfo[userid]'

is that the right order

Thanks
Reply With Quote
  #129  
Old 12-17-2001, 03:19 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by ptbyjason
I've tried it several times now and I just tried it again. I have used my search command and I have even searched for just part of the string in case my code is messed up. The code is still the original without modification, so I don't know why it wouldn't be in there. I saw the code that you had help with on the first page for functions.php and I couldn't find the original code in the download nor the code bira suggested. Functions.php and usercp.php are the only ones that I am having problems with. Everything else was found easily.
Reply With Quote
  #130  
Old 12-17-2001, 03:34 PM
ptbyjason's Avatar
ptbyjason ptbyjason is offline
 
Join Date: Dec 2001
Location: TX
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure

In the usercp.php I can't find

*****
$sql="SELECT userid,username,invisible,lastactivity
*****

AND I can't find

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

In the functions.php I can't find (orginal install)

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

NOR (modified by bira on page 1)

*****
if ($post[sessionuserid]>0) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
*****
Reply With Quote
  #131  
Old 12-17-2001, 04:04 PM
eva2000's Avatar
eva2000 eva2000 is offline
 
Join Date: Oct 2001
Location: Brisbane, Australia
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm just going through 'Bira only made' hacks today and wow !!!

Going to be adding some of these hacks right after christmas
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 08:47 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.05338 seconds
  • Memory Usage 2,320KB
  • 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
  • (6)bbcode_code
  • (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