Page 1 of 1

whois_online Not show bots

Posted: 11. November 2015 09:29
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]

Re: whois_online Not show bots

Posted: 13. November 2015 14:35
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'; 

Re: whois_online Not show bots

Posted: 13. November 2015 15:14
by demonlibra
Thank you

Re: whois_online Not show bots

Posted: 13. January 2016 01:23
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

???
???
???

Re: whois_online Not show bots

Posted: 13. January 2016 17:08
by Kirk
Yes

Re: whois_online Not show bots

Posted: 14. January 2016 21:21
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?

Re: whois_online Not show bots

Posted: 13. February 2016 09:33
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',
      );

Re: whois_online Not show bots

Posted: 12. March 2016 08:59
by demonlibra
Thank you