vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Away message for users (https://vborg.vbsupport.ru/showthread.php?t=33099)

Boofo 08-19-2002 11:29 PM

No. Im still using 2.2.5 (with the security updates), but I have seen many peopple say it works on 2.2.6 just fine. What is it doing or not doing? I'll see if I can help you figure it out. :)

[QUOTE]Originally posted by Sho
Still can't get it to work on 2.2.6. Hmhm. Boofo, do you use 2.2.6?

Sho 08-19-2002 11:36 PM

The installer orders you to replace code that is not there anymore: usercp.php step 2/2, user.php step 1/4. Now talon3dhq told us on page 18 (&perpage=15, post 262) how the new 2.2.6 code snippets looks like. I found them and applied bira's changes - not by replacing, but by complementing as seemed logical to me. Result: parse errors. Unfortunately, my PHP knowledge is limited. I'm looking for someone who goes over it, maybe even re-releases this hack for 2.2.6 - bira didn't visit this board since the beginning of the year.

As always, sorry for my clumsy English. And thanks a lot for showing interest! :)

Boofo 08-19-2002 11:45 PM

Ok, pm me the code taht needs to be changed or added and the code BEFORE you changed it and I will have a look at it. I'm sure it can't be too hard to fix. :)

[QUOTE]Originally posted by Sho
The installer orders you to replace code that is not there anymore: usercp.php step 2/2, user.php step 1/4. Now talon3dhq told us on page 18 (&perpage=15, post 262) how the new 2.2.6 code snippets looks like. I found them and applied bira's changes - not by replacing, but by complementing as seemed logical to me. Result: parse errors. Unfortunately, my PHP knowledge is limited. I'm looking for someone who goes over it, maybe even re-releases this hack for 2.2.6 - bira didn't visit this board since the beginning of the year.

As always, sorry for my clumsy English. And thanks a lot for showing interest! :)

Sho 08-19-2002 11:55 PM

PM is on its way. Thanks again! ;)

Sho 08-20-2002 01:10 AM

How to get this hack to work with 2.2.6 starting with the original installer:

Now here's how to get past the problems with usercp.php step 2/2 and user.php step 1/4 when installing for vB 2.2.6. All credit goes to Boofo (who provided the final replacements) and talon3dhq (who found the right code in 2.2.6's files)! Here we go:

a) usercp.php, step 2/2:

Bira wants us to find:

PHP Code:

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

Instead, search for (thanks talon3dhq!):

PHP Code:

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


And replace it with (thanks Boofo!):

PHP Code:

// Leave Away Message in Profile (v1.2)
  
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.2) 

b) user.php, step 1/4:

Bira wants us to find:

PHP Code:

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 

Instead, search for (thanks talon3dhq!):

PHP Code:

$user=$DB_site->query_first("SELECT user.*,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost, 

And replace it with (thanks, Boofo!):

PHP Code:

  $user=$DB_site->query_first("SELECT user.*,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,FROM_UNIXTIME(awaydate) AS awaydate, 

--- snip ---

Besides, I ran into some minor problems most of you won't have a problem with. Anyway, here we go again:

a) usercp.php, step 1/2:

Bira wants us to find:

PHP Code:

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

You will find:

PHP Code:

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

Replace it with:

PHP Code:

$sql="SELECT userid,username,invisible,away,lastactivity,lastvisit 

b) user.php, step 4/4:

Bira wants us to find:

PHP Code:

$DB_site->query("UPDATE user SET birthday='$birthday

You will find:

PHP Code:

$DB_site->query("UPDATE user SET birthday='$birthday',options='$options',usergroupid='$usergroupid',username='".addslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlspecialchars($email))."',styleid='$userstyleid',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser=$coppauser,homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',signature='".addslashes($signature)."',adminemail=$adminemail,showemail=$showemail,invisible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$customtitle,joindate=$joindate,cookieuser=$cookieuser,nosessionhash=$nosessionhash,daysprune='$daysprune',lastvisit=$lastvisit,lastactivity=$lastactivity,lastpost=$lastpost,posts='$posts',timezoneoffset='$timezoneoffset',emailnotification=$emailnotification,receivepm='$receivepm',emailonpm='$emailonpm',ipaddress='".addslashes($aipaddress)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid"); 

Change it to:

PHP Code:

$DB_site->query("UPDATE user SET away='$away',awaydate=$awaydate,returndate='$returndate',awayreason='".addslashes(htmlspecialchars($awayreason))."',birthday='$birthday',options='$options',usergroupid='$usergroupid',username='".addslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlspecialchars($email))."',styleid='$userstyleid',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser=$coppauser,homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',signature='".addslashes($signature)."',adminemail=$adminemail,showemail=$showemail,invisible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$customtitle,joindate=$joindate,cookieuser=$cookieuser,nosessionhash=$nosessionhash,daysprune='$daysprune',lastvisit=$lastvisit,lastactivity=$lastactivity,lastpost=$lastpost,posts='$posts',timezoneoffset='$timezoneoffset',emailnotification=$emailnotification,receivepm='$receivepm',emailonpm='$emailonpm',ipaddress='".addslashes($aipaddress)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid"); 

--- snip ---

Don't forget, the installer has another error! Thanks to Birdie501 for pointing this out to us.

a) member.php, step 4/4:

Bira wants us to find:

PHP Code:

    eval("\$referrals = \"".gettemplate("getinfo_referrals")."\";");
  } 

And place this after it:

PHP Code:

// 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) 

Instead, place it after:

PHP Code:

eval("\$referrals = \"".gettemplate("getinfo_referrals")."\";");
  }
else {
        
$referrals '';
    } 


Boofo 08-20-2002 01:35 AM

How about coming out with a text file for the full install now (for 2.2.5 AND 2.2.6)? :)

Sho 08-20-2002 01:39 AM

I am currently working to get my board open again, afterwards - an hour or so - I'm going to write a new text installer for vB 2.2.6 that includes the templates. I am considering to re-release it. Of course with full credit to bira and you guys!

Sho 08-20-2002 03:28 AM

Note: This hack works with 2.2.7 *and* 2.2.6!

This hack is a re-release of "Away" message for users by bira - now it works with vB 2.2.6/2.2.7. (He/She didn't visit this board since the beginning of 2001 and didn't react to PM and mail, too; I hope this re-release is fine with him/her.) In addition to changing the instructions to make them valid for 2.2.6/2.2.7, other errors in the original installer were fixed. All I did was compiling the new text-based installer; code was kindly provided by Boofo, talon3dhq and Birdie501.

Now I am going to quote what bira told us about her hack:

[QUOTE]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).

Sho 08-20-2002 03:29 AM

I re-released this hack for vBulletin 2.2.6.

Look here: https://vborg.vbsupport.ru/showthrea...threadid=42520

Thanks to all who contributed!

joeboo 08-20-2002 03:32 AM

...re-release? I installed the first release on my board (vB 2.2.6) and had no errors, or problems what so ever.


All times are GMT. The time now is 01:12 PM.

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.01663 seconds
  • Memory Usage 1,829KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (15)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete