Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 03-04-2008, 08:23 PM
Masked Crusader Masked Crusader is offline
 
Join Date: Oct 2005
Location: Sacramento, CA, USA
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 03-05-2008, 01:08 AM
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When you edit a profile field, you can change the order of the fields.
Reply With Quote
  #3  
Old 03-07-2008, 01:40 AM
baderandsonsco baderandsonsco is offline
 
Join Date: Feb 2008
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 03-08-2008, 12:20 PM
baderandsonsco baderandsonsco is offline
 
Join Date: Feb 2008
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

shameful bump. Can anybody help with this?
Reply With Quote
  #5  
Old 03-10-2008, 03:27 PM
baderandsonsco baderandsonsco is offline
 
Join Date: Feb 2008
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another very shameful bump.

Any insight, even if not a solution would GREATLY help. Thank you to anybody who tries to tackle this problem.
Reply With Quote
  #6  
Old 03-11-2008, 08:25 PM
pnd pnd is offline
 
Join Date: Nov 2007
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 03-16-2008, 11:34 PM
baderandsonsco baderandsonsco is offline
 
Join Date: Feb 2008
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very cool. Thank you very very much.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:16 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.04443 seconds
  • Memory Usage 2,211KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete