Prophet2002
09-02-2002, 12:24 AM
This is such a dumb problem i'm embarrest to post. I had the online/offline hack installed, everything was working great, untill I installed another hack that replaced this line in
showthread.php
$postbits .= getpostbit($post);
it replaces it will a whole bunch of code, but the part i'm concerned with is
if ($post[userid]!=0) {
if ($showonline) {
unset($onlinestatus);
if ($post[sessionuserid]>0) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
}
After replacing that code the online/offline hack no longer works (doesnt show anything). I was able to get it half way working by replacing the above code with a similar bit of code from
admin/functions php
if ($post[userid]!=0) {
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")."\";");
}
When i use this second bit of code. It does show online and offline BUT everyone shows up as online unless they have the "dont show online" option checked in there user optoins (in which case they show offline even if they are online). so anybody got any idea where i'm going wrong here?
showthread.php
$postbits .= getpostbit($post);
it replaces it will a whole bunch of code, but the part i'm concerned with is
if ($post[userid]!=0) {
if ($showonline) {
unset($onlinestatus);
if ($post[sessionuserid]>0) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
}
After replacing that code the online/offline hack no longer works (doesnt show anything). I was able to get it half way working by replacing the above code with a similar bit of code from
admin/functions php
if ($post[userid]!=0) {
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")."\";");
}
When i use this second bit of code. It does show online and offline BUT everyone shows up as online unless they have the "dont show online" option checked in there user optoins (in which case they show offline even if they are online). so anybody got any idea where i'm going wrong here?