whois_online Not show bots

Current Version: 2.1.0
Released: 2015-10-26
Forum rules
Before creating a new support thread, please take a look at the board3 Portal FAQ and use the search!
Many questions have already been answered.
Locked

Topic author
demonlibra
Active Member
Posts: 12
Joined: 30. October 2015 08:30
phpBB.com User: demonlibra

whois_online Not show bots

Post by demonlibra »

Your Portal Version: 2.1.0
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Basic Knowledge

PHP Version: 5.3.13
MySQL Version: 5.1.41

What have you done before the problem was there?


What have you already tryed to solve the problem?


Description and Message
Is it possible that module whois_online not show bots?

I Try to edit file ".../ext/board3/portal/modules/whois_online.php" in section below but no result.

Code: Select all

if ($row['group_name'] == 'BOTS' || ($this->user->data['user_id'] != ANONYMOUS && !$this->auth->acl_get('u_viewprofile')))
			{
				$legend[] = '<span' . $colour_text . '>' . $group_name . '</span>';
			}
			else
			{
				$legend[] = '<a' . $colour_text . ' href="' . append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>';
[/i]
User avatar

Kirk
Dev
Posts: 1956
Joined: 27. July 2010 18:02
phpBB.de User: Kirk
Contact:

Re: whois_online Not show bots

Post by Kirk »

Hi
Open: root/includes/funtions.php
Find:

Code: Select all

        $sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour
                FROM ' . USERS_TABLE . '
                WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
                ORDER BY username_clean ASC'; 
Replace with:

Code: Select all

      $sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour
            FROM ' . USERS_TABLE . '
            WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
            AND user_type <> ' . USER_IGNORE . '
            ORDER BY username_clean ASC'; 
Gruß Udo

Topic author
demonlibra
Active Member
Posts: 12
Joined: 30. October 2015 08:30
phpBB.com User: demonlibra

Re: whois_online Not show bots

Post by demonlibra »

Thank you

Topic author
demonlibra
Active Member
Posts: 12
Joined: 30. October 2015 08:30
phpBB.com User: demonlibra

Re: whois_online Not show bots

Post by demonlibra »

For PHPBB 3.7.1-PL1

Code: Select all

		$sql_ary = array(
			'SELECT'	=> 'u.username, u.username_clean, u.user_id, u.user_type, u.user_allow_viewonline, u.user_colour',
			'WHERE'		=> $db->sql_in_set('u.user_id', $online_users['online_users']),
			'ORDER_BY'	=> 'u.username_clean ASC',
		);
replace

???
???
???
User avatar

Kirk
Dev
Posts: 1956
Joined: 27. July 2010 18:02
phpBB.de User: Kirk
Contact:

Re: whois_online Not show bots

Post by Kirk »

Yes
Gruß Udo

Topic author
demonlibra
Active Member
Posts: 12
Joined: 30. October 2015 08:30
phpBB.com User: demonlibra

Re: whois_online Not show bots

Post by demonlibra »

Sorry, but i dont understand.

phpbb 3.16 have code

Code: Select all

		$sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour
				FROM ' . USERS_TABLE . '
				WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
				ORDER BY username_clean ASC';
phpbb 3.1.7-PL1 have code

Code: Select all

		$sql_ary = array(
			'SELECT'	=> 'u.username, u.username_clean, u.user_id, u.user_type, u.user_allow_viewonline, u.user_colour',
			'FROM'		=> array(
				USERS_TABLE	=> 'u',
			),
			'WHERE'		=> $db->sql_in_set('u.user_id', $online_users['online_users']),
			'ORDER_BY'	=> 'u.username_clean ASC',
		);
What changes must be done in phpbb 3.1.7?
User avatar

Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München
Contact:

Re: whois_online Not show bots

Post by Marc »

You should only have to change that to:

Code: Select all

      $sql_ary = array(
         'SELECT'   => 'u.username, u.username_clean, u.user_id, u.user_type, u.user_allow_viewonline, u.user_colour',
         'FROM'      => array(
            USERS_TABLE   => 'u',
         ),
         'WHERE'      => $db->sql_in_set('user_id', $online_users['online_users']) . ' AND user_type <> ' . USER_IGNORE,
         'ORDER_BY'   => 'u.username_clean ASC',
      );

Topic author
demonlibra
Active Member
Posts: 12
Joined: 30. October 2015 08:30
phpBB.com User: demonlibra

Re: whois_online Not show bots

Post by demonlibra »

Thank you
Locked

Return to “Board3 Portal 2.1.x - English Support”