I am not sure if this is useful to anyone else, but I have various "sites" (categories) to search, and I wanted each one to have its own link to the sphider search with its own template (not allways just the standard one).
I could create a template and just specify that in conf.php, but then every search would use that template.
I have slightly modified "search.php" to include on-the-fly templates.
To use it, just do search.php?template=your_template_name_here
You will need a template in a template directory with the name of your template, and you will need to make sure that template passes the correct template name back for the results (usually the same template, but you may want the results to use a different template from the search) by adding the line:
<input type="hidden" name="template" value="<"your_template_name_here">
in the search_form.html file in your template (if you don't, results will use the default template).
Here is the modification I made (against Sphider 1.3.5):
------------[ CUT HERE ]------------
+++ search.php 2012-06-07 09:39:01.009960517 +1000
@@ -44,6 +44,11 @@
include "$settings_dir/conf.php";
+if (isset($_GET['template']))
+ $new_template = $_GET['template'];
+if (($new_template <> ""

&& is_dir("$template_dir/$new_template"

)
+ $template = $new_template;
+
include "$template_dir/$template/header.html";
include "$language_dir/$language-language.php";
------------[ CUT HERE ]------------
I am not sure if anyone wants it, or how to suggest it to the main branch (I am new to this project, and I have only still setting this all up and trying to make it work for my needs), but anyone can use it.
-- Benjamin Holmes
Interactive Pty Ltd