A couple more tweaks for PhpDig v.1.8.6...
The first tweak shores up the pagination by keeping links within the result pages and setting proper page start positions. The second tweak removes the hardcoded search page and disables logging for the template links.
In search_function.php find:
PHP Code:
$n_start = $lim_start+1;
$num_tot = count($final_result);
if ($n_start+$limite-1 < $num_tot) {
$n_end = ($lim_start+$limite);
$more_results = 1;
}
else {
$n_end = $num_tot;
$more_results = 0;
}
And replace with:
PHP Code:
$lim_start = max(0, $lim_start-($lim_start % $limite));
$n_start = $lim_start+1;
$num_tot = count($final_result);
if ($n_start+$limite-1 < $num_tot) {
$n_end = ($lim_start+$limite);
$more_results = 1;
}
else {
$n_end = $num_tot;
$more_results = 0;
}
if ($n_start > $n_end) {
$n_start = 1;
$n_end = min($num_tot,$limite);
$lim_start = 0;
if ($n_end < $num_tot) {
$more_results = 1;
}
}
In function_phpdig_form.php find the
$result['templates_links'] variable.
Now in each of the 13 template links find:
And replace that part of each link with:
PHP Code:
".SEARCH_PAGE."&browse=1
If you downloaded PhpDig v.1.8.6
after the date of this post, the changes in this post have already been applied to the package.