Page 1 of 1
Filter for the "Random Members" block
Posted: 29. June 2009 10:56
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
Re: Filter for the "Random Members" block
Posted: 29. June 2009 14:22
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;
Re: Filter for the "Random Members" block
Posted: 29. June 2009 14:33
by DutchToxophilite
OK, but in what file?
edit: Oh, found it, random_member.php
Many Thanx
grtz,
Twan
Re: Filter for the "Random Members" block
Posted: 29. June 2009 14:34
by Ice
Whoops sorry, portal/block/random_member.php
Re: Filter for the "Random Members" block
Posted: 23. July 2009 08:18
by DutchToxophilite
Sorry.
I forgot to answer this topic.
But It worked like a charm.
THANX
grtz,
Twan