Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorPieperLy
    • CommentTimeOct 12th 2008 edited
     
    links on pagination shows for the first page "/page/1/" , when i click in collection on thumb-link shows "/page/" and it's the same site, so i have double content. how can i make for the first site in pagination "/page/" and for other sites
    /page/2/
    /page/3/
    /page/4/
    /page/5/
    /page/6/...and so on

    hope, you understand me ?
    uwe
    •  
      CommentAuthorsidtheduck
    • CommentTimeOct 13th 2008 edited
     
    PieperLy,

    Can you provide a link? Whenever I just enter "/page/" it comes up as a 404 error. All the links should either be nothing "/" or "/page/1/". Are you wanting the first page to always be "/" instead of "/page/1/"?

    p.s. You are using the current SVN install and not beta3, correct?
    • CommentAuthorPieperLy
    • CommentTimeOct 13th 2008 edited
     
    good morning,

    yes, i use svn trunk r585...here is an example for that, what i mean:

    1. click on this site on the first thumb in upper left
    .../bilder/freigestellte-bilder/

    2. url is = .../bilder/freigestellte-bilder/menschen/
    in pagination on upper right click on 5 -> "1 2 3 4 5 »

    3. now, you on this site: .../bilder/freigestellte-bilder/menschen/page/5/
    pagination shows: « 1 2 3 4 [5] ...click on 1

    4. now, the url is .../bilder/freigestellte-bilder/menschen/page/1/ - the equal site to .../bilder/freigestellte-bilder/menschen/ but have different urls= double content

    the ".../album/page/1/" in pagination-links must rewrite to the first site from album "/album/"

    my english isn't good (sorry) and i hope, you understand me.

    PieperLy
    •  
      CommentAuthorsidtheduck
    • CommentTimeOct 14th 2008
     
    I understand you, PierperLy. :D

    I was just confused with this part of your post above regarding the straight "/page/".
    Posted By: PieperLyhow can i make for the first site in pagination "/page/" and for other sites


    So now to fix it, look for the following code under the "generate_pagination" function in plog-functions.php (around lines 1199-1206):
    for ($i = 1; $i <= $num_pages; $i++){
    if ($i == $current_page){
    $output .= '<span class="page-link"> ['.$i.'] </span>';
    } else{
    $args['plog_page'] = $i;
    $output .= '<a href="'.generate_url($level, $id, $args).'" class="page-link">'.$i.'</a> ';
    }
    }

    and change it to:
    for ($i = 1; $i <= $num_pages; $i++){
    if ($i == $current_page){
    $output .= '<span class="page-link"> ['.$i.'] </span>';
    } else if ($i == 1) {
    $output .= '<a href="'.generate_url($level, $id).'" class="page-link">'.$i.'</a> ';
    } else {
    $args['plog_page'] = $i;
    $output .= '<a href="'.generate_url($level, $id, $args).'" class="page-link">'.$i.'</a> ';
    }
    }


    That should fix it for you! :D
    • CommentAuthorPieperLy
    • CommentTimeOct 14th 2008
     
    hehe, cool, working fine :-)))

    thanks
    PieperLy
    • CommentAuthorPieperLy
    • CommentTimeOct 26th 2008
     
    ups, a little mistake is now in search.php pagination.

    when i search for a word in search-field, plogger shows all sites with this word. when i have more than one search result sites, pagination for site1 link give an error - message.
    here is an example:
    search result for "Marienkäfer" ...switch to site2 on search results. when i click on pagination to site3 for search results - working fine, when i click on site1 to search results, plogger shows errormessages

    site2 for search marienkäfer

    how can i solved this problem?

    reagards from germany
    uwe
    •  
      CommentAuthorsidtheduck
    • CommentTimeOct 26th 2008 edited
     
    Nice catch, PieperLy,

    To fix, change from the code I gave you above:
    for ($i = 1; $i <= $num_pages; $i++){
    if ($i == $current_page){
    $output .= '<span class="page-link"> ['.$i.'] </span>';
    } else if ($i == 1) {
    $output .= '<a href="'.generate_url($level, $id).'" class="page-link">'.$i.'</a> ';
    } else {
    $args['plog_page'] = $i;
    $output .= '<a href="'.generate_url($level, $id, $args).'" class="page-link">'.$i.'</a> ';
    }
    }

    to this:
    for ($i = 1; $i <= $num_pages; $i++){
    if ($i == $current_page){
    $output .= '<span class="page-link"> ['.$i.'] </span>';
    } else {
    if ($i != 1) {
    $args['plog_page'] = $i;
    }
    $output .= '<a href="'.generate_url($level, $id, $args).'" class="page-link">'.$i.'</a> ';
    }
    }


    I think that should fix it!
    • CommentAuthorPieperLy
    • CommentTimeOct 27th 2008
     
    when i change the code so, pagination was crazy:
    the pagination on search.php works, but the pagination on albums don't work. in pagination on albums, i have then on pagination-link "1" every the current site minus-1

    « 1 2 3 4 5 6 7 8 9 10 11 [12]
    on this pagination link « 1 to site 11


    « 1 2 3 4 5 6 7 [8] 9 10 11 12 »
    on this pagination link « 1 to site 7


    « 1 [2] 3 4 5 6 7 8 9 10 11 12 »
    on this pagination link come the old problem back - « 1 - link to /album/1/ instead of /album/

    for the first, i have change back to the older code, so i have correct pagination on albums.

    hope, you understand my lingo (my gibberish?...my double Dutch?)

    reagards from germany
    PieperLy