vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Rearrange Memberlist columns? (https://vborg.vbsupport.ru/showthread.php?t=221938)

Mobo 08-28-2009 04:55 AM

Rearrange Memberlist columns?
 
I was wondering how I could reorder or rearrange the columns on the Memberlist page. I tried just moving/removing the If conditions around in the table, but all that did was rearrange the names of the columns at the top, not actually rearrange the columns them selves.

I have also selected to show custom user profile fields on the memberlist page, however, I do not want them all showing up. Is there a way I can select which ones appear on the page? I believe this is the code that is adding all the fields...

Code:

        <if condition="$show['customfields']">$customfieldsheader</if>
Thanks for any help!

AFemaleProdigy 08-28-2009 08:25 PM

Hey there! I literally JUST figured out how to do exactly what you are doing and it took a good amount of time to figure it out. So here's what I did...

There are actually two templates you need to edit to accomplish moving the tables around. Open up memberlist and memberlist_resultsbit (this is using 3.8.3). Memberlist template is where you move the column headers. Memberlist_resultsbit is where you move the columns (td tags). I don't have time to explain in great detail, but if you compare the two templates, they are very similar and you can find where they work hand in hand.

I wanted to add only specific custom fields to my memberlist too. I wanted to add a column for the State the user lived in. It was a bit complicated, but I made notes for myself. I will copy them here and hopefully it will help you. Note where it says "state" you can call that whatever your field is.

---
Do not enable custom profile fields on the home page through the vB options control panel. Leave that unchecked or it will display all of them.

To add a single new custom field that is displayed on the memberlist page....

Use the custom profile field option to create a new field. Note the field name.

You need to edit the memberlist_resultsbit template and add the new column. Note: this template may be named memberlistbit in older vB installs (I think).

- <td class="$bgclass">$userinfo[field7]</td> (this makes new column)

- Note: "field7" is changed to reflect the name of the new field you created.

then edit the memberlist template to add the column header/title

- <td class="thead" nowrap="nowrap">$vbphrase[state]</td> (this adds the new column header)

- Note: "state" is changed to reflect the name of the new field you created and used to call the vb phrase. Use phrase manager to create this phrase and then reference it: $vbphrase[state] (or hand type in the title instead of using a phrase)

------

I don't give instructions a lot here so forgive me if it's not that great. I just popped on to get help with something else. LOL!

Mobo 08-29-2009 05:18 AM

Thanks Jessica! That worked perfectly.

Mobo 08-29-2009 05:25 AM

1 Attachment(s)
Oh, actually I seem to have a little problem. See the attached image showing the black table cell. How do I get that filled in with the correct image?


All times are GMT. The time now is 11:00 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.00943 seconds
  • Memory Usage 1,716KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete