![]() |
[QUOTE]Originally posted by FireFly
Members could abuse and put offending messages as the away reason, so it's important to have the ability to change it. Also bira while you're at it, censor the reason before it's saved. :) |
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, 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] Code:
makeinputcode("IP Address","aipaddress",$user[ipaddress]); PHP Code:
Code:
if ($posts=="") { PHP Code:
Code:
$DB_site->query("UPDATE user SET birthday='$birthday' Code:
$DB_site->query("UPDATE user SET [high]away=$away,awaydate=$awaydate,returndate='$returndate',awayreason='".addslashes(htmlspecialchars($awayreason))."',[/high]birthday='$birthday' |
JJR512 & Hooper: I uploaded a new zipfile to the 1st post. If you haven't installed the hack yet, then download the zipfile again (and make sure you don't get a cached version of the zip file -- the file should be called awayuser_v_12.zip when you are prompted to save it).
|
Works as expected. Wonderful. Thank you so much for your help!
|
[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 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] Code:
makeinputcode("IP Address","aipaddress",$user[ipaddress]); PHP Code:
Code:
if ($posts=="") { PHP Code:
Code:
$DB_site->query("UPDATE user SET birthday='$birthday' Code:
$DB_site->query("UPDATE user SET [high]away=$away,awaydate=$awaydate,returndate='$returndate',awayreason='".addslashes(htmlspecialchars($awayreason))."',[/high]birthday='$birthday' |
e-mail me your user.php to goren@atlasf1.com and I'll take a look
|
You got mail Buddy.:)
Everything is working great for me so far, exept for the user.php3 I am using 2.2.1 Thanks for taking the time. |
Beadhead, found your error.
Open your user.php3 and find: Code:
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 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,FROM_UNIXTIME(awaydate) AS awaydate |
Thanks,
I can now access the control panel but now I am getting the following: 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: 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 2 mysql error number: 1064 Date: Tuesday 11th of December 2001 06:41:12 AM Script: http://www.mysite.com/forum Referer: http://www.mysite.com/forum/admin/index.php3 |
sorry, try adding a coma , after "FROM_UNIXTIME(awaydate) AS awaydate"
|
That was it.
This is great! Thank you for your quick responses. I wish you all the best in the new year. |
you too babe, thanks :)
|
A small little problem on my site ...
this: Quote:
The sender gets the auto-response ... that works ... but the receiver don't get a notification about it. Perhaps i missed something ... (but i created the template email_pmautoreply!) I tried to change the options of my test-user. He gets an email, if he has turned on "notification about pm by mail" ... but only the normal "you got pm"-message. And if it's turned off ... nothing. No notification. Any idea? |
Meta I don't think I understand you :confused:
|
Thats what i was afraid of.
Okay ... i'll try it again (i do my best with my little english ...) If i understand you well, one of the actions should be to send an email to the person who is absent if somebody writes them a pm. That's what not happens on my board. If it shouldn't ... please forget the rest of my words from now on. But if it should be so ... well ... no mail. Or in other words ... nobody gets the message from the email_pmautoreply ... i think. But ... i know, the user "Test" can get email-notifications for pms. If he turns it on in his options ... he gets one telling him he has a new pm. But it's the normal message ... not the words from email_pmautoreply. And if he turns it off in his options (and who will turn this especially on when he leaves a while ... i think almost everybody on my board has it disabled) he gets no mail. Nothing. Nada. Niente. Gar nichts. So that is my small little and absolutely not important problem. If it won't work ... it don't work. Nevermind. Anyway ... if you have a smill little hint ...? (And all the other functions are working properly. That's what i wanted to say.) |
Meta,
mail_pmautoreply is the same is mail_pmreceived. The only difference is that it switches the sener/receiver. Let's say user A has selected to receive an e-mail when he gets a new PM. User B also selected to receive a notificaion by mail on new pms. User A sets himself 'away. User B sends a pm to User A. User A will receive an e-mail notification letting him know there's a new PM for him. User B will receive 1) an auto-reply pm, and 2) an e-mail notification letting him know there's a new PM for him. That's how it should work Does it help? |
I'm afraid ... yes.
And it works perfectly. Please excuse the ... hm ... disturbance. |
Hello.
Now I have noticed that I can not change a coppa user. Please help. This is the error I get: 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=,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 'returndate='0000-00-00',awayreason='',birthday='0000-11-26' ,options='15',userg' at line 1 mysql error number: 1064 Date: Tuesday 11th of December 2001 08:27:12 AM Script: http://www.mysite.com/forum Referer: http://www.mysite.com/forum/admin/us...it&userid=2164 |
A coppa user? :confused:
|
hrmm...
try changing awaydate=$awaydate to awaydate='$awaydate' |
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 |
ok, try this:
change: Code:
if ($awaydate!="") { Code:
if ($awaydate!="") { awaydate='$awaydate' to awaydate=$awaydate |
Right on Buddy.
She's A-OK. Thanks again. |
[QUOTE]Originally posted by bira
ok, try this: change: Code:
if ($awaydate!="") { Code:
if ($awaydate!="") { awaydate='$awaydate' to awaydate=$awaydate |
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 |
I get this
Parse error: parse error in /home/web+++++/public_html/XXXX/admin/install_awayuser.php on line 488 |
sorry, my bad. Download the zip file again (from the first post)
|
[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??
|
[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, 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] Code:
makeinputcode("IP Address","aipaddress",$user[ipaddress]); PHP Code:
Code:
if ($posts=="") { PHP Code:
Code:
$DB_site->query("UPDATE user SET birthday='$birthday' Code:
$DB_site->query("UPDATE user SET [high]away=$away,awaydate=$awaydate,returndate='$returndate',awayreason='".addslashes(htmlspecialchars($awayreason))."',[/high]birthday='$birthday' |
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? |
squawell - what error do you get? Paste it here
Evil_Incarnate - you have a comma missing after FROM_UNIXTIME(awaydate) AS awaydate It should be: FROM_UNIXTIME(awaydate) AS awaydate[high],[/high] avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar |
thankya bira, and great hack btw
works a treat now... |
Glad it works. Thanks :)
|
this is my error
===================================== Database error in vBulletin Control Panel 2.2.1: Invalid SQL: UPDATE user SET away=0,awaydate=,returndate='0000-00-00',awayreason='',birthday='0000-00-00',options='15',usergroupid='2',username='789',em ail='plumgreen75@hotmail.com',styleid='1',parentem ail='',coppauser=0,homepage='http://www.',icq='',aim='',yahoo='',signature='',adminema il=1,showemail=1,invisible=0,usertitle='<div style=\"width:100%; font-size:8pt; color:white; filter:Glow(color=purple, strength=2)\">???ลท|??</div>',customtitle=0,joindate=UNIX_TIMESTAMP('2001-11-25 05:03:38'),cookieuser=1,nosessionhash=0,daysprune= '-1',lastvisit=UNIX_TIMESTAMP('2001-12-11 14:25:09'),lastactivity=UNIX_TIMESTAMP('2001-12-11 14:25:09'),lastpost=UNIX_TIMESTAMP('2001-12-11 09:51:15'),posts='2',timezoneoffset='0',emailnotif ication=1,receivepm='1',emailonpm='0',ipaddress='' ,pmpopup=IF(pmpopup=2 AND 0=1,pmpopup,'0') WHERE userid=85 mysql error: You have an error in your SQL syntax near 'returndate='0000-00-00',awayreason='',birthday='0000-00-00',options='15',usergro' at line 1 mysql error number: 1064 ===================================== any idea??and thankz ur help~~ |
squawell, scroll up and look at post #62 ( https://vborg.vbsupport.ru/showthrea...284#post206284 ) for the fix :)
|
bira~~~thankz!!
now it's work!! |
I get this
Database error in vBulletin 2.2.0: Invalid SQL: UPDATE user SET birthday='0',signature='',customtitle='0',usertitl e='Administrator',email='chrisdildy@hotmail.com',p arentemail='',coppauser='0',homepage='',icq='',aim ='',yahoo='',usergroupid='6' WHERE userid='1', ,away='1',awaydate='1008201008',returndate='01-12-13',awayreason='Testing this old thing out :)' WHERE userid='1' mysql error: You have an error in your SQL syntax near ' ,away='1',awaydate='1008201008',returndate='01-12-13',awayreason='Testing this ' at line 1 mysql error number: 1064 Date: Wednesday 12th of December 2001 06:50:08 PM Script: http://www.webmafiaforums.com/***/***/member.php Referer: http://www.webmafiaforums.com/****/m...on=editprofile when I mark myself away in the admin cp it works great..but the usercp.com or it is the memeber.php that I get this error when I hit submit... |
I have installed this hack only to figure out that I am not getting the online and offline tags happening so it will not work under a post. I am running 2.20 and cannot upgrade right now because I will lose alot of work I have into it. Can someone tell me why it wont show online, offline, or away? I have $onlinestatus in the templete and I see ppl talking about turning that on in the vb options but its not there in 2.20 are at least not mine, so what do I do?
|
I'm having the same problem in 2.2.1 I have the online option turned on in the admin cp in the vbulletin options.
|
The ComputerGuy: you made a complete mess of the UPDATE user query. Check the instructions again and make sure you follow them accurately.
mADmAX & Nemesis77: Go to the Admin Control Panel -> Options -> Forum Home Page Options, and select 'yes' for 'Display logged in users on home page' |
All times are GMT. The time now is 04:53 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|