vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   An Idea for Thread Display Order (https://vborg.vbsupport.ru/showthread.php?t=42383)

Sho 08-20-2002 08:40 PM

Catherine, forumdisplay.php is written in the PHP scripting language, not in JavaScript. You will find forumdisplay.php in the root directory of your vBulletin installation.

Catherine 08-20-2002 09:14 PM

Thank you!

butty 10-08-2002 11:52 PM

hi there, thanks very much for this tip its something that i have needed on my board for a while and didnt know it existed hat off 2 ya :)

only thing is could someone tell me how to change it so that the forum i am displaying by thread title so that it is sorted in ascending order aswel?

heres what i have at the moment in my forumdisplay.php file


PHP Code:


if($foruminfo[forumid]==17$sortfield='title';
  else 
$sortfield='lastpost'


many thanks in advance

Xenon 10-09-2002 09:45 AM

just change it to:
PHP Code:

if($foruminfo[forumid]==17) {
  
$sortfield='title';
  
$sortorder='';
}  else 
$sortfield='lastpost'

but if you have this, you won't be able to change the sortorder for this forum anymore without changing it in the php-file

butty 10-09-2002 01:58 PM

hi there mate thanks very much for your help. Ive changed it but it doesnt seem to have taken effect - heres what my forumdisplay.php looks like

PHP Code:


default:
if(
$foruminfo[forumid]==17) {
  
$sortfield='title';
  
$sortorder='';
}  else 
$sortfield='lastpost';


you can see the forum its supposed to be working on here and as you can see it still says descending wherease i would like it to be ascending

many thanks :)

Xenon 10-09-2002 02:15 PM

hmm, it should work, be sure it's below this block:
if ($sortorder!='asc') {
$sqlsortorder='DESC';
$order['desc']='selected';
} else {
$sqlsortorder='';
$order['asc']='selected';
}

have you uploaded the correct file?

butty 10-09-2002 02:24 PM

yeah definetly mate triple checked that and its underneath that block heres what more if it looks like..........


PHP Code:


if ($sortorder!='asc') {
  
$sqlsortorder='DESC';
  
$order['desc']='selected';
} else {
  
$sqlsortorder='';
  
$order['asc']='selected';
}
switch (
$sortfield) {
  case 
'title':
  case 
'lastpost':
  case 
'replycount':
  case 
'views':
  case 
'postusername':
  case 
'voteavg':
    break;

default:
if(
$foruminfo[forumid]==17) {
  
$sortfield='title';
  
$sortorder='';
}  else 
$sortfield='lastpost';
}
if (
$sortfield=="voteavg" and !$foruminfo[allowratings]) {
  
$sortfield="lastpost";
}

$sort = array();
$sort[$sortfield]='selected'


Xenon 10-09-2002 09:40 PM

looool, damn sorry was my fault

change $sortorder=''; into $sqlsortorder='';

TundraSoul 10-18-2002 07:17 AM

Would it be possible to get a hack, which allows the user to set the thread order (forward or reverse) from the user control panel?

No matter what way I set it, half the group always wants it the other way.

Thanks!

TundraSoul 11-05-2002 04:26 AM

^bump


All times are GMT. The time now is 07:18 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.01156 seconds
  • Memory Usage 1,748KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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