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)

memobug 08-16-2002 09:27 PM

An Idea for Thread Display Order
 
Would it be possible to create a hack that would allow the default thread display order for certain forums to be set to Alphabetical? I am thinking for book lists and FAQs this would be a nice feature.

Obviously the user can click the THREAD button to reorder the posts alphabetically or reverse alpha, but certain information-only forums really would benefit from a default presentation like this, plus very few new users know they can reorder the display of threads by thread/starter/replies/views/rating or Last Post.

Maybe what I am actually suggesting is that the admin could be able to select any of these options:

thread title/starter/replies/views/rating/lastpost

could be configurable as the Thread sort order, able to override "last post" order, which would remain the default.

Regards,

Matt

Sho 08-17-2002 09:39 PM

Very nice idea, actually.

Xenon 08-17-2002 11:30 PM

in your forumdisplay.php you can find this:
PHP Code:

switch ($sortfield) {
  case 
'title':
  case 
'lastpost':
  case 
'replycount':
  case 
'views':
  case 
'postusername':
  case 
'voteavg':
    break;

  default:
    
$sortfield='lastpost';


just change $sortfield='lastpost'; into $sortfield='title';

memobug 08-17-2002 11:45 PM

But, that would change all the forums to the new order (alphabetic or views, etc) wouldn't it? I was really hoping to just affect one or two - the faq sorted by alpha; the booklist sorted by rating, and so forth.

Regards,

Matt

Xenon 08-18-2002 12:25 AM

replace it with an if-clause:
PHP Code:

if($foruminfo[forumid]==x$sortfield='title';
  elseif(
$foruminfo[forumid]==y$sortfield='rating';
  else 
$sortfield='lastpost'


Sho 08-18-2002 01:26 PM

Thanks Xenon!

memobug 08-18-2002 04:59 PM

This is great, Thanks!

Catherine 08-20-2002 07:07 PM

Xenon, I can't find the string of characters:
$sortfield ='lastpost' in the template forumdisplay.
What is the exact name of the template I need to look for.

I am only interested for the time being by having the Thread display in the order: first created, first in the list.

I totally agree with Memobug. We should have the choice of orders'criterias in the Admin options.

Thanks for your help!

Xenon 08-20-2002 07:37 PM

Catherine you should read more carefully:
i said forumdisplay.php not the forumdisplay template

Catherine 08-20-2002 08:29 PM

Xenon,

Sorry for my stupid question but I am not a Java script specialist and am just trying to hack some of my templates based on my knowledge of other programming languages.
So where can I find forumdisplay.php?

Thank you to let me know.


All times are GMT. The time now is 06:57 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.01018 seconds
  • Memory Usage 1,734KB
  • 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
  • (2)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