Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-10-2004, 10:51 AM
Royal's Avatar
Royal Royal is offline
 
Join Date: Jan 2002
Location: Netherlands
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vb3 : put closed threads down the page

Hello,

im looking for a hack that will move threads to the bottom of the threadlist when they are closed. (see attach image)

thnx in advance
Attached Images
File Type: gif hackrequest.gif (14.6 KB, 0 views)
Reply With Quote
  #2  
Old 01-12-2004, 12:08 PM
Royal's Avatar
Royal Royal is offline
 
Join Date: Jan 2002
Location: Netherlands
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

up
Reply With Quote
  #3  
Old 01-12-2004, 01:43 PM
Feran's Avatar
Feran Feran is offline
 
Join Date: Oct 2003
Location: San Diego, CA (USA)
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*lazy coder*

Since I'm too lazy to do it, I'll tell you how to figure out how to do it ^.~

Okay, um, if I weren't lazy, I'd go into PHPMyAdmin to check the DB for a boolean flag that triggers closed-ness.

Then I'd look for the function that outputs threads and modify the SQL query to exclude closed threads.

Then I'd copy and paste and modify the SQL query to explicitly get closed threads.

Remember that it shouldn't be hard to figure out! Programming is in english.

Something like:

Code:
SELECT * FROM thread_table WHERE closed = false; // part 1
SELECT * FROM thread_table WHERE closed = true; // part 2
Just keep in mind that.. although a simple concept you have to identify the fieldname, and filter through the fifty zillion other fields that vB also calls <.< Even then, it's not hard, so go have fun! I expect you to figure it out in no less than an hour
Reply With Quote
  #4  
Old 01-12-2004, 02:00 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its a bad idea to introduce extra queries when they arn't needed at all. It should be easy enough to just change the order it selects the posts. I don't have the vB3 code with me so I'll look into it when I get home.
Reply With Quote
  #5  
Old 01-12-2004, 02:17 PM
Feran's Avatar
Feran Feran is offline
 
Join Date: Oct 2003
Location: San Diego, CA (USA)
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, true.

Find the ORDER BY clause of the SQL query and throw in the closed field
Reply With Quote
  #6  
Old 01-13-2004, 02:37 PM
Royal's Avatar
Royal Royal is offline
 
Join Date: Jan 2002
Location: Netherlands
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thnx guys ... ill be waiting NTLDR
Reply With Quote
  #7  
Old 01-14-2004, 10:18 AM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In forumdisplay.php find around line 637:

PHP Code:
ORDER BY sticky DESC$sqlsortfield $sqlsortorder 
Replace With:

PHP Code:
ORDER BY sticky DESCthread.open 1 DESC$sqlsortfield $sqlsortorder 
This has one small side effect that all normal open threads are listed first, then you get the closed threads and redirects together at the end.
Reply With Quote
  #8  
Old 01-15-2004, 02:32 PM
Royal's Avatar
Royal Royal is offline
 
Join Date: Jan 2002
Location: Netherlands
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thnx ntldr im goin to try it out tonight
Reply With Quote
  #9  
Old 09-05-2006, 08:36 PM
Kmurray Kmurray is offline
 
Join Date: May 2006
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am trying this on VB 3.6 but i cant seem to get it to work properly. Does anyone have an idea how to make this work on 3.6?
Reply With Quote
  #10  
Old 03-25-2008, 11:28 AM
Jon Jon is offline
 
Join Date: Mar 2002
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*bump*
Reply With Quote
Reply


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 04:39 AM.


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.04474 seconds
  • Memory Usage 2,273KB
  • Queries Executed 14 (?)
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
  • (1)bbcode_code
  • (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
  • (1)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
  • (1)postbit_attachment
  • (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_postinfo_query
  • fetch_postinfo
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete