Sitemap output (sitemap-extended ZP1.4)

i think there is a bug in the sitemap-extended plugin.

the `getSitemapGoogleLoopIndex` function returns an array with the number of pictures per album pages.

the `printSitemapGoogleImageVideoExtras` function always print the same info. the loop for each album page goesfrom 0 to $loop_index[0]. i think it should go from (page_number - 1)*image_per_page to $loop_index[page_number]

Comments

  • well start and end of the loop are more like:

    `
    $start = ($page - 1) * getOption('images_per_page');
    $end = ($page - 1) * getOption('images_per_page') + $loop_index[($page-1)];
    `
    if $page is the page number (must be somehow passed as an argument to the function)
  • for the image location information i would not use `$imageobj->getLocation()` as this corresponds to the IPTCSubLocation metadata. i think it is a bit restrictive.

    i would create a$location variable and fill it like this:
    `
    $location = '';
    if ($imageobj->getLocation()) { $location .= $imageobj->getLocation() . ', ' ; }
    if ($imageobj->getCity()) { $location .= $imageobj->getCity() . ', ' ; }
    if ($imageobj->getState()) { $location .= $imageobj->getState() .', ' ; }
    if ($imageobj->getCountry()) { $location .= $imageobj->getCountry(); }
    `
    and then replace
    `
    if ($imageobj->getLocation()) { sitemap_echonl("\t\t\t".$imageobj->getLocation().""); }
    `
    by
    `
    if (!empty($location)) { sitemap_echonl("\t\t\t".$location.""); }
    `
  • acrylian Administrator, Developer
    Ok, to the location change, I rarely use EXIF meta data so I did not notice.

    To the other issue, I have to admit I have not yet understood it...;) Will take a look.

    If you like to do me a favour you could create a ticket and attach the changed plugin file. (be sure to use the one from a nightly)
  • done. ticket number is #1795.
Sign In or Register to comment.