Hi. I think jirving means that the below link doesn't work, as it still gives the phpdig.html template.
.....%2Ftemplates%2F
green.html
&site=0&path=&result_page=index.php&query_string=test&limite=10&option=star t
Here's how I did it in the demo, although TIMTOWTDI (there is more than one way to do it)
In config.php:
PHP Code:
//template file and style
$templates_array = array('black.html','bluegrey.html','corporate.html','green.html',
'grey.html','lightgreen.html','linear.html','newspaper.html','phpdig.html','simple.html',
'terminal.html','yellow.html');
if(isset($template_demo) && in_array($template_demo, $templates_array)) {
$template = "$relative_script_path/templates/$template_demo";
} else {
$template = "$relative_script_path/templates/phpdig.html";
}
In function_phpdig_form.php:
PHP Code:
// before $result['form_head'] = "<form action='$result_page' method='get'> add the following
$query_string2 = urlencode($query_string);
$result['templates_links'] = "
<b>Choose a template</b> :
<a href='search.php?template_demo=phpdig.html&query_string=$query_string2'><u>phpdig.html</u></a>
<a href='search.php?template_demo=black.html&query_string=$query_string2'><u>black.html</u></a>
<a href='search.php?template_demo=simple.html&query_string=$query_string2'><u>simple.html</u></a>
<a href='search.php?template_demo=green.html&query_string=$query_string2'><u>green.html</u></a>
<a href='search.php?template_demo=grey.html&query_string=$query_string2'><u>grey.html</u></a>
<a href='search.php?template_demo=yellow.html&query_string=$query_string2'><u>yellow.html</u></a>
<a href='search.php?template_demo=bluegrey.html&query_string=$query_string2'><u>bluegrey.html</u></a>
<a href='search.php?template_demo=terminal.html&query_string=$query_string2'><u>terminal.html</u></a>
<a href='search.php?template_demo=linear.html&query_string=$query_string2'><u>linear.html</u></a>
<a href='search.php?template_demo=lightgreen.html&query_string=$query_string2'><u>lightgreen.html</u></a>
<a href='search.php?template_demo=newspaper.html&query_string=$query_string2'><u>newspaper.html</u></a>
<a href='search.php?template_demo=corporate.html&query_string=$query_string2'><u>corporate.html</u></a>
";
// this assumes that search.php is the result_page
In the templates use:
Code:
<phpdig:templates_links/>
Keep $template in:
PHP Code:
phpdigSearch($id_connect, $query_string, $option, $refine,
$refine_url, $lim_start, $limite, $browse,
$site, $path, $relative_script_path, $template);