get_results("SELECT t.*, tt.* FROM $wpdb->nggallery AS t INNER JOIN $wpdb->nggpictures AS tt ON t.gid = tt.galleryid WHERE t.gid = '$galleryID' AND tt.exclude != 1 ORDER BY tt.$ngg_options[galSort] $ngg_options[galSortDir] "); // no images, no output if (!is_array($thepictures)) die; // Create XML output header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("content-type:text/xml;charset=utf-8"); echo ''; echo ''; if (is_array ($thepictures)){ foreach ($thepictures as $picture) { $image = $siteurl.'/'.$picture->path.'/'.$picture->filename; $size = getimagesize("$image"); $width = $size[0]; $height = $size[1]; echo ""; echo ''.$image.''; echo 'description)).']]>'; echo ''.$width.''; echo ''.$height.''; echo "\n"; } } echo "\n"; ?>