Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Search Thread Details »»
Search Thread
Version: 1.00, by Erwin Erwin is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 10-28-2002 Last Update: Never Installs: 82
 
No support by the author.

Search Thread - by Erwin Loh
-----------------------------

This hack will add a "Search This Thread" search box at the bottom of threads (similar to the "Search This Forum" search box at the bottom of Forum Display).

Should be useful for loooooooooooooong threads, especially for a forum like this one.


Demo
-------

This hack is installed here at vB.org - just use the Search This Thread box at the bottom right hand corner of this page.


Features
-----------

1. Only posts from the thread will be searched.
2. Uses that standard searchindex table.
3. Uses the same vB search algorithms.
4. This will add NO extra queries to your forum.
5. Uses the standard search and forum permissions set by you.


Installation
------------

1. Running 1 database query
2. Making 2 changes to showthread.php
3. Making 6 changes to search.php
4. Making 1 change to template "showthread"
5. Adding a new template "showthread_searchthread"

Enjoy!

Please click install if you want updates to this hack!

Dr. Erwin Loh

I've updated the installation text file to make things clearer, and made the search box visible to guests as well.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #102  
Old 03-23-2003, 10:01 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's exactly what I said. The vb search does it to. I wasn't complaining about your hack. I have it installed and use it constantly. I was giving you more of a "looks what I found out about vb's search from using your hack." And it can be duplicated here. This is where I found it.
Reply With Quote
  #103  
Old 03-23-2003, 10:26 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, okay.
Reply With Quote
  #104  
Old 04-26-2003, 10:38 AM
Da`Nacho Da`Nacho is offline
 
Join Date: Mar 2002
Location: Fort Worth, Texas
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Erwin, I'm still having trouble integrating this with the MySQL 4 search hack per your instructions. I've totally redone the hacks on a fresh search.php and I still get a parse error on the following line:

PHP Code:
 $DB_site->query("UPDATE search SET dateline=".time().", userid=$bbuserinfo[userid], ipaddress='".$ipaddress)."', threadid=$threadid WHERE searchid=$getsearch[searchid]"); 
Reply With Quote
  #105  
Old 04-26-2003, 10:44 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have exactly the same line in mine, and it works. I just checked. I have no idea what the problem could be. Post 10 lines before and 10 lines after.
Reply With Quote
  #106  
Old 04-26-2003, 11:00 AM
Da`Nacho Da`Nacho is offline
 
Join Date: Mar 2002
Location: Fort Worth, Texas
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 06:44 AM Erwin said this in Post #104
I have exactly the same line in mine, and it works. I just checked. I have no idea what the problem could be. Post 10 lines before and 10 lines after.
I'm sure it's something simple I'm just not getting through my thich head at 7AM saturday morning, lol:

PHP Code:
    $wheresql.=$datesql;

  }

// search thread - Erwin

  
if (!$threadid) {
  
$threadid="0";
  }
    
// check for existing query:
  
if ($getsearch=$DB_site->query_first("SELECT searchid FROM search WHERE showposts='".$showposts)."' AND query='".$wheresql)."' AND postids='".$goodpostlist)."' AND querystring='".$masterquery)."'") {
    
$DB_site->query("UPDATE search SET dateline=".time().", userid=$bbuserinfo[userid], ipaddress='".$ipaddress)."', threadid=$threadid WHERE searchid=$getsearch[searchid]");
    
$searchid=$getsearch[searchid];
  } else {
                
// insert query into db
                
$DB_site->query("INSERT INTO search  (searchid,query,postids,dateline,querystring,showposts,userid,ipaddress,threadid) VALUES (NULL,'".$wheresql)."','".$goodpostlist)."',".time().",'".$masterquery)."','".$showposts)."',$bbuserinfo[userid],'".$ipaddress)."',$threadid)");
                
$searchid=$DB_site->insert_id();
  }

// search thread - Erwin


  
eval("standardredirect(\"".gettemplate("redirect_search")."\",\"search.php?s=$session[sessionhash]&action=showresults&searchid=$searchid&sortby=".addslashes($sortby)."&sortorder=".addslashes($sortorder)."\");"); 
Reply With Quote
  #107  
Old 04-26-2003, 11:44 AM
Da`Nacho Da`Nacho is offline
 
Join Date: Mar 2002
Location: Fort Worth, Texas
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

By the way, it's giving the parse error on the following line now:
PHP Code:
  if ($getsearch=$DB_site->query_first("SELECT searchid FROM search WHERE showposts='".$showposts)."' AND query='".$wheresql)."' AND postids='".$goodpostlist)."' AND querystring='".$masterquery)."'")) { 
Reply With Quote
  #108  
Old 04-26-2003, 11:45 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are missing a } somewhere I'm sure. You really have to get it back to a working file, then reinstall as instructed.
Reply With Quote
  #109  
Old 04-26-2003, 11:50 AM
Da`Nacho Da`Nacho is offline
 
Join Date: Mar 2002
Location: Fort Worth, Texas
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 07:45 AM Erwin said this in Post #107
You are missing a } somewhere I'm sure. You really have to get it back to a working file, then reinstall as instructed.
I've done it three times now, each time to a fresh copy of search.php... the two hacks work seperate fine.

I wonder if it has to do with the problem some of us were having with the phantom query with the MySQL 4 search hack? *shrug*

Oh well... thanks for your help... looks like today is going to be one of those days.
Reply With Quote
  #110  
Old 04-26-2003, 11:55 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, PM me your search.php with the MY hack installed, without the MYSQL 4 hack, and I'll fix it for you.
Reply With Quote
  #111  
Old 04-26-2003, 12:35 PM
Da`Nacho Da`Nacho is offline
 
Join Date: Mar 2002
Location: Fort Worth, Texas
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Erwin helped me out. all is good with integrating his search thread hack and the MySQL 4 hack.
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 06:17 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07097 seconds
  • Memory Usage 2,328KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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