Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Manually type a search string in browser?
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Lon2
Junior Member

USA
151 Posts

Posted - 04 December 2008 :  11:57:07  Show Profile  Reply with Quote
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<

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 04 December 2008 :  12:09:04  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
i dont think you add search terms..if i remember correctly its to stop a security flaw..correct me if im wrong that may have been for somthing else but im sure they made it this way so that a user cannot exploit anything that may occur via dodgy search terms.<

© 1999-2010 MaD2ko0l
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 04 December 2008 :  12:24:57  Show Profile  Visit HuwR's Homepage  Reply with Quote
it has always been a POST form rather than a GET, I don't know why it was done the way it was, it has allways been that way.<
Go to Top of Page

Lon2
Junior Member

USA
151 Posts

Posted - 04 December 2008 :  12:50:41  Show Profile  Reply with Quote
Thanks for the answers.

<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 04 December 2008 :  20:48:48  Show Profile  Visit leatherlips's Homepage  Reply with Quote
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.

<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 04 December 2008 20:52:21
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 04 December 2008 :  22:34:36  Show Profile  Visit Etymon's Homepage  Reply with Quote
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! <
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 05 December 2008 :  01:43:54  Show Profile  Visit HuwR's Homepage  Reply with Quote
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 <
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 05 December 2008 :  04:58:14  Show Profile  Visit Etymon's Homepage  Reply with Quote
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!
<

Edited by - Etymon on 05 December 2008 04:59:46
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 05 December 2008 :  05:31:07  Show Profile  Visit Etymon's Homepage  Reply with Quote
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<
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 05 December 2008 :  06:22:24  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
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.

<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 05 December 2008 :  06:32:02  Show Profile  Visit Etymon's Homepage  Reply with Quote
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
<
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 05 December 2008 :  06:50:28  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
I'm an idiot or my brain must be fried.

Do you have a demo anywhere ?
<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 05 December 2008 :  07:00:49  Show Profile  Visit Etymon's Homepage  Reply with Quote
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<

Edited by - Etymon on 05 December 2008 07:24:53
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 05 December 2008 :  07:59:03  Show Profile  Visit AnonJr's Homepage  Reply with Quote
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.<
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 05 December 2008 :  08:06:57  Show Profile  Visit Etymon's Homepage  Reply with Quote
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?



<
Go to Top of Page

Lon2
Junior Member

USA
151 Posts

Posted - 05 December 2008 :  10:04:09  Show Profile  Reply with Quote
So how would I properly sanitize the inputs with at least the ChkString function?


<
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07