View Single Post
Old 01-03-2005, 06:10 PM   #5
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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-$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-$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:
PHP Code:
search.php 
And replace that part of each link with:
PHP Code:
".SEARCH_PAGE."&browse=
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.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline