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-26-2004 08:36 AM

&forumchoice[]=1&forumchoice[]=5&forumchoice[]=7

In the forumhome_forumbit_* and FORUMDISPLAY-Templates you can use $foerumid

Quote:

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. ;)
What do you mean with "so the date and time show up in there too"?

Boofo 02-26-2004 08:45 AM

When you click on View Unanswered threads, the date and time you did for the "Thread Post Time on Forum Display" code you did in the other thread doesn't show up. I thought I would ask about it in here because I don't remember where the other thread is. ;)

Andreas 02-26-2004 09:22 AM

I C.

In search.php FIND
PHP Code:

        // query thread data
        
$dataQuery "
            SELECT 
$previewfield
                thread.threadid, thread.threadid AS postid, thread.title AS threadtitle, thread.iconid AS threadiconid, 

REPLACE that with
PHP Code:

        // query thread data
        
$dataQuery "
            SELECT 
$previewfield
                thread.dateline, thread.threadid, thread.threadid AS postid, thread.title AS threadtitle, thread.iconid AS threadiconid, 

Still in search.php FIND
PHP Code:

eval('$searchbits .= "' fetch_template('threadbit') . '";'); 

ABOVE that ADD
PHP Code:

$thread[created] = vbdate($vboptions['dateformat'], $thread[dateline], 1) . ' ' vbdate($vboptions['timeformat'], $thread[dateline]); 


If you also want to display the thread creation date/time when displaying search results as posts:

In search.php FIND
PHP Code:

         // query post data
        
$dataQuery "
            SELECT post.postid, post.title AS posttitle, post.dateline AS postdateline,
                post.iconid AS posticonid, post.pagetext,
                IF(post.userid = 0, post.username, user.username) AS username,
                thread.threadid, thread.title AS threadtitle, thread.iconid AS threadiconid, thread.replycount, 

REPLACE that with
PHP Code:

         // query post data
        
$dataQuery "
            SELECT post.postid, post.title AS posttitle, post.dateline AS postdateline,
                post.iconid AS posticonid, post.pagetext,
                IF(post.userid = 0, post.username, user.username) AS username,
                thread.dateline AS threaddateline, thread.threadid, thread.title AS threadtitle, thread.iconid AS threadiconid, thread.replycount, 


Still in search.php FIND
PHP Code:

eval('$searchbits .= "' fetch_template('search_results_postbit') . '";'); 

ABOVE that ADD
PHP Code:

$post[threadcreated] = vbdate($vboptions['dateformat'], $post[threaddateline], 1) . ' ' vbdate($vboptions['timeformat'], $post[threaddateline]); 

Add $post[threadcreated] to Template search_results_postbit.

Please note that these modifications will work for all searches, not just for unanswered threads.

PS: Should I release both "thread creation date" mods as hacks? Might be useful for others too ...

Boofo 02-26-2004 09:45 AM

Yes, you should release both of them. Maybe even put them together as one? ;)

And thank you, sir. ;)

Boofo 02-26-2004 09:56 AM

I'm not seeing it show up for the posts. :(

EDIT: Ignore this. I was doing it inside the if condition. I moved it outside that and it works right now for posts. ;) Excellent job, thank you, sir. ;)

Reverend 02-26-2004 06:13 PM

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]");



Works perfect. https://vborg.vbsupport.ru/external/2009/06/7.gif

ogden2k 03-02-2004 09:24 PM

Quote:

Originally Posted by Reverend

How many forum choices can I use? Is there a limit on performance?

Andreas 03-02-2004 09:32 PM

Same as for "normal" search.

ogden2k 03-02-2004 09:33 PM

Ok. I have this under Quick Links. When I'm on forum home, I do not see the option under Quick Links, but I do when I'm in a forum...?

This is what I'm using:
Code:

search.php?do=process&replyless=1&replylimit=0&dontcache=1&forumchoice[]=7&forumchoice[]=37&forumchoice[]=10&forumchoice[]=14&forumchoice[]=9&forumchoice[]=38&forumchoice[]=36&forumchoice[]=11&forumchoice[]=8&forumchoice[]=20&forumchoice[]=23


All times are GMT. The time now is 06:59 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.01133 seconds
  • Memory Usage 1,765KB
  • 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
  • (10)bbcode_php_printable
  • (3)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
  • (9)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