vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   memberlist.php display (https://vborg.vbsupport.ru/showthread.php?t=49478)

sabret00the 02-28-2003 06:02 PM

memberlist.php display
 
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:
PHP Code:

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
PHP Code:

 if ($counter == 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:
PHP Code:

eval("\$memberlistbits .= \"".gettemplate("memberlistbit")."\";"); 

and replace it with:
PHP Code:

if ($counter == 0$memberlistbits.= "<tr>";
eval(
"\$memberlistbits .= \"".gettemplate("memberlistbit")."\";");
if (
$counter == 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 :)


All times are GMT. The time now is 01:51 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01178 seconds
  • Memory Usage 1,734KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete