View Full Version : Memberlist?
Celcia
05-19-2009, 06:55 AM
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?
Bloodrun
05-19-2009, 07:18 AM
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:
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:
$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:
$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:
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:
$article_content = $article_content."<b><a href='profile.php?user=".$username."'>".$star."".$username."</a></b><br>";
$i++;
}
$article_content = $article_content."<br>";
Into this:
$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.
Celcia
05-19-2009, 01:09 PM
I've found all parts and put them into the codes, you had given me, but now I've got this error and don't know, what it means:
Parse error: syntax error, unexpected T_LNUMBER in /is/htdocs/wp1135501_XMRNJ7ACPP/www/creatures/adoptables/profile.php on line 234
In my profile.php on line 234, there is:
<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>
I also recognized, that I haven't got a file called "profile2.php", which is part of this code-part:
<td><b><a href='profile2.php?user=".$username."'>".$star."".$username."</a></b></td>
BMR777
05-19-2009, 03:51 PM
If you're using the default script if you visit yoursite.com/profile.php that shows all of the members on your site. :)
Celcia
05-19-2009, 03:58 PM
Wow, thanks. That's it :)
Bloodrun
05-19-2009, 09:17 PM
I've found all parts and put them into the codes, you had given me, but now I've got this error and don't know, what it means:
Parse error: syntax error, unexpected T_LNUMBER in /is/htdocs/wp1135501_XMRNJ7ACPP/www/creatures/adoptables/profile.php on line 234
In my profile.php on line 234, there is:
<td><center><a href='profile.php?do=add&more=".$username."'><img src='templates/icons/cog.gif' border="0"></a></center></td>
I also recognized, that I haven't got a file called "profile2.php", which is part of this code-part:
<td><b><a href='profile.php?user=".$username."'>".$star."".$username."</a></b></td>
Oh oops, I always forget to edit out certain things, well for one, you have to remove the part of the link that says:
http://4u.1free.ws/
Then lastely (and i dont know what gave you the idea) to put [b] tags in the link, but those have to be removed (which I ust removed for those for you) and then just delete the '2' in the link.
(btw, this just puts your memberlist in a table.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.