MyBB Community Forums

Full Version: Only show approved members on board statistics
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is there a way/option to only show approved accounts on board statistics at the bottom of who's online? The option in admin only excludes listing on memberlist. If a spammer registers, the member profile still shows on board statistics. Then when you delete the profile, and googlebot catches it, you still have to deal with the 404 error.
I believe yes and I think there was a plugin for this as well.
You can search here on MyBB forums, but I am sure this has been asked Ashley1.
(08-23-2018, 08:34 AM)WallBB Wrote: [ -> ]I believe yes and I think there was a plugin for this as well.
You can search here on MyBB forums, but I am sure this has been asked Ashley1.

I've tried doing the search function but I ended up with 207 pages worth of possible outcomes.

Can you give us a link or some idea what the name of this plugin is? 

I am interested in this plugin as well.
(08-23-2018, 02:35 PM)Serpius Wrote: [ -> ]
(08-23-2018, 08:34 AM)WallBB Wrote: [ -> ]I believe yes and I think there was a plugin for this as well.
You can search here on MyBB forums, but I am sure this has been asked Ashley1.

I've tried doing the search function but I ended up with 207 pages worth of possible outcomes.

Can you give us a link or some idea what the name of this plugin is? 

I am interested in this plugin as well.

Yeah, his post was real helpful  Rolleyes like i didn't try searching before.
Ah, you guys will not leave me like this Smile
Open index.php in MyBB root and find
WHERE s.time>'$timesearch' 
and Change that into
WHERE s.time>'$timesearch' AND u.usergroup != 'GROUPID' 

This will remove the GROUPID based members from the who's online. You can do it for multiple groups as well and vice versa.

Hope I am a little more helpful now @Serpius Toungue
Whatever is the modification should cover 'portal.php' as well.
(08-24-2018, 07:57 AM)WallBB Wrote: [ -> ]Ah, you guys will not leave me like this Smile
Open index.php in MyBB root and find
WHERE s.time>'$timesearch' 
and Change that into
WHERE s.time>'$timesearch' AND u.usergroup != 'GROUPID' 

This will remove the GROUPID based members from the who's online. You can do it for multiple groups as well and vice versa.

Hope I am a little more helpful now @Serpius Toungue

This does not work, it still orders by last member registered regardless of the group. I will figure it out later, just thought there might have been a setting/ existing plugin for it already.
(08-24-2018, 10:03 AM)Ashley1 Wrote: [ -> ]
(08-24-2018, 07:57 AM)WallBB Wrote: [ -> ]Ah, you guys will not leave me like this Smile
Open index.php in MyBB root and find
WHERE s.time>'$timesearch' 
and Change that into
WHERE s.time>'$timesearch' AND u.usergroup != 'GROUPID' 

This will remove the GROUPID based members from the who's online. You can do it for multiple groups as well and vice versa.

Hope I am a little more helpful now @Serpius Toungue

This does not work, it still orders by last member registered regardless of the group. I will figure it out later, just thought there might have been a setting/ existing plugin for it already.
Based on the original question, I gave an answer.
For ordering, you need to modify the code just above this line (WHERE s.time>'$timesearch'), basically SQL sorting. Smile

I will have to search for plugin, maybe it is not there.
So half the problem can be solved by making patches as follows:

In index.php on line 77:

replace 
WHERE s.time > '".$timesearch."'

with
WHERE s.time > '".$timesearch."' AND u.usergroup != '5'

and in portal.php on line 242
replace
WHERE s.time>'$timesearch'

with:
WHERE s.time>'$timesearch' AND u.usergroup != '5'

This will exclude the awaiting activation users from who is online, on index.php and portal.php as long as the default group id of 5 is not changed.
That leaves "Please welcome our newest member, ...."

not sure where that is built:


	// Check who's the newest member.
	if(!$stats['lastusername'])
	{
		$newestmember = $lang->nobody;;
	}
	else
	{
		$newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);
	}
(08-24-2018, 12:50 PM)Ashley1 Wrote: [ -> ]So half the problem can be solved by making patches as follows:

In index.php on line 77:

replace 
WHERE s.time > '".$timesearch."'

with
WHERE s.time > '".$timesearch."' AND u.usergroup != '5'

and in portal.php on line 242
replace
WHERE s.time>'$timesearch'

with:
WHERE s.time>'$timesearch' AND u.usergroup != '5'

This will exclude the awaiting activation users from who is online, on index.php and portal.php as long as the default group id of 5 is not changed.
That leaves "Please welcome our newest member, ...."

not sure where that is built:


	// Check who's the newest member.
	if(!$stats['lastusername'])
	{
		$newestmember = $lang->nobody;;
	}
	else
	{
		$newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);
	}
You should find that in language file ($l['stats_newestuser'] ) i.e.
/inc/languages/english/index.lang.php

Any love for me Wink

Cheers
Pages: 1 2