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)

Sho 09-01-2002 10:40 PM

I am very happy to announce that this hack works perfectly well with 2.2.7. I modified my initial posting accordingly.

Unknown553 09-01-2002 11:47 PM

In the modifyprofile_away template, there really isn't a need for this piece of code:

Code:

<option value="01" $year2001away>2001</option>
As you will not be returning in the past ;)


In fact, if you could, it'd be a great feature if you disabled return dates in the past. If it's too hard I will totally understand, I'm just being picky. Great hack, I had a lot of problems with the original hack, this one works flawlessly though. Thanks for updating it!

Sho 09-01-2002 11:50 PM

Actually, I'm working on it. ;)

Will take some time, though. Busy updating my own forums to 2.2.7 right now. :)

Unknown553 09-01-2002 11:56 PM

I can understand that. Moving over 70 hacks is a pain. :( I've just applied the critical security patches so far, not sure if I will convert to 2.2.7 all the way yet, maybe just wait for v3 :)

groovesalad 09-02-2002 12:45 AM

Installed it, and the away system works, however, when I click on a username I get this:

Fatal error: Call to undefined function: dotimeonline() in /www/g/groove_salad/htdocs/forum/member.php on line 1412

how can I get this corrected?

Unknown553 09-02-2002 12:54 AM

When I PM an away user I get the auto reply, but there are no contents inside the PM, it's just blank. I do have the priv_autoreply template too, I double checked....Ideas?

Dark Shogun 09-26-2002 02:39 AM

Does anyone have the away.gif?

Dark Shogun

sklwer 10-15-2002 09:18 PM

Does this Hack work on Version 2.28"?????
Thanks

Data 10-26-2002 08:28 AM

I'm getting the following error within the member.php file:

Parse error: parse error in /home/gaming2/public_html/forums/member.php on line 1413

It's funny, because I tried to locate the line, but when opening the edit menu to search for this, the option was gray, meaning that I couldn't select it to see what was going on.

Um, let me see if this helps. Download the file from the server and when you open it in notepad it'll show all nicely organized. Does anybody know what the problem might be anyways?

ddausch 10-26-2002 10:22 AM

Thx for this hack ...öhm oder einfach Danke für diesen feinen Hack..

my english not to good?? ..naja wird sicher verstanden was ich meine ^^

poolking 10-27-2002 04:21 PM

I have got this hack working under 2.2.8

Now how do I get the away info from the user profile to also appear in the postbit template?

Blago 10-28-2002 05:22 AM

[QUOTE]Originally posted by poolking
I have got this hack working under 2.2.8

Now how do I get the away info from the user profile to also appear in the postbit template?

poolking 10-28-2002 05:38 AM

In the modifyprofile template find

$birthday
$customtext

and after them add

$awaytext

Then the away fields will appear in the edit profile, It had me scratching my head why it wouldn't appear in any of my other styles.

Still waiting for an answer to the postbit question.

adriandaz 11-03-2002 12:18 PM

thanks, installed successfully on 2.2.8 no problems :D

Webster Media 11-13-2002 12:12 AM

I keep getting a parse error on line 266 of admin/functions.php. I have read almost every thread in this post, and have not had any luck.

I am running vB version 2.2.8, and any help you guys could give me would be great.

Line 266 of functions.php is this:
Code:

} else {
Which shouldn't matter, but this is the part I am questioning:
Code:

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

EDIT: Just installed the version made for 2.2.6, and this one did not work either. Got same error message.

Regards,
Nick B.

Sho 11-13-2002 06:31 AM

Try https://vborg.vbsupport.ru/showthrea...606#post287606

NTLDR 11-13-2002 10:14 AM

Follow the instructions carefully, this hack works fine on vB 2.2.8.

Sho 11-13-2002 10:22 AM

The original version certainly does not work on 2.2.6 and 2.2.7, which is why I re-released this hack with updated and corrected instructions. You can find a list of errors and their corrections both in this thread, as well as in the new. See link above.

(Edit: Whoa. Just noticed that both threads were merged.)

SemperFidelis 01-10-2003 01:40 AM

Ok
On vb 2.2.9 once applying Sho updated version of the hack, I am now getting a blank page returned when trying to access usercp.php

Here is a snippet of the code from there regarding the required changes:

Change #1
PHP Code:

// Leave Away Message in Profile (v1.2a) (Start Code Replaced)
// Here is the original :
//   $sql="SELECT userid,username,invisible,usertitle,lastactivity,lastvisit
//      FROM user
//      WHERE (user.userid='$buddyuserssql')
//      ORDER BY username";
// Here is its replacement :
   
$sql="SELECT userid,username,invisible,usertitle,away,lastactivity,lastvisit
      FROM user
      WHERE (user.userid='
$buddyuserssql')
      ORDER BY username"
;
// Leave Away Message in Profile (v1.2a) (End Code Replaced) 

Change #2
PHP Code:

// Leave Away Message in Profile (v1.2a) (Start Code Replaced)
// Here is the original :
//  if ($buddy['lastactivity'] > $datecut and (!$buddy['invisible'] or $bbuserinfo['usergroupid'] == 6) and $buddy['lastvisit'] != $buddy['lastactivity']) {
//  {
//    $onoff="on";
//  } else {
//    $onoff="off";
// Here is its replacement :
  
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.2a) (End Code Replaced) 


Any help with getting this sorted would be greatly appreciated.

vLIMIT Sandman 01-13-2003 08:20 AM

Quote:

Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: SELECT userid
FROM user
WHERE username='Peter'
AND userid <>
mysql error: You have an error in your SQL syntax near '' at line 4

mysql error number: 1064

Date: Monday 13th of January 2003 05:13:39 AM
Script: http://www.inthebackground.com/forum...admin/user.php
Referer: http://www.inthebackground.com/forum...=edit&userid=6
That was what i got when trying to update someone from the admin cp.

LilTara 01-22-2003 10:56 PM

I've got the same problem vLIMIT.... does anyone have a fix for this? *crosses fingers*

-----------------------------------------------------------------
*pops in a while later* I got a fresh copy of user.php and redid the changes on it. Works perfect.

I had very little problem and I'm running 2.2.9 :cool: Great hack!

subu1 02-05-2003 02:20 PM

hi, that was a great hack and it works on my 2.2.8. *Click install*

but i have a litle problem, in my Profil, ich have a double from this but it is only one in my member.php

auweia my englisch *g*

// Leave Away Message in Profile (v1.2a)
if ($userinfo[away]=="1") {
$sincedate = vbdate($dateformat, $userinfo[awaydate]);
if ($userinfo[returndate]=="0000-00-00") {
$returndate = "Unknown";
} else {
$returnaway = explode("-", $userinfo[returndate]);
$returndate = vbdate($dateformat, mktime(0,0,0,$returnaway[1],$returnaway[2],$returnaway[0]));
}
eval("\$away .= \"".gettemplate("getinfo_away")."\";");
} else {
$away = "";
}
// Leave Away Message in Profile (v1.2a)

==========================================
<tr>
<td bgcolor="#F1F1F1" colspan="2" align="center">
<normalfont><b>$userinfo[username] ist nicht verf?gbar</b><normalfont>
<br><smallfont><i>Grund: $userinfo[awayreason]</i></smallfont><br>
<normalfont>ab: $sincedate &nbsp;&nbsp;&nbsp; zur?ck am: $returndate</normalfont>
</td>
</tr>

can you help me? :)



greetz/gr??e subu1

leitel 04-07-2003 09:52 PM

Excuse me, but does this hack run on 2.3?

iggy123 04-10-2003 08:34 AM

I tried it on 2.3 and i get a SQL error from the user.php
Quote:


Invalid SQL: SELECT userid
FROM user
WHERE username='Kois'
AND userid <>
mysql error: You have an error in your SQL syntax near '' at line 4

mysql error number: 1064

Alien 04-10-2003 08:59 PM

Can anyone confirm this working on a copy of 2.3.0? :)

AlexanderT 04-13-2003 05:11 PM

Installed it on a testboard running v2.3.0 final - no probs.

AlexanderT 04-14-2003 09:54 AM

... and *that* is why the very first post of this thread points to a new version (v1.2a) that takes all these changes you mentioned into account.

https://vborg.vbsupport.ru/showthrea...606#post287606

Alien 04-19-2003 06:20 AM

Great, I'll give it a whirl.

Any idea how many queries this hack adds by chance? :D

Frozen Dreams 04-29-2003 11:35 AM

I installed version 1.2a on a 2.2.9 ... and it works like a charm
thanks a lot :)

Boofo 05-18-2003 03:41 PM

Has anyone figured out a way of having this hack automatically set the user as back when their return date comes due?

DelFDgfd_gT 05-28-2003 04:09 AM

PHP Code:

Step 3/4.

========
||
FIND||
========

  if (
$posts=="") {
    
$posts=0;
  }
  
==================
||
ABOVE that ADD||
==================

// Leave Away Message in Profile (v1.2a)
  
if ($awaydate!="") {
    
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
  } else {
      
$awaydate="''";
  }
// Leave Away Message in Profile (v1.2a) 

Ok, basically, I cant find
PHP Code:

  if ($posts=="") {
    
$posts=0;
  } 

any thoughts?

Splitfyre 06-23-2003 07:28 PM

Received errors when hacking the user.php file.

Does this hack work in 2.30? Will be going through an uninstall for now and then re-hack at a later date when this function becomes fully stable on 2.30 :bunny:

cYbercOsmOnauT 06-27-2003 09:59 PM

This is a cool hack! I will install it soon (first I need to translate the texts ;))

Frozen Dreams 07-01-2003 03:12 PM

[QUOTE]05-28-03 at 07:09 AM Ramsy de Vos said this in Post #391
PHP Code:

Step 3/4.

========
||
FIND||
========

  if (
$posts=="") {
    
$posts=0;
  }
  
==================
||
ABOVE that ADD||
==================

// Leave Away Message in Profile (v1.2a)
  
if ($awaydate!="") {
    
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
  } else {
      
$awaydate="''";
  }
// Leave Away Message in Profile (v1.2a) 

Ok, basically, I cant find
PHP Code:

  if ($posts=="") {
    
$posts=0;
  } 

any thoughts?

C.Assassin 07-02-2003 12:43 AM

installed on 2.3.0 no probs

Christoff 07-05-2003 04:01 PM

Yup... on 2.3.0 no probs... i like it a lot.
So does m users.
Thread about being away was the biggest one.

cYbercOsmOnauT 07-08-2003 01:09 AM

Great hack!

/me clicks install.

Holidazed 07-08-2003 06:54 PM

This is awesome. Works wonderously.

Suggestions:
Filter the Away messages through the vBB filter system
Multiple away messages.
Admins can edit and/or lock an away message so it cannot be edited.
Add a "Start Date" option so people can set away status in advance. eg. I will be gone from xx-xx-xxx to xx-xx-xxxx.

DarkDraco07 07-24-2003 09:21 PM

i get this error

Database error in vBulletin 2.2.9:

Invalid SQL: UPDATE user SET element='2', birthday='1985-6-4',signature='',customtitle='1',usertitle='Admin / Web Master',email='darkdraco@darknemesis.com',parentem ail='',coppauser='0',homepage='http://www.darknemesis.com',icq='',aim='',yahoo='',usergr oupid='6', ,away='0',awaydate='',returndate='',awayreason='' WHERE userid='1', gender='2', rpgclass='11', rpgrace='13', alignment='3', rpgtype='2', rpggender='2' WHERE userid='1'
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'away='0',awaydate='',returndate='',awayreason='' WHERE userid='

mysql error number: 1064

Date: Thursday 24th of July 2003 03:22:36 PM
Script: http://www.darknemesis.com/forums/forums/member.php
Referer: http://www.darknemesis.com/forums/me...on=editprofile

clamcrusher 07-28-2003 12:07 AM

i get this error:

Parse error: parse error, unexpected T_ELSE in /usr/local/psa/home/vhosts/chemical-conversions.com/httpdocs/member.php on line 1387



heres my code:

btw-the last "else{" is line 1387


PHP Code:

$refcount $DB_site->query_first("SELECT count(*) AS count
                                       FROM user
                                       WHERE referrerid = '
$userinfo[userid]'");
    
$referrals $refcount[count];
    eval(
"\$referrals = \"".gettemplate("getinfo_referrals")."\";");
  }
// 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)
 
 
else {
        
$referrals '';
    }

  
// get extra profile fields 



All times are GMT. The time now is 10:15 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.02818 seconds
  • Memory Usage 1,857KB
  • 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
  • (3)bbcode_code_printable
  • (7)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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