Search Question

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/71324?pagenum=1
05 November 2025, 08:58

Topic


Etymon
Search Question
13 September 2020, 23:27


Hey Huw,

Do you have anything with the .NET version where a person can be directed straight to the search page with the Forum's name preselected?
The Classic version has it, but I don't know how to link to the .NET like that ... like this ... https://forum.snitz.com/classicforum/search.asp?FORUM_ID=25

 

Replies ...


HuwR
15 September 2020, 12:20


no, but you can search a forums posts from the forum page itself you don't need to go to the search page, the search box in the right hand column of the forum page searches that specific forum.
I could add that ability, but might forget unless you post it in my todo forum smile
Etymon
15 September 2020, 14:14


OK. Thanks Huw! I am trying to write a MOD for the users to search for help in the MVC forum from a specific forum. The MOD is for Classic ASP, but depending on which technology a person is more comfortable using, as in, the Snitz forum (forum.snitz.com/?/ in Classic or MVC, I want to give an option for both.
My MOD looks something like this for now:



Search for info at Snitz.com:

MODs W/Code Forum: Classic / .NET MODs WO/Code Forum: Classic / .NET MOD Help Forum: Classic / .NET


Etymon
15 September 2020, 14:24


I want these (but for the MVC):

https://forum.snitz.com/classicforum/search.asp?FORUM_ID=25
https://forum.snitz.com/classicforum/search.asp?FORUM_ID=25&Search=Avatar Mod for 3.4
HuwR
16 September 2020, 07:48


Not sure I follow, the two forums are the same database so searching doesn't know what classic or .net means it's just a search
HuwR
16 September 2020, 14:48


For what reason would you need/want to do that?
HuwR
16 September 2020, 14:51


You couldn't do what your example does any, that is not how .net routing works, it would still look very similar to the classic asp URL. Just not sure why you would need to do it? It would also require the search method changing from a POST to a GET
Etymon
16 September 2020, 15:43


I'm thinking MVC could maybe do something like this:

Code:
https://forum.snitz.com/forum/search/25/Avatar Mod for 3.4

in comparison to Classic's:

Code:
https://forum.snitz.com/classicforum/search.asp?FORUM_ID=25&Search=Avatar Mod for 3.4
Etymon
16 September 2020, 17:45


I'm making a "MODS Installed" mod where I am using the forum id and an installed mod's title to refer a person to the forum ids of 25 and 26 along with the title of the mod so that it prefills the Search input and pre-selects the appropriate forum.
HuwR
18 September 2020, 14:53


It could be done, however the URL would look something like

Forum.snitz.com/forum/forum/search/26?terms=mod title&searchfor=phrase or something like that would have to work out what is required for the search form to work
HuwR
19 September 2020, 12:29


In the process of adding this for version 2, url will basically look like
Code:

https://forum.snitz.com/forum/Forum/Search/1?phrase=Avatar Mod for 3.4
I may be able to remove the second Forum, but that would require adding a Search controller to the mvc code which it currently does not have, the search functions are part of the Forum controller. I will see how much work it would be to change.
HuwR
19 September 2020, 13:21


Ok, managed to create a dummy controller that just redirects to the search page. So you will be able to use

Code:
https://forum.snitz.com/forum/Search/1/?phrase=Avatar Mod for 3.4

This will only work in version 2
Etymon
22 September 2020, 08:51


Thanks, Huw!
© 2000-2021 Snitz™ Communications