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)

Bedhead 12-11-2001 01:41 PM

Hello.

Still doesn't work.

Here is what I am getting now:



There seems to have been a slight problem with the My Site database.
Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.

Database error in vBulletin Control Panel 2.2.1:

Invalid SQL: UPDATE user SET away=0,awaydate='UNIX_TIMESTAMP('1969-12-31 17:00:00')',returndate='0000-00-00',awayreason='',birthday='0000-11-26'
,options='15',usergroupid='2',username='gmull875', email='gmullins875@hotmail.com',styleid='1',parent email='gmullins875@hotmail.com',coppauser=1,homepa ge='http://',icq='',aim='',yahoo='',signature='',adminemail=1 ,showemail=1,invisible=0,usertitle='Junior Member',customtitle=0,joindate=UNIX_TIMESTAMP('200 1-12-09 21:21:43'),cookieuser=1,nosessionhash=1,daysprune= '-1',lastvisit=UNIX_TIMESTAMP('2001-12-10 17:58:47'),lastactivity=UNIX_TIMESTAMP('2001-12-10 17:58:47'),lastpost=UNIX_TIMESTAMP('1969-12-31 17:00:00'),posts='0',timezoneoffset='-3',emailnotification=1,receivepm='1',emailonpm='1' ,ipaddress='206.153.0.195',pmpopup=IF(pmpopup=2 AND 1=1,pmpopup,'1') WHERE userid=2164
mysql error: You have an error in your SQL syntax near '1969-12-31 17:00:00')',returndate='0000-00-00',awayreason='',birthday='0000-11-2' at line 1

mysql error number: 1064

Date: Tuesday 11th of December 2001 08:51:53 AM
Script: http://www.mysite.com/forum
Referer: http://www.mysite.com/forum/admin/us...it&userid=2164

bira 12-11-2001 02:00 PM

ok, try this:

change:

Code:

  if ($awaydate!="") {
    $awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
  } else {
          $awaydate="";
  }

to

Code:

  if ($awaydate!="") {
    $awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
  } else {
          $awaydate="[high]''[/high]";
  }

And

awaydate='$awaydate'

to

awaydate=$awaydate

Bedhead 12-11-2001 02:05 PM

Right on Buddy.

She's A-OK.

Thanks again.

SirSteve 12-11-2001 03:41 PM

[QUOTE]Originally posted by bira
ok, try this:

change:

Code:

  if ($awaydate!="") {
    $awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
  } else {
          $awaydate="";
  }

to

Code:

  if ($awaydate!="") {
    $awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
  } else {
          $awaydate="[high]''[/high]";
  }

And

awaydate='$awaydate'

to

awaydate=$awaydate

bira 12-11-2001 03:45 PM

SirSteve,

It's in admin/user.php

Don't know if you added the Admin CP add-on or not. If you did, just open it and make sure the code looks like that.

if you didn't have any problems in the user Admin CP page nor any errors, then most likely you don't need to change anything.

Cheers,

Bira

TheComputerGuy 12-11-2001 07:40 PM

I get this
Parse error: parse error in /home/web+++++/public_html/XXXX/admin/install_awayuser.php on line 488

bira 12-11-2001 07:53 PM

sorry, my bad. Download the zip file again (from the first post)

Nemesis77 12-11-2001 09:40 PM

[QUOTE]Do you have the normal Online/Offline status icons showing in your postbit template? Do you have the setting for those turned ON in your vBulletin Options??

squawell 12-12-2001 09:46 AM

[QUOTE]Originally posted by bira
OK,

I'm going to upload a new installer, which includes:

1) 'Away' auto-cancel when a user posts (optional)
2) Auto-reply to PMs while away (optional)
3) 'Away' details editable in the user's page in Admin CP

If you haven't installed the hack yet, then ignore this post and simply download the zip from the first post

If you already installed the hack, here's what you need to do to add the Admin CP bit:

Open admin/user.php

Find:

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,
Change to (changes marked in high):

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,[high]FROM_UNIXTIME(awaydate) AS awaydate,[/high]
Find:

Code:

makeinputcode("IP Address","aipaddress",$user[ipaddress]);
AFTER it ADD:

PHP Code:

// Leave Away Message in Profile (v1.0)
  
maketableheader("Away Status");
      
makeyesnocode("User is away?","away",$user[away]);
      
makeinputcode("Away since<br>(Format yyyy-mm-dd)","awaydate",$user[awaydate]);
      
makeinputcode("Return date<br>(Format yyyy-mm-dd)","returndate",$user[returndate]);
      
makeinputcode("Away reason","awayreason",$user[awayreason]);
// Leave Away Message in Profile (v1.0) 

Find:

Code:

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

BEFORE it ADD:

PHP Code:

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

Find:

Code:

$DB_site->query("UPDATE user SET birthday='$birthday'
Change to (changes marked in high):

Code:

$DB_site->query("UPDATE user SET [high]away=$away,awaydate=$awaydate,returndate='$returndate',awayreason='".addslashes(htmlspecialchars($awayreason))."',[/high]birthday='$birthday'
Save and upload.

Evil_Incarnate 12-12-2001 10:33 AM

hey bira i get this error when trying to change user info from adminCP

Database error in vBulletin Control Panel 2.2.1:

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=1
mysql error: You have an error in your SQL syntax near 'avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar
' at line 3

mysql error number: 1064

Date: Wednesday 12th of December 2001 11:29:15 PM
Script: http://www.fscknetworks.net/forums/f...=edit&userid=1
Referer: http://210.49.170.7:81/forums/admin/...s=&action=find


got any ideas?


All times are GMT. The time now is 09:22 AM.

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.01414 seconds
  • Memory Usage 1,759KB
  • 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
  • (10)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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