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
  #252  
Old 06-11-2002, 06:06 AM
Crunch Crunch is offline
 
Join Date: Mar 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

egh on 2.2.6 in the functions I can't find where to put the

PHP Code:
// 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) 
can someone who's recently installed it on that or 2.2.5 give me an idea of where it's around? (line wise)
Reply With Quote
  #253  
Old 06-18-2002, 01:53 PM
talon3dhq's Avatar
talon3dhq talon3dhq is offline
 
Join Date: Oct 2001
Location: Brick, NJ
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Birdie501
Hi,

i found the error:

In the installation instructions you should change step 4 in member.php

You have to insert the code not after
PHP Code:
eval("\$referrals = \"".gettemplate("getinfo_referrals")."\";");
  } 
but after:
PHP Code:
eval("\$referrals = \"".gettemplate("getinfo_referrals")."\";");
  }
else {
        
$referrals '';
    } 
so that it looks like this

PHP Code:
eval("\$referrals = \"".gettemplate("getinfo_referrals")."\";");
  }
else {
        
$referrals '';
    }
  
// Leave Away Message in Profile (v1.2)
    
if ($userinfo[away]=="1") {
        
$sincedate vbdate($dateformat$userinfo[awaydate]);
      if (
$userinfo[returndate]=="0000-00-00") {
          
$returndate "Unbekannt";
      } 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) 
Regards
Birdie501
Reply With Quote
  #254  
Old 06-19-2002, 02:08 AM
talon3dhq's Avatar
talon3dhq talon3dhq is offline
 
Join Date: Oct 2001
Location: Brick, NJ
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok. I installed everything, and have no error messages, but also NOTHING shows up either! I can set the away status in the Admin control panel only, but as far as the main site is concerned, there is nothing showing in the usercp or the members profile..anyone?
Reply With Quote
  #255  
Old 06-19-2002, 02:41 AM
talon3dhq's Avatar
talon3dhq talon3dhq is offline
 
Join Date: Oct 2001
Location: Brick, NJ
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, quick update. The hack is technically working, but only from the admins control panel. If I set my status to away, it shows it correctly in my profile, and if PM'ed, the user will get the auto reply. However, I still can't get this to show up in the "edit profile" area. I have edited the template as directed, but still nothing!..ugh!
Reply With Quote
  #256  
Old 06-19-2002, 08:52 AM
talon3dhq's Avatar
talon3dhq talon3dhq is offline
 
Join Date: Oct 2001
Location: Brick, NJ
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, fixed it myself, and It was a user mistake. thanks anyway guys, and yes, it is a great hack!
Reply With Quote
  #257  
Old 06-22-2002, 10:29 AM
Hellburn Hellburn is offline
 
Join Date: Mar 2002
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@talon3dhq i have the same prob. Can you tell me what you have fix?
Reply With Quote
  #258  
Old 06-23-2002, 12:43 AM
NeRilkA's Avatar
NeRilkA NeRilkA is offline
 
Join Date: Jun 2002
Location: South of France
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes me too, i can't see in my user profil th away option

please tell us what did you do
Reply With Quote
  #259  
Old 06-25-2002, 02:37 AM
talon3dhq's Avatar
talon3dhq talon3dhq is offline
 
Join Date: Oct 2001
Location: Brick, NJ
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure..

The VERY first change that needs to be made to the "member.php" file says find
Code:
eval("dooutput(\"".gettemplate("modifyprofile")."\");");
and place
Code:
// Leave Away Message in Profile (v1.2)
  if ($bbuserinfo[away]=="1") {
  	$awaystatus = "<font color=\"{hovercolor}\"><b>You have been marked as 'away' since ".vbdate($calformat1, $bbuserinfo[awaydate])."</b></font>";
    $away1checked = "checked";
    $returndate = explode("-",$bbuserinfo[returndate]);
    $dayname = "day".$returndate[2]."away";
    $$dayname = "selected";
    $monthname = "month".$returndate[1]."away";
    $$monthname = "selected";
    $yearname = "year".$returndate[0]."away";
    $$yearname = "selected";
  } else {
  	$awaystatus = "select whether you are away or not";
  	$away0checked = "checked";
  }
  eval("\$awaytext = \"".gettemplate("modifyprofile_away")."\";");
// Leave Away Message in Profile (v1.2)
ABOVE IT.... I was placing it AFTER it...that was why it wasn't working correctly.

Hope that helps.
Reply With Quote
  #260  
Old 06-25-2002, 10:02 AM
Hellburn Hellburn is offline
 
Join Date: Mar 2002
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack but i wont a field for the "post subject" in the box. Can you make a code for this? Thank You.
Reply With Quote
  #261  
Old 06-27-2002, 03:00 PM
Bro_Joey_Gowdy's Avatar
Bro_Joey_Gowdy Bro_Joey_Gowdy is offline
 
Join Date: May 2002
Location: Hickory Flat MS 38633
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im useing vB2.2.6 and cannot find any of these :

Quote:
root/usercp.php
Step 2 of 2 FIND:
if ((!$buddy[invisible] or $bbuserinfo['usergroupid']==6) and $buddy[lastactivity]>$datecut) {
$onoff="on";
} else {
$onoff="off";
}
and :

Quote:
admin/user.php
Step 1 of 4 FIND:
$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

Anyone have any thoughts ??
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 01:07 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.14585 seconds
  • Memory Usage 2,332KB
  • 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
  • (4)bbcode_php
  • (2)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
  • (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