Title: [Plugin: Search Unleashed] Simplifying creating custom modules
Last modified: August 20, 2016

---

# [Plugin: Search Unleashed] Simplifying creating custom modules

 *  [vikingjs](https://wordpress.org/support/users/vikingjs/)
 * (@vikingjs)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-search-unleashed-simplifying-creating-custom-modules/)
 * First, I have to say that I was very happy to see a folder full of search modules.
   Overall I found your plugin really well-designed and laid out. The suggestions
   below are really minor but I thought I’d pass along my thoughts, for what little
   they’re worth.
 * It wasn’t terribly difficult to create my own module, but there was a couple 
   of things that would have made it easier. Both these suggestions are in the engine
   files, specifically for me, mysql.php.
 * 1) if you used $wp_query->query instead of $_GET, then code run in earlier hooks
   could modify $wp_query and get the expected results when your plugin does its
   magic.
 * 2) My module actually narrows the search rather than expands it, so the AND %
   var% LIKE… construction didn’t work. I had to put a special test in the code 
   to use NOT IN for my module. It worked for me but isn’t very general.
 * The simple solution to that would be to let the module supply its full AND clause,
   but then the plugin would have to know what engine was running. To do this right
   I guess you would have to create an abstraction of the clause that each engine
   could interpret. That may be too much work for the limited number of cases, but
   you would increase the versatility of your modules significantly. Such an abstraction
   would also allow you to move some of your logic out of the database-specific 
   engine files, which would reduce maintenance long-term.
 * Anyway, thanks for making this plugin, and thanks for doing it well.
 * [http://wordpress.org/extend/plugins/search-unleashed/](http://wordpress.org/extend/plugins/search-unleashed/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [vikingjs](https://wordpress.org/support/users/vikingjs/)
 * (@vikingjs)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-search-unleashed-simplifying-creating-custom-modules/#post-2285297)
 * And now I see I should have put this in the hacks sub-forum. Dangit.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Search Unleashed] Simplifying creating custom modules’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/search-unleashed.svg)
 * [Search Unleashed](https://wordpress.org/plugins/search-unleashed/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/search-unleashed/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/search-unleashed/)
 * [Active Topics](https://wordpress.org/support/plugin/search-unleashed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/search-unleashed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/search-unleashed/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [vikingjs](https://wordpress.org/support/users/vikingjs/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-search-unleashed-simplifying-creating-custom-modules/#post-2285297)
 * Status: not resolved