Mod Name / Version - Who's Online Box for 6.2 <br /> <br />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 <br /> <br />Working Under - UBB.Threads 6.2 <br /> <br />Pre-requisites - none <br /> <br />Author - JustDave <br /> <br />Credits - JoshPet for adapting instructions to add to top of every page <br /> <br />Files Altered - ubbthreads.php, ubbthreads.tmpl <br /> (if you are doing every page - ubbt.inc.php, ubbt_registerednav.tmpl) <br /> <br />Database Altered - none <br /> <br />New Files - none <br /> <br />Notes - This has been around for a few versions. JustDave gets all the credit for creating this. <img src="/forum/images/graemlins/wink.gif" alt="" /> <br />
Hi!<br /><br />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!
Ack... hmmmm thought I changed that over to user numbers...<br /><br />I'll get this fixed asap. <img src="/forum/images/graemlins/smile.gif" alt="" />
Ok I uploaded the new zip. It would have worked with invisible users... I just forgot to fix the links for the visible ones. <img src="/forum/images/graemlins/smile.gif" alt="" />
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 <img src="/forum/images/graemlins/frown.gif" alt="" />.
At the top of ubbthreads.tmpl after this line:<br /><br />$only_favs<br /><br />PLace the code that you would place at the bottom instead. It goes right before the $tbopen. Works fine.
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?
Thats a bit tougher my friend.<br /><br />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.
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
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. <img src="/forum/images/graemlins/smile.gif" alt="" /><br /><br />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.<br /><br />To do that, insert the Who's Online code into ubbt.inc.php just above:<br /><br /> // -------------------------------------------<br /> // Now require the registerednav.php template<br /> $html = new html;<br /> list($tbopen,$tbclose) = $this -> table_wrapper();<br /> if (!$debug) {<br /> include("$thispath/templates/$tempstyle/ubbt_registerednav.tmpl");<br /> }<br /> }<br /><br /><br />And change the first line of the Whos Online code from:<br /><br /> $LastOn = $html -> get_date() - 600;<br /><br />To this:<br /><br /> $LastOn = $this -> get_date() - 600;<br /><br /><br />Then insert the Template code into the ubbt_registerednav.tmpl file.<br /><br />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. <img src="/forum/images/graemlins/wink.gif" alt="" /><br /><br />Thanks Dave! <img src="/forum/images/graemlins/cool.gif" alt="" />
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Just updated the zip again..... <br /><br />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. <img src="/forum/images/graemlins/tongue.gif" alt="" /><br /><br />All fixed now. <img src="/forum/images/graemlins/smile.gif" alt="" />
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 <img src="/forum/images/graemlins/confused.gif" alt="" /><br /><br />I want to cry <img src="/forum/images/graemlins/frown.gif" alt="" />
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
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. <img src="/forum/images/graemlins/wink.gif" alt="" />
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 <img src="/forum/images/graemlins/smile.gif" alt="" /> All is well.
Have added it to my site.<br /><br />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.<br /><br />I also saw some code making it depending on number of users online - can you offer me some explication on that?
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. <br /> <br />Ohhh Josh.... <img src="/forum/images/graemlins/wink.gif" alt="" /> <br /> <br /> <br /> <br />(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) <img src="/forum/images/graemlins/smile.gif" alt="" />
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I also answered his PM <img src="/forum/images/graemlins/crazy.gif" alt="" /><br /><br />Basically the top line of your who's online code needs to be changed to this:<br /><br /> $LastOn = $this -> get_date() - 600;<br /><br /><br />Then add it into ubbt.inc.php just before this line:<br /><br /> @include("$thispath/templates/$tempstyle/ubbt_footer.tmpl");<br /><br /><br /><br />Then in the ubbt_footer.tmpl file<br />just above $tbopen, add this:<br /><br />$tbopen<br />$whosOnline<br />$tbclose<br /><br /><br /><br />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. <img src="/forum/images/graemlins/smile.gif" alt="" />
Sorry,<br /><br />I didn't mean for him to PM you about something that should be asked in the forums. <img src="/forum/images/graemlins/crazy.gif" alt="" />
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
LOL<br /><br />I wish I had saved my PM to him.... I could have copied and pasted it here if others wanted the info. <img src="/forum/images/graemlins/smile.gif" alt="" />
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
[]Could you tell me how to make it appear in the bottom of each forum (postlist.php) as it was at ubb classic ? [/]<br /><br />I have just updated and posted instructions here.<br /><br />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.<br /><br />Check it out. <img src="/forum/images/graemlins/wink.gif" alt="" />
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. <br /> <br /> []http://www.doording.com/images/wol.jpg[/] <br /> <br />This photo I edited to show an example. <br /> <br /> []http://www.doording.com/images/wol1.jpg[/]
I am having trouble getting the guests to show up. This is using the show whos online on every page... on top.<br /><br />Other mods installed are the chat online, extra online user info. (both functioning) <br /><br />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..
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.
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
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.<br /><br />Where it needs to go has a few places that look very similar. <img src="/forum/images/graemlins/wink.gif" alt="" /><br /><br />But if you put it before the unregisterednav.tmpl include statment, then when you are viewing the registerednav you don't see the results. <img src="/forum/images/graemlins/wink.gif" alt="" />
pretty sure its in the ubbt.inc.php <br /><br />I don't have in the unregistered nav.tmpl... strictly for the registered users. <br /><br /><br />Would the placement of the code above or below the chat mod make a difference?
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I don't think that would make a difference.<br /><br />But the who's online code needs to be above the include statemnt for registerednav.tmpl.<br /><br />It's pretty easy to accidentally place it above the unregisterednav.tmpl include statment. I've done it myself.<br /><br />Also, double check that all variable names are used correctly. They are case sensitive. So $AnonUsers is different from something like $anonusers<br /><br />
Thanks I will go over it again after a bit..... threads has taken over my life and the pile of todos has grown. <img src="/forum/images/graemlins/smile.gif" alt="" />
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).<br /><br />Easy but great mod !
Thanks for the mod, it works great!<br /><br />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.