Changeset 600

Show
Ignore:
Timestamp:
12/10/03 19:06:28 (5 years ago)
Author:
saxmatt
Message:

Fixed more and multiple page code to use new permalink system.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/b2-include/b2template.functions.php

    r597 r600  
    873873    if (count($content)>1) { 
    874874        if ($more) { 
    875             $output .= '<a name="more'.$id.'"></a>'.$content[1]; 
     875            $output .= '<a id="more-'.$id.'"></a>'.$content[1]; 
    876876        } else { 
    877             $output .= ' <a href="'.$file.$querystring_start.'p'.$querystring_equal.$id.$querystring_separator.'more'.$querystring_equal.'1#more'.$id.'">'.$more_link_text.'</a>'
     877            $output .= " <a href='". get_permalink() . "#more-$id'>$more_link_text</a>"
    878878        } 
    879879    } 
     
    986986        $file = $pagenow; 
    987987    } 
    988     if (($multipage)) { // && ($more)) { 
     988    if (($multipage)) { 
    989989        if ($next_or_number=='number') { 
    990990            echo $before; 
     
    992992                $j=str_replace('%',"$i",$pagelink); 
    993993                echo " "; 
    994                 if (($i != $page) || ((!$more) && ($page==1))) 
    995                     echo '<a href="'.$file.$querystring_start.'p'.$querystring_equal.$id. 
    996                     $querystring_separator.'more'.$querystring_equal.'1'. 
    997                     $querystring_separator.'page'.$querystring_equal.$i.'">'; 
     994                if (($i != $page) || ((!$more) && ($page==1))) { 
     995                if ('' == get_settings('permalink_structure')) { 
     996                    echo '<a href="'.get_permalink().$querystring_separator.'page'.$querystring_equal.$i.'">'; 
     997                } else { 
     998                    echo '<a href="'.get_permalink().$i.'/">'; 
     999                } 
     1000                } 
    9981001                echo $j; 
    9991002                if (($i != $page) || ((!$more) && ($page==1))) 
     
    10051008                echo $before; 
    10061009                $i=$page-1; 
    1007                 if ($i && $more) 
    1008                     echo ' <a href="'.$file.$querystring_start.'p'.$querystring_equal.$id. 
    1009                     $querystring_separator.'more'.$querystring_equal.'1'. 
    1010                     $querystring_separator.'page'.$querystring_equal.$i.'">'. 
    1011                     $previouspagelink.'</a>'; 
     1010                if ($i && $more) { 
     1011                if ('' == get_settings('permalink_structure')) { 
     1012                    echo '<a href="'.get_permalink().$querystring_separator.'page'.$querystring_equal.$i.'">'; 
     1013                } else { 
     1014                    echo '<a href="'.get_permalink().$i.'/">'; 
     1015                } 
     1016                } 
    10121017                $i=$page+1; 
    1013                 if ($i<=$numpages && $more) 
    1014                     echo ' <a href="'.$file.$querystring_start.'p'.$querystring_equal.$id. 
    1015                     $querystring_separator.'more'.$querystring_equal.'1'. 
    1016                     $querystring_separator.'page'.$querystring_equal.$i.'">'. 
    1017                     $nextpagelink.'</a>'; 
     1018                if ($i<=$numpages && $more) { 
     1019                if ('' == get_settings('permalink_structure')) { 
     1020                    echo '<a href="'.get_permalink().$querystring_separator.'page'.$querystring_equal.$i.'">'; 
     1021                } else { 
     1022                    echo '<a href="'.get_permalink().$i.'/">'; 
     1023                } 
     1024                } 
    10181025                echo $after; 
    10191026            } 
  • trunk/wp-admin/wp-options-permalink.php

    r592 r600  
    133133    if (0 < $i) $query .= '&'; 
    134134    $query .= str_replace($rewritecode, $queryreplace, $tokens[0][$i]) . '$'. ($i + 1); 
    135      
    136135} 
     136++$i; 
     137// Add post paged stuff 
     138$match .= '([0-9]+)?/?'; 
     139$query .= "&page=$$i"; 
    137140 
    138141// Code for nice categories, currently not very flexible 
     
    142145 
    143146?>  
    144   <p><code>RewriteEngine On<br />  
    145     RewriteBase <?php echo $site_root; ?><br />  
    146     RewriteRule ^<?php echo $match; echo '$ ' . $site_root . $query ?> [QSA]<br /> 
    147     RewriteRule ^<?php echo $catmatch; ?>(.*) <?php echo $site_root; ?>index.php?category_name=$1 [QSA]</code></p>  
     147<form action""> 
     148  <textarea rows="5" style="width: 100%;">RewriteEngine On 
     149RewriteBase <?php echo $site_root; ?>  
     150RewriteRule ^<?php echo $match; echo '$ ' . $site_root . $query ?> [QSA] 
     151RewriteRule ^<?php echo $catmatch; ?>(.*) <?php echo $site_root; ?>index.php?category_name=$1 [QSA]</textarea>  
     152    </form> 
    148153</div>  
    149154<?php