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)

carpman 08-07-2002 07:48 AM

Hello, need a lillte clarification on this hack.

I have $onlinestatus in postbit template which show

Online
or
Offline

If i install this hack can i get it to change 'offline' to 'away' if user sets themselves as being 'away'.

Would look silly having 'offline' and 'away' message.

cheers

Boofo 08-07-2002 08:02 AM

When you install the hack, it adds it to the functions.php so it will show the away message accordingly in the postbit. :)

[QUOTE]Originally posted by carpman
Hello, need a lillte clarification on this hack.

I have $onlinestatus in postbit template which show

Online
or
Offline

If i install this hack can i get it to change 'offline' to 'away' if user sets themselves as being 'away'.

Would look silly having 'offline' and 'away' message.


cheers

PhoenixBB 08-12-2002 08:46 AM

I'm using 2.2.6 and I can't get it working. I keep getting a parse error in Usercp.php line 382. Line 382 is just ?>

There is code differences to that in the installer script. Dunno if that is causing the problem. The code is actually

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

As there was no mention of userid==6 stuff I left that out.

I've spent 2 days trying to suss it to no avail. I thought installing the weather hack and vbpad might have been more difficult but they went smoothly compared to this. :(

Anyone know why I'm getting that parse error?

ZiRu$ 08-14-2002 04:27 AM

can i get a TEXT installation for version 1.2.........thx

Boofo 08-14-2002 04:33 AM

https://vborg.vbsupport.ru/showthrea...017#post257017

[QUOTE]Originally posted by ZiRu$
can i get a TEXT installation for version 1.2.........thx

ZiRu$ 08-14-2002 04:50 PM

thx man

Boofo 08-14-2002 04:56 PM

You're very welcome there, sir. ;)

marc49 08-14-2002 07:58 PM

ok, this thread is 20 pages long so maybe this has been answered already but I am getting this error

Quote:

Database error in vBulletin Control Panel 2.2.5:

Invalid SQL: SELECT *,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


avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar
FROM user
LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid
WHERE user.userid=103
mysql error: You have an error in your SQL syntax near 'avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar
' at line 4

mysql error number: 1064

Date: Wednesday 14th of August 2002 02:53:11 PM
Script: http://www.mysite.com/admin/user.php...dit&userid=103
Referer: mysite.com/admin/user.php
I am running 2.2.5


*EDIT*

Never mind, I started looking through the pages while I was waiting for a reply and I think I got it fixed.

Boofo 08-14-2002 08:59 PM

I think you need a comma after FROM_UNIXTIME(awaydate) AS awaydate like this:

FROM_UNIXTIME(awaydate) AS awaydate,

|DarkManX| 08-15-2002 06:46 PM

how can i put the away icon in the sig??

JasonGreen 08-18-2002 08:15 PM

It's a great idea, but it doesn't work.

Sho 08-19-2002 01:02 PM

Humm, I want a re-release for 2.2.6. I know talon3dhq told us what to replace instead of what the installer tells us, but, well, JelSoft certainly made those changes for a reason. :pirate:

Schorsch 08-19-2002 03:46 PM

question:

1) can I use this without any errors on vB 2.2.6 ?

Schorsch

Sho 08-19-2002 04:43 PM

I don't think so. At least I didn't get it to run on my test installation.

Schorsch 08-19-2002 04:52 PM

:surprised: :(

ExAvIoUr 08-19-2002 06:44 PM

everything i try to use the away feature i get this

Please make sure that you have completed all the required fields. These include username, password and email. Press the back button, correct the error and try again.

how cna i fix this.

ZiRu$ 08-19-2002 09:15 PM

[QUOTE]Originally posted by Boofo
https://vborg.vbsupport.ru/showthrea...017#post257017


Sho 08-19-2002 09:17 PM

:(

And that's the next problem, well ...

Boofo 08-19-2002 09:26 PM

I used the install_awayuser.php file, myself, when I installed it and it worked great for me. I just found that link in the thread. Sorry. :)

[QUOTE]Originally posted by ZiRu$


UM....that is INCOMPLETE

it dosent show up to put the info in the profile and in the instructions it says VIEW NEXT PAGE

Sho 08-19-2002 11:27 PM

Still can't get it to work on 2.2.6. Hmhm. Boofo, do you use 2.2.6?

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.

Boofo 08-20-2002 03:34 AM

How about releasing a version that has both parts (2.2.5 and 2.2.6) in it for those who want a text version for pre-2.2.6?

Sho 08-20-2002 03:38 AM

I would, but I don't have vB 2.2.5 here to validate what I'm writing. And I'm going to bed now - it's 6:30 AM over here and I am *still* awake. :).

How about you use my re-release as a template, create a file for 2.2.5, post it in the 2.2.6 thread and I link to the posting in my own first post? :)

G'night!

JulianD 08-20-2002 03:56 AM

I have the original version too, but i will try this new version.... The actual version seems a little buggy in my forums.

JJR512 08-20-2002 03:58 AM

That's odd...I had no problems getting it to work with 2.2.6. It's been a while since I installed it, though, and I don't recall what adjustments, if any, I had to make for any code differences, though.

Sho 08-20-2002 03:59 AM

[QUOTE]Originally posted by joeboo
...re-release? I installed the first release on my board (vB 2.2.6) and had no errors, or problems what so ever.

Erwin 08-20-2002 04:11 AM

I've been running this on 2.2.6 for many months now with no problems either. But that's just me. :)

Sho 08-20-2002 04:15 AM

There are several errors and unclear instructions in the original installer by bira (code to replace has changed in 2.2.6, a wrong find/add after, etc.). Look in one of my last posts here, I compiled a list of them. Some were pointed out by me and fixed by Boofo, others by Birdie501 and talon3dhq. You probably didn't have any problems getting around these errors, others might have. :)

Please note that I have fully credited bira and all who contributed to this re-release! And only after bira did not react to PM and mail - he/she didn't visit this board since the beginning of 2001.

I only compiled the new text-based installer, that's all.

Boofo 08-20-2002 04:18 AM

Yes, Erwin, but didn't you and JJR512 already have the hack installed when you upgraded to 2.2.6? That is a lot different than installing it on a fresh copy of 2.2.6 and being a newbie at it, too. We've all done enough of these hacks where we get to know how to work around these things. The people just starting out doing it haven't been doing it very long, and it gets confusing sometimes for them. Just like it did for us when we were new at it.

Velocd 08-20-2002 05:05 AM

Sounds good, I've noticed some minor errors in my version also, so I'll have to update when I get the chance ;)

JJR512 08-20-2002 05:27 AM

When I upgraded to 2.2.6, no, I didn't have it installed. I had it installed in an earlier version, but in an earlier upgrade I didn't reinstall it. Besides, having it already installed shouldn't matter. Having it already installed only saves you the trouble of doing any database changes and possibly adding templates; those are the easy parts. The hard parts are doing the file modifications, and upgrading completely destroys file modifications, because you're using new, clean files.

I understand what you're saying about being a newbie...but it's because I had to figure things out on my own that I'm not a newbie anymore. ;)

But I'm not saying there's anything wrong; I'm just saying that, in my experience, I don't have any problems.


All times are GMT. The time now is 08:24 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.01750 seconds
  • Memory Usage 1,895KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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