Quote:
Originally Posted by Celcia
I've used search-options, but just found an old entry, which didn't help me.
I just installed the new Adoptables Version 1.0.0 a few days ago and it works great. But what my user really need is a memberlist.
I'm a beginner in all this and don't know how to show a memberlist with PHP and SQL.
So I ask you: Is there anyone able to give me a code for showing all my members?
|
sure can. What you need to do is, go to your
profile.php, and find where it says:
PHP Code:
else{
// We did not specify a user, so show the memberlist
$article_title = "Memberlist";
$article_content = "Here are all of the members of this site, sorted by registration date.<br><br>";
Now, you want to take this part:
PHP Code:
$article_title = "Memberlist";
$article_content = "Here are all of the members of this site, sorted by registration date.<br><br>";
and turn it into this:
PHP Code:
$article_title = "Memberlist";
$article_content = "Here are all of the members of this site, sorted by registration date.<br><br><table width='302' border='1'>
<tr>
<td width='100'><strong>Username:</strong></td>
<td width='60'><strong>User ID:</strong></td>
</tr>";
Then scroll down, until you find this:
PHP Code:
if($status == "yes"){
$star = "<img src='templates/icons/star.gif' border=0'> ";
}
$article_content = $article_content."<b><a href='profile.php?user=".$username."'>".$star."".$username."</a></b><br>";
$i++;
}
$article_content = $article_content."<br>";
And you want to turn this part:
PHP Code:
$article_content = $article_content."<b><a href='profile.php?user=".$username."'>".$star."".$username."</a></b><br>";
$i++;
}
$article_content = $article_content."<br>";
Into this:
PHP Code:
$article_content = $article_content."
<tr>
<td><b><a href='profile2.php?user=".$username."'>".$star."".$username."</a></b></td>
<td><center>".$id."</center></td>
<td><center><a href='http://4u.1free.ws/profile.php?do=add&more=".$username."'><img src='templates/icons/cog.gif' border=0></a></center></td>
<td><center><a href='http://4u.1free.ws/profile.php?do=delete&more=".$username."'><img src='templates/icons/delete.gif' border=0></a></center></td>
</tr>
";
$i++;
}
$article_content = $article_content."<br></table>
Hope I helped.