ZenphotoCMS Forum
Sitemap output (sitemap-extended ZP1.4) - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Sitemap output (sitemap-extended ZP1.4) (/thread-8097.html)



Sitemap output (sitemap-extended ZP1.4) - frankm - 2011-01-13

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]




Sitemap output (sitemap-extended ZP1.4) - frankm - 2011-01-13

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)




Sitemap output (sitemap-extended ZP1.4) - frankm - 2011-01-13

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.""); }




Sitemap output (sitemap-extended ZP1.4) - acrylian - 2011-01-13

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)




Sitemap output (sitemap-extended ZP1.4) - frankm - 2011-01-13

done. ticket number is #1795.