vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   vb3 : put closed threads down the page (https://vborg.vbsupport.ru/showthread.php?t=60003)

Royal 01-10-2004 10:51 AM

vb3 : put closed threads down the page
 
1 Attachment(s)
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

Royal 01-12-2004 12:08 PM

up:)

Feran 01-12-2004 01:43 PM

*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 :p

NTLDR 01-12-2004 02:00 PM

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.

Feran 01-12-2004 02:17 PM

Yeah, true.

Find the ORDER BY clause of the SQL query and throw in the closed field :p

Royal 01-13-2004 02:37 PM

thnx guys ... ill be waiting NTLDR :)

NTLDR 01-14-2004 10:18 AM

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.

Royal 01-15-2004 02:32 PM

thnx ntldr im goin to try it out tonight

Kmurray 09-05-2006 08:36 PM

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?

Jon 03-25-2008 11:28 AM

*bump*


All times are GMT. The time now is 09:58 PM.

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.00936 seconds
  • Memory Usage 1,726KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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