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
  #32  
Old 10-29-2002, 03:29 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome Erwin... i wish chen would install this here

Im certainly installing it straigt away on my forums

Regards

- miSt
Reply With Quote
  #33  
Old 10-29-2002, 03:48 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think once Chen sees this, he will install it

*HINT HINT*
Reply With Quote
  #34  
Old 10-29-2002, 05:12 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by X-Fan


I think that's the code for the search flood check - I only allow users on my forum to do one search every 60 seconds.

Well it's still not working. Any reason why it woluldn't be compatible?
No it's not. Seach flood check is not reliant on that piece of code - it's build into the normal unhacked search.php - that piece of code is something very strange. Are you using 2.2.8? I suggest starting from scratch with an unhacked 2.2.8 and install my hack first, then the other hacks. That piece of code may be not needed as I don't see what the point is as you are DOUBLING UP on queries.
Reply With Quote
  #35  
Old 10-29-2002, 05:19 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Schorsch
thanks Erwin for your work!

I have two questions:

1) in your manual:



But I have this "// insert query into db" 6 times in my search.php. So do I have to do the changes 6 times or just for the first ?


Just the FIRST occurence, and ignore the rest.

I've edited the installation text file to make it clear that it's the FIRST one.

Quote:


2.) I don't have the following line of code in my search.php (vB 2.2.6)

is there a possibility to install your hack with 2.2.6 ?

thanks,
Schorsch
2.2.6... mmm, I'm using 2.2.8 - My advice is to UPGRADE ASAP as 2.2.6 has huge security holes - dangerous ones.

Just download the search.php for vB 2.2.8 and use the 2.2.8 search.php on your forums while keeping the rest 2.2.6 - it should still work. I recommend upgrading the whole forum though.
Reply With Quote
  #36  
Old 10-29-2002, 05:23 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice addition. Installed and working great!
Reply With Quote
  #37  
Old 10-29-2002, 06:21 PM
ManagerJosh's Avatar
ManagerJosh ManagerJosh is offline
 
Join Date: Feb 2002
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Superb Hack Erwin! I'm definitely installing this hack...the minute I get back to my PC that is.

I hate business trips...cause I can never carry my stuff with me..
Reply With Quote
  #38  
Old 10-29-2002, 08:40 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ X-Fan:

I found the problem in your search.php - Geez, it was obvious.

In your search.php:

Find this:

PHP Code:
// search thread
    
" WHERE post.visible=1 AND $newpostsql $searchthreadquery $search[query]");
// search thread 
Change it to:

PHP Code:
    " WHERE post.visible=1 AND $newpostsql $searchthreadquery $search[query]"); 
Get rid of the //search thread bits. You CANNOT put // comments in the MIDDLE of a query!!!

Same goes for this:

PHP Code:
// search thread
      
$postids AND $searchthreadquery thread.threadid=post.threadid
// search thread 
Change it to:

PHP Code:
      $postids AND $searchthreadquery thread.threadid=post.threadid 
I repeat - you CANNOT put // comments in the MIDDLE of a QUERY!!!

Look at the code - that whole paragraph is ONE line of code on separate lines - you cannot just put // comments in the middle of it. Don't go adding lines to my hack, and then blaming my hack.
Reply With Quote
  #39  
Old 10-29-2002, 11:54 PM
Vivi Ornitier's Avatar
Vivi Ornitier Vivi Ornitier is offline
 
Join Date: Nov 2001
Location: Black Mage Village
Posts: 442
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is anyone else experiencing template problems? my side scroll bars go WAY out
Reply With Quote
  #40  
Old 10-30-2002, 12:09 AM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Vivi, I experience no problems, did you modify the template according to instructions? Do you have any other modifications to that template?
Reply With Quote
  #41  
Old 10-30-2002, 12:23 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can just modify the template to suit your site. My hack will work for an unmodified template as it is. For modified templates, obviously you need to play around with the templates.

Tip: In "showthread" templates, you can move the variable "$searchthread" anywhere you like and the search box will appear.
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:53 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.06768 seconds
  • Memory Usage 2,316KB
  • 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
  • (4)bbcode_php
  • (3)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