vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Custom Profile Fields -- How To Sort In Memberslist? (https://vborg.vbsupport.ru/showthread.php?t=172106)

Masked Crusader 03-04-2008 08:23 PM

Custom Profile Fields -- How To Sort In Memberslist?
 
Hey guys.

I have added several text-based Profile Fields and I would like my users to be able to sort them alphabetically via the Members List, just like the User Name does by default.

How would I go about doing this?

Thanks.

MoT3rror 03-05-2008 01:08 AM

When you edit a profile field, you can change the order of the fields.

baderandsonsco 03-07-2008 01:40 AM

I see this is an old thread. I figured I would search before starting a new one, however, this doesn't really answer the question.

I don't want to change the display order as they appear on the memberslist, I want the users to be able to click the Custom Category Field (as a link), and have it sort ASC, DESC - just like the username Category field.

Explaination
In the template:
memberlist
There is a line that sets the username as a sortable category.

Code:

<td class="thead" align="$stylevar[left]" nowrap="nowrap"><a href="$sorturl&amp;order=ASC&amp;sort=username&amp;pp=$perpage$usergrouplink">$vbphrase[username]</a> $sortarrow[username]</td>
Now since the memberlist_results_header handles the custom fields you find in the template:
memberlist_results_header
Default:
Code:

<td class="thead" nowrap="nowrap">$customfield</td>
Modified:
Code:

<td class="thead" nowrap="nowrap">
<a href="$sorturl&amp;order=ASC&amp;sort=$customfield&amp;pp=$perpage$usergrouplink">$customfield</a>
$sortarrow[customfield]
</td>

Now that spits out a link looking like:
Code:

http://blah/blah/forums/memberlist.php?&order=ASC&sort=Location&pp=30
It obviously doesn't like the sort=Location (Location being the $customfield).

Is there anyway to do this easily without writing new code into the memberslist.php? and if not, a little help on the code would be great.

baderandsonsco 03-08-2008 12:20 PM

shameful bump. Can anybody help with this?

baderandsonsco 03-10-2008 03:27 PM

Another very shameful bump.

Any insight, even if not a solution would GREATLY help. Thank you to anybody who tries to tackle this problem.

pnd 03-11-2008 08:25 PM

I'll bump this too - as I am trying to figure this out myself.

--------------- Added [DATE]1205270874[/DATE] at [TIME]1205270874[/TIME] ---------------

I found this a while ago - I tried to use this mod, but it made my member list page wider to the point it didn't look right. Maybe this will work for the rest of you.

https://vborg.vbsupport.ru/showthread.php?t=124580

baderandsonsco 03-16-2008 11:34 PM

Very cool. Thank you very very much. :D


All times are GMT. The time now is 11:48 PM.

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.01155 seconds
  • Memory Usage 1,725KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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