Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-14-2003, 03:47 PM
Xube's Avatar
Xube Xube is offline
 
Join Date: Nov 2001
Location: private
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default DEFAULT VIEW: Memberlist -- Top Posters

I'm guessing/hoping that this hack has probably already been requested and created but I haven't been able to find it while looking so far:

Right now the default view for the memberlist is to show members alphabetically. Is there a hack existing that changes the default view (the view you get when you first click on the memberlist button) so that it shows the members listed by the highest number of posts to lowest number of posts?

Thanks if anyone has this or knows where I can find it.
Reply With Quote
  #2  
Old 10-14-2003, 08:32 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In memberlist.php find:
Code:
  if ($what=="topposters") {
    $orderby="posts";
    $direction="DESC";
  }
Above it add:
Code:
  if ($what=="username") {
    $orderby="username";
    $direction="ASC";
  }
Find:
Code:
  if ($orderby=="" or ($orderby!="username" and $orderby!="posts" and $orderby!="joindate" and $orderby!="lastpost")) {
    $what = 'username';
    $orderby="username";
  }
Replace it with:
Code:
  if ($orderby=="" or ($orderby!="username" and $orderby!="posts" and $orderby!="joindate" and $orderby!="lastpost")) {
    $what = 'topposters';
    $orderby="posts";
    $direction="DESC";
  }
In your memberlist template find:
Code:
	<td bgcolor="{secondaltcolor}"><smallfont><a href="memberlist.php?s=$session[sessionhash]"><b>List Alphabetically</b></a></smallfont></td>
Replace it with:
Code:
	<td bgcolor="{secondaltcolor}"><smallfont><a href="memberlist.php?s=$session[sessionhash]&what=username"><b>List Alphabetically</b></a></smallfont></td>
Reply With Quote
  #3  
Old 10-14-2003, 11:19 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The better way would be to do the following:

open memberlist.php and find
PHP Code:
require("./global.php"); 
below it, add:
PHP Code:
$what="topposters"
Simple as that
Reply With Quote
  #4  
Old 10-14-2003, 11:34 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you do it that way the List Alphabetically and List by Date Joined links will no longer work b/c $what will always be defined as topposters.

The easiest way to do it would be to simply replace the memberlist link with this:
<a href="memberlist.php?s=$session[sessionhash]&what=topposters">

But I figured the guy has already considered that and didn't wanna do it that way for whatever reason. *shrugs*
Reply With Quote
  #5  
Old 10-15-2003, 12:05 AM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EvilLS1
If you do it that way the List Alphabetically and List by Date Joined links will no longer work b/c $what will always be defined as topposters.

The easiest way to do it would be to simply replace the memberlist link with this:
<a href="memberlist.php?s=$session[sessionhash]&what=topposters">

But I figured the guy has already considered that and didn't wanna do it that way for whatever reason. *shrugs*
True, true. Yes, replacing the link with that would be best.
Reply With Quote
  #6  
Old 10-16-2003, 04:44 AM
Xube's Avatar
Xube Xube is offline
 
Join Date: Nov 2001
Location: private
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EvilLS1
If you do it that way the List Alphabetically and List by Date Joined links will no longer work b/c $what will always be defined as topposters.

The easiest way to do it would be to simply replace the memberlist link with this:
<a href="memberlist.php?s=$session[sessionhash]&what=topposters">

But I figured the guy has already considered that and didn't wanna do it that way for whatever reason. *shrugs*
:squareeyed: Thanks for some great advice and for the codings! So, if I replace the memberlist link with that new link, then clicking on it would take me to the list of top posting users, but... would members still be able to later change the order of how the memberlist appears. (change the list into ordering by date joined, etc).
Reply With Quote
  #7  
Old 10-16-2003, 04:50 AM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xube
So, if I replace the memberlist link with that new link, then clicking on it would take me to the list of top posting users, but... would members still be able to later change the order of how the memberlist appears. (change the list into ordering by date joined, etc).
Yep.
Reply With Quote
  #8  
Old 10-16-2003, 06:17 PM
Xube's Avatar
Xube Xube is offline
 
Join Date: Nov 2001
Location: private
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EvilLS1
Yep.
Many thanx!! It worked like a charm! :banana:
Reply With Quote
Reply


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 11:23 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04417 seconds
  • Memory Usage 2,244KB
  • Queries Executed 13 (?)
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
  • (6)bbcode_code
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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