Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 02-13-2006, 10:26 AM
stark427's Avatar
stark427 stark427 is offline
 
Join Date: Aug 2002
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to create a "search" link with "search titles only" by default

Hello all.

I have a reviews page which reflects all the CD reviews that have been made at my forum.

I want to make a search link (or button - I don't care) that will lead directly to the search.php *but* it will have as default the "search titles only" option.

this way my users will be able to search - the - reviews forum - by - artist (where artist = the title of the topics/reviews).

could anyone tell me how I could do that ?

thanx in advance
Reply With Quote
  #2  
Old 02-13-2006, 10:57 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try adding titleonly=1 to the url.
Reply With Quote
  #3  
Old 02-13-2006, 11:20 AM
stark427's Avatar
stark427 stark427 is offline
 
Join Date: Aug 2002
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
Try adding titleonly=1 to the url.
It works

Thanx

http://www.electrowave.gr/forum/search.php?titleonly=1

Now could we also make it so that ...

1) it will only have one specific (by ID ?) forum selected to search in (my reviews forum)

2) the search options will not be shown
Reply With Quote
  #4  
Old 02-13-2006, 11:28 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://www.electrowave.gr/forum/search.php?titleonly=1&forumid=<forumid>

2. I don't think so, unless you create your own Search box (like the standard quicksearch).
Reply With Quote
  #5  
Old 02-13-2006, 11:33 AM
stark427's Avatar
stark427 stark427 is offline
 
Join Date: Aug 2002
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank YOU

Now I'll go find out how to create a search form and when I create it I will put that link down...
Reply With Quote
  #6  
Old 02-13-2006, 11:47 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stark427
thank YOU

Now I'll go find out how to create a search form and when I create it I will put that link down...
Just copy the code for the standard Quick Search, and adopt to your needs.
Reply With Quote
  #7  
Old 02-13-2006, 11:55 AM
stark427's Avatar
stark427 stark427 is offline
 
Join Date: Aug 2002
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
Just copy the code for the standard Quick Search, and adopt to your needs.
first of all thanx for the support

Let me make clear that I want to put the search form on a page outside the forum - actually on a VBadvanced page...

here is the code I have put:

Code:
<smallfont><form action="http://www.electrowave.gr/forum/search.php?forumid=29" method="post">
&nbsp;<input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="forumchoice" value="- 1" /><input type="hidden" name="searchin" value="subject" /><input type="hidden" name="searchdate" value="-1" /><input type="hidden" name="action" value="simplesearch" /><input type="hidden" name="booleanand" value="yes" />
<input class="search" onFocus="this.value='';" type="text" name="query" value="search..." size="15" maxlength="150"/>

<input type="hidden" name="action" value="simplesearch">
</form></smallfont>
but it has one problem

instead of searching the forum
it just redirects to the Search.php with the keyword inserted in the search field...


which is the standard quick search code?
Reply With Quote
  #8  
Old 02-13-2006, 02:18 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This the standard vB code for the quick search:
HTML Code:
			<form action="search.php" method="post">
				<input type="hidden" name="do" value="process" />
				<input type="hidden" name="showposts" value="0" />
				<input type="hidden" name="quicksearch" value="1" />
				<input type="hidden" name="s" value="$session[sessionhash]" />
				<input type="text" class="bginput" name="query" size="20" />&nbsp;$gobutton<br />
			</form>
Just change it with the added forumid.

PS In your example you seem to be missing the 'do', also don't use full url's, better relative file ie "forum/search.php........"
Reply With Quote
  #9  
Old 02-13-2006, 02:52 PM
stark427's Avatar
stark427 stark427 is offline
 
Join Date: Aug 2002
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
This the standard vB code for the quick search:
HTML Code:
			<form action="search.php" method="post">
				<input type="hidden" name="do" value="process" />
				<input type="hidden" name="showposts" value="0" />
				<input type="hidden" name="quicksearch" value="1" />
				<input type="hidden" name="s" value="$session[sessionhash]" />
				<input type="text" class="bginput" name="query" size="20" />&nbsp;$gobutton<br />
			</form>
Just change it with the added forumid.

PS In your example you seem to be missing the 'do', also don't use full url's, better relative file ie "forum/search.php........"

Ok thanx

here is what I have put :

Code:
<form action="forum/search.php?forumid=29" method="post">
				<input type="hidden" name="do" value="process" />
				<input type="hidden" name="showposts" value="0" />
				<input type="hidden" name="quicksearch" value="1" />
				<input type="hidden" name="s" value="$session[sessionhash]" />
				<input type="text" class="bginput" name="query" size="20" />&nbsp;$gobutton<br />
</form>
I have also tried by putting:

Code:
<form action="forum/search.php?include=29" method="post">...

it works but it searches the whole forum and not only the forum with ID=29 :disappointed:
Reply With Quote
  #10  
Old 02-13-2006, 03:24 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't use the forumid in the filename. Insert the followingline instead:
HTML Code:
				<input type="hidden" name="forumid" value="29" />
Reply With Quote
Reply

Thread Tools
Display Modes

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:19 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.04071 seconds
  • Memory Usage 2,260KB
  • Queries Executed 13 (?)
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
  • (3)bbcode_html
  • (4)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
  • (1)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
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete