Filter for the "Random Members" block

Current Version: 1.0.6
Released: 09.01.10
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.
Locked
User avatar

Topic author
DutchToxophilite
Active Member
Posts: 28
Joined: 30. January 2009 12:17
phpBB.com User: DutchToxophilite
Location: Venlo, The Netherlands
Contact:

Filter for the "Random Members" block

Post by DutchToxophilite »

Your Portal Version: 1.0.3
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Advanced Knowledge
Boardlink: http://www.handboogforum.nl

What have you done before the problem was there?
-

What have you already tryed to solve the problem?
-

Description and Message
Hi.

Is it possible to filter the members shown in the Random Member block to only show members who have 1 or more post(s)?

grtz,
Twan
The joy's of Archery can be found anywhere. Far places only offer exotic ways to suffer.
User avatar

Ice
Former Team Member
Posts: 359
Joined: 20. January 2008 23:43
Location: England, United Kingdom

Re: Filter for the "Random Members" block

Post by Ice »

Replace

Code: Select all

        case 'postgres':
            $sql = 'SELECT *
            FROM ' . USERS_TABLE . '
            WHERE user_type <> ' . USER_IGNORE . '
            AND user_type <> ' . USER_INACTIVE . '
            ORDER BY RANDOM()';
        break;
    
        case 'mssql':
        case 'mssql_odbc':
            $sql = 'SELECT *
            FROM ' . USERS_TABLE . '
            WHERE user_type <> ' . USER_IGNORE . '
            AND user_type <> ' . USER_INACTIVE . '
            ORDER BY NEWID()';
        break;
    
        default:
            $sql = 'SELECT *
            FROM ' . USERS_TABLE . '
            WHERE user_type <> ' . USER_IGNORE . '
            AND user_type <> ' . USER_INACTIVE . '
            ORDER BY RAND()';
        break;
 
With

Code: Select all

        case 'postgres':
            $sql = 'SELECT *
            FROM ' . USERS_TABLE . '
            WHERE user_type <> ' . USER_IGNORE . '
            AND user_type <> ' . USER_INACTIVE . '
            AND user_posts > 0
            ORDER BY RANDOM()';
        break;
    
        case 'mssql':
        case 'mssql_odbc':
            $sql = 'SELECT *
            FROM ' . USERS_TABLE . '
            WHERE user_type <> ' . USER_IGNORE . '
            AND user_type <> ' . USER_INACTIVE . '
            AND user_posts > 0
            ORDER BY NEWID()';
        break;
    
        default:
            $sql = 'SELECT *
            FROM ' . USERS_TABLE . '
            WHERE user_type <> ' . USER_IGNORE . '
            AND user_type <> ' . USER_INACTIVE . '
            AND user_posts > 0
            ORDER BY RAND()';
        break;
 
Board3 Portal Dev & English Tech Support
User avatar

Topic author
DutchToxophilite
Active Member
Posts: 28
Joined: 30. January 2009 12:17
phpBB.com User: DutchToxophilite
Location: Venlo, The Netherlands
Contact:

Re: Filter for the "Random Members" block

Post by DutchToxophilite »

OK, but in what file?

edit: Oh, found it, random_member.php
Many Thanx

grtz,
Twan
Last edited by DutchToxophilite on 29. June 2009 14:36, edited 1 time in total.
The joy's of Archery can be found anywhere. Far places only offer exotic ways to suffer.
User avatar

Ice
Former Team Member
Posts: 359
Joined: 20. January 2008 23:43
Location: England, United Kingdom

Re: Filter for the "Random Members" block

Post by Ice »

Whoops sorry, portal/block/random_member.php
Board3 Portal Dev & English Tech Support
User avatar

Topic author
DutchToxophilite
Active Member
Posts: 28
Joined: 30. January 2009 12:17
phpBB.com User: DutchToxophilite
Location: Venlo, The Netherlands
Contact:

Re: Filter for the "Random Members" block

Post by DutchToxophilite »

Sorry.

I forgot to answer this topic.

But It worked like a charm.

THANX

grtz,
Twan
The joy's of Archery can be found anywhere. Far places only offer exotic ways to suffer.
Locked

Return to “board3 Portal 1.0.x - English Support”