Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-14-2009, 03:04 PM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Search This Thread box

Hi All,

I am looking for a "Search this thread box" that I can physically put at the top and bottom of my forum.

The drop down menu one is getting overlooked by my users.

I am looking at putting a table? around the box and for me to be able to add some text (Title and a little write up about it) and then Place the "Search (this THREAD) box along with a 'Go' or Search button at the side of it.

I am new to it all and would be grateful if some one would tell me what code I need and where to put it please?

I would only like this on one or two selected Threads/forums - So would this be possible too please?

Many Thanks.

PS. I have attached screen shots of where I would like them positioned.

I would be happy with the standard vB table, Title in the Blue border, with a little desciption below. (Please bear in mind that I only want these to show in Select threads. Is it possible to do them based on a thread ID for example, please?
Attached Images
File Type: jpg top.jpg (131.9 KB, 0 views)
File Type: jpg bottom.jpg (118.5 KB, 0 views)
Reply With Quote
  #2  
Old 09-16-2009, 04:30 PM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you know what I mean?
Reply With Quote
  #3  
Old 09-16-2009, 04:33 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Search threads?

What does this accomplish that Ctrl + F doesn't?
Reply With Quote
  #4  
Old 09-16-2009, 04:43 PM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not all my members are familiar with short cuts like that and it would look more professional to have it as I have described. Even though there is one via the drop down menu (That always gets over looked).

--------------- Added [DATE]1253133912[/DATE] at [TIME]1253133912[/TIME] ---------------

Forgot to add that CTRL & F only searches the page that you are looking at - I need it to search the whole of a given thread.
Reply With Quote
  #5  
Old 09-18-2009, 06:17 AM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Forgot to mention that I am running vB 3.8.1 PL1
Reply With Quote
  #6  
Old 09-18-2009, 02:51 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you tried just copying the form for the Search this Thread that is currently displayed on the page? (Give the other forms a unique id, of course.)
Reply With Quote
  #7  
Old 09-19-2009, 11:20 AM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I haven't a clue on how to do what you suggest, Lynne.

If you have the patients and time to explain on here (So everyone can benefit) then I would be grateful.




Thank You.

--------------- Added [DATE]1253363250[/DATE] at [TIME]1253363250[/TIME] ---------------

Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat">
		<if condition="$show['searchthread']">$vbphrase[search_thread] - <a href="showthread.php?$session[sessionurl]t=$threadinfo[threadid]">$threadinfo[title]</a><else />$vbphrase[search_forums]</if>
	</td>
</tr>
<tr>
	<td class="panelsurround" align="center">

	<table class="panel" cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
	<tr>
		<td align="$stylevar[left]" valign="top" width="50%">
			<fieldset class="fieldset" style="margin:0px">
				<legend>$vbphrase[search_by_key_word]</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
				<tr>
					<td colspan="2">
						<div>$vbphrase[key_words]:</div>
						<div><input type="text" class="bginput" name="query" size="35" value="$query" style="width:250px" /></div>
					</td>
				</tr>
				<if condition="!$show['searchthread']">
				<tr>
					<td>
						<select name="titleonly">
							<option value="0" $titleonlyselected[0]>$vbphrase[search_entire_posts]</option>
							<option value="1" $titleonlyselected[1]>$vbphrase[search_titles_only]</option>
						</select><if condition="$show['nocache']"> <label for="cb_nocache"><input type="checkbox" name="nocache" value="1" id="cb_nocache" />$vbphrase[do_not_use_cached_results]</label></if>
					</td>
				</tr>
				</if>
				</table>
			</fieldset>
		</td>
--------------- Added [DATE]1253363434[/DATE] at [TIME]1253363434[/TIME] ---------------

I believe that is what I need, Yes?

I would like it to search and show individual posts please. What would I need to do and where do I place this code please?

Would it be possible to add this just to search the whole thread that I need it for? To search thread ID34212 for example.

--------------- Added [DATE]1253363846[/DATE] at [TIME]1253363846[/TIME] ---------------

I have scaled it down to this:

Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat">
		<if condition="$show['searchthread']">$vbphrase[search_thread] - <a href="showthread.php?$session[sessionurl]t=$threadinfo[threadid]">$threadinfo[title]</a><else />$vbphrase[search_forums]</if>
	</td>
</tr>
<tr>
	<td class="panelsurround" align="center">

	<table class="panel" cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
	<tr>
		<td align="$stylevar[left]" valign="top" width="50%">
			<fieldset class="fieldset" style="margin:0px">
				<legend>Search this thread</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
				<tr>
					<td colspan="2">
						<div>Please enter any search word, Ie: Name, Address, Post Code etc:</div>
						<div><input type="text" class="bginput" name="query" size="35" value="$query" style="width:250px" /></div>
					</td>
				</tr>
				<if condition="!$show['searchthread']">
				<tr>
					<td>

						</select> </label></if>
					</td>
				</tr>
				</if>
				</table>
			</fieldset>
		</td>

Would this work Lynne? I can't see to actually enter the unique ThreadID of the only thread that I would like this to work on?

Is the above code correct to search a thread and show the actual posts, Please?



Many Thanks.

--------------- Added [DATE]1253365168[/DATE] at [TIME]1253365168[/TIME] ---------------

Scrap the above codes... What do you think of the following...

Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat">
		
	</td>
</tr>
<tr>
	<td class="panelsurround" align="center">

	<table class="panel" cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
	<tr>
		<td align="$stylevar[left]" valign="top" width="50%">
			<fieldset class="fieldset" style="margin:0px">
				<legend>Search this thread</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
				<tr>
					<td colspan="2">
										<tr>
<form action="search.php?do=process&searchthreadid=5" method="post">
	<table cellpadding="4" cellspacing="1" border="0">
	<tr>
		<td class="thead">Please enter any search word, Ie: Name, Address, Post Code etc:<a name="goto_threadsearch"></a></td>
	</tr>
	<tr>
		<td class="vbmenu_option" title="nohilite">
			<input type="hidden" name="s" value="" />
			<input type="hidden" name="securitytoken" value="9-fe0c255" />
			<input type="hidden" name="do" value="process" />
			<input type="hidden" name="searchthreadid" value="5" />
			<input type="text" class="bginput" name="query" size="25" /><input type="submit" class="button" value="Go"  /><br />
		</td>
	</tr>
	<tr>
			</tr>
	</table>
</form>

					<td>

						</select> </label></if>
					</td>
				</tr>
				</if>
				</table>
			</fieldset>
		</td>

Where would I place this, just to search the threadID that I will correct, to the one that I need (The one now '5' is an example).

I need it to show on all the current pages and any future pages too. (top and bottom). Where would I place the code please?


Many Thanks.
Reply With Quote
  #8  
Old 09-19-2009, 02:21 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your code is a bit different from mine. This is from my SHOWTHREAD template. This is the part you see in the top bar - it's just basic javascript to create the dropdown (in the same manner dropdowns are made in the navbar):
HTML Code:
    <if condition="$show['search']">
        <td class="vbmenu_control" id="threadsearch" nowrap="nowrap">
            <a href="$show[nojs_link]#goto_threadsearch">$vbphrase[search_this_thread]</a>
            <if condition="$show['popups']"><script type="text/javascript"> vbmenu_register("threadsearch"); </script></if>
        </td>
    </if>
Then, near the bottom of the template is the drop down part with the form:
HTML Code:
<if condition="$show['search']">
<!-- thread search menu -->
<div class="vbmenu_popup" id="threadsearch_menu" style="display:none">
<form action="search.php?do=process&amp;searchthreadid=$threadid" method="post">
    <table cellpadding="4" cellspacing="1" border="0">
    <tr>
        <td class="thead">$vbphrase[search_this_thread]<a name="goto_threadsearch"></a></td>
    </tr>
    <tr>
        <td class="vbmenu_option" title="nohilite">
            <input type="hidden" name="s" value="$session[sessionhash]" />
            <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
            <input type="hidden" name="do" value="process" />
            <input type="hidden" name="searchthreadid" value="$threadid" />
            <input type="text" class="bginput" name="query" size="25" />$gobutton<br />
        </td>
    </tr>
    <tr>
        <td class="vbmenu_option"><a href="search.php?$session[sessionurl]searchthreadid=$threadid">$vbphrase[advanced_search]</a></td>
    </tr>
    </table>
</form>
</div>
<!-- / thread search menu -->
</if>
If you don't want the dropdown, then you can just use the form in the second code portion. You'll have to format it how you want. It looks like it doesn't have a form id you need to change, but you can't leave that div id the same - threadsearch_menu. Of course, get rid of the display:none stuff, but when you reformat it, I'm sure you will. You'll have to just play with it, I'd guess.
Reply With Quote
  #9  
Old 09-19-2009, 07:08 PM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne.

How would I actually find the Template (If that is the correct word) of the forum that I need to add it to, And where would I need to place that code in order to have it in the correct positions as my two Attachments in my OP Please?

Many Thanks.
Reply With Quote
  #10  
Old 09-19-2009, 07:17 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Admin CP -> vBulletin Options -> General Settings -> Add Template Name in HTML Comments -> Yes
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 03:04 PM.


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.05169 seconds
  • Memory Usage 2,301KB
  • Queries Executed 14 (?)
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
  • (3)bbcode_code
  • (2)bbcode_html
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete