Page 1 of 1

Random Member issue

Posted: 14. July 2009 22:57
by MrBaseball34
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:

Code: Select all

$result = $db->sql_query_limit($sql, 1);
$member_count = $db->sql_affectedrows();
$row = $db->sql_fetchrow($result);
And this change:

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,
  ));
};
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]

Re: Random Member issue

Posted: 14. July 2009 23:01
by MrBaseball34
Oh, heck, nevermind. I was filtering by #posts, also and none of the members had enough posts.