Previous Thread
Next Thread
Print Thread
Rate Thread
#231264 12/30/2002 12:15 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Mod Name / Version - Who's Online Box for 6.2

Description - This will add a box listing users online to the bottom of your main index page. There are also instructions to add this info to the top of every page for Registered users

Working Under - UBB.Threads 6.2

Pre-requisites - none

Author - JustDave

Credits - JoshPet for adapting instructions to add to top of every page

Files Altered - ubbthreads.php, ubbthreads.tmpl
(if you are doing every page - ubbt.inc.php, ubbt_registerednav.tmpl)

Database Altered - none

New Files - none

Notes - This has been around for a few versions. JustDave gets all the credit for creating this.
Attachments
62978-wol-box.6.2 Folder.zip (0 Bytes, 181 downloads)

Last edited by JoshPet; 01/01/2003 3:57 PM.
Sponsored Links
Joined: Jun 2002
Posts: 63
Junior Member
Junior Member
Offline
Joined: Jun 2002
Posts: 63
Thanks for all your hard work Dave. Much appreciated

Joined: Feb 2002
Posts: 22
Junior Member
Junior Member
Offline
Joined: Feb 2002
Posts: 22
Hi!

Thanks for the mod. However, on my site, it seems that there's a little problem. If you click on a user's name (in the who's online box), it seems that you cannot view their profile. You would get an error saying that the user is not in the database. Do you know what could have went wrong? Thanks!

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Ack... hmmmm thought I changed that over to user numbers...

I'll get this fixed asap.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Ok I uploaded the new zip. It would have worked with invisible users... I just forgot to fix the links for the visible ones.

Sponsored Links
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Works great - thanks for the updated .tmpl file as well.


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Feb 2002
Posts: 22
Junior Member
Junior Member
Offline
Joined: Feb 2002
Posts: 22
thanks dave!

Joined: Jun 2002
Posts: 63
Junior Member
Junior Member
Offline
Joined: Jun 2002
Posts: 63
I was wondering if anyone has gotten this to work so you get it at the top of every page? I know Josh had it this way with the old version but I can't figure out how to do it .

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
At the top of ubbthreads.tmpl after this line:

$only_favs

PLace the code that you would place at the bottom instead. It goes right before the $tbopen. Works fine.

Joined: Jun 2002
Posts: 63
Junior Member
Junior Member
Offline
Joined: Jun 2002
Posts: 63
Thanks omegatron, that worked great. The only thing is that I was wondering if you would know how to get it on every page like the IIP index and all the other pages?

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Thats a bit tougher my friend.

The code required to define the variable is loaded in ubbthreads.php. There is no way currently as is to do that. However i am playing a bit to see what I can do.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
That's how I will be adding this to my site.

Will work on this now and post instructions. Lemme take a look.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I updated JustDave's documentation a bit (per his request) as he hates to document... and we'd all rather have him creating cool stuff rather than documenting.

I've updated the ZIP file as well. To the bottom of his instructions, I have added instructions to add this to the ubbt_registerednav.tmpl file.

To do that, insert the Who's Online code into ubbt.inc.php just above:

// -------------------------------------------
// Now require the registerednav.php template
$html = new html;
list($tbopen,$tbclose) = $this -> table_wrapper();
if (!$debug) {
include("$thispath/templates/$tempstyle/ubbt_registerednav.tmpl");
}
}


And change the first line of the Whos Online code from:

$LastOn = $html -> get_date() - 600;

To this:

$LastOn = $this -> get_date() - 600;


Then insert the Template code into the ubbt_registerednav.tmpl file.

Then it will appear at the top of the page for registered users. If you wish to do it for unregistered users you'll need to place the modified Who's Online code above the require statement for ubbt_unregisterednav.tmpl and edit the ubbt_unregisterednav.tmpl file as well.

Thanks Dave!

Joined: Jun 2002
Posts: 63
Junior Member
Junior Member
Offline
Joined: Jun 2002
Posts: 63
Cool Josh! Gonna go try this out after dinner.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Just updated the zip again.....

it was still leaving the User number off the link to visible user's profiles. I think just dave fixed it, but maybe the instructions I started modifying were downloaded before that.

All fixed now.

Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
Small problem... I can get it to show up at the bottom of every page like normal. But for adding to the top of every page, the who's online box is there, but no users are inside of it

I want to cry

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Did you alter the first line of the code in ubbt.inc.php.... and did you place it before the registered nav template. There are two similar places. I had that trouble too... If the code is in the wrong place in ubbt.inc.php it won't show any users.

Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
I did change the first line, and I thought I double checked everything, but that's ok. I didn't want it on every page anyway. Just the top of ubbthreads.php so I just edited that template and removed the other part of the hack All is well.

Joined: Nov 2001
Posts: 417
Enthusiast
Enthusiast
Joined: Nov 2001
Posts: 417
Who's Online Box

whosonline_index_6.2 all languages

Nettomo

Joined: Jul 2002
Posts: 12
Newbie
Newbie
Offline
Joined: Jul 2002
Posts: 12
Have added it to my site.

Have changed a few things here and there, but would like to have the admin username in bold. Any chance for help? I've tried but didn't manage.

I also saw some code making it depending on number of users online - can you offer me some explication on that?

Joined: Aug 2002
Posts: 45
User
User
Offline
Joined: Aug 2002
Posts: 45
Could you tell me how to make it appear in the bottom of each forum (postlist.php) as it was at ubb classic ?

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I believe Josh has some instructions around here somewhere that explain how to do that. Off hand I don't know what it would take for sure.

Ohhh Josh....



(I just looked over this thread and I see that Josh's instructions place this on all pages for registered users using the ubbt_registerednav.tmpl file)

Last edited by JustDave; 01/19/2003 9:35 AM.
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I also answered his PM

Basically the top line of your who's online code needs to be changed to this:

$LastOn = $this -> get_date() - 600;


Then add it into ubbt.inc.php just before this line:

@include("$thispath/templates/$tempstyle/ubbt_footer.tmpl");



Then in the ubbt_footer.tmpl file
just above $tbopen, add this:

$tbopen
$whosOnline
$tbclose



I do a similar mod of this, but include the code before the include statement for ubbt_registerednav.tmpl file. Then it appears on every page.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Sorry,

I didn't mean for him to PM you about something that should be asked in the forums.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
LOL

I wish I had saved my PM to him.... I could have copied and pasted it here if others wanted the info.

Joined: Aug 2002
Posts: 45
User
User
Offline
Joined: Aug 2002
Posts: 45
My mistake guys sorry
BTW I get an error for ubbt.inc.php at the line 869
Any ideas?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
[]Could you tell me how to make it appear in the bottom of each forum (postlist.php) as it was at ubb classic ? [/]

I have just updated and posted instructions here.

It's basically JustDave's hack. In my version, I offer instuctions for including at the top of each page **OR** at the bottom of each page.

Check it out.

Joined: Jan 2003
Posts: 141
Journeyman
Journeyman
Offline
Joined: Jan 2003
Posts: 141
This is a great mod. I can't believe that I have overlooked it. I have one question.....I altered the code a little and took out the header so it just shows the list, it was starting to look too busy with the other mods, is there anyway to make it "join" the bottom of the menubar to look like one thing with the tablewrappers around it? I think it looks Much better.

[]http://www.doording.com/images/wol.jpg[/]

This photo I edited to show an example.

[]http://www.doording.com/images/wol1.jpg[/]

#231292 02/27/2003 2:32 PM
Joined: Jan 2003
Posts: 141
Journeyman
Journeyman
Offline
Joined: Jan 2003
Posts: 141
Man, don't ask me how or if it's right but I played around with the registerednav.tmpl and made it look just like I wanted it too.

#231293 03/01/2003 8:17 AM
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
I am having trouble getting the guests to show up. This is using the show whos online on every page... on top.

Other mods installed are the chat online, extra online user info. (both functioning)

the guests are visiting cause I can see them in the extra online info screen in whos online. Its just the generic line that tells how many guests are online. My users like to see how many are visiting. Doesn't help me much but they like it..

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
It can only list registered users... then say x number of guests online. (Guests are anonymous users - not logged in)

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Josh I realize that, but guests count stays at zero all the time. Even when I can see them browsing from the other extra info mod in the whos online main screen. It does show the registered guests with no problems.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I would check the placement of the code in the ubbt.inc.php if you are putting it in the wrong function, there won't be any results returned.

Where it needs to go has a few places that look very similar.

But if you put it before the unregisterednav.tmpl include statment, then when you are viewing the registerednav you don't see the results.

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
pretty sure its in the ubbt.inc.php

I don't have in the unregistered nav.tmpl... strictly for the registered users.


Would the placement of the code above or below the chat mod make a difference?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I don't think that would make a difference.

But the who's online code needs to be above the include statemnt for registerednav.tmpl.

It's pretty easy to accidentally place it above the unregisterednav.tmpl include statment. I've done it myself.

Also, double check that all variable names are used correctly. They are case sensitive. So $AnonUsers is different from something like $anonusers


Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Thanks I will go over it again after a bit..... threads has taken over my life and the pile of todos has grown.

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Checked those but don't see anything out of the ordinary.

Joined: Feb 2001
Posts: 169
Member
Member
Offline
Joined: Feb 2001
Posts: 169
Update: Works in 6.5 too but admin and mod names are without colors (probably because of the move of color setting in the styleshhet).

Easy but great mod !

#231302 03/24/2005 6:32 PM
Joined: Feb 2005
Posts: 3
Lurker
Lurker
Offline
Joined: Feb 2005
Posts: 3
Thanks for the mod, it works great!

Is there anyway for it to work with unregistered/not logged in users as well. If I add the code to the ubbt_unregistered template it just shows the 'guests' that are online and not the registered members that are online at the time. Yet unregistered users can still see the members online by clicking on the 'Who's Online' Link.


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
hatter
hatter
USA
Posts: 69
Joined: January 2001
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)