View Full Version : memberlist.php display
sabret00the
02-28-2003, 06:02 PM
if it possible that instead of displaying the memberlist as is, it can be changed to display little boxes, lets say 4 across, 6 down and inside each little box it would have
member avatar
member name
member age
member post count
member location
online indicator
Xenon
02-28-2003, 06:06 PM
yes it's possible :)
you have to change the memberlist info bit templates (don't know the exact name now)
and then just add a counter to the memberlist.php and after every 4th user add a </tr><tr> tag :)
sabret00the
02-28-2003, 06:18 PM
is it that simple, i thought it would've been a whole load of hacking to get the fields to display on the memberlist.php, btw xenon, stupid question but how do you add a counter 0_o
Xenon
02-28-2003, 06:29 PM
lool, it's even more simple than i thought, the counter is already there:
while ($userinfo=$DB_site->fetch_array($users) and $counter++<$perpage) {
so just test if the $counter mod 4 equals 0 and then add the new row html code.. :)
sabret00the
03-01-2003, 09:34 AM
Sorry only just found my way back to this thread, i know this seems like a dumb question, a very dumb question but how do i test the $counter mod?
Xenon
03-01-2003, 09:52 AM
if ($counter % 4 == 0) ...
sabret00the
03-01-2003, 10:44 AM
so i'd do something like
if ($counter % 4 == 0) {
echo "$memberlist"}
else {
echo "you dunno what your doing 0_o"}
that was just a guess, all i know how to do with php is use the switch function and include files :nervous:
Xenon
03-01-2003, 10:52 AM
ok, then the hack itself..... ^^
in memberlist.php find:
eval("\$memberlistbits .= \"".gettemplate("memberlistbit")."\";");
and replace it with:
if ($counter % 4 == 0) $memberlistbits.= "<tr>";
eval("\$memberlistbits .= \"".gettemplate("memberlistbit")."\";");
if ($counter % 4 == 3) $memberlist.= "</tr>";
then edit template memberlistbit and take out the leading and ending <tr></tr> tags.
last thing is that you have to edit the template memberlist itself to make another table header ;)
sabret00the
03-01-2003, 11:13 AM
thank you so much xenon
/me bows down
Xenon
03-01-2003, 11:16 AM
you're welcome :)
sabret00the
03-02-2003, 10:42 AM
xenon i got a slight problem, ever so slight
the hack works fine, you should really add it to the database, but one the first and last lines it displays only 3 columns of the row 0_o
Xenon
03-02-2003, 10:52 AM
hmm, try to change every $counter into a ($counter - 1)
sabret00the
03-25-2003, 06:03 PM
tried that it totally messed up, so i changed it to 1 and that's ok but it's got 2 empty spaces on the bottom row now
Kamui Shirou
07-30-2003, 06:06 AM
hm i dont get it look like that
sabret00the
07-30-2003, 12:30 PM
you need to make the templates kamui
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.