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
  #82  
Old 02-04-2003, 11:22 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What's the error, Chris? What version vB are you using?
Reply With Quote
  #83  
Old 02-05-2003, 01:57 AM
Dany Dany is offline
 
Join Date: Dec 2001
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Erwin,

I have this Error when trying to search the thread.

Database error in vBulletin 2.2.9:

PHP Code:
Invalid SQL
        
SELECT
          post
.postidthread.visible
        FROM
          post LEFT JOIN thread ON thread
.threadid=post.threadid
        WHERE
// REPLACED with search thread - Erwin
          
post.visible=AND thread.visible=AND  post.threadid=59462 AND   post.postid IN (258360,0) AND   1=1  AND NOT (thread.forumid='19')
// search thread - Erwin
      //  post.visible=1 AND thread.visible=1 AND  post.postid IN (258360,0) AND   1=1  AND NOT (thread.forumid='19')
                    
ORDER BY
          post
.dateline DESC,post.dateline DESC
        LIMIT 0
,20
        
mysql error
You have an error in your SQL syntax near '// REPLACED with search thread - Erwin
          post.visible=1 AND thread.visib' 
at line 7

mysql error number
1064

Date
Tuesday 04th of February 2003 08:50:34 PM 
Any help?
Reply With Quote
  #84  
Old 02-05-2003, 02:11 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just remove all the // lines and it will work. You cannot put // comments in the middle of a search query like that.
Reply With Quote
  #85  
Old 02-05-2003, 03:18 AM
Dany Dany is offline
 
Join Date: Dec 2001
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Erwinnow, now it works fine

try changing this:
Code:
<table cellpadding="2" cellspacing="0" border="0" width="95%"  align="center">
<tr valign="bottom">
	<td align="right">
	<table cellpadding="0" cellspacing="0" border="0"><tr>
	<form action="search.php" method="post">
	<td><smallfont><b>Search this Thread:</b>
		<input type="hidden" name="s" value="$session[sessionhash]"><input type="hidden" name="searchdate" value="-1">
		<input type="hidden" name="beforeafter" value="after"><input type="hidden" name="threadid" value="$threadid"><input type="hidden" value="1" name="showposts">
		<input type="hidden" name="action" value="simplesearch"><br><input type="text" class="bginput" name="query">$gobutton
	</smallfont></td>
	</form>
	</tr></table>
	</td>
</tr>
</table>
with this:
Code:
<table cellpadding="2" cellspacing="0" border="0" width="95%"  align="center">
<tr valign="bottom">
	<td align="right">
	<table cellpadding="0" cellspacing="0" border="0"><tr>
	<form action="search.php" method="post">
	<td><smallfont>
		<input type="hidden" name="s" value="$session[sessionhash]"><input type="hidden" name="searchdate" value="-1">
		<input type="hidden" name="beforeafter" value="after"><input type="hidden" name="threadid" value="$threadid"><input type="hidden" value="1" name="showposts">
		<input type="text" class="bginput" name="query" VALUE="Search this Thread" OnFocus="if (value == 'Search this Thread') {value =''}" OnBlur="if (value == '') {value = 'Search this Thread'}" size="20" dir="ltr">$gobutton
	</smallfont></td>
	</form>
	</tr></table>
	</td>
</tr>
</table>
Reply With Quote
  #86  
Old 02-08-2003, 01:09 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Erwin -

Code:
Database error in vBulletin 2.2.9:

Invalid SQL: SELECT COUNT(*) AS posts FROM post
WHERE post.visible=1 AND post.threadid= AND 1=1 AND post.userid='1'
mysql error: You have an error in your SQL syntax near 'AND 1=1 AND post.userid='1'' at line 2

mysql error number: 1064
Thats the error I get

I use vB2.2.9

Satan
Reply With Quote
  #87  
Old 02-08-2003, 01:39 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You installed the hack wrongly.

Uninstall it, and install it again, following the instructions EXACTLY. It is very easy to make a mistake with this hack. It works as long as you make sure you follow the instructions word for word.
Reply With Quote
  #88  
Old 02-08-2003, 02:04 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Erwin - I did install the hack correctly - I have rechecked all the instructions from the file I had downloaded, and they are all as they should be

I will re-download the hack, and check to see if there are any differences

Satan
Reply With Quote
  #89  
Old 02-08-2003, 02:15 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope...Not a single one

Satan
Reply With Quote
  #90  
Old 02-09-2003, 05:49 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PM me your search.php and I'll take a look.
Reply With Quote
  #91  
Old 02-09-2003, 09:38 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok

Pm on the way

Satan
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:08 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.06671 seconds
  • Memory Usage 2,320KB
  • 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_code
  • (1)bbcode_php
  • (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