Просмотр исходного кода

Improved structured data and sitemap

seavenois 10 лет назад
Родитель
Сommit
48c915bfde

+ 0 - 0
www/img/logo/logo-alt.png → www/img/logo/GasteizkoMargolariak-0.png


BIN
www/img/logo/GasteizkoMargolariak.png


BIN
www/img/logo/logo.png


BIN
www/img/spo/LVDVS.jpg


BIN
www/img/spo/comes-gamarra.jpg


BIN
www/img/spo/el-mirador-de-salburua.jpg


BIN
www/img/spo/miniature/LVDVS.jpg


BIN
www/img/spo/miniature/comes-gamarra.jpg


BIN
www/img/spo/miniature/el-mirador-de-salburua.jpg


BIN
www/img/spo/miniature/zeppelin.jpg


+ 6 - 0
www/img/spo/script

@@ -0,0 +1,6 @@
+for file in *.jpg;do
+	#convert "$file" -resize 800x800  "view/$file"
+	#convert "$file" -resize 600x600  "preview/$file"
+	convert "$file" -resize 340x340  "miniature/$file"
+	convert "$file" -resize 180x180  "thumb/$file"
+done

BIN
www/img/spo/thumb/LVDVS.jpg


BIN
www/img/spo/thumb/comes-gamarra.jpg


BIN
www/img/spo/thumb/el-mirador-de-salburua.jpg


BIN
www/img/spo/thumb/zeppelin.jpg


BIN
www/img/spo/zeppelin.jpg


+ 51 - 12
www/index.php

@@ -64,7 +64,13 @@
 				$q_settings = mysqli_query($con, "SELECT value FROM settings WHERE name = 'festivals';");
 				$r_settings = mysqli_fetch_array($q_settings);
 				if ($r_settings['value'] == 1){
-					echo "<div class='section' id='festivales'>\n";
+					echo "<div class='section' id='festivales' itemscope itemtype='http://schema.org/Event'>\n";
+					echo "<meta itemprop='inLanguage' content='$lang'/>\n";
+					echo "<meta itemprop='name' content='$lng[index_festivals_header] $year'/>\n";
+					echo "<meta itemprop='description' content='$lng[index_festivals_header] $year'/>\n";
+					echo "<meta itemprop='startDate' content='$year-08-04'/>\n";
+					echo "<meta itemprop='startDate' content='$year-08-09'/>\n";
+					echo "<meta itemprop='location' content='Vitoria-Gasteiz'/>\n";
 					echo "<h3>$lng[index_festivals_header] $year</h3>\n";
 					echo "<table class='festival_section_table'><tr>\n";
 					
@@ -102,18 +108,26 @@
 					echo "<table class='festival_section_table'><tr>\n";
 					
 					//GM schedule
-					$q_sch_curr = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 1 AND start > NOW() - INTERVAL 45 MINUTE AND start < NOW() + INTERVAL 30 MINUTE ORDER BY start LIMIT 1;");
-					$q_sch_next = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 1 AND start > NOW() AND start < NOW() + INTERVAL 240 MINUTE ORDER BY start LIMIT 1;");
+					$q_sch_curr = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, DATE_FORMAT(start, '%Y-%m-%dT%H:%i:00') AS isostart, DATE_FORMAT(end, '%Y-%m-%dT%H:%i:00') AS isoend, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 1 AND start > NOW() - INTERVAL 45 MINUTE AND start < NOW() + INTERVAL 30 MINUTE ORDER BY start LIMIT 1;");
+					$q_sch_next = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, DATE_FORMAT(start, '%Y-%m-%dT%H:%i:00') AS isostart, DATE_FORMAT(end, '%Y-%m-%dT%H:%i:00') AS isoend, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 1 AND start > NOW() AND start < NOW() + INTERVAL 240 MINUTE ORDER BY start LIMIT 1;");
 					if (mysqli_num_rows($q_sch_curr) > 0 || mysqli_num_rows($q_sch_next) > 0){
 						echo "<td><div class='entry festival_schedule'>\n";
 						echo "<h3>$lng[index_festivals_gm_schedule]</h3>\n";
 					
 						if (mysqli_num_rows($q_sch_curr) > 0){
 							$r_sch_curr = mysqli_fetch_array($q_sch_curr);
-							echo "<div id='festival_event'><h4>$lng[index_festivals_schedule_now]</h4>\n";
+							echo "<div id='festival_event' itemprop='subEvent' itemscope itemtype='http://schema.org/Event'><h4>$lng[index_festivals_schedule_now]</h4>\n";
+							echo "<meta itemprop='inLanguage' content='$lang'/>\n";
+							echo "<meta itemprop='name' content='$r_sch_curr[title]'/>\n";
+							echo "<meta itemprop='startDate' content='$r_sch_curr[isostart]'/>\n";
+							if (strlen($r_sch_curr['isoend']) > 0){
+								echo "<meta itemprop='endDate' content='$r_sch_curr[isoend]'/>\n";
+							}
+							echo "<meta itemprop='location' content='Vitoria-Gasteiz'/>\n";
 							echo "<span class='title'>$r_sch_curr[title]\n</span>";
 							if (strlen($r_sch_curr["description"]) > 0 && $r_sch_curr["description"] != $r_sch_curr["title"]){
 								echo "<br/><span class='description'>$r_sch_curr[description]</span>\n";
+								echo "<meta itemprop='description' content='$r_sch_curr[description]'/>\n";
 							}
 							echo "<table class='location'><tr>\n";
 							echo "<td><a target='_blank' href='http://maps.google.com/maps?q=$r_sch_curr[lat],$r_sch_curr[lon]+(My+Point)&z=14&ll=$r_sch_curr[lat],$r_sch_curr[lon]'><img alt=' ' src='http://$http_host/img/misc/pinpoint.png'/></a></td>\n"; 
@@ -129,10 +143,18 @@
 						
 						if (mysqli_num_rows($q_sch_next) > 0){
 							$r_sch_next = mysqli_fetch_array($q_sch_next);
-							echo "<div id='festival_event'><h4>$lng[index_festivals_schedule_next]</h4>\n";
+							echo "<div id='festival_event' itemprop='subEvent' itemscope itemtype='http://schema.org/Event'><h4>$lng[index_festivals_schedule_next]</h4>\n";
+							echo "<meta itemprop='inLanguage' content='$lang'/>\n";
+							echo "<meta itemprop='name' content='$r_sch_next[title]'/>\n";
+							echo "<meta itemprop='startDate' content='$r_sch_next[isostart]'/>\n";
+							if (strlen($r_sch_curr['isoend']) > 0){
+								echo "<meta itemprop='endDate' content='$r_sch_next[isoend]'/>\n";
+							}
+							echo "<meta itemprop='location' content='Vitoria-Gasteiz'/>\n";
 							echo "<span class='title'>$r_sch_next[title] - $r_sch_next[st]\n</span>";
 							if (strlen($r_sch_next["description"]) > 0 && $r_sch_next["description"] != $r_sch_next["title"]){
 								echo "<br/><span class='description'>$r_sch_next[description]</span>\n";
+								echo "<meta itemprop='description' content='$r_sch_next[description]'/>\n";
 							}
 							echo "<table class='location'><tr>\n";
 							echo "<td><a target='_blank' href='http://maps.google.com/maps?q=$r_sch_next[lat],$r_sch_next[lon]+(My+Point)&z=14&ll=$r_sch_next[lat],$r_sch_next[lon]'><img alt=' ' src='http://$http_host/img/misc/pinpoint.png'/></a></td>\n"; 
@@ -149,19 +171,26 @@
 					}
 										
 					//city schedule
-					$q_sch_curr = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 0 AND start > NOW() - INTERVAL 45 MINUTE AND start < NOW() + INTERVAL 30 MINUTE ORDER BY start LIMIT 1;");
-					$q_sch_next = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 0 AND start > NOW() AND start < NOW() + INTERVAL 240 MINUTE ORDER BY start LIMIT 1;");
-					//echo "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 1 AND start > NOW() - INTERVAL 30 MINUTE AND start < NOW() + INTERVAL 120000 MINUTE ORDER BY start LIMIT 2;";
+					$q_sch_curr = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, DATE_FORMAT(start, '%Y-%m-%dT%H:%i:00') AS isostart, DATE_FORMAT(end, '%Y-%m-%dT%H:%i:00') AS isoend, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 0 AND start > NOW() - INTERVAL 45 MINUTE AND start < NOW() + INTERVAL 30 MINUTE ORDER BY start LIMIT 1;");
+					$q_sch_next = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, DATE_FORMAT(start, '%Y-%m-%dT%H:%i:00') AS isostart, DATE_FORMAT(end, '%Y-%m-%dT%H:%i:00') AS isoend, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 0 AND start > NOW() AND start < NOW() + INTERVAL 240 MINUTE ORDER BY start LIMIT 1;");
 					if (mysqli_num_rows($q_sch_curr) > 0 || mysqli_num_rows($q_sch_next) > 0){
-						echo "<td><div class='entry festival_schedule'>\n";
+						echo "<td><div class='entry festival_schedule' >\n";
 						echo "<h3>$lng[index_festivals_city_schedule]</h3>\n";
 					
 						if (mysqli_num_rows($q_sch_curr) > 0){
 							$r_sch_curr = mysqli_fetch_array($q_sch_curr);
-							echo "<div id='festival_event'><h4>$lng[index_festivals_schedule_now]</h4>\n";
+							echo "<div id='festival_event' itemprop='subEvent' itemscope itemtype='http://schema.org/Event'><h4>$lng[index_festivals_schedule_now]</h4>\n";
+							echo "<meta itemprop='inLanguage' content='$lang'/>\n";
+							echo "<meta itemprop='name' content='$r_sch_curr[title]'/>\n";
+							echo "<meta itemprop='startDate' content='$r_sch_curr[isostart]'/>\n";
+							if (strlen($r_sch_curr['isoend']) > 0){
+								echo "<meta itemprop='endDate' content='$r_sch_curr[isoend]'/>\n";
+							}
+							echo "<meta itemprop='location' content='Vitoria-Gasteiz'/>\n";
 							echo "<span class='title'>$r_sch_curr[title]\n</span>";
 							if (strlen($r_sch_curr["description"]) > 0 && $r_sch_curr["description"] != $r_sch_curr["title"]){
 								echo "<br/><span class='description'>$r_sch_curr[description]</span>\n";
+								echo "<meta itemprop='description' content='$r_sch_curr[description]'/>\n";
 							}
 							echo "<table class='location'><tr>\n";
 							echo "<td><a target='_blank' href='http://maps.google.com/maps?q=$r_sch_curr[lat],$r_sch_curr[lon]+(My+Point)&z=14&ll=$r_sch_curr[lat],$r_sch_curr[lon]'><img alt=' ' src='http://$http_host/img/misc/pinpoint.png'/></a></td>\n"; 
@@ -177,10 +206,19 @@
 						
 						if (mysqli_num_rows($q_sch_next) > 0){
 							$r_sch_next = mysqli_fetch_array($q_sch_next);
-							echo "<div id='festival_event'><h4>$lng[index_festivals_schedule_next]</h4>\n";
+							echo "<div id='festival_event' itemprop='subEvent' itemscope itemtype='http://schema.org/Event'><h4>$lng[index_festivals_schedule_next]</h4>\n";
+							echo "<div id='festival_event' itemprop='subEvent' itemscope itemtype='http://schema.org/Event'><h4>$lng[index_festivals_schedule_now]</h4>\n";
+							echo "<meta itemprop='inLanguage' content='$lang'/>\n";
+							echo "<meta itemprop='name' content='$r_sch_next[title]'/>\n";
+							echo "<meta itemprop='startDate' content='$r_sch_next[isostart]'/>\n";
+							if (strlen($r_sch_curr['isoend']) > 0){
+								echo "<meta itemprop='endDate' content='$r_sch_next[isoend]'/>\n";
+							}
+							echo "<meta itemprop='location' content='Vitoria-Gasteiz'/>\n";
 							echo "<span class='title'>$r_sch_next[title] - ($r_sch_next[st])\n</span>";
 							if (strlen($r_sch_next["description"]) > 0 && $r_sch_next["description"] != $r_sch_next["title"]){
 								echo "<br/><span class='description'>$r_sch_next[description]</span>\n";
+								echo "<meta itemprop='description' content='$r_sch_next[description]'/>\n";
 							}
 							echo "<table class='location'><tr>\n";
 							echo "<td><a target='_blank' href='http://maps.google.com/maps?q=$r_sch_next[lat],$r_sch_next[lon]+(My+Point)&z=14&ll=$r_sch_next[lat],$r_sch_next[lon]'><img alt=' ' src='http://$http_host/img/misc/pinpoint.png'/></a></td>\n"; 
@@ -213,11 +251,12 @@
 					echo "<meta itemprop='description' content='$r_activity[text]'/>\n";
 					echo "<meta itemprop='startDate endDate' content='$r_activity[isodate]'/>\n";
 					echo "<meta itemprop='location' content='$r_activity[city]'/>\n";
+					echo "<meta itemprop='url' content='http://$http_host/lablanca/'/>\n";
 					echo "<div class='hidden' itemprop='organizer' itemscope itemtype='http://schema.org/Organization'>\n";
 					echo "<meta itemprop='legalName' content='Asociaci&oacute;n Cultural Recreativa Gasteizko Margolariak'/>\n";
 					echo "<meta itemprop='name' content='Gasteizko Margolariak'/>\n";
 					echo "<meta itemprop='logo' content='http://$http_host/img/logo/logo.png'/>\n";
-					echo "<meta itemprop='foundingDate' content='03-02-2013'/>\n";
+					echo "<meta itemprop='foundingDate' content='2013-02-03'/>\n";
 					echo "<meta itemprop='telephone' content='+34637140371'/>\n";
 					echo "<meta itemprop='url' content='http://$http_host'/>\n";
 					echo "</div>\n";

+ 0 - 46
www/sitemap-image.php

@@ -1,46 +0,0 @@
-<?php
-	header('Content-type: application/xml');
-	$http_host = $_SERVER['HTTP_HOST'];
-	include("functions.php");
-	$con = startdb();
-	echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
-?>
-<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
-        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
-	<url>
-		<loc>http://<?php echo $http_host; ?>/</loc>
-		<image:image>
-			<image:loc>http://<?php echo $http_host; ?>/img/logo/logo.png</image:loc>
-			<image:caption>Gasteizko Margolariak</image:caption>
-			<image:title>Gasteizko Margolariak</image:title>
-		</image:image>
-		<?php
-			$q = mysqli_query($con, "SELECT title_es, image FROM activity_image, activity WHERE activity = activity.id ORDER BY date DESC;");
-			while ($r = mysqli_fetch_array($q)){
-				echo("\t\t<image:image>\n");
-				echo("\t\t\t<image:loc>http://$http_host/img/actividades/view/$r[image]</image:loc>\n");
-				echo("\t\t\t<image:title>$r[title_es]</image:title>\n");
-				echo("\t\t</image:image>\n");
-			}
-			$q = mysqli_query($con, "SELECT title_es, image FROM post_image, post WHERE post = post.id ORDER BY dtime DESC;");
-			while ($r = mysqli_fetch_array($q)){
-				echo("\t\t<image:image>\n");
-				echo("\t\t\t<image:loc>http://$http_host/img/blog/view/$r[image]</image:loc>\n");
-				echo("\t\t\t<image:title>$r[title_es]</image:title>\n");
-				echo("\t\t</image:image>\n");
-			}
-			$q = mysqli_query($con, "SELECT album.title_es AS album, photo.title_es AS photo, file FROM photo, album, photo_album WHERE photo.id = photo AND album.id = album ORDER BY uploaded;");
-			while ($r = mysqli_fetch_array($q)){
-				echo("\t\t<image:image>\n");
-				echo("\t\t\t<image:loc>http://$http_host/img/galeria/view/$r[file]</image:loc>\n");
-				if (strlen($r['photo']) == 0){
-					echo("\t\t\t<image:title>$r[album]</image:title>\n");
-				}
-				else{
-					echo("\t\t\t<image:title>$r[photo]</image:title>\n");
-				}
-				echo("\t\t</image:image>\n");
-			}
-		?>
-	</url>
-</urlset>

+ 53 - 9
www/sitemap.php

@@ -6,7 +6,9 @@
 	//registerVisit($_SERVER['REQUEST_URI'], false);
 	echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
 ?>
-<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+<urlset
+	xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
+	xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
 	<url>
 		<loc>http://<?php echo $http_host; ?>/</loc>
 		<?php
@@ -15,6 +17,16 @@
 		?><lastmod><?php echo $row_date['cdate']; ?></lastmod>
 		<changefreq>weekly</changefreq>
 		<priority>0.8</priority>
+		<image:image>
+			<image:loc>http://<?php echo $http_host; ?>/img/logo/GasteizkoMargolariak.png</image:loc>
+			<image:caption>Gasteizko Margolariak</image:caption>
+			<image:title>Gasteizko Margolariak</image:title>
+		</image:image>
+		<image:image>
+			<image:loc>http://<?php echo $http_host; ?>/img/logo/GasteizkoMargolariak-0.png</image:loc>
+			<image:caption>Gasteizko Margolariak Original</image:caption>
+			<image:title>Gasteizko Margolariak Original</image:title>
+		</image:image>
 	</url>
 	<url>
 		<loc>http://<?php echo $http_host; ?>/help/</loc>
@@ -36,7 +48,7 @@
 		<priority>0.8</priority>
 	</url>
 	<?php
-		$res_post = mysqli_query($con, "SELECT id, permalink, DATE_FORMAT(dtime, '%Y-%m-%d') AS cdate FROM post WHERE visible = 1 ORDER BY cdate DESC;");
+		$res_post = mysqli_query($con, "SELECT id, title_es, permalink, DATE_FORMAT(dtime, '%Y-%m-%d') AS cdate FROM post WHERE visible = 1 ORDER BY cdate DESC;");
 		$priority = 0.75;
 		while ($row_post = mysqli_fetch_array($res_post)){
 			echo "\t<url>\n";
@@ -44,6 +56,13 @@
 			echo "\t\t<lastmod>$row_post[cdate]</lastmod>\n";
 			echo "\t\t<changefreq>weekly</changefreq>\n";
 			echo "\t\t<priority>$priority</priority>\n";
+			$q_i = mysqli_query($con, "SELECT image FROM post_image WHERE post = $row_post[id] ORDER BY idx;");
+			while ($r_i = mysqli_fetch_array($q_i)){
+				echo("\t\t<image:image>\n");
+				echo("\t\t\t<image:loc>http://$http_host/img/blog/view/$r_i[image]</image:loc>\n");
+				echo("\t\t\t<image:title>$row_post[title_es]</image:title>\n");
+				echo("\t\t</image:image>\n");
+			} 
 			echo "\t</url>\n";
 			$priority = $priority - 0.05;
 			if ($priority < 0.45)
@@ -60,7 +79,7 @@
 		<priority>1</priority>
 	</url>
 	<?php
-		$res = mysqli_query($con, "SELECT id, permalink, DATE_FORMAT(dtime, '%Y-%m-%d') AS cdate FROM activity WHERE visible = 1 ORDER BY cdate DESC;");
+		$res = mysqli_query($con, "SELECT title_es, id, permalink, DATE_FORMAT(dtime, '%Y-%m-%d') AS cdate FROM activity WHERE visible = 1 ORDER BY cdate DESC;");
 		$priority = 0.95;
 		while ($row = mysqli_fetch_array($res)){
 			echo "\t<url>\n";
@@ -68,6 +87,13 @@
 			echo "\t\t<lastmod>$row[cdate]</lastmod>\n";
 			echo "\t\t<changefreq>weekly</changefreq>\n";
 			echo "\t\t<priority>$priority</priority>\n";
+			$q_i = mysqli_query($con, "SELECT image FROM activity_image WHERE activity = $row[id] ORDER BY idx;");
+			while ($r_i = mysqli_fetch_array($q_i)){
+				echo("\t\t<image:image>\n");
+				echo("\t\t\t<image:loc>http://$http_host/img/actividades/view/$r_i[image]</image:loc>\n");
+				echo("\t\t\t<image:title>$row[title_es]</image:title>\n");
+				echo("\t\t</image:image>\n");
+			} 
 			echo "\t</url>\n";
 			$priority = $priority - 0.05;
 			if ($priority < 0.65)
@@ -84,7 +110,7 @@
 		<priority>0.8</priority>
 	</url>
 	<?php
-		$res = mysqli_query($con, "SELECT DISTINCT album.permalink AS permalink, DATE_FORMAT(uploaded, '%Y-%m-%d') AS cdate FROM photo, album, photo_album WHERE photo = photo.id AND album = album.id ORDER BY cdate DESC;");
+		$res = mysqli_query($con, "SELECT DISTINCT album.id AS albumid, album.title_es AS title, album.permalink AS permalink, DATE_FORMAT(uploaded, '%Y-%m-%d') AS cdate FROM photo, album, photo_album WHERE photo = photo.id AND album = album.id ORDER BY cdate DESC;");
 		$priority = 0.75;
 		while ($row = mysqli_fetch_array($res)){
 			echo "\t<url>\n";
@@ -92,6 +118,18 @@
 			echo "\t\t<lastmod>$row[cdate]</lastmod>\n";
 			echo "\t\t<changefreq>weekly</changefreq>\n";
 			echo "\t\t<priority>$priority</priority>\n";
+			$q_i = mysqli_query($con, "SELECT file, title_es FROM photo, photo_album WHERE id = photo AND album = $row[albumid];");
+			while ($r_i = mysqli_fetch_array($q_i)){
+				echo("\t\t<image:image>\n");
+				echo("\t\t\t<image:loc>http://$http_host/img/galeria/view/$r_i[file]</image:loc>\n");
+				if (strlen($r_i['title_es']) > 0){
+					echo("\t\t\t<image:title>$r_i[title_es]</image:title>\n");
+				}
+				else{
+					echo("\t\t\t<image:title>$row[title]</image:title>\n");
+				}
+				echo("\t\t</image:image>\n");
+			} 
 			echo "\t</url>\n";
 			$priority = $priority - 0.05;
 			if ($priority < 0.45)
@@ -105,8 +143,8 @@
 			if (mysqli_num_rows($res_lb) > 0){
 				$r_lb = mysqli_fetch_array($res_lb);
 				if ($r_lb['value'] == 1){
-					echo "<changefreq>monthly</changefreq>\n";
-					echo "\t\t<priority>0.5</priority>\n";
+					echo "<changefreq>daily</changefreq>\n";
+					echo "\t\t<priority>1</priority>\n";
 				}
 				else{
 					echo "<changefreq>monthly</changefreq>\n";
@@ -121,13 +159,19 @@
 	</url>
 	<?php
 		$year = date("Y");
-		$res_post = mysqli_query($con, "SELECT year FROM festival WHERE year != " . date("Y") . " ORDER BY year;");
+		$res_years = mysqli_query($con, "SELECT img, year FROM festival ORDER BY year DESC;");
 		$priority = 0.55;
-		while ($row_post = mysqli_fetch_array($res_post)){
+		while ($row_years = mysqli_fetch_array($res_years)){
 			echo "\t<url>\n";
-			echo "\t\t<loc>http://$http_host/lablanca/$r_years[year]</loc>\n";
+			echo "\t\t<loc>http://$http_host/lablanca/$row_years[year]</loc>\n";
 			echo "\t\t<changefreq>yearly</changefreq>\n";
 			echo "\t\t<priority>$priority</priority>\n";
+			if (strlen($row_years['img']) > 0){
+				echo("\t\t<image:image>\n");
+				echo("\t\t\t<image:loc>http://$http_host/img/fiestas/view/$row_years[img]</image:loc>\n");
+				echo("\t\t\t<image:title>La Blanca $row_years[year]</image:title>\n");
+				echo("\t\t</image:image>\n");
+			}
 			echo "\t</url>\n";
 			$priority = $priority - 0.05;
 			if ($priority < 0.40)