vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Chronological Thead Display By Start Date (https://vborg.vbsupport.ru/showthread.php?t=35710)

Neo 03-03-2002 10:00 PM

Chronological Thead Display By Start Date
 
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.

Lionel 03-04-2002 08:03 PM

Neo, it does exactly what I was looking for. Upon entering the forum, the thread are properly sorted. :up:

Neo 03-05-2002 07:43 AM

No prob man. I am happy to serve.

Admin 03-05-2002 02:21 PM

Why are you setting $sortfield to 'asc' as well?

Neo 03-05-2002 03:26 PM

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.

Admin 03-05-2002 04:03 PM

$sortfield is the column to sort by, not the order. $sortorder holds the order (ASC/DESC).

Neo 03-05-2002 04:50 PM

Yeah... thats what I ment to say.

Admin 03-05-2002 04:53 PM

And I'm asking why are you setting $sortfield (not $sortorder) to ASC?

SystemLogic 03-05-2002 09:43 PM

Works perfectly, thanks a lot bud!

SystemLogic 03-09-2002 05:30 AM

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.


All times are GMT. The time now is 01:41 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.01027 seconds
  • Memory Usage 1,735KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete