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]