Previous Thread
Next Thread
Print Thread
Rate Thread
~;
$ML_online_found++;
}
}
if (!$ML_online_found) {
print qq~~;
}


That is the code used to either display the Online .GIF or leave the 'Online' column blank; depending on their current status.

So I tried to copy that code over to my public_topic_page.pl and replace the print qq~... lines to $this_online = qq(... then just toss $this_online wherever I wanted the indicator to show...and this actually works; kinda.

In many other hacks, you would just define something like

if ($whatever = 'yes') {
$this_blah = "Status: Online";
} else {
$this_blah = "Status: Offline";
}

But when I do this here (using the if statement I took from public_memberlist.pl)...it doesn't seem to actually get evaluated properly. If I have the 'else', it will make everyone show as offline and if I don't have the 'else', it will make everyone online.. . so I thought maybe it needed to be reset each time or something (I'm no programmer, BTW) and I could just setup the variable with value "" (blank) before it really gets defined, but apparently there's more than meets the eye.

I had been tinkering with the code a little while with no luck, so I thought I'd get some help in doing this. I hope I've explained myself properly; if not, inquire and I will carify.

Thanks

% SS %

[ 01-07-2002 01:48 AM: Message edited by: Soul Survivor ]

can't find peace of mind but every corner's got a mcdonalds?!
#51716 01/07/2002 2:24 AM
Joined: Dec 2001
Posts: 90
Member
Member
Offline
Joined: Dec 2001
Posts: 90
I had seen an Online/Offline indicator next to users posts on some older boards..so I tried to implement it myself using memberlist code that basically does the same thing (since you can setup your memberlist to include an 'Online' column)...

In public_memberlist.pl there is a


foreach (@ML_online_array) {
($ML_online_time, $ML_online_user, $ML_online_number, $ML_online_ip, $ML_online
_location) = split(/|^|/, $_); chomp($ML_online_location);
if ($ML_usernum eq $ML_online_number) {
print qq~
 
Sponsored Links
Joined: Nov 2001
Posts: 198
Member
Member
Offline
Joined: Nov 2001
Posts: 198
iirc the memberlist takes its online/offline status from who's online...
you'd need to take a closer look at the code to see where it gets its info, and how it handles it


Just another boring 17-year-old
and yes, I like smilies/graemlins
Joined: Dec 2001
Posts: 90
Member
Member
Offline
Joined: Dec 2001
Posts: 90
Oh well, I thought I was on the right track


can't find peace of mind but every corner's got a mcdonalds?!
Joined: Aug 2001
Posts: 71
Member
Member
Offline
Joined: Aug 2001
Posts: 71
I'm hoping someone will do this hack for the 6.1 series of ubb, because it is a good hack. One of the main ones I miss from 'another board' that my message board was previously on.

Joined: May 2001
Posts: 197
Member
Member
Offline
Joined: May 2001
Posts: 197
Well I'm going to try to do something for this

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Ruben Rocha
Ruben Rocha
Lutz,FL,USA
Posts: 254
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)