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

Reply
 
Thread Tools Display Modes
  #21  
Old 02-26-2004, 08:36 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

&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"?
Reply With Quote
  #22  
Old 02-26-2004, 08:45 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #23  
Old 02-26-2004, 09:22 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ...
Reply With Quote
  #24  
Old 02-26-2004, 09:45 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

And thank you, sir.
Reply With Quote
  #25  
Old 02-26-2004, 09:56 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #26  
Old 02-26-2004, 06:13 PM
Reverend Reverend is offline
 
Join Date: Mar 2002
Location: England
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #27  
Old 03-02-2004, 09:24 PM
ogden2k's Avatar
ogden2k ogden2k is offline
 
Join Date: Apr 2003
Posts: 192
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Reverend
Works perfect.
How many forum choices can I use? Is there a limit on performance?
Reply With Quote
  #28  
Old 03-02-2004, 09:32 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Same as for "normal" search.
Reply With Quote
  #29  
Old 03-02-2004, 09:33 PM
ogden2k's Avatar
ogden2k ogden2k is offline
 
Join Date: Apr 2003
Posts: 192
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
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 11:20 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.04417 seconds
  • Memory Usage 2,273KB
  • Queries Executed 11 (?)
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
  • (10)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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_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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete