Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Chronological Thead Display By Start Date Details »»
Chronological Thead Display By Start Date
Version: 1.00, by Neo Neo is offline
Developer Last Online: Dec 2009 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-03-2002 Last Update: Never Installs: 2
 
No support by the author.

Works with 2.2.0 and up!

This hack was suggested by Lionel at this thread. https://vborg.vbsupport.ru/showthrea...threadid=35707

Its a small hack but it does what he wants.

##### In forumdisplay.php Replace #####

PHP Code:
// look at sorting options:
if (!isset($sortorder)) {
  
$sortorder "";
}
if (!isset(
$sortfield)) {
  
$sortfield "";

### with ###

PHP Code:
// look at sorting options:
if ($foruminfo[forumid]=="xx" || $foruminfo[forumid]=="xx") {
    if (!isset(
$sortorder)) {
      
$sortorder "asc";
    }
    if (!isset(
$sortfield)) {
      
$sortfield "asc";
    }
} else {
    if (!isset(
$sortorder)) {
      
$sortorder "";
    }
    if (!isset(
$sortfield)) {
      
$sortfield "";
    }

to set it for a certain forum edit this code like

PHP Code:
if ($foruminfo[forumid]=="xx" || $foruminfo[forumid]=="xx") { 
xx would be the number of the forum you want to have this be used on.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-04-2002, 08:03 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Neo, it does exactly what I was looking for. Upon entering the forum, the thread are properly sorted. :up:
Reply With Quote
  #3  
Old 03-05-2002, 07:43 AM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No prob man. I am happy to serve.
Reply With Quote
  #4  
Old 03-05-2002, 02:21 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why are you setting $sortfield to 'asc' as well?
Reply With Quote
  #5  
Old 03-05-2002, 03:26 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

He wanted to have it so that the first made was at the top instead of the bottom... so the newest one would start or be placed at the end of the page... and as you know ASC is a MySQL command.
Reply With Quote
  #6  
Old 03-05-2002, 04:03 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$sortfield is the column to sort by, not the order. $sortorder holds the order (ASC/DESC).
Reply With Quote
  #7  
Old 03-05-2002, 04:50 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah... thats what I ment to say.
Reply With Quote
  #8  
Old 03-05-2002, 04:53 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And I'm asking why are you setting $sortfield (not $sortorder) to ASC?
Reply With Quote
  #9  
Old 03-05-2002, 09:43 PM
SystemLogic SystemLogic is offline
 
Join Date: Nov 2001
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works perfectly, thanks a lot bud!
Reply With Quote
  #10  
Old 03-09-2002, 05:30 AM
SystemLogic SystemLogic is offline
 
Join Date: Nov 2001
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm odd, I thought it worked, but it's actually putting the replies back at the top even though the start date is much earlier then the most recent post.
Reply With Quote
Reply

Thread Tools

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 08:09 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.09080 seconds
  • Memory Usage 2,292KB
  • Queries Executed 23 (?)
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
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete