View Full Version : Away message for users
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).
Some demo captures:
The Edit Profile screen, when a user is NOT away:
https://vborg.vbsupport.ru/
The Edit Profile screen when a user IS away:
https://vborg.vbsupport.ru/
The Get Info (User Profile) screen when a user IS away:
https://vborg.vbsupport.ru/
The Get Info (User Profile) screen when a user is NOT away:
https://vborg.vbsupport.ru/
The postbit icon when a user is away:
https://vborg.vbsupport.ru/
How to install:
Download the attached zip file. Upload away.gif to your images dir (or create your own away.gif).
Upload install_awayuser.php to your admin dir and follow the instructions.
Cheers,
Bira
newest version by sho here:
https://vborg.vbsupport.ru/showthread.php?postid=287606#post287606
squawell
12-10-2001, 01:53 PM
bira~~
u do a great hack again~~~
thankz~~~
Lesane
12-10-2001, 02:09 PM
Very tight Bira, i luv it. Thanks for such a great hack.
pretty kewl hack.....thanks for your shared..........
Tarion
12-10-2001, 02:16 PM
great hack bira, thx a lot :cool:
trainer
12-10-2001, 02:19 PM
that is a great hack, it is perfect for my board!
never would have thought of this hack!
thanks
Admin
12-10-2001, 02:26 PM
Nice, I'll install it later when I get some time. :)
Admin
12-10-2001, 03:07 PM
Done installing. :)
*cough* I see you've mastered my install script, eh? ;)
Oh and there's a little bug. You use the same variables to denote the day, month and year name as the birthday system uses. You'll need to change that or the birthday will become your away date when you edit your profile next. :)
[QUOTE]Originally posted by FireFly
Done installing. :)
*cough* I see you've mastered my install script, eh? ;)
Radon3k
12-10-2001, 03:18 PM
Nice hack man, thanks! :)
Admin
12-10-2001, 03:26 PM
[QUOTE]Originally posted by bira
Yeah, I've actually been using it for my last 3 or 4 hacks. It's very good.
(Regarding that - I got a small surprise coming. But let me finish it first ;))
Lesane
12-10-2001, 03:32 PM
I receive a parse error in admin/functions.php
Bira, you say in the install:
Step 1 of 1 FIND:
if ($post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
well, i'm using 2.03 and 2.0.3 dont have that part in functions.php so i'm looking for a similar code and i found this in my functions.php:
if ($post[userid]!=0) {
if ($showonline) {
unset($onlinestatus);
if ($post[sessionuserid]>0) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
}
if ($post[avatarid]!=0) {
$avatarurl=$post[avatarpath];
} else {
if ($post[hascustomavatar] and $avatarenabled) {
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
} else {
$avatarurl="";
}
}
if ($avatarurl=="" or ($bbuserinfo[userid]>0 and !($bbuserinfo[showavatars]))) {
$post[avatar]="";
} else {
eval("\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
}
if ($post[customtitle]==2) {
$post[usertitle] = htmlspecialchars($post[usertitle]);
}
I changed the above code to:
if ($post[away]=="1") {
eval("\$onlinestatus = \"".gettemplate("postbit_away")."\";");
} else {
if ($post[userid]!=0) {
if ($showonline) {
unset($onlinestatus);
if ($post[sessionuserid]>0) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
}
}
if ($post[avatarid]!=0) {
$avatarurl=$post[avatarpath];
} else {
if ($post[hascustomavatar] and $avatarenabled) {
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
} else {
$avatarurl="";
}
}
if ($avatarurl=="" or ($bbuserinfo[userid]>0 and !($bbuserinfo[showavatars]))) {
$post[avatar]="";
} else {
eval("\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
}
if ($post[customtitle]==2) {
$post[usertitle] = htmlspecialchars($post[usertitle]);
}
but then i receive a parse error :(.
Hope u can help me out with this.
Lesane,
Revert back the code to what it was originally.
After that, find:
if ($post[sessionuserid]>0) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
And replace it with:
// Leave Away Message in Profile (v1.0)
if ($post[away]=="1") {
eval("\$onlinestatus = \"".gettemplate("postbit_away")."\";");
} else {
if ($post[sessionuserid]>0) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
}
// Leave Away Message in Profile (v1.0)
Thank you for this very lovely hack, Bira!
Installed ... and works smooth without any problems ... a nice to have.
Lesane
12-10-2001, 06:30 PM
Thanks Bira, it works perfect now.
But ...
if you User don't gives a Return Date it says he will come back on 1. Januar 1970.
Is there a way to change that to something like "not quite sure" or something like that?
(And ... do somebody know where my hackcount has gone? I had five or six of them installed ... at least this one. And now it says none. Quite strange.)
[QUOTE]Originally posted by Meta
But ...
if you User don't gives a Return Date it says he will come back on 1. Januar 1970.
Is there a way to change that to something like "not quite sure" or something like that?
Yeah, you have a point. It was a pleasure for me.
The "hack:" under your username in posts is the number of hacks you released, not installed Oh ... what a shame.
(Look ... thats because i'm a junior member and a newbie with only 10 Posts at all and ... oh, what a shame.)
Anyway ... thanks for your fast reply. I think, this will work. If not ... i'll be back.
Works like it should. Great! But ...
Now it would be nice, if the Admin could do this also for an user. The admin can enter a birthday for users ... why not the longer absence ...?
Would be nice.
Crinos
12-10-2001, 07:24 PM
Hey bira, nice hack once again ...
but before I install it, I was wondering if this one had a pop-up or some sort of notification to remind a user who has been "away" if he or she wants to update their away info after they return ... I know that some users, once they set an away message and then come back a little early, will sometimes forget to to update their away status ... hence they will already be posting yet still be considered "away" until the date is reached.
Maybe, even automatically disable the away setting once the user posts a message before the date he stated he was gonne be back...
I dunno, just a suggestion ... I'll install the hack anyway ;)
ok, here are a couple of add-ons:
1) Cancel 'Away' status when user posts:
Open newthread.php
Find:
$DB_site->query("UPDATE user SET
".iif ($foruminfo[countposts],"posts=posts+1,","")."
$dotitle"."lastpost='".time()."' WHERE userid='$bbuserinfo[userid]'");
Change to (changes hilighted):
$DB_site->query("UPDATE user SET
".iif ($foruminfo[countposts],"posts=posts+1,","")."
$dotitle"."lastpost='".time()."',away=0,awaydate='',awayreason='',returndate='' WHERE userid='$bbuserinfo[userid]'");
Open newreply.php and find:
$DB_site->query("UPDATE user SET
".iif ($foruminfo[countposts],"posts=posts+1,","")."
$dotitle"."lastpost='".time()."' WHERE userid='$bbuserinfo[userid]'");
Change to (changes hilighted):
$DB_site->query("UPDATE user SET
".iif ($foruminfo[countposts],"posts=posts+1,","")."
$dotitle"."lastpost='".time()."',away=0,awaydate='',awayreason='',returndate='' WHERE userid='$bbuserinfo[userid]'");
Save both files and upload.
This change will automatically cancel a user's 'away' status once he/she posts a new thread or a new reply.
2) Send auto-reply to PMs while a user is a way.
This add-on will act like the "vacation" auto-reply most e-mail programs have.
When you send a PM to a user who is away, you will immediately receive a PM with "Auto Reply:" in the subject line.
The PM message body will say 'I'm away and will read your PM when I return', with the reason (if present) and the return date (if present).
If you want to add this, open private.php and find:
eval("standardredirect(\"".gettemplate("redirect_pmthanks")."\",\"private.php?s=$session[sessionhash]\");");
ABOVE it ADD:
// away auto-reply add-on
if ($touserinfo[away]=="1") {
$sincedate = vbdate($dateformat, $touserinfo[awaydate]);
if ($touserinfo[returndate]=="0000-00-00") {
$returndate = "(date unknown)";
} else {
$returnaway = explode("-", $touserinfo[returndate]);
$returndate = "on ".vbdate($dateformat, mktime(0,0,0,$returnaway[1],$returnaway[2],$returnaway[0]));
}
if (!$touserinfo[awayreason]) {
$awayreason = "(No reason specified)";
} else {
$awayreason = "($touserinfo[awayreason])";
}
$autoreply = "Hi $bbuserinfo[username],\n\n I have been away since $sincedate $awayreason and will read your message when I return $returndate.";
$autotitle = "Auto Reply: ".addslashes(htmlspecialchars($title));
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,showsignature,iconid,messageread ,folderid,receipt) VALUES (NULL,$bbuserinfo[userid],$bbuserinfo[userid],$touserinfo[userid],'".addslashes(htmlspecialchars($autotitle))."','".addslashes(htmlspecialchars($autoreply))."','".time()."',0,0,0,0,0)");
if ($bbuserinfo[emailonpm]) {
eval("\$emailmsg = \"".gettemplate("email_pmautoreply",1,0)."\";");
eval("\$emailsubject = \"".gettemplate("emailsubject_pmreceived",1,0)."\";");
mail($bbuserinfo[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");
}
}
// away auto-reply add-on
Save and upload.
create NEW template called email_pmautoreply and place in it:
$bbuserinfo[username],
You have received a new private message at $bbtitle from $touserinfo[username]. Please click here to log in and read it:
$bburl/private.php
Thanks,
$bbtitle team
That's it :)
p.s.
Meta, I will add what you're asking for (Admin CP) tomorrow. I'm off to sleep now :)
Bedhead
12-10-2001, 08:19 PM
Awesome!!!
JJR512
12-10-2001, 08:49 PM
I don't have time to do this hack now, but I've saved it and have it queued... One question: Does the ZIP in the original post include the changes or additions from just above?
Hooper
12-11-2001, 01:22 AM
Question:
Will you be incorporating all of the addon code you posted into the script? If so, I will just wait for the final. Looks very impressive.
Thank You.
SirSteve
12-11-2001, 03:57 AM
How about being able to set your own auto PM message.
:)
Admin
12-11-2001, 04:58 AM
Very nice addons, installed all except one (auto-setting away back to 0 when posting, because people often login to check posts out and sometimes post while they're still away). :)
Crinos
12-11-2001, 06:31 AM
Installed and working ... excellent work! :)
Just did some slight modifications (http://www.opentechsupport.net/forums/member.php?s=&action=getinfo&userid=2) to the getinfo template, but it works great.
This is the 3rd or 4th straight hack from bira I am using, and all of them are just grrrrrreat ;)
KuraFire
12-11-2001, 07:28 AM
[QUOTE]Originally posted by Crinos
Just did some slight modifications (http://www.opentechsupport.net/forums/member.php?s=&action=getinfo&userid=2) to the getinfo template, but it works great.
Nemesis77
12-11-2001, 07:43 AM
Great Hack thanks. I installed this with no probs at all except The Icon in the postbit area (away.gif) does not show when a user is away. I didn't see anything in the install instructions about adding anything to the postbit template.
Crinos
12-11-2001, 07:47 AM
Hmm, attached is a zip file of the modified templates in my User Info Display ... I used custom colors on some parts, so just change them to the colors that go good with your site...
If you don't have the user points hack, just remove the "support points" fields ;)
KuraFire
12-11-2001, 07:52 AM
[QUOTE]Originally posted by Nemesis77
Great Hack thanks. I installed this with no probs at all except The Icon in the postbit area (away.gif) does not show when a user is away. I didn't see anything in the install instructions about adding anything to the postbit template.
Meta, I will add what you're asking for (Admin CP) tomorrow. I'm off to sleep now. Great. I'm not in a hurry. Thank you very much!
(It's because we have some members who surely will be back ... someday ... someyear ... they always come back sometime. But actually they are absent.)
KuraFire
12-11-2001, 08:33 AM
Thanks Crinos! :up:
[QUOTE]Originally posted by Meta
Great. I'm not in a hurry. Thank you very much!
(It's because we have some members who surely will be back ... someday ... someyear ... they always come back sometime. But actually they are absent.)
KuraFire
12-11-2001, 08:49 AM
I don't know if the Admin's should be able to mess with a user's away status. The "cancel away status" add-on would do for that, the only thing else that you could do then is abusing it, so... :/
Admin
12-11-2001, 08:59 AM
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. :)
Meta, then add the "Cancel 'Away' when user posts" add-on, about 6 posts up It won't help. Because they are (!!!) away. Now. In this very moment. So there is nobody who can say that they are away. Except me ... the admin. But i can't.
I don't know if the Admin's should be able to mess with a user's away status. May be. But ... the admin can mess with all. With all of userinformation like birthdays and AOL-Names and so on ... but also with the posts or whatever he wants. Even he can erase all of the board or forget to pay the bill.
If you don't trust the admin ... whom do you will?
I think messing around with the away-status is something i will not do. I only want to enter for users, who are in this moment absent ... that they are absent. In fact ... thats one of the reasons why i installed the hack.
KuraFire
12-11-2001, 09:11 AM
Ah, true, true..
I'm too kindhearted I think to realize abusal from the common abusing side of things, I only think about abusal from the side that has power...
Must. change. stance...
;)
Okay, so Admin accessibility *is* a good idea. :)
(I'm so happy to hear that. Thank you.)
[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:
$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):
$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,
Find:
makeinputcode("IP Address","aipaddress",$user[ipaddress]);
AFTER it ADD:
// 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:
if ($posts=="") {
$posts=0;
}
BEFORE it ADD:
// Leave Away Message in Profile (v1.0)
if ($awaydate!="") {
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
} else {
$awaydate="";
}
// Leave Away Message in Profile (v1.0)
Find:
$DB_site->query("UPDATE user SET birthday='$birthday'
Change to (changes marked in high):
$DB_site->query("UPDATE user SET away=$away,awaydate=$awaydate,returndate='$returnd ate',awayreason='".addslashes(htmlspecialchars($awayreason))."',birthday='$birthday'
Save and upload.
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!
Bedhead
12-11-2001, 11:14 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:
$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):
$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
Find:
makeinputcode("IP Address","aipaddress",$user[ipaddress]);
AFTER it ADD:
// 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:
if ($posts=="") {
$posts=0;
}
BEFORE it ADD:
// Leave Away Message in Profile (v1.0)
if ($awaydate!="") {
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
} else {
$awaydate="";
}
// Leave Away Message in Profile (v1.0)
Find:
$DB_site->query("UPDATE user SET birthday='$birthday'
Change to (changes marked in high):
$DB_site->query("UPDATE user SET away=$away,awaydate=$awaydate,returndate='$returnd ate',awayreason='".addslashes(htmlspecialchars($awayreason))."',birthday='$birthday'
Save and upload.
e-mail me your user.php to goren@atlasf1.com and I'll take a look
Bedhead
12-11-2001, 11:20 AM
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:
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=$userid");
This should be:
$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
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=$userid");
Bedhead
12-11-2001, 11:44 AM
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"
Bedhead
12-11-2001, 11:56 AM
That was it.
This is great!
Thank you for your quick responses.
I wish you all the best in the new year.
A small little problem on my site ...
this:
mail($bbuserinfo[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>"); ... don't happen.
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.
Bedhead
12-11-2001, 01:29 PM
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/user.php3?action=edit&userid=2164
hrmm...
try changing
awaydate=$awaydate
to
awaydate='$awaydate'
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/user.php3?action=edit&userid=2164
ok, try this:
change:
if ($awaydate!="") {
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
} else {
$awaydate="";
}
to
if ($awaydate!="") {
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
} else {
$awaydate="''";
}
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:
if ($awaydate!="") {
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
} else {
$awaydate="";
}
to
if ($awaydate!="") {
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
} else {
$awaydate="''";
}
And
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
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
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:
$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):
$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,
Find:
makeinputcode("IP Address","aipaddress",$user[ipaddress]);
AFTER it ADD:
// 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:
if ($posts=="") {
$posts=0;
}
BEFORE it ADD:
// Leave Away Message in Profile (v1.0)
if ($awaydate!="") {
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
} else {
$awaydate="";
}
// Leave Away Message in Profile (v1.0)
Find:
$DB_site->query("UPDATE user SET birthday='$birthday'
Change to (changes marked in high):
$DB_site->query("UPDATE user SET away=$away,awaydate=$awaydate,returndate='$returnd ate',awayreason='".addslashes(htmlspecialchars($awayreason))."',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/forums/admin/user.php?s=&action=edit&userid=1
Referer: http://210.49.170.7:81/forums/admin/user.php?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,
avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar
Evil_Incarnate
12-12-2001, 12:25 PM
thankya bira, and great hack btw
works a treat now...
squawell
12-12-2001, 12:31 PM
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/showthread.php?postid=206284#post206284 ) for the fix :)
squawell
12-12-2001, 01:09 PM
bira~~~thankz!!
now it's work!!
TheComputerGuy
12-12-2001, 10:37 PM
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/****/member.php?action=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...
mADmAX`
12-13-2001, 04:17 AM
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?
Nemesis77
12-13-2001, 05:37 AM
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'
mADmAX`
12-13-2001, 06:50 AM
It is checked, but is not working for me...
KuraFire
12-13-2001, 07:17 AM
Thanks Bira, I'm gonna add the admin bit to the hack, great work, I'll let ya know if someone goes wrong, if not, then I'll be very silently and very happy :)
Thanks a lot for a great hack! ^_^
Tarion
12-13-2001, 09:45 AM
an exelent hack, bira wonderfull work :)
Nemesis77
12-13-2001, 09:45 PM
[QUOTE]mADmAX & Nemesis77: Go to the Admin Control Panel -> Options -> Forum Home Page Options, and select 'yes' for 'Display logged in users on home page'
Maybe someone else will be able to tell you what should be checked. I don't use this option at all in postbit on my BB, so I don't know how to help you, sorry :o
Sadie Frost
12-14-2001, 01:50 AM
Hiya - great hack! It's only my second one, but it worked like a charm :)
Could someone please help me with a very stupid question - how do I add members' away status to what's displayed under the avatar?
:)
Shane
12-14-2001, 06:05 AM
"Excellent..."... Mongomery Burns
Tarion
12-14-2001, 08:20 AM
Bira: how can I get a complet list of the members who has marked as away??? like the staff list or in the memberlist with an extra link in the navbar.
Can you explane me how can i do that!
THX for this great hack.
Lesane
12-14-2001, 09:18 AM
[QUOTE]Originally posted by TheComputerGuy
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/****/member.php?action=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...
No lesane. It won't work.
He placed the Away SQL part AFTER the 'WHERE'. It will never work.
The instructions were to find a line like (cut for shortness):
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."', ........... ,usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'
And change it to (cut for shortness):
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."', ........... ,usergroupid='$bbuserinfo[usergroupid]' $awaysql WHERE userid='$bbuserinfo[userid]'
TheComputerGuy didn't copy and paste the entire line, he simply placed $awaysql in the WRONG location (after the WHERE). That's why he has errors, and removing the coma (which shouldn't exist there anyway) won't help.
It would help, if he made sure he installed things as required :D
Lesane
12-14-2001, 11:26 AM
hehe aight :D
TheComputerGuy, were you drunk or something? :D
[QUOTE]Originally posted by Tarion
Bira: how can I get a complet list of the members who has marked as away??? like the staff list or in the memberlist with an extra link in the navbar.
Can you explane me how can i do that!
THX for this great hack.
Lesane
12-14-2001, 12:59 PM
[QUOTE]Originally posted by bira
1) If you want an extra link in the memberlist's navbar, then open memberlist.php and find:
if ($what=="datejoined") {
$orderby="joindate";
$direction="DESC";
}
AFTER it ADD
if ($what=="away") {
$condition.="away='1'";
}
Lesane, that's not the only possible condition though. So the dot is necessary. It wasn't a mistake.
Lesane
12-14-2001, 03:13 PM
Strange because with the dot i receive this error:
Database error in vBulletin: Invalid SQL: SELECT COUNT(*) AS users
FROM user,userfield
WHERE 1=1away='1' AND
user.userid = userfield.userid
AND usergroupid NOT IN (1,3,4)
mysql error: Unknown column '1away' in 'where clause'
mysql error number: 1054
Date: Friday 14th of December 2001 04:04:42 PM
Script: /board/memberlist.php?what=away
Without the dot it works perfect :confused:
A-ha! That's cos it is missing the space AND space :D
if ($what=="away") {
$condition.=" AND away='1'";
}
Lesane
12-14-2001, 03:38 PM
haha :D
but it works good without the dot :p
well yes, because without the dot it diminishes the rest of the conditions, which means there's no need for an AND and spaces.
A dot is a connector.
$condition = 1;
echo $condition; // will output "1"
$condition .= 2;
echo $condition; // will output "12"
$condition = 2;
echo $condition; // will output "2"
Comprende? :D
Lesane
12-14-2001, 04:01 PM
haha, cool :cool:
Thanks, learned something day ;)
KuraFire
12-15-2001, 02:38 PM
Bira, your hack, albeit really nice, is killer to making a backup of a database. For me, at least.
I installed your hack, then later on I added the Admin Panel bit so that I could check everyone's status in the AP and change it, and then I took the test.
I made a backup dump through the Admin Panel, all settings to Yes (as the default is), saved it as vbulletin.sql - then I made a new directory (this is all on my personal computer, not online or anything), threw the files of vBulletin in there, installed it again (on a new database, completely empty, fresh install), added the files of all my hacks, installed the Away user hack again (ran the install_awayusers.php script) but didn't yet add the Admin Panel bit, then I went into phpMyAdmin and clicked on the new database with a fresh install of vB (but overwrote the files with the hacked php files from the already customized board where everything's working), and below the textfield "Run Queries on database ....:" I entered the location of the vbulletin.sql (the one where you're supposed to enter .sql files) and hit GO.
At first, it started inserting the dump file nicely into the database, but then the user table came and it quit at the second entry. Why not the first? The first is my own entry, which was on Away status for 10 or so days when I made the dump. The second entry wasn't. The input process errored out saying:
"MySQL says: column 'awaydate' cannot be NULL!"
Now, how can I fix this? If I look at the working database and working version where I installed this hack and many others, all the users that haven't put themselves on Away status (i.e. everyone except for myself, because this is an offline board only for hacking and preparing) all their values in the AWAYDATE column in the user table are NULL - but when I want to update the database with a backup dump, MySQL says that the value CANNOT be null!!
Please help!
OK, Kura
I looked into this and this is actually a bug in the database backup.
The away date is NULL by design but when you download the SQL file, it turns it into NOT NULL.
You will need to open your .sql file for the user table, and find:
away tinyint(1) NOT NULL,
awaydate int(10) unsigned NOT NULL,
returndate date DEFAULT '0000-00-00' NOT NULL,
awayreason varchar(200) NOT NULL,
And change it to (the highlighted stuff from above should be deleted):
away tinyint(1) DEFAULT '0' NOT NULL,
awaydate int(10) unsigned,
returndate date DEFAULT '0000-00-00',
awayreason varchar(200),
After that, you will have no problems.
I will report this bug on vBulletin.com
Cheers,
Bira
Hooper
12-15-2001, 03:43 PM
The hack is nice but my files are just to hacked up to install anymore without the hack installations that include line numbers. The installer doesn't show line numbers. No more installer hacks. Maybe someone could add line numbering to the installer proggie.
The hack is very nice though Bira. ;)
KuraFire
12-15-2001, 03:44 PM
Great, thanks, I will try this soon (watching a movie, when it's a break I will do this) and let you know what the outcome is. :)
Thank you :)
Hooper line numbers will not help you.
If code x was on line 100, then after you hacked your script it will be on line 108, then how would it help if I gave you line #100 in the installer?
Line numbers work ONLY on a very clean and non-hacked script.
Hooper
12-15-2001, 03:56 PM
[QUOTE]Originally posted by bira
Hooper line numbers will not help you.
If code x was on line 100, then after you hacked your script it will be on line 108, then how would it help if I gave you line #100 in the installer?
Line numbers work ONLY on a very clean and non-hacked script.
KuraFire
12-15-2001, 04:06 PM
Hooper, you're awfully demanding and picky, ya know that?
Line numbers are not at all useful with hacks. Hacks that say "find **example line** and ADD ABOVE that **hacked code line**" and the like are much better in this aspect, for no matter what line this will be at, you can simply find it and add to it the necessary changes.
Also, when a new version of vbulletin is released which adds about 60-80 lines above this line, the line numbers would be WAY off, but if you just search for the strings it doesn't matter.
[QUOTE]Originally posted by Hooper
I just will not install no more hacks that don't display line numbers.
KuraFire
12-15-2001, 04:35 PM
W3rd bira :)
Btw, it worked this time, I removed the three NOT NULL's and the dump installed sweetly over my empty install.
Only strange thing, however, was the fact (nothing to do with this hack btw) that... well, this:
I had two vbulletins running on my comp, the Couch and the Couch v.2. I only use the first one for installing hacks in preparation of my new sites and everything. The second one is only installed to simulate when I switch hosts and will have to insert a dumpfile into an empty (fresh) install.
Now, the dump-inserting worked, everything worked smoothly and all. But then I made a thread on the Couch v.2, and went to a site (also on my HD) that runs a query that lists all the threads from one specific forum. It listed the new thread. At first I was "Yay it works!" but then I realised, it was a Whole Different Database! But it STILL took the new thread!
So I checked the other Couch, the original one, and the new thread had appeared there as well.
So when i made a thread on ONE forum, it magically copied itself to the database of the OTHER forum. That database has a different name, a different mySQL user and a different mySQL password.
Any idea why on earth this happened??
are you sure you didn't overwrite config.php?
If you are running two databases, you gotta make sure you have two different config.php. That's the gateway to the db :)
KuraFire
12-15-2001, 04:48 PM
You're very correct.
I *initially* had a different config.php of course, with the new username and db-name and everything. But then I realised that I took the files from the vB221 zip, and thus was missing out on several files (install_awayusers.php being one of them) and I copied all the files from the first board, to the directory of the second board. And I forgot to exclude the config.php file for the DB-settings. Heh..
Thanks for pointing that out to me. :)
np, as long as you got it working :)
Hooper
12-15-2001, 05:13 PM
[QUOTE]Originally posted by bira
Who do you think you're punishing here?
For all I care, don't install a single hack. It's your bulletin board, not mine. I'm not even a user of your BB. I don't care what you do there.
I write hacks for my own Bulletin Board and I release them here for the sake of those who may have equal interest in them.
I do my best to provide a very clear and accurate installer.
Including line numbers will be supremely inaccurate and hazzardeous -- most people follow instructions to a T so if I tell them "find code X on line 100", they'll just jump to line 100 and if they don't find it there, they'll either come here complaining or simply overwrite whatever is in line 100.
If you are too inadequate to do a search on specific code as provided in the instructions, not even a line number will help you.
In any event, as I said, it's a free world. Do whatever you want, but don't think you're sanctioning me or any other hacker by making such ultimatums.
Crinos
12-16-2001, 10:12 AM
I have no problem with the way bira gives instructions for her hacks ... imho line numbers just make it more confusing if you already have several hacks installed in the same file (hence making them irrelevant) ... I usually ignore instructions that say "look at around lines 157 to 169" because more often than not the code to be changed is not there .... it "may" help you find tha range, but isn't it much faster to just do a Ctrl-F instead of dragging your scroll bar and "hunting" for it?
Line numbers won't be a problem if you're installing on a vanilla vbulletin board ...
I just will not install no more hacks that don't display line numbers. Yeah, that sounded a bit demanding ... but frankly, who cares if someone doesn't install it for just that reason ;) If someone has been hacking lots of forums for a long time, something as trivial as line numbers won't matter ;)
Hooper
12-16-2001, 04:45 PM
CRINOS,
"The hack is nice but my files are just to hacked up to install anymore without the hack installations that include line numbers. The installer doesn't show line numbers. No more installer hacks. Maybe someone could add line numbering to the installer proggie.
The hack is very nice though Bira. "
That is what I said.
Where did I once say anything about Bira's instructions not being fine? I didn't . Not once did I demand anything in this statement and if you want to read something more into what I wrote then fine. I merely wrote that my files are quite hacked up and that I wouldn't install no more hacks that didn't have line numbering. This statement is in regards to hacked up files and in no way should have been taken like it has. For crying out loud I said the hack was very nice. This must mean I like it. nO? And if I like it I must have it installed no????. Why didn't you read that into it?
Now if you can get something demanding out of this you most definitely are not reading what I wrote. Case closed.
Hooper, maybe you should have started a thread about it in the General Discussions forum?
I'll just say once again that your request is contradictory by nature. If your files are thoroughly hacked, then the line number will 100% be wrong.
You are also ignoring the fact that MY files are thoroughly hacked, in which case the line number I would give out would be wrong to start with.
Anyhow, I think that as a GENERAL suggestion to all hackers - if this isn't aimed at me personally - you should take this topic to the General Discussions forum, rather than debate it within a thread dedicated to a different topic, namely A specific hack.
JJR512
12-16-2001, 04:59 PM
[QUOTE]Originally posted by KuraFire
Hooper, you're awfully demanding and picky, ya know that?
Line numbers are not at all useful with hacks. Hacks that say "find **example line** and ADD ABOVE that **hacked code line**" and the like are much better in this aspect, for no matter what line this will be at, you can simply find it and add to it the necessary changes.
Also, when a new version of vbulletin is released which adds about 60-80 lines above this line, the line numbers would be WAY off, but if you just search for the strings it doesn't matter.
[QUOTE]Originally posted by JJR512
The "find and replace" method isn't perfect, either, because sometimes there is more than one occurance of the same line in one file.
Hooper
12-16-2001, 05:16 PM
[QUOTE]Originally posted by bira
Hooper, maybe you should have started a thread about it in the General Discussions forum?
I'll just say once again that your request is contradictory by nature. If your files are thoroughly hacked, then the line number will 100% be wrong.
You are also ignoring the fact that MY files are thoroughly hacked, in which case the line number I would give out would be wrong to start with.
Anyhow, I think that as a GENERAL suggestion to all hackers - if this isn't aimed at me personally - you should take this topic to the General Discussions forum, rather than debate it within a thread dedicated to a different topic, namely A specific hack.
Hooper
12-16-2001, 05:17 PM
[QUOTE]Originally posted by JJR512
But line numbers are good to include in case the code you're looking for has already been changed by another hack. So you will never find the code by searching for it. But if you have a line number, you can at least go to that line and look for something similar to the code you're supposed to find, and adapt the new hack as necessary.
I don't think this argument is one that can be clearly won one way or the other. It seems the best solution is to include both the line numbers and the search-for code.
KuraFire
12-17-2001, 07:10 AM
[QUOTE]Originally posted by Hooper
I have found that at times code isn't there at all when you go to do a search for it. It had been modified by another hack.
Tarion
12-17-2001, 10:06 AM
[QUOTE]Originally posted by bira
Hi Tarion,
that requires an extra condition - so it depends where you want it.
1) If you want an extra link in the memberlist's navbar, then open memberlist.php and find:
if ($what=="datejoined") {
$orderby="joindate";
$direction="DESC";
}
AFTER it ADD
if ($what=="away") {
$condition.=" AND away='1'";
}
The open the memberlist template and add a link to memberlist.php?s=$session[sessionhash]&what=away
2) if you want to add the away to the ADVANCED SEARCH in the member's list,
Find:
if ($postsupper!="") {
$condition.=" AND posts<'$postsupper'";
}
AFTER it ADD
if ($away=="1") {
$condition.=" AND away='1'";
} elseif ($away=="2") {
$condition.=" AND away='0'";
}
Open template memberlistsearch, and find:
<tr>
<td bgcolor="#F1F1F1"><normalfont><b>and Number of Posts is less than</b></normalfont></td>
<td bgcolor="#F1F1F1"><normalfont><input type="text" class="bginput" size="35" name="postsupper" value=""></normalfont></td>
</tr>
AFTER it ADD:
<tr>
<td bgcolor="#DFDFDF"><normalfont><b>and user is away or not</b></normalfont></td>
<td bgcolor="#DFDFDF"><normalfont><select name="away">
<option value=""></option>
<option value="2">user is NOT away</option>
<option value="1">user IS away</option>
</select></normalfont></td>
</tr>
JJR512
12-17-2001, 12:14 PM
Yes, those hacks do exist. They don't have to exist plentifully; all you need is one, that modified just one line that another later hack also wants to modify. One such very extensive hack is ethank's persistent mark forum read hack.
And yes, you can search for just a part of the line. The potential problem with that is that as you make your search less specific, the chances increase of you finding what you're searching for more than once. In that event, you can either look at the text around each hit, and see if it looks close enough to what you're supposed to be looking for that you can reasonably decide you've found it. Alternatively, line numbers would make that process a lot easier; you would just have to find the partial search terms at or near the specified line number.
Please understand, I am not saying that line numbers are the ultimate best solution. There are multiple ways for handling any situation here, and what might be best for you, might not be best for some (anybody feel like singing the theme song from Diff'rent Strokes? :D).
Hooper
12-17-2001, 12:33 PM
Amen JJ,
I'll sing different strokes with you! :D
ptbyjason
12-17-2001, 01:48 PM
I think this is a great hack, and I can't wait to use it. I ran into a problem installing it though. I am running version 2.03 and when I look in my usercp.php I cannot find any code that matches the two I am suppose to find. :confused:
Lesane
12-17-2001, 02:21 PM
Well, check again :p because i'm using also 2.0.3 and the code matched.
ptbyjason
12-17-2001, 02:59 PM
I've tried it several times now and I just tried it again. I have used my search command and I have even searched for just part of the string in case my code is messed up. The code is still the original without modification, so I don't know why it wouldn't be in there. I saw the code that you had help with on the first page for functions.php and I couldn't find the original code in the download nor the code bira suggested. Functions.php and usercp.php are the only ones that I am having problems with. Everything else was found easily.
Hi Bira
It is me, again :D
what can I do, I love your hacks :D
Is this hack compatable with tha Random Password hack.
I noticed this in the /root/member.php
$bbuserinfo[usergroupid]'$changepw $awaysql WHERE userid='$bbuserinfo[userid]'
is that the right order
Thanks
Lesane
12-17-2001, 03:19 PM
[QUOTE]Originally posted by ptbyjason
I've tried it several times now and I just tried it again. I have used my search command and I have even searched for just part of the string in case my code is messed up. The code is still the original without modification, so I don't know why it wouldn't be in there. I saw the code that you had help with on the first page for functions.php and I couldn't find the original code in the download nor the code bira suggested. Functions.php and usercp.php are the only ones that I am having problems with. Everything else was found easily.
ptbyjason
12-17-2001, 03:34 PM
Sure
In the usercp.php I can't find
*****
$sql="SELECT userid,username,invisible,lastactivity
*****
AND I can't find
*****
if ((!$buddy[invisible] or $bbuserinfo['usergroupid']==6) and $buddy[lastactivity]>$datecut) {
$onoff="on";
} else {
$onoff="off";
}
*****
In the functions.php I can't find (orginal install)
*****
if ($post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
*****
NOR (modified by bira on page 1)
*****
if ($post[sessionuserid]>0) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
*****
eva2000
12-17-2001, 04:04 PM
i'm just going through 'Bira only made' hacks today and wow !!!
Going to be adding some of these hacks right after christmas :D
Lesane
12-17-2001, 05:10 PM
[QUOTE]Originally posted by ptbyjason
Sure
In the usercp.php I can't find
*****
$sql="SELECT userid,username,invisible,lastactivity
*****
Right, thats this rule on 20:
$sql="SELECT DISTINCT session.lastactivity, user.userid,username,session.userid AS online,invisible,away
(i have added away on the end)
ptbyjason
12-17-2001, 05:25 PM
Ok, now that was what I needed. Thank you so much Lesane. Now last question before I change this. Since I have changed the code I was looking for, do I put the code in that is says in the original install or do I need to alter it in anyway?
Lesane
12-17-2001, 06:32 PM
Here are the instructions for the usercp.php code.
ptbyjason
12-17-2001, 07:25 PM
The whole database goes down and I get the following error when I follow the instructions:
Parse error: parse error in /business/bclapp/html/vbulletin/admin/functions.php on line 2103
Fatal error: Call to undefined function: getuserinfo() in /business/bclapp/html/vbulletin/admin/sessions.php on line 327
This is the code I put in from the for functions.php
// Leave Away Message in Profile (v1.0)
if ($post[away]=="1") {
eval("\$onlinestatus = \"".gettemplate("postbit_away")."\";");
} else {
if ($post[sessionuserid]>0) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
}
// Leave Away Message in Profile (v1.0)
Lesane, I am so sorry that I haven't gotten this down yet. I haven't had any trouble installing anything until this one.
Adding this:
functions.php line 2103
$DB_site->query("DELETE FROM post WHERE postid IN ($postids"."0)");
Sessions.php is still original.
ptbyjason
12-17-2001, 07:59 PM
D'oh figured it out. Sorry. Who would have thought placing a code after what it is suppose to replace in functions.php could cause the problem? jk :)
Thank you for your patience Lesane, I couldn't have done it without you.
Lesane
12-18-2001, 09:05 AM
Your welcome :), so it works fine now?
ptbyjason
12-18-2001, 12:19 PM
It works perfectly now Lesane. I couldn't be happier. :D
Tarion
12-18-2001, 01:46 PM
Hi Bira,
i have a little problem viewing my modifie_profile template, wenn i add an bithday, the day and the month of the birthday is also showing in the selectboxes of your hack, i tried to get it work but it doesn't.
here the template:
<tr>
<td bgcolor="{tableheadbgcolor}" colspan="2"><normalfont color="{tableheadtextcolor}" class="thtcolor"><b>Abwesenheitsinformation</b></normalfont> <smallfont color="{tableheadtextcolor}" class=thtcolor>Benutze diese Option um anderen Mitglieder deine Abwesenheit zu signalisieren</smallfont></td>
</tr>
<tr>
<td bgcolor="{secondaltcolor}"><b><normalfont>Abwesenheits Status</normalfont></b><br><smallfont>$awaystatus</smallfont></td>
<td bgcolor="{secondaltcolor}"><normalfont><input type="radio" name="away" value="0" $away0checked> Bin da <input type="radio" name="away" value="1" $away1checked> Bin abwesend</normalfont></td>
</tr>
<tr>
<td bgcolor="{firstaltcolor}"><b><normalfont>Abwesenheits Grund:</normalfont></b><br><smallfont>max. 200 Zeichen</smallfont></td>
<td bgcolor="{firstaltcolor}"><normalfont><input type="text" class="bginput" name="awayreason" value="$bbuserinfo[awayreason]" size="30" maxlength="200"></normalfont></td>
</tr>
<tr>
<td bgcolor="{secondaltcolor}"><b><normalfont>R?ckkehr Datum:</normalfont></b></td>
<td bgcolor="{secondaltcolor}">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td><smallfont><select name="awayday">
<option value="">Tag</option>
<option value="1" $day01selected>1</option>
<option value="2" $day02selected>2</option>
<option value="3" $day03selected>3</option>
<option value="4" $day04selected>4</option>
<option value="5" $day05selected>5</option>
<option value="6" $day06selected>6</option>
<option value="7" $day07selected>7</option>
<option value="8" $day08selected>8</option>
<option value="9" $day09selected>9</option>
<option value="10" $day10selected>10</option>
<option value="11" $day11selected>11</option>
<option value="12" $day12selected>12</option>
<option value="13" $day13selected>13</option>
<option value="14" $day14selected>14</option>
<option value="15" $day15selected>15</option>
<option value="16" $day16selected>16</option>
<option value="17" $day17selected>17</option>
<option value="18" $day18selected>18</option>
<option value="19" $day19selected>19</option>
<option value="20" $day20selected>20</option>
<option value="21" $day21selected>21</option>
<option value="22" $day22selected>22</option>
<option value="23" $day23selected>23</option>
<option value="24" $day24selected>24</option>
<option value="25" $day25selected>25</option>
<option value="26" $day26selected>26</option>
<option value="27" $day27selected>27</option>
<option value="28" $day28selected>28</option>
<option value="29" $day29selected>29</option>
<option value="30" $day30selected>30</option>
<option value="31" $day31selected>31</option>
</select></smallfont></td>
<td>
<td><smallfont><select name="awaymonth">
<option value="">Monat</option>
<option value="1" $month01selected>Januar</option>
<option value="2" $month02selected>Februar</option>
<option value="3" $month03selected>M?rz</option>
<option value="4" $month04selected>April</option>
<option value="5" $month05selected>Mai</option>
<option value="6" $month06selected>Juni</option>
<option value="7" $month07selected>Juli</option>
<option value="8" $month08selected>August</option>
<option value="9" $month09selected>September</option>
<option value="10" $month10selected>Oktober</option>
<option value="11" $month11selected>November</option>
<option value="12" $month12selected>Dezember</option>
</select></smallfont></td>
<td><smallfont><select name="awayyear">
<option value="">Jahr</option>
<option value="01" $year2001selected>2001</option>
<option value="02" $year2002selected>2002</option>
<option value="03" $year2003selected>2003</option>
<option value="04" $year2004selected>2004</option>
</select></smallfont></td>
</tr>
</table>
</td>
</tr>
and here the part of member.php i insert your code:
// Get referrals
if ($usereferrer) {
if ($backcolor=="#13486D") {
$backcolor="#1C5780";
$bgclass = "alt2";
} else {
$backcolor="#13486D";
$bgclass = "alt1";
}
$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 = "Unbekannt";
} 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.2)
// get extra profile fields
THX Bira
Sorry but the template is in german, i hope you understand this so far ;)
Tarion, yes, that was a mistake I made which FireFly commented about in the first page of this thread :)
You need to change all the $xxxxxselected> in the template to $xxxxxaway> (replace 'selected' with 'away').
Then, in member.php, find:
$dayname = "day".$returndate[2]."selected";
$$dayname = "selected";
$monthname = "month".$returndate[1]."selected";
$$monthname = "selected";
$yearname = "year".$returndate[0]."selected";
$$yearname = "selected";
And replace it with:
$dayname = "day".$returndate[2]."away";
$$dayname = "selected";
$monthname = "month".$returndate[1]."away";
$$monthname = "selected";
$yearname = "year".$returndate[0]."away";
$$yearname = "selected";
[QUOTE]Originally posted by Remi
Hi Bira
It is me, again :D
what can I do, I love your hacks :D
Is this hack compatable with tha Random Password hack.
I noticed this in the /root/member.php
$bbuserinfo[usergroupid]'$changepw $awaysql WHERE userid='$bbuserinfo[userid]'
is that the right order
Thanks
Tarion
12-19-2001, 09:04 AM
great bira, it works perfect now :) youre wonderfull and it's a very good hack.
THX for your fast support
oops, sorry Remi -- yes, that's the correct order :)
Thanks :)
the_sisko
12-22-2001, 03:30 PM
Just a small add on I created and want to share with you:
It's just a small CP add on which shows all away users.
To add it do the following:
In admin/index.php
FIND:makenavselect("Users");
Add above:makenavoption("Find away user","user.php?action=findaway");
In admin/user.php
FIND:cpfooter();
Add above:// ###################### Start findaway #######################
if ($action=="findaway") {
if ($orderby=="") {
$orderby="awaydate";
}
if ($limitstart=="") {
$limitstart=0;
} else {
$limitstart--;
}
if ($limitnumber=="") {
$limitnumber=99999999;
}
$users=$DB_site->query("SELECT user.userid,username,FROM_UNIXTIME(awaydate) AS awaydate,returndate,awayreason,away FROM user WHERE away = 1 ORDER BY $orderby $direction LIMIT $limitstart,$limitnumber");
$countusers=$DB_site->query_first("SELECT COUNT(*) AS users FROM user WHERE away=1");
$limitfinish=$limitstart+$limitnumber;
echo "<p>Showing records ".($limitstart+1)." to ".iif($limitfinish>$countusers[users],$countusers[users],$limitfinish)." of $countusers[users]. Click username to view forum profile.</p>";
doformheader("","");
echo "<tr class='tblhead'>";
echo "<td><p><b><span class='tblhead'>Name</span></b></p></td>";
echo "<td><p><b><span class='tblhead'>Options</span></b></p></td>";
echo "<td><p><b><span class='tblhead'>Away reason</span></b></p></td>";
echo "<td><p><b><span class='tblhead'>Away date</span></b></p></td>";
echo "<td><p><b><span class='tblhead'>Return date</span></b></p></td>";
echo "</tr>\n";
while ($user=$DB_site->fetch_array($users)) {
echo "<tr class='".getrowbg()."'>";
echo "<td><p><a href='../member.php?s=$session[sessionhash]&action=getinfo&userid=$user[userid]' target='_blank'>$user[username]</a> </p></td>";
echo "<td><p>".
makelinkcode("edit","user.php?s=$session[sessionhash]&action=edit&userid=$user[userid]")."
</p></td>";
echo "<td><p>$user[awayreason] </p></td>";
echo "<td><p>$user[awaydate] </p></td>";
echo "<td><p>$user[returndate]</p></td>";
echo "</tr>\n";
} // end while
echo "</table></td></tr></table></form>";
if ($limitnumber!=99999999 AND $limitfinish<$countusers[users]) {
doformheader("user","findaway");
makehiddencode("ausername",$ausername);
makehiddencode("awaydate",$awaydate);
makehiddencode("returndate",$returndate);
makehiddencode("awayreason",$awayreason);
makehiddencode("orderby",$orderby);
makehiddencode("direction",$direction);
makehiddencode("limitstart",$limitstart+$limitnumber+1);
makehiddencode("limitnumber",$limitnumber);
echo "<input type=submit value=\"Show Next Page\">";
}
}
Upload the two files and you will find a new link under Users: "Find away user ".
Thats all ;)
Not the best, but it works
hey the_sisko - long time no see!!!
You know, I was wondering where you were -- I never got the chance to thank you for the Links Directory hack :up: :up: :up:
Thanks for the add-on :)
user.php4?action=findaway
Not sure the 4 is required :D
the_sisko
12-22-2001, 03:53 PM
Thx bira,...;)
Changed post above with .php. Its my system running on .php4...I always forget to change it :D
Sadie Frost
12-22-2001, 05:44 PM
Great add-on! That will be so useful!
Could someone help me with what to put in the postbit template to display in their posts when people are away?
And did somebody say links directory hack? *goes off to search for that one*
lol
Bedhead
12-22-2001, 05:59 PM
Thanks the_sisko
Works great
Sadie the Links Directory hack can be found at https://vborg.vbsupport.ru/showthread.php?s=&threadid=12815
You can see a demonstration of it on my BB:
http://www.atlasf1.com/bb/links.php
Sadie Frost
12-22-2001, 07:33 PM
Thanks so much bira (that's a good one!)
:)
DelusionalMind
12-24-2001, 01:43 AM
gonna be installing this in a few :)
awesome hack. thanks a lot :) I'm sure this will be used frequently on my teen forum :) :up:
Parker Clack
12-25-2001, 06:03 PM
Bira:
I hope you don't mind but I have added a couple of things to the main script and the control panel script
Where you have:
// Leave Away Message in Profile (v1.0)
if ($away=="1") {
$awaysql = ",away='$away',awaydate='".time()."',returndate='".$awayyear."-".$awaymonth."-".$awayday."',awayreason='".addslashes(htmlspecialchars(censortext($awayreaso n)))."'";
} else {
$awaysql = ",away='0',awaydate='',returndate='',awayreason=''";
}
// Leave Away Message in Profile (v1.0)
in the member.php file change this to:
// Leave Away Message in Profile (v1.0)
if ($away=="1") {
$awaysql = ",away='$away',awaydate='".time()."',returndate='".$awayyear."-".$awaymonth."-".$awayday."',awayreason='".addslashes(htmlspecialchars(censortext($awayreaso n)))."'";
$showemail=0;
} else {
$awaysql = ",away='0',awaydate='',returndate='',awayreason=''";
$showemail=1;
}
// Leave Away Message in Profile (v1.0)
and then in the user.php file
where you have:
if ($awaydate!="") {
$awaydate="UNIX_TIMESTAMP('".addslashes($awaydate)."')";
} else {
$awaydate="";
}
just below this put
if ($away==1) {
$showemail=0;
} else {
$showemail=1;
}
The changes to the member.php file I highlighted and user.php file is just the add on.
Both will set the showemail option to either one or zero if they are away or back. That way people can't email them if they are away.
Parker
Parker,
The problem with your add-on is that it forces the change on the user, and without his knowledge.
Example: say you have showemail=0 by default. You set yourself away, it stays 0. You return, and it changes it to 1 without you knowing...
Likewise, if you WANT to continue getting e-mails while you're away, you're not gonna be able to, and you won't even know that it's disabled.
Cheers,
Bira
Parker Clack
12-25-2001, 09:26 PM
Bira:
Hmm.....I will have to work on this.
Thanks,
Parker
SirSteve
12-27-2001, 04:18 AM
This isn't a big deal but when a user is away and the Buddy List alt tag message says "User is Away-line"
The installation went well and I did all the manual changes by the letter. Yet I get the following error message when I try to access the admin panel in order to do the necessary template changes:
"Parse error: parse error in /home/*****/public_html/memberarea/admin/functions.php on line 242
Fatal error: Call to undefined function: getuserinfo() in /home/*****/public_html/memberarea/admin/sessions.php on line 108"
Dex
Shenlong
01-21-2002, 02:31 PM
mines just plainly not showing up.....heres a screenshot
http://teleblaze.com/asp/HackNotShowing.jpg
FUNKTION.PHP
Find
if ($post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
REPLACE that with:
// Leave Away Message in Profile (v1.2)
if ($post[away]=="1") {
eval("\$onlinestatus = \"".gettemplate("postbit_away")."\";");
} else {
if ($post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
}
// Leave Away Message in Profile (v1.2)
By this Code Pharsen Error in Funktions.php
Pleas Help
MFG
PS: Very God HAck
Joshua Clinard
01-22-2002, 05:04 AM
Bira, did you add all the addons, including the_sisko's cpanel addon to the zip?
Wolf42
01-22-2002, 01:45 PM
Thx, great hack, ...
but one question: What changes do I have to make in the "showgroups.php" to the forum-staff is away or not?
StarBuG
01-22-2002, 02:44 PM
I installed it and anything seems to work fine but now i recognised a problem!
After a users returndate he is still away!
No changes..
Hmm any suggestions would be nice :D
Greetings
StarBuG
But....
Admin CP editing a user gets this message
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 22nd of January 2002 06:43:14 PM
Script: http://buffy.phpwebhosting.com/forums/forums/admin/user.php?action=edit&userid=1
Referer: http://buffy.phpwebhosting.com/forums/admin/?
Could you tell me what I need to edit.. i tried the suggest you have earlier on page 5 of this thread, but it didn't seem to make a difference.
Cheers.
Wolf42
01-23-2002, 05:11 AM
[QUOTE]Originally posted by Russ
But....
Admin CP editing a user gets this message
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 22nd of January 2002 06:43:14 PM
Script: http://buffy.phpwebhosting.com/forums/forums/admin/user.php?action=edit&userid=1
Referer: http://buffy.phpwebhosting.com/forums/admin/?
Could you tell me what I need to edit.. i tried the suggest you have earlier on page 5 of this thread, but it didn't seem to make a difference.
Cheers.
Joshua Clinard
01-25-2002, 05:44 AM
I know this is a long thread, but can someone answer my question?
PhotoGenie
01-27-2002, 05:51 PM
I am having the same problem as a few others with the away icon not showing in post. Online status is on and everything else seems to be ok.. Ijust dont see the icon.. Great hack though.:)
PhotoGenie
01-29-2002, 12:55 PM
My mistake on the last error but now I'm getting this error when I go to user options at the bottom of members profile..
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=27
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 29th of January 2002 08:40:47 AM
Script: http://www.a2zautoforums.com/admin/user.php?s=&action=edit&userid=27
Referer: http://www.a2zautoforums.com/admin/index.php?s=&loc=user.php%3Fs%3D%26action%3Dedit%26userid%3D27
I noticed a couple of other post with the same problem. Has anyone created a fix yet or figured out how to fix this?
Thanks:)
Please disregard this post the problem was the coma after:
FROM_UNIXTIME(awaydate) AS awaydate
was missing. Hasn't been updated in the install script.
PhotoGenie
02-01-2002, 03:00 AM
I upgraded to 2.2.2 and tried twice install this hack twice. I backed up my php files before i started installing the hack so I had fresh files each time. I couldn't get anything to show at all anywhere. I know I'm seeing 2.2.2 at the beginning of this post, lol.. I managed to get it installed on 2.2.1 and it worked perfectly.. Its a real nice addition. Just not for me right now.:(
Linus
02-01-2002, 11:48 AM
[QUOTE]Originally posted by PhotoGenie
My mistake on the last error but now I'm getting this error when I go to user options at the bottom of members profile..
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=27
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 29th of January 2002 08:40:47 AM
Script: http://www.a2zautoforums.com/admin/user.php?s=&action=edit&userid=27
Referer: http://www.a2zautoforums.com/admin/index.php?s=&loc=user.php%3Fs%3D%26action%3Dedit%26userid%3D27
I noticed a couple of other post with the same problem. Has anyone created a fix yet or figured out how to fix this?
Thanks:)
Please disregard this post the problem was the coma after:
FROM_UNIXTIME(awaydate) AS awaydate
was missing. Hasn't been updated in the install script.
Linus
02-01-2002, 12:02 PM
[QUOTE]Originally posted by bira
sorry, try adding a coma , after "FROM_UNIXTIME(awaydate) AS awaydate"
PhotoGenie
02-01-2002, 10:04 PM
Yep Linus.. My problem too.. I corrected it the first time I installed it but the second time I had forgotten it... Seems thats really the only problem in the installer.. Mine is working now though :) .. I really like this hack.
Tim Wheatley
02-02-2002, 12:42 AM
Database error in vBulletin 2.2.2:
Invalid SQL: UPDATE user SET birthday='1979-6-21',signature='Tim Wheatley,
Racesim Central Administrator,
Experienced Finest Cider Taster.
\"<a href=\"http://forum.racesimcentral.com/showthread.php?s=&threadid=13465\">Oh the gingerbread men are comming for me take me away mother. lock me in the basement and feed me pins.</a>\" - Guvnor, 22.JAN.02<br>',customtitle='0',usertitle='Administrator',email= 'tim.wheatley1@ntlworld.com',parentemail='',coppau ser='0',homepage='http://forum.racesimcentral.com/showthread.php?s=&threadid=15014',icq='10872803',a im='',yahoo='',usergroupid='6' ,away='0',awaydate='',returndate='',awayreason='' WHERE userid='2',country='England' WHERE userid='2'
mysql error: You have an error in your SQL syntax near 'country='England' WHERE userid='2'' at line 1
mysql error number: 1064
Date: Saturday 02nd of February 2002 03:42:33 AM
Script: http://forum.racesimcentral.com/member.php
Referer: http://forum.racesimcentral.com/member.php?s=&action=editprofile
Any ideas?
Tim Wheatley
02-02-2002, 12:45 AM
Obviously it's this line, and it's this hack and the 'country' hack conflicting, but I have NO idea how I need to put them to have them both functioning... anyone?
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='".addslashes($signature)."',cust omtitle='$customtitle',usertitle='".addslashes($customtext)."',email='".addslash es(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($pare ntemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($hom epage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlsp ecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',usergroupi d='$bbuserinfo[usergroupid]' $awaysql WHERE userid='$bbuserinfo[userid]',country='".addslashes($country)."' WHERE userid='$bbuserinfo[userid]'");
pestilence
02-02-2002, 05:15 AM
Great hack bira so usefull to my forums since they are for a gaming clan..thanx :)
PhotoGenie
02-03-2002, 01:16 PM
[QUOTE]Originally posted by Tim Wheatley
Database error in vBulletin 2.2.2:
Invalid SQL: UPDATE user SET birthday='1979-6-21',signature='Tim Wheatley,
Racesim Central Administrator,
Experienced Finest Cider Taster.
\"<a href=\"http://forum.racesimcentral.com/showthread.php?s=&threadid=13465\">Oh the gingerbread men are comming for me take me away mother. lock me in the basement and feed me pins.</a>\" - Guvnor, 22.JAN.02<br>',customtitle='0',usertitle='Administrator',email= 'tim.wheatley1@ntlworld.com',parentemail='',coppau ser='0',homepage='http://forum.racesimcentral.com/showthread.php?s=&threadid=15014',icq='10872803',a im='',yahoo='',usergroupid='6' ,away='0',awaydate='',returndate='',awayreason='' WHERE userid='2',country='England' WHERE userid='2'
mysql error: You have an error in your SQL syntax near 'country='England' WHERE userid='2'' at line 1
mysql error number: 1064
Date: Saturday 02nd of February 2002 03:42:33 AM
Script: http://forum.racesimcentral.com/member.php
Referer: http://forum.racesimcentral.com/member.php?s=&action=editprofile
Any ideas?
Lucky
02-05-2002, 04:09 AM
Works awesome with 2.2.2
Just Installed the Hack. And It seems all worked fine, except for the fact that for some reason in posts where it should show the Pic if member is away it shows nothing.
I checked every thing and seems everything was setup right. The rest of it works fine, can set away in UserCP and it sets and if PM is sent it sends the auto reply. So it seems everything else is working.
Just nothing shows under the Avatars in posts..... Any clues?
Thanks though
PhotoGenie
02-05-2002, 01:43 PM
Read back a few post about the missing coma, that will fix it for you..
Wolf42
02-07-2002, 05:07 PM
[QUOTE]Originally posted by Wolf42
Thx, great hack, ...
but one question: What changes do I have to make in the "showgroups.php" to the forum-staff is away or not?
PhotoGenie
02-10-2002, 10:39 PM
Great Hack.. Only problem I seem to have is everytime I go through members on the main page to edit user options I find an away since date in their options of 1969-12-31 18:00:00 .. I have no idea where its coming from but I have to remove it before I can save anything or I get errors.. Does anybody know what might be causing this.. Other than that it works perfect.. Thanks for a great hack!
Getting these two errors:
Parse error: parse error in /home/teenaged/public_html/admin/functions.php on line 810
Fatal error: Call to undefined function: vbsetcookie() in /home/teenaged/public_html/admin/sessions.php on line 181
Wolf42
02-14-2002, 07:37 AM
[QUOTE]Originally posted by Tim Wheatley
Obviously it's this line, and it's this hack and the 'country' hack conflicting, but I have NO idea how I need to put them to have them both functioning... anyone?
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='".addslashes($signature)."',customtitle='$customtitle',usertitle='".addslashes($customtext)."',email='".addslashes(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',usergroupid='$bbuserinfo[usergroupid]' $awaysql WHERE userid='$bbuserinfo[userid]',country='".addslashes($country)."' WHERE userid='$bbuserinfo[userid]'");
tanster
03-13-2002, 04:00 AM
Being new to vBulletin (just got it installed last month), I have to admit I was darn well terrified getting through that long list of manual code changes -- lol, I barely breathed until I was finished! :D
But your instructions were impeccable and the feature is fantastic.
Thanks so much! My users are going to love this.
:) Jennie
Harryli
03-21-2002, 11:32 PM
I have a Problem, using 2.2.4
In admin/user.php there is no
$DB_site->query("UPDATE user SET birthday='$birthday'
just a
$DB_site->query("UPDATE user SET birthday='$birthday',options='$options',usergroupi d='$usergroupid',username='".a ddslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlsp ecialchars($email))."',styleid='$userstyleid',parentemail='".addslashes(htmlspec ialchars($parentemail))."',coppauser=$coppauser,homepage='".addslashes(htmlspeci alchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))." ',signature='".addslashes($signature)."',adminemail=$adminemail,showemail=$showe mail,invisible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$cu stomtitle,joindate=$joindate,cookieuser=$cookieuse r,nosessionhash=$nosessionhash ,daysprune='$daysprune',lastvisit=$lastvisit,lasta ctivity=$lastactivity,lastpost =$lastpost,posts='$posts',timezoneoffset='$timezon eoffset',emailnotification=$em ailnotification,receivepm='$receivepm',emailonpm=' $emailonpm',ipaddress='".addsl ashes($aipaddress)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid");
so I changed it to
$DB_site->query("UPDATE user SET away='$away',awaydate=$awaydate,returndate='$retur ndate',awayreason='".addslashe s(htmlspecialchars($awayreason))."',birthday='$birthday',options='$options',user groupid='$usergroupid',username='".addslashes(htmlspecialchars($ausername))."'$p wdinclude,email='".addslashes(htmlspecialchars($email))."',styleid='$userstyleid ',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser=$coppau ser,homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htm lspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".ad dslashes(htmlspecialchars($yahoo))."',signature='".addslashes($signature)."',adm inemail=$adminemail,showemail=$showemail,invisible =$invisible,usertitle='".addsl ashes($usertitle)."',customtitle=$customtitle,joindate=$joindate,cook ieuser=$coo kieuser,nosessionhash=$nosessionhash,daysprune='$d aysprune',lastvisit=$lastvisit ,lastactivity=$lastactivity,lastpost=$lastpost,pos ts='$posts',timezoneoffset='$t imezoneoffset',emailnotification=$emailnotificatio n,receivepm='$receivepm',email onpm='$emailonpm',ipaddress='".addslashes($aipaddress)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid");
but the Birthday now is stuck at 01.01.1970...
i installed and everything appears to work fine but it won't show the away thing in the user cp under "profile"? ideas? tips? thanks
never mind...got it :) nice hack
I'm having a problem, I didn't install this hack, but I uploaded that file to my file manager...after I did that I can't get into my CP.
Warning: Cannot add header information - headers already sent by (output started at /home/xxxbo/public_html/admin/sessions.php:399) in /home/xxx-bo/public_html/admin/global.php on line 136
Warning: Cannot add header information - headers already sent by (output started at /home/xxx-bo/public_html/admin/sessions.php:399) in /home/xxx-bo/public_html/admin/global.php on line 162
Hang on a sec
and then it brings me back to the login page...
Any ideas on what's wrong??
BlueWolf
03-23-2002, 05:04 PM
I have a Problem, using 2.2.4 also!
about 3 files did not have the code requested to be change...
Can you fix, I really like to have this hack, is very interesting.
members.php
functions.php
admin.php
*rolls eyes* all it takes is some common sense
google54
03-24-2002, 01:56 PM
i get this wrong
Fatal error: Call to undefined function: gettemplate() in /home/opticacr/public_html/vbulletin/upload/member.php3 on line 324
what have i done for fault ?
google54
03-24-2002, 02:02 PM
my member.php3 looks like this
} else {
$awaystatus = "select whether you are away or not";
$away0checked = "checked";
}
eval("\$awaytext = \"".gettemplate("modifyprofile_away")."\";");
eval("dooutput(\"".gettemplate("modifyprofile")."\");");
// ############################### start update profile ###
Bira I Installed this hackand I get the message when I try to edit my users in the CP, (Im kinda new at vbulletin)
Database error in vBulletin Control Panel 2.2.4:
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=10
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: Monday 25th of March 2002 03:42:38 PM
Harryli
03-27-2002, 11:26 PM
Bump :D My Users are still set to 1970... is it possible that it has something to do with the above I noted??
69-FLy-gUy
03-28-2002, 06:47 AM
i am having the same proibem that nicksaunders had. anyone help?
Ignite
03-31-2002, 10:24 PM
i coudn't find the getinfo template or the modifyprofile template*
*EDITED*
Ok, this really screwed up my Admin CP, I cant even acess somethings now. How can i unistall it the link at the php doesnt work. This is killing my site.
Ignite
03-31-2002, 10:41 PM
ok, now i am so pissed. I can't even access my Admin CP, at all. I really really need somones help now. THIS IS URGENT! I HAVE to be able to access my admin CP. Please help me. I really really really need it.
Ignite
03-31-2002, 11:21 PM
please I despartly need help
Ignite
04-01-2002, 12:28 AM
can someone please tell me how to uninstall this thing?
Ignite
04-01-2002, 01:59 AM
if no one knows, can you tell me who does, I can't express the importance of this, how would you like to be w/o access ro you Admin CP???
Ignite
04-02-2002, 04:20 AM
Ok, I fixed my old problem but now I have a new one.
The icon that show if the user is away or not is to the left to the "profile", "pm", "email", "www", "search" & "buddy" icon instead of in the correct box that has the name and stuff in it.
69-FLy-gUy
04-02-2002, 07:14 AM
did you upload the image
Ignite
04-02-2002, 07:05 PM
yeah, but its on the wrong side....
Birdie501
04-06-2002, 01:52 PM
Hi,
did somebody install this hack on version 2.2.5?
I did and get an parse error in member.php on line (about) 1370!
Can somebody help me?
Thanks.
Regars
Birdie501
Birdie501
04-06-2002, 02:08 PM
Hi,
i found the error:
In the installation instructions you should change step 4 in member.php
You have to insert the code not after
eval("\$referrals = \"".gettemplate("getinfo_referrals")."\";");
}
but after:
eval("\$referrals = \"".gettemplate("getinfo_referrals")."\";");
}
else {
$referrals = '';
}
so that it looks like this
eval("\$referrals = \"".gettemplate("getinfo_referrals")."\";");
}
else {
$referrals = '';
}
// Leave Away Message in Profile (v1.2)
if ($userinfo[away]=="1") {
$sincedate = vbdate($dateformat, $userinfo[awaydate]);
if ($userinfo[returndate]=="0000-00-00") {
$returndate = "Unbekannt";
} 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.2)
Regards
Birdie501 :)
Birdie501
04-06-2002, 02:55 PM
Hi,
i just found another error: in Admin Cp if i want to change a template it shows this error:
Warning: Missing argument 7 for makechoosercode() in /homepages/test/admin/adminfunctions.php on line 312
????????
What to do?
Thanks!
ariaforums
04-10-2002, 07:40 AM
Well the hack works OK for the users but Im getting this error when I tyr to change user stuff in the Admins CP:
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=36
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
cityofangelus
04-19-2002, 09:42 AM
Hi all
Can someone tell me if this hack is OK with 2.2.5 as I keep getting a parse error in member.php on line 1383
I have installed this on older versions without any problems and I have tried to go through the upgrade three times and still the same parse error..
Can someone help me out
Thanks
Lucy
cityofangelus
04-19-2002, 09:57 AM
Ok I have sorted it...
Worth pointing out that the mistake was in the install script though it told me to enter the last change in the member.php in the wrong place..
Step 4 of 4 in the member PHP told me to add the code here:
eval("\$referrals = \"".gettemplate("getinfo_referrals")."\";");
}
It needed to be after:
eval("\$referrals = \"".gettemplate("getinfo_referrals")."\";");
} else {
$referrals = '';
}
Just though I would let you know about that :D
Lucy
jjj0923
04-21-2002, 03:50 PM
this is a great hack. I have it installed and love it.
I use the Online/Offline hack so I had to change the _away template to display the word "Away".
One thing that would be really nice is to be able to also display "Return Date" under "Away".
Is there an easy way to get index.php to evaluate $returndate in the event that the date is not 'unknown'????
This would be great.
thanks in advance.
- jeff
jjj0923
04-22-2002, 06:29 PM
I'm moving this one back to the top. I spend a number of hours this weekend onyl to come up empty handed. I REALLY want to show the date of return on the thread screen (showthread.php). I have code that retrieve the date of return and will display it properly via an echo from index.php or functions.php and place the date of return in a variable called $returningdate but I'll be darned if I can get it to show up in the left <td> of the postings screen. Will somebody please help me out?
thanks
- jeff
tkeil69575
04-24-2002, 09:17 AM
hi bira - nice hack, got it working perfectly for 2.2.5. Just, had an Idea. Wouldnt it be nice if the admin got a mail saying that a user has switched his/her status to "away". Any ideas on how I could implement that?
regards Tina
rascal
04-24-2002, 11:58 AM
Got this error
Parse error: parse error in www\member.php on line 1390
Anyone can assist?
Attached is the file.
jjj0923
04-24-2002, 02:50 PM
rascal - your problem is that you were supposed to replace lines 1390- 1392 with the new code and you inserted the new code instead.
delete lines 1390-1392 and it will work (assuming you did not make any other mistakes installing this hack code).
rascal
04-24-2002, 05:29 PM
Got it.
Thanks jj!
tanster
04-26-2002, 07:25 PM
Hello,
I'm not sure when this started happening, but one of my users found this problem recently -- the 'return date' is one day behind.
1. Go to 'Edit Profile' and choose that I'm away, enter a reason, and choose the 'return date' to be 6/21/02.
2. Save the changes.
3. If I then display my profile, it shows all the 'away' information correctly except the return date, which appears as 6/20/02.
Do you have any ideas on how to troubleshoot this? Should I uninstall and reinstall?
Thanks for any insight you can provide!
:) Jennie
bandersen
04-27-2002, 05:06 PM
Nice hack - I installed it! I am getting a parse error in line 1496, member.php. Hope someone can help. Most likely its a minor thing I do not see myself!
I am on 2.2.5.. I have read the thread here and checked off the error for 2.2.5 and the other errors (they were fixed already in my download), included the comma etc. I can access everything in the Admin Panel, but when I enter usercp and click on change profile or change option... that parse error shows in the member.php.
I have attached the file - some of it. Anyone have an idea....
Thanks!!
ps. in the PHP Editor I get this error message:
Parse error: parse error, unexpected $ in A:\member on line 1496
Boofo
04-28-2002, 11:09 AM
jjj0293,
The hack I got says that you are supposed to INSERT the code above that point, not replace it. I had the same problem and I just moved the following code above the hack and it took care of the parse error.
else {
$referrals = '';
}
That won't mess anything up will it? I can't see how the referrals would work without it.
Boofo
04-29-2002, 10:08 PM
I installed this hack and it is working fine now except that it shows 1 day off in the profile for what was picked in the options. Also, you can pick Feb 31 which will take it to mar 3 in the display.
bandersen
05-04-2002, 11:58 AM
Please help someone...
I get a parse error message "unexpected $" in my member.php (when running it in the PHP Editor). In the browser it just says.. parse error. In the last line... no where near the installed code. Everything worked ok before this.
I am on 2.2.5... and I did see the error in the install for that.
Did anyone else get this message? No new members here until this is fixed....
bandersen
05-04-2002, 12:59 PM
I figured it out. Had to place a } in between two of the installs... as they came next to each other. At least on my member.php ( I have the store hack in there too).
Edit... nope.. something else happend... If I enter the user profile... I have lost all the data filled in there... and trying to submit something I end up on a blank member.php page. When I look at a thread....I do not see the "username" displayed all nice and clean... but the full description of the "Cutom User Text: this is the description of the..........".
I revert back to the "unexpected $"....
I really need some help on this one, please :(
Edit: I redid the member.php from the original file... went into Admin and manually changed my own settings back to normal... everything seem to work now!
Ihsahn
05-13-2002, 01:59 PM
[QUOTE]Originally posted by tanster
Hello,
I'm not sure when this started happening, but one of my users found this problem recently -- the 'return date' is one day behind.
1. Go to 'Edit Profile' and choose that I'm away, enter a reason, and choose the 'return date' to be 6/21/02.
2. Save the changes.
3. If I then display my profile, it shows all the 'away' information correctly except the return date, which appears as 6/20/02.
Do you have any ideas on how to troubleshoot this? Should I uninstall and reinstall?
Thanks for any insight you can provide!
:) Jennie
Ihsahn
05-15-2002, 02:12 PM
nevermind i found the mistake ... :)
Boofo
05-15-2002, 04:17 PM
What mistake did you find to fix it?
Ihsahn
05-16-2002, 11:05 AM
Mistake: "the 'return date' is one day behind"
Solution: i just change my Start of the week & my Time offset and it's ok ...
That's all ...
/Ihsahn
Highlander
05-17-2002, 05:38 AM
Hi,
i just downloaded this cool hack, but in some threads i read to change some codes in some files...and when i open this attachment..there is no installing instruction..only two files..(install_awayuser.php + away.gif)..so i just typed in my browser this yxz.php..but i get an parse error on line 98..he dont want to make me happy...i just cant install this hack..maybe someone knows what is wrong..i get the portal installed too..maybe there is something wrong !
scsa20
05-17-2002, 06:09 AM
just upload install_awayuser.php to your admin folder then go to www.yoursite.com/yourforums/admin/install_awayuser.php then follow the instruction after that, it should be easy after words ;)
Highlander
05-17-2002, 09:53 AM
i did so..but i got error on line blabla .. i think it was the 98..
Arjun
05-17-2002, 06:00 PM
where does the script show the away image?
GOD-Dblade
05-18-2002, 03:38 AM
bad ass hack...good job
Keyser S?ze
05-19-2002, 02:22 AM
having a problem, i got lesanes store installed and the newthread/new reply gets messed up when i replace that past, so what code would i use to use both?
sorry if this has been asked before, but 232 replies is alot :p
thanks
Mone'
05-30-2002, 03:06 AM
Great hack bira just installed on vb 2.2.6 and is working so well :)
( thx "cityofangelus" for pointing the installer mistake )
Keyser S?ze
05-31-2002, 03:37 PM
[QUOTE]Originally posted by IceMalee
having a problem, i got lesanes store installed and the newthread/new reply gets messed up when i replace that past, so what code would i use to use both?
sorry if this has been asked before, but 232 replies is alot :p
thanks
Keyser S?ze
06-01-2002, 04:12 AM
cannot get this to work for some reason, i click on "edit profile" and it acts like its goig to work, i see the profile, but then it jumps to a dead screen with nothing on it
anyone up late and want to help me out?
-update- on another style, it refreshes itself like every 3 secs,
Boofo
06-01-2002, 06:58 PM
How would you do this for a memberlist online status column?
[QUOTE]Originally posted by Wolf42
Ok, I got it for myself :D
Find $templatesused="postbit_online,postbit_offline,showgroups,showgrou ps_groups,showgroups_adminbit,postbit_sendpm,showg roups_bit,showgroups_forumbit,showgroups_forumspli t,postbit_avatar";
and replace with $templatesused="postbit_online,postbit_offline,postbit_away,showgr oups,showgroups_groups,showgroups_adminbit,postbit _sendpm,showgroups_bit,showgroups_forumbit,showgro ups_forumsplit,postbit_avatar";
Find if ($user['lastactivity'] > $datecut and !$user['invisible'] and $user['lastactivity'] != $user['lastvisit']) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
an replace with if ($user[away]=="1") {
eval("\$onlinestatus = \"".gettemplate("postbit_away")."\";");
} else {
if ($user['lastactivity'] > $datecut and !$user['invisible'] and $user['lastactivity'] != $user['lastvisit']) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
}
Find // get administrators & super moderators ************************************************** ********
$users = $DB_site->query("
SELECT
$locationfieldselect usergroup.title, user.username, user.userid, user.invisible, user.receivepm,
user.usergroupid, user.lastactivity, user.lastvisit
and replace with // get administrators & super moderators ************************************************** ********
$users = $DB_site->query("
SELECT
$locationfieldselect usergroup.title, user.username, user.userid, user.invisible, user.receivepm,
user.usergroupid, user.lastactivity, user.lastvisit,user.away
Find // get moderators ************************************************** ********
$users = $DB_site->query("
SELECT
$fieldselect forum.forumid, forum.title AS forumtitle,
user.username, user.userid, user.invisible, user.receivepm, user.lastactivity, user.lastvisit
and replace with // get moderators ************************************************** ********
$users = $DB_site->query("
SELECT
$fieldselect forum.forumid, forum.title AS forumtitle,
user.username, user.userid, user.invisible, user.receivepm, user.lastactivity, user.lastvisit,user.away
I just added user.away twice, added postbit_away in templatesused and modified the code like the funktions.php.
It is working well on my board.
Boofo
06-01-2002, 07:07 PM
here's how my private autoreply looks. Can someone please help me figure out why it is doing this?
Auto Reply: RE: RE: Gender
Hi Boofo,
I have been away since Today (GCSE Exams ) and will read your message when I return on Jun 18, 2002.
[size=1 ]This is an auto-reply generated by the bearfacts2.com Forum Messaging System.[/size ]
I had to add spaces just before the ] because the code wouldn't show right in here. In the message, there is no spaces before the last bracket. And also, if I try to take the space out between the awaymessage and the ) I get a parse error when I send a message. What have I got set wrong on my site that won't let the size function work in the message? The color function works fine.
Boofo
06-01-2002, 07:18 PM
Can someone please help me add the ability to have the away status icon show in the privmsg template? Here is the code I need to edit from the private template.
unset($onlinestatus);
if ($post['lastactivity'] > $datecut and !$post['invisible'] and $post['lastvisit'] != $post['lastactivity']) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
I want it to show in private messages like it does in the postbit.
Keyser S?ze
06-01-2002, 09:43 PM
this was working fine for about a hour, i didnt do a thing, then without me doing anything stopped working again
same problem
aidler
06-02-2002, 09:54 PM
OK, great hack. But why isn't there a detailed explanation what has chanced so one can do it manually. I upgraded to 2.2.6 and now I can't reintegrate the modifications for this hack into my templates because I don't know the necessary modifications. Now what??
Keyser S?ze
06-03-2002, 12:08 AM
u know i wanted the same thing, because i dont really like these auto installers for the simple reason of if there is a problem, it makes it hard to hunt down, so i made this, its just a txt copy of the installer
now let me be clear, all i did was copy/paste in the right spots, i didnt make this in any way, all credit goes to bira
scsa20
06-03-2002, 12:35 AM
[QUOTE]Originally posted by aidler
OK, great hack. But why isn't there a detailed explanation what has chanced so one can do it manually. I upgraded to 2.2.6 and now I can't reintegrate the modifications for this hack into my templates because I don't know the necessary modifications. Now what??
Boofo
06-03-2002, 12:39 AM
But isn't the code different in some spots that make it harder to compare? I have almost 60 hacks installed and it would scare the heck out of me to try and compare anything. That is the only reason I haven't upgraded. I would upgrade in a minute if I knew I wouldn't have to re-install my hacks. :)
[QUOTE]Originally posted by scsa20
before I upgraded mine, I used Beyond Compare to move over all my hacks :D
Smoothie
06-06-2002, 07:58 AM
Xcellent hack! Long thread here to read thru all the extras, but well worth it.
Boofo
06-06-2002, 11:47 AM
How would you add the away status to the member listing itself?
[QUOTE]Originally posted by Tarion
THX Bira wonderfully :) it works perfect.
chr@nox
06-07-2002, 07:52 PM
w00t...great hack m8!!
many thanks :)
[update] WORKS GREAT
thebigboss
06-09-2002, 09:06 PM
I installed this hack after I seen it working at Bane's site, talkloud.
The problem I have, is any user who date of birth is before 1970 has there birthday set to 1 january 1970 in the members under there details. If the year is omitted, the day and month are correct.
I don't mind a couple of years knocked off, but theres an awfull lot of oldies on my site born 1 January 1970 :)
Any help would be appreciated, thanks in advance.
(Will post if I find the fix, as I noticed another member posted the same problem a few pages back and I've read this thread 4 times now and can't bring myself to searching through it again tonight) :laugh:
Tarion
06-09-2002, 09:22 PM
[QUOTE]Originally posted by Boofo
How would you add the away status to the member listing itself?
Boofo
06-09-2002, 09:27 PM
Thanks, Tarion, but I already have it in those 2 places. I wanted to put it in the meberlist itself (next to the name column). I also want it to show up in the private messages, if I can. :)
[QUOTE]Originally posted by Tarion
look at Post 92 and 93 there is the instructions to do that
https://vborg.vbsupport.ru/showthread.php?postid=206810#post206810
thebigboss
06-09-2002, 09:59 PM
I just checked the profiles on my live site and it doesn't have this hack installed.
The users who's birthdays are before 1970 (1969 and before) are all showing there DOB as 1 January 1970, so its over to vbulletin.com for me :)
I apologise for any chaos :ermm:
Tarion
06-10-2002, 10:35 AM
sorry but with that feature i can't help you. I can coding PHP but in VB my knowlege is over, but i hope you found someone who can help you with this problem.
[QUOTE]Originally posted by Boofo
Thanks, Tarion, but I already have it in those 2 places. I wanted to put it in the meberlist itself (next to the name column). I also want it to show up in the private messages, if I can. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.