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)

Andreas 02-25-2004 10:46 PM

That might happen on the frist call as the cashed search is deleted after displaying the results.

Reverend 02-25-2004 10:59 PM

Nope,after several refreshes,logging out/in and deleting temp internet files it still shows a couple of threads with replies.

Andreas 02-25-2004 11:44 PM

Hmm ...
Does the nocache=1 appear in the URL when the search results are being displayed?

Reverend 02-26-2004 12:09 AM

When the results are displayed the url is forums/search.php?searchid=xxxx

the xxxx is always the same number

Andreas 02-26-2004 12:27 AM

OK, so it still uses the cached results.

Maybe this does work (remove the other mods):

In search.php FIND
PHP Code:

// check our results and decide what to do
switch ($highScore

ABOVE that ADD
PHP Code:

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



Boofo 02-26-2004 01:07 AM

Will the same line be used for the link then?

EvilLS1 02-26-2004 04:01 AM

Why not show unanswered threads on a forum by forum basis or for specific forums with a link on the index page?

I have it set up like that on my test forum and it seems to work nicely. Comes in handy if you want to quickly see just the unanswered posts from specific forums such as a support or tech forum without having to go to the search page.

To do it, open forumdisplay.php and find:
Code:

$actiontemplates = array(
        'none' => array(
                'FORUMDISPLAY',
                'threadbit',
                'threadbit_deleted',
                'forumdisplay_announcement',
                'forumhome_lastpostby',
                'forumhome_forumbit_level1_post',
                'forumhome_forumbit_level2_post',
                'forumhome_forumbit_level1_nopost',
                'forumhome_forumbit_level2_nopost',
                'forumdisplay_loggedinuser',
                'forumhome_moderator',
                'forumdisplay_moderator',
                'forumdisplay_sortarrow',
                'forumhome_subforumbit_post',
                'forumhome_subforumseparator_post',
                'forumrules'
        )

Replace it with:
Code:

$actiontemplates = array(
        'none' => array(
                'FORUMDISPLAY',
                'threadbit',
                'threadbit_deleted',
                'forumdisplay_announcement',
                'forumhome_lastpostby',
                'forumhome_forumbit_level1_post',
                'forumhome_forumbit_level2_post',
                'forumhome_forumbit_level1_nopost',
                'forumhome_forumbit_level2_nopost',
                'forumdisplay_loggedinuser',
                'forumhome_moderator',
                'forumdisplay_moderator',
                'forumdisplay_sortarrow',
                'forumhome_subforumbit_post',
                'forumhome_subforumseparator_post',
                'forumrules'
        ),
        'getunanswered' => array(
                'FORUMDISPLAY',
                'threadbit',
                'threadbit_deleted',
                'forumdisplay_announcement',
                'forumhome_lastpostby',
                'forumhome_forumbit_level1_post',
                'forumhome_forumbit_level2_post',
                'forumhome_forumbit_level1_nopost',
                'forumhome_forumbit_level2_nopost',
                'forumdisplay_loggedinuser',
                'forumhome_moderator',
                'forumdisplay_moderator',
                'forumdisplay_sortarrow',
                'forumhome_subforumbit_post',
                'forumhome_subforumseparator_post',
                'forumrules'
        )

Find:
Code:

$threadscount = $DB_site->query_first("
Above it add:
Code:

if ($_REQUEST['do'] == 'getunanswered')
{
$condition = "AND replycount=0";
}
else
{
$condition = "";
}

Find:
Code:

                FROM " . TABLE_PREFIX . "thread AS thread
                $deljoin
                WHERE forumid = $foruminfo[forumid]

Replace it with:
Code:

                FROM " . TABLE_PREFIX . "thread AS thread
                $deljoin
                WHERE forumid = $foruminfo[forumid]
                                $condition

Find:
Code:

WHERE thread.threadid IN (0$ids)
Replace it with:
Code:

WHERE thread.threadid IN (0$ids)
$condition

Then just put this somewhere in your forumhome_forumbit_level2_post & forumhome_forumbit_level1_post templates.
Code:

(<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]&do=getunanswered">View Unanswered Threads</a>)

Boofo 02-26-2004 04:57 AM

Quote:

Originally Posted by KirbyDE
OK, so it still uses the cached results.

Maybe this does work (remove the other mods):

In search.php FIND
PHP Code:

// check our results and decide what to do
switch ($highScore

ABOVE that ADD
PHP Code:

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



That works great! Can we do this on a forum by forum basis with a link in each forum just for that forum?

Andreas 02-26-2004 08:14 AM

Yes you can limit that on one (or multiple) forums:

/search.php?do=process&replyless=1&replylimit=0&don tcache=1&forumchoice[]=id

Boofo 02-26-2004 08:19 AM

Like this?

PHP Code:

&forumchoice[1,5,7

or

PHP Code:

 &forumchoice[12

If I put a link in each forum on forumhome, is there a way to pull the ID out automatically of will it do that this way?

Aslo, how can I add this to the search.php so the date and time show up in there too when searching? I have been trying for a couple of hours now to add it there, but to no avail. ;)


All times are GMT. The time now is 06:58 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.01262 seconds
  • Memory Usage 1,761KB
  • 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
  • (9)bbcode_code_printable
  • (6)bbcode_php_printable
  • (1)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