Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 08-16-2002, 09:27 PM
memobug memobug is offline
 
Join Date: Jun 2002
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 08-17-2002, 09:39 PM
Sho Sho is offline
 
Join Date: Nov 2001
Location: Berlin, Germany
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice idea, actually.
Reply With Quote
  #3  
Old 08-17-2002, 11:30 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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';
Reply With Quote
  #4  
Old 08-17-2002, 11:45 PM
memobug memobug is offline
 
Join Date: Jun 2002
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 08-18-2002, 12:25 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

replace it with an if-clause:
PHP Code:
if($foruminfo[forumid]==x$sortfield='title';
  elseif(
$foruminfo[forumid]==y$sortfield='rating';
  else 
$sortfield='lastpost'
Reply With Quote
  #6  
Old 08-18-2002, 01:26 PM
Sho Sho is offline
 
Join Date: Nov 2001
Location: Berlin, Germany
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Xenon!
Reply With Quote
  #7  
Old 08-18-2002, 04:59 PM
memobug memobug is offline
 
Join Date: Jun 2002
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is great, Thanks!
Reply With Quote
  #8  
Old 08-20-2002, 07:07 PM
Catherine Catherine is offline
 
Join Date: Aug 2002
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #9  
Old 08-20-2002, 07:37 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Catherine you should read more carefully:
i said forumdisplay.php not the forumdisplay template
Reply With Quote
  #10  
Old 08-20-2002, 08:29 PM
Catherine Catherine is offline
 
Join Date: Aug 2002
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

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 06:32 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.06728 seconds
  • Memory Usage 2,248KB
  • Queries Executed 11 (?)
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
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (10)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