Author |
Topic |
l3reacher
Starting Member
12 Posts |
Posted - 27 September 2005 : 13:12:12
|
I have been trying to modify the Search.asp so that I can search by Topic_ID, but I keep failing to get it working. I was able to modify the forum.asp to show the TOPIC_ID so that user can use that ID as a ticket number. With that ticket number, they can use that number instead of the keywords. Any help is appreciated.
I am actually editing the search_form_enhancem-34-0004a.zip version, but just renamed it to Search.asp. However I don't think that would really matter.
The link to that file is http://www.snitzbitz.com/mods/download.asp?mid=65&fid=57< |
Edited by - l3reacher on 27 September 2005 13:30:28 |
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 27 September 2005 : 15:01:31
|
Ehm...perhaps I'm a bit daft, but what's the point in searching by Topic_id ? If you know the topic_id, you know the topic....< |
portfolio - linkshrinker - oxle - twitter |
|
|
l3reacher
Starting Member
12 Posts |
Posted - 28 September 2005 : 01:37:21
|
It is true that people should know the topic, but however, not everybody else would be able to remember the whole string. Even when they search for a keyword for the subject, it may show alot of results, which will make it harder for them to find the correct topic that they are looking for. On the other, if you search by the TOPIC_ID, it will not show as much as the keyword itself, just the numbers itself will show. We are a technical staff team and we want to be able to assist the people by the order of the TOPIC_ID. The order of the TOPIC_ID will determine the priorities of our replies. It is really hard to explain, but we believe that the TOPIC_ID would be a useful tool for us. Thanks< |
Edited by - l3reacher on 28 September 2005 01:44:54 |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 28 September 2005 : 04:56:07
|
there is no point in searching for a topic_id, if you know the topic id you can just open the topic by using /topic.asp?TOPIC_ID=TOPICNUMBER< |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 28 September 2005 : 05:49:58
|
Huw, I think that's what L3recher meant when he said:quote: not everybody else would be able to remember the whole string
An alternative method, L3reacher, that would save you the headache of editing search.asp would be to add a small form to inc_header.asp with a single text input where members could enter the TOPIC_ID of the topic they were looking for and you could then, upon submission, use javascript to construct and redirect to the relevant URL.
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
l3reacher
Starting Member
12 Posts |
Posted - 28 September 2005 : 10:44:57
|
Hmmm... how much of a coding will this little form take, since I am not a programmer. Will the textbox on the header act as a topic search field?? I can try to go online and get some help tutorials on creating this form.< |
Edited by - l3reacher on 28 September 2005 10:51:29 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 28 September 2005 : 12:25:28
|
In fact, the easiest way to do it would be to use get as the form's method, topic.asp as it's action and TOPIC_ID as the name of the text input. Doing it this way, the form will submit to topic.asp with TOPIC_ID in the querystring, no need for an additional handler to process the form and redirect to the appropriate topic.
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 28 September 2005 : 12:39:59
|
quote: Originally posted by Shaggy
In fact, the easiest way to do it would be to use get as the form's method, topic.asp as it's action and TOPIC_ID as the name of the text input. Doing it this way, the form will submit to topic.asp with TOPIC_ID in the querystring, no need for an additional handler to process the form and redirect to the appropriate topic.
Good suggestion.< |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
l3reacher
Starting Member
12 Posts |
Posted - 28 September 2005 : 12:50:24
|
Would it be something like this for the form?
<form action="topic.asp" method="get"> <input name="TOPIC_ID" /> <input type="submit" /> </form>< |
|
|
l3reacher
Starting Member
12 Posts |
Posted - 28 September 2005 : 12:56:07
|
Great! I tested it and it works great. Thanks alot all, espeically ruirib and shaggy for the guidance.< |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 28 September 2005 : 13:04:10
|
You're welcome, glad to be of service Have you got a link 'til we have a look at it?
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
l3reacher
Starting Member
12 Posts |
Posted - 28 September 2005 : 13:14:15
|
not yet, it is still in development, but will post it up when i do have it done.< |
|
|
rpainter
Junior Member
USA
153 Posts |
Posted - 28 September 2005 : 13:29:32
|
This is pretty cool. I've been trying to do something similar, and could not figure out what to do. Thanks.
quote: Originally posted by l3reacher
I was able to modify the forum.asp to show the TOPIC_ID so that user can use that ID as a ticket number.
l3reacher,
can you tell me what you did to show the TOPIC_ID.< |
Rusty Painter Learn to Cook REAL BBQ SCBBQtalk.com Monkey Boy's BBQ Sauce
|
Edited by - rpainter on 28 September 2005 13:31:47 |
|
|
l3reacher
Starting Member
12 Posts |
Posted - 28 September 2005 : 14:54:14
|
In the forum.asp Search for code below , which is around line 595 for mine. Yours may be different.
Response.Write "</a></td>" & vbNewLine & _ " <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""left"">" & vbNewLine & _ " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" if Topic_Sticky and strStickyTopic = "1" then Response.Write("Answered: ") Response.Write "<span class=""spnMessageText""><a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & """>" & ChkString(Topic_Subject,"title") & "</a></span> </font>" & vbNewLine if strShowPaging = "1" then Call TopicPaging() end if
Add the following code below right on top of the code above
Response.Write "</a></td>" & vbNewLine & _ " <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center"">" & vbNewLine & _ " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" Response.Write "<span class=""spnMessageText""><a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & """>" & ChkString(Topic_ID,"topicID") & "</a></span> </font>" & vbNewLine
< |
Edited by - l3reacher on 28 September 2005 20:04:22 |
|
|
Topic |
|