Random Member issue
Posted: 14. July 2009 22:57
Your Portal Version: 1.0.0RC3
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Beginner
What have you done before the problem was there?
What have you already tryed to solve the problem?
Description and Message
I modified the random_member block like I said in my replies to girlintrouble's question.
However, I don't want the block to show if there are no members returned from the query.
in random_member.php I made this change:
And this change:
But I get no random members, even when I DO have some that opted in.
Any ideas why? If I remove the changes above, I get random members shown.[/i]
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Beginner
What have you done before the problem was there?
What have you already tryed to solve the problem?
Description and Message
I modified the random_member block like I said in my replies to girlintrouble's question.
However, I don't want the block to show if there are no members returned from the query.
in random_member.php I made this change:
Code: Select all
$result = $db->sql_query_limit($sql, 1);
$member_count = $db->sql_affectedrows();
$row = $db->sql_fetchrow($result);
Code: Select all
if ($member_count > 0) {
$template->assign_vars(array(
'S_DISPLAY_RANDOM_MEMBER' => true,
));
} else {
$template->assign_vars(array(
'S_DISPLAY_RANDOM_MEMBER' => false,
));
};
Any ideas why? If I remove the changes above, I get random members shown.[/i]