Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Manually type a search string in browser?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Lon2 Posted - 04 December 2008 : 11:57:07
I searched Snitz and couldn't find a topic on this: I was wondering if it's possible to type a search string directly in my browser's address field to search the forums without using the forum's search form? For example, typing this directly in the browser's address bar:

http://www.website.com/forum/search.asp?forum_ID=4&SearchTerms=word1,word2<
15   L A T E S T    R E P L I E S    (Newest First)
AnonJr Posted - 05 December 2008 : 10:30:47
quote:
Originally posted by Shaggy

The values from the search form are passed through the chkString function when the SQL statement is being constructed so, if you make the changes exactly as posted above, you won't need to do anything else.



I was getting ready to check if they were validated elsewhere, thanks.

Been a little distracted today - I'm getting ready for a little vacation. <
Shaggy Posted - 05 December 2008 : 10:25:59
The values from the search form are passed through the chkString function when the SQL statement is being constructed so, if you make the changes exactly as posted above, you won't need to do anything else.

<
Lon2 Posted - 05 December 2008 : 10:04:09
So how would I properly sanitize the inputs with at least the ChkString function?


<
Etymon Posted - 05 December 2008 : 08:06:57
Thanks for the suggestion Anon!

I was just substituting ThisSearch with what is already in the original code which is Request.Form("Search"). Maybe adding the chkstring where it is needed in search.asp also could be an addition to be considered for 3.4.07 as well.

For chkstring(), are you suggesting SQLString or something other?



<
AnonJr Posted - 05 December 2008 : 07:59:03
quote:
Originally posted by Etymon

Isn't that what I did here:

if trim(Request.Form("Search")) <> "" then
	ThisSearch = Request.Form("Search")
elseif trim(Request.QueryString("Search")) <> "" then
	ThisSearch = Request.QueryString("Search")
end if


Don't forget to properly sanitize the inputs with at least the ChkString function.<
Etymon Posted - 05 December 2008 : 07:00:49
The search terms in the query strings below are for a test topic on our new farm web site. As long as we have a description of our cat sammy listed in a topic, then the search terms in the links below for cat+sammy will query for them. However, in the event that we move or delete the topic about our cat sammy, then try something like milk+goat or web+design ...

To find results in forum id 1 (Albums), try this:
http://www.lawrunfarms.com/search_welcome.asp?search=sammy+cat&forum=1

To find results in forum id 2 (Market Place), try this:
http://www.lawrunfarms.com/search_welcome.asp?search=sammy+cat&forum=2<
Podge Posted - 05 December 2008 : 06:50:28
I'm an idiot or my brain must be fried.

Do you have a demo anywhere ?
<
Etymon Posted - 05 December 2008 : 06:32:02
Isn't that what I did here:

if trim(Request.Form("Search")) <> "" then
	ThisSearch = Request.Form("Search")
elseif trim(Request.QueryString("Search")) <> "" then
	ThisSearch = Request.QueryString("Search")
end if
<
Podge Posted - 05 December 2008 : 06:22:24
The ideal thing would be to store the search terms in a string variable (e.g. searchterms) and replace all the Request.Form instances with that variable.

<
Etymon Posted - 05 December 2008 : 05:31:07
Hey Huw,

If you think this qualifies as a MOD, then after Lon2 gets to have a look at it, would you mind moving the topic over to the MOD Add-on Forum w/Code for others to enjoy as well?

Cheers,

Etymon<
Etymon Posted - 05 December 2008 : 04:58:14
In addition to what I wrote above ...

Below the following:

if trim(Request.Form("Search")) <> "" then
	ThisSearch = Request.Form("Search")
elseif trim(Request.QueryString("Search")) <> "" then
	ThisSearch = Request.QueryString("Search")
end if



Add this:


if trim(Request.Form("Forum")) <> "" then
	ThisForum = Request.Form("Forum")
elseif trim(Request.QueryString("Forum")) <> "" then
	ThisForum = Request.QueryString("Forum")
end if



And, change all instances of:

Request.Form("Forum")

To:

ThisForum

Try your search for one word as:

http://www.mydomain.com/search.asp?search=word1&forum=1

Try your search for two words as:

http://www.mydomain.com/search.asp?search=word1+word2&forum=1

if the forum id you are querying does not produce results, then try the next forum id.

Above of all ... have much more fun than you were having before!
<
HuwR Posted - 05 December 2008 : 01:43:54
quote:
Try your search for two words as:

http://www.mydomain.com/search.asp?search=word1+word2

Most of all ... have fun!

it would work, but would not actually do what Lon2 asked which was to search a particular forum <
Etymon Posted - 04 December 2008 : 22:34:36
Find the line in search.asp that has:

if Request.QueryString("mode") = "DoIt" then

Above that add this:

if trim(Request.Form("Search")) <> "" then
	ThisSearch = Request.Form("Search")
elseif trim(Request.QueryString("Search")) <> "" then
	ThisSearch = Request.QueryString("Search")
end if


Change:

if Request.QueryString("mode") = "DoIt" then

To:

if Request.QueryString("mode") = "DoIt" or ThisSearch <> "" then

And, change all instances of:

Request.Form("Search")

To:

ThisSearch

Try your search for one word as:

http://www.mydomain.com/search.asp?search=word1

Try your search for two words as:

http://www.mydomain.com/search.asp?search=word1+word2

Most of all ... have fun! <
leatherlips Posted - 04 December 2008 : 20:48:48
You can in Google.

For example, in Google's search field type:

your search terms here site:www.yoursite.com/forum

Google will only search for that term within the URL you specified.

So if I wanted to search for the word concert in my forum I would type:

concert site:www.mangionemagic.com/forum

Here is what the results would show up as in Google.

<
Lon2 Posted - 04 December 2008 : 12:50:41
Thanks for the answers.

<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000 Version 3.4.07