Site Map and Page-o-mation

From: Date: Thu, 13 Nov 2008 03:11:32 +0000
Subject: Site Map and Page-o-mation
Groups: php.db 
Request: Send a blank email to php-db+get-45625@lists.php.net to get a copy of this message
I need help with a site map I am making using PHP. The site map is of an online photo gallery. In the code below I am trying to determine the <lastmod> value for the photo theme (category) thumbnail image pages. Each of the photo theme (category) pages may display up to 18 thumbnail images and then the next web page is made. I use page-o-mation to offer the subsequent pages for photos that are of similar content. The code below is what I have come up with so far. Where I am stuck is determining the most recent photo_gallery_index.last_update value for the up to 18 photos thumbnails which are being displayed. I am wondering if I should be doing this WHILE loop, to scan the up to 18 images. So far my results only incorporate the first image being displayed. Any suggestions? Ron $page_link=1; $ii=0; $last_update = "0000-00-00"; while ($ii < $number_of_images) { $current_photo_last_update = mysql_result($image_result, $ii,"photo_gallery_index.last_update"); if ( $current_photo_last_update > $last_update ) { $last_update = $current_photo_last_update; } $site_map .= " <url>\r\n"; $site_map .= " <loc>http://www.rons-home.net/photo-gallery-category/" . stripslashes($photo_gallery_category) . "/" . $page_link . "/</loc>\r \n"; $site_map .= " <lastmod>" . $last_update . "</lastmod>\r\n"; $site_map .= " <changefreq>weekly</changefreq>\r\n"; $site_map .= " <priority>1</priority>\r\n"; $site_map .= " </url>\r\n"; ++$page_link; $ii=$ii+18; }

« previous php.db (#45625) next »