vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Unanswered Threads (https://vborg.vbsupport.ru/showthread.php?t=61921)

Reverend 02-25-2004 08:53 PM

Unanswered Threads
 
Looking for a hack that would show "Unanswered Threads" via a link,similar to the Virgin topics "hackette" that was made for vB2x.
I'm currently using a link suggested by KirbyDE
Quote:

/search.php?do=process&replyless=1&replylimit=0
but this still shows some answered threads.

I presume some code needs to be added to search.php or global.php for this to function correctly

Thanks.

Andreas 02-25-2004 09:16 PM

I think the problem is that vB caches search results for up to 1 day.
So if there are answers within this time the threads will be displayed.

One solution to avoid this could be

In search.php FIND
PHP Code:

$url "search.php?$session[sessionurl]searchid=$searchid";
eval(
print_standard_redirect('search')); 

REPLACE that with
PHP Code:

if ($_REQUEST['dontcache'])
  
$url "search.php?$session[sessionurl]searchid=$searchid&dontcache=1";
else
  
$url "search.php?$session[sessionurl]searchid=$searchid";
eval(
print_standard_redirect('search')); 

Still in search.php FIND
PHP Code:

// add to the navbits
 
$navbits[''] = $vbphrase['search_results']; 

ADD above that
PHP Code:

if ($_REQUEST[dontcache])
  
$DB_site->query("DELETE FROM " TABLE_PREFIX "search WHERE searchid='$searchid'"); 

With this modification it should work, just append &dontcache=1 to the link.

Boofo 02-25-2004 09:19 PM

You mean add that to this link at the end?

Quote:

/search.php?do=process&replyless=1&replylimit=0

Andreas 02-25-2004 09:21 PM

Yep.

Boofo 02-25-2004 09:24 PM

Is there a way to get the amount of unanswered threads from this, too?

Reverend 02-25-2004 09:44 PM

Quote:

Originally Posted by KirbyDE
In search.php FIND
PHP Code:

$url "search.php?$session[sessionurl]searchid=$searchid";
eval(
print_standard_redirect('search')); 


There's 3 instances of this on lines 1412 , 2101 , 2232

Andreas 02-25-2004 09:51 PM

Line 1412.

Reverend 02-25-2004 10:12 PM

I can't find this:
Quote:

Originally Posted by KirbyDE
Still in search.php FIND
PHP Code:

// add to the navbits
$navbits .= construct_navbits(array('' => $vbphrase['search_results'])); 


The nearest i found was
Code:

// add to the navbits
 $navbits[''] = $vbphrase['search_results'];

on line 1949

Andreas 02-25-2004 10:17 PM

Hmm ... I wonder why I took code from Beta 7 - lol.
Corrected.

Reverend 02-25-2004 10:44 PM

Strange,its still showing a couple of threads with replies.


All times are GMT. The time now is 11:54 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.01188 seconds
  • Memory Usage 1,746KB
  • 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
  • (6)bbcode_php_printable
  • (4)bbcode_quote_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