Previous Thread
Next Thread
Print Thread
Hop To
#212247 05/14/2008 10:22 PM
Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678
Basically I don't want "and 0 Spiders online".

How do I get rid of that, and include the number of "Spiders" in the number that is shown for guests. (ie. just as it is now in 7.2.2)

[So for example if there were 5 guests and 20 spiders online, I would have that display as "25 guests online"]

Thanks

Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
Just a thought (don't know if this would work) but if you remove (or shorten) the list of user agents - perhaps the spiders will show up as guests.

Of course that won't remove the '0 spiders' notice - but it will make it look like you've got more 'real' visitors to your site smile

Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678
Thanks - it's not just that, I just don't want spiders mentioned all over the place....

Anyone?

Joined: Jun 2006
Posts: 3,839
Likes: 1
I
Ian Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,839
Likes: 1
There is help for arachnophobia wink

Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678
Go on, tell me please!

Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678
Anyone, please! wink

Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678

Anyone how do I get rid of the spiders mention on that Whos Online post island (like it was 7.2)?

Please if anyone knows, thanks

Joined: Aug 2006
Posts: 1,659
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,659
Likes: 1

You can remove the Spiders part entirely if you comment-out this section of \templates\default\island_whos_online.tpl:
PHP Code

{$spiders} 
{if $spiders == 1}
<?php echo $ubbt_lang['ONLINE_SPIDER']?>
{else}
<?php echo $ubbt_lang['ONLINE_SPIDERS']?>
{/if}
 
to:
HTML
<!--//
{$spiders} 
{if $spiders == 1}
<?php //echo $ubbt_lang['ONLINE_SPIDER']?>
{else}
<?php //echo $ubbt_lang['ONLINE_SPIDERS']?>
{/if}
//-->
...but as for adding those totals into Guests, I'd have to look into it more deeply and don't have time for that tonight...


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 8.1.34 / MySQL 5.7.23-23 / Apache 2.4.67
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678
OK good start thank you.

If anyone could let me know how to "add" the guests and spiders that would be fantastic.

Thanks

Joined: Aug 2006
Posts: 1,659
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,659
Likes: 1

If you have any familiarity with coding, you could compare the 7.2.2 way of doing things vs the 7.3 way, and hack it up from there. I'm no PHP expert, but at 1AM I don't feel it's the time to try and become one... lol.

But really, I dislike having the Spiders' count included into Guests, because I'd rather have an accurate count of *users* vs inflated access totals. But that's just me. If what I posted works, I think that could be enough. Only the site owner cares about Spiders, not the members. And the Spider totals should still come up on the full Who's Online page anyway.

That said, inflating numbers can help sometimes if you're trying to sell ad space or something... wink


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 8.1.34 / MySQL 5.7.23-23 / Apache 2.4.67
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678
Thanks. It really isn't that. I am fine with the spiders being on the main Who's Online page. I just don't see the need and don't want them to be on every single page of my site. It was fine how it was in 7.2.2 with the spiders being included in the Guests number.

I am far from being expert in php! Hoping to hear from some....

smile

Joined: Jun 2006
Posts: 3,839
Likes: 1
I
Ian Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,839
Likes: 1
You also asked about the sort order....

in cache_builders/online_now.php

change

PHP Code
// Now get's get info about the user's we have
	$query = "
		SELECT	t1.USER_ID, t1.USER_DISPLAY_NAME, t1.USER_MEMBERSHIP_LEVEL, t2.USER_NAME_COLOR, t2.USER_VISIBLE_ONLINE_STATUS
		FROM	{$config['TABLE_PREFIX']}USERS as t1
		LEFT JOIN	{$config['TABLE_PREFIX']}USER_PROFILE as t2
		ON t1.USER_ID = t2.USER_ID
		WHERE	t1.USER_ID in ( ? ) AND t1.USER_ID <> 1
		order by t1.USER_DISPLAY_NAME asc
	"; 

to

PHP Code
// Now get's get info about the user's we have
	$query = "
		SELECT	t1.USER_ID, t1.USER_DISPLAY_NAME, t1.USER_MEMBERSHIP_LEVEL, t2.USER_NAME_COLOR, t2.USER_VISIBLE_ONLINE_STATUS
		FROM	{$config['TABLE_PREFIX']}USERS as t1
		LEFT JOIN	{$config['TABLE_PREFIX']}USER_PROFILE as t2
		ON t1.USER_ID = t2.USER_ID
		WHERE	t1.USER_ID in ( ? ) AND t1.USER_ID <> 1
		order by t2.USER_VISIBLE_ONLINE_STATUS asc
	"; 

Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678
Cool... what, that shows the users in the Who's Online list by activity rather than alphabetically?

(I don't have enough users on my test to find out!)

Thank you

Joined: Jun 2006
Posts: 3,839
Likes: 1
I
Ian Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,839
Likes: 1
Bear in mind the portal box is not instant - 10 minutes cache or above is good - however it will no longer sort in alphabetical order.

Currently running at www.fansfocus.com

Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678
So basically is that the same as what is going on in 7.2?

Good stuff.

Dead simple when you know hey? wink

Joined: Jun 2006
Posts: 3,839
Likes: 1
I
Ian Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,839
Likes: 1
similar smile

.............

Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678
Cool. Thanks, I'm sure other people will be happy.

Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678
I changed the code you have there Ian - thanks - but the listing is really strange. It seems to be almost showing the names at random. What are the criteria used for that if you could tell me?

Thank you

Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678
Hi Ian I have been trying to get this to work this morning with a clear head, but just can't. It just doesn't seem to be doing it right and the numbers appear what seems almost totally random. (Certainly not by activity). I&ve put it back to abc for now..

Do I need to change something else, or, .... any ideas? smile

Thank you

Originally Posted by Ian
You also asked about the sort order....

in cache_builders/online_now.php

change

PHP Code
// Now get's get info about the user's we have
	$query = "
		SELECT	t1.USER_ID, t1.USER_DISPLAY_NAME, t1.USER_MEMBERSHIP_LEVEL, t2.USER_NAME_COLOR, t2.USER_VISIBLE_ONLINE_STATUS
		FROM	{$config['TABLE_PREFIX']}USERS as t1
		LEFT JOIN	{$config['TABLE_PREFIX']}USER_PROFILE as t2
		ON t1.USER_ID = t2.USER_ID
		WHERE	t1.USER_ID in ( ? ) AND t1.USER_ID <> 1
		order by t1.USER_DISPLAY_NAME asc
	"; 

to

PHP Code
// Now get's get info about the user's we have
	$query = "
		SELECT	t1.USER_ID, t1.USER_DISPLAY_NAME, t1.USER_MEMBERSHIP_LEVEL, t2.USER_NAME_COLOR, t2.USER_VISIBLE_ONLINE_STATUS
		FROM	{$config['TABLE_PREFIX']}USERS as t1
		LEFT JOIN	{$config['TABLE_PREFIX']}USER_PROFILE as t2
		ON t1.USER_ID = t2.USER_ID
		WHERE	t1.USER_ID in ( ? ) AND t1.USER_ID <> 1
		order by t2.USER_VISIBLE_ONLINE_STATUS asc
	"; 

Joined: Jun 2006
Posts: 3,839
Likes: 1
I
Ian Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,839
Likes: 1
Willing - I never said it was by activity - I just said it was similar wink and takes away the alphabetical order.

No one (apart from you) would ever know which order you want the box in anyway.

If you look at the code you will easily see which order it is in with the revised code wink

Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678
Well I simply want it in by activity, as per 7.2. I think that is fairly easy to understand!

smile

Joined: Jun 2006
Posts: 3,839
Likes: 1
I
Ian Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,839
Likes: 1
I and others are only trying to help you.

Being rude is not the way forward.

We only do our best and do not get paid for our time here.

Joined: Feb 2007
Posts: 678
W
old hand
old hand
W Offline
Joined: Feb 2007
Posts: 678
Sorry Ian - I was certainly not meaning to be rude! smile

In the above thread you said that no-one apart from me would ever know which order I wanted it. But I'm pretty sure that I said I wanted it as per 7.2

Anyway, if it came across that way I apologise, I more often than not post thanks and pleases I think and have countless times said how much I appreciate the help.

Thank you.

Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
I reckon the smiley does quite a lot for keeping the peace in 'emails' and posts wink but for all the good it does... the exclamation mark "!" can do quite a lot to undo it.

They should be used sparingly wink smile


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
Email Settings
by Outdoorking - 05/13/2026 2:44 AM
Who's Online Now
0 members (), 115 guests, and 140 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)