SMFHacks.com

SMF Classifieds => Support => Topic started by: Shades on October 10, 2020, 11:33:22 am

Title: Search box?
Post by: Shades on October 10, 2020, 11:33:22 am
How can I make the top "default" search box (drop down) where it searches the forum or the classifieds like SMF has on their site for Modifications and Themes etc.,?
Title: Re: Search box?
Post by: SMFHacks on October 10, 2020, 11:53:51 am
That would have to be custom code. You would make one dropdown toggle the search function of SMF and the other toogle Search Classifieds.
Title: Re: Search box?
Post by: Shades on October 10, 2020, 12:12:06 pm
I have my site set up to default to the classifieds which makes the smf search box useless so I need to change it to search the classifieds and not the forum or maybe for both.
Title: Re: Search box?
Post by: SMFHacks on October 10, 2020, 12:31:00 pm
If you only want the classifieds
You would edit index.template.php find the search editor change the form action from
index.php?action=search
To
index.php?action=classifieds;sa=search i belive
Title: Re: Search box?
Post by: Shades on October 10, 2020, 12:53:26 pm
If you only want the classifieds
You would edit index.template.php find the search editor change the form action from
index.php?action=search
To
index.php?action=classifieds;sa=search i belive

Ok thanks will try that but would be nice if It would search both or have a drop down to search either one. Thanks for the help!
Title: Re: Search box?
Post by: SMFHacks on October 10, 2020, 12:59:57 pm
This mod can probably be customized to do that
https://custom.simplemachines.org/mods/index.php?mod=1634
Title: Re: Search box?
Post by: Shades on October 10, 2020, 01:13:00 pm
That looks interesting! I'll play around with it and see if I can get it to work for my needs thanks!