ソースを参照

HTML Markup in the album view.

seavenois 9 年 前
コミット
fbaa5a7f2f
3 ファイル変更16 行追加7 行削除
  1. 3 3
      www/blog/post.php
  2. 11 2
      www/galeria/album.php
  3. 2 2
      www/galeria/index.php

+ 3 - 3
www/blog/post.php

@@ -107,8 +107,8 @@
 					echo "<meta itemprop='telephone' content='+34637140371'/>\n";
 					echo "<meta itemprop='url' content='$proto$http_host'/>\n";
 					echo "</div>\n";
-					echo "<div class='entry'>\n";
-					echo "<h3 class='entry_title'>$r[title]</h3>\n";
+					echo("<h3 class='section_title'>$r[title]</h3>\n");
+					echo("<div class='entry'>\n");
 					if ($r_image != null){
 						echo "<div class='image_container'>\n";
 						echo "<meta itemprop='image' content='$proto$http_host/img/blog/$r_image[image]'/>\n";
@@ -160,7 +160,7 @@
 						echo "<hr>\n";
 						$q_comment = mysqli_query($con, "SELECT id, post, DATE_FORMAT(dtime, '%Y-%m-%dT%T') AS isodate, dtime, user, username, lang, text FROM post_comment WHERE post = $id AND approved = 1 ORDER BY dtime;");
 						$count = mysqli_num_rows($q_comment);
-						echo "<meta itemprop='commentCount interationCount' content='$count'/>\n";
+						echo "<meta itemprop='commentCount interactionCount' content='$count'/>\n";
 						switch ($count){
 							case 0:
 								echo "<h4><meta itemprop='interactionCount' content='0'/></meta>$lng[blog_comments_0]</h4>\n";

+ 11 - 2
www/galeria/album.php

@@ -73,10 +73,18 @@
 	<body onLoad="populatePhotos();" onkeypress="keyDown(event);">
 		<?php include("../header.php"); ?>
 		<div id="content">
-			<div class="section" id="album">
+			<div class="section" id="album" itemscope itemtype='https://schema.org/ImageGallery'>
+				<div class='hidden' itemprop='author creator' itemscope itemtype='http://schema.org/Organization'>\n");
+					<meta itemprop='legalName' content='Asociaci&oacute;n Cultural Recreativa Gasteizko Margolariak'/>\n");
+					<meta itemprop='name' content='Gasteizko Margolariak'/>\n");
+					<meta itemprop='logo' content='$proto$http_host/img/logo/logo.png'/>\n");
+					<meta itemprop='foundingDate' content='03-02-2013'/>\n");
+					<meta itemprop='telephone' content='+34637140371'/>\n");
+					<meta itemprop='url' content='<?php echo("$proto$http_host"); ?>'/>\n");
+				</div>\n");
 				<?php
 					//Header
-					echo "<h3 class='section_title' id='album_title'>$r[title]</h3>\n";
+					echo("<h3 class='section_title' itemprop='name' id='album_title'>$r[title]</h3>\n");
 					if ($r['description'] != ''){
 						echo "<div class='entry' id='album_header'>\n";
 						echo $r['description'];
@@ -89,6 +97,7 @@
 					while ($r_photo = mysqli_fetch_array($q_photo)){
 						echo "<div class='entry photo'>\n<div class='photo_container'>\n";
 						echo "<img class='pointer photo_img' path='$r_photo[file]' onClick=\"showPhotoByPath('$r_photo[file]');\" src='/img/galeria/miniature/$r_photo[file]' /></div>\n";
+						echo("<meta itemprop='image' content='$proto$http_host/img/galeria/view/$r_photo[file]'/>\n");
 						if (strlen($r_photo['title']) > 0 ){
 							echo "<h3 class='entry_title'><a href='javascript:;' onClick=\"showPhotoByPath('$r_photo[file]');\">$r_photo[title]</a></h4>\n";
 						}

+ 2 - 2
www/galeria/index.php

@@ -82,7 +82,7 @@
 						$i = 0;
 						$q_photo = mysqli_query($con, "SELECT * FROM photo, photo_album WHERE id = photo AND album = $r[album] ORDER BY rand() LIMIT 4;");
 						while ($r_photo = mysqli_fetch_array($q_photo)){
-							echo("<td><a href='$proto$http_host/galeria/$r[permalink]'>");
+							echo("<td><a itemprop='url' href='$proto$http_host/galeria/$r[permalink]'>");
 							echo("<meta itemprop='image' content='$proto$http_host/img/galeria/view/$r_photo[file]'/>\n");
 							echo("<img src='$proto$http_host/img/galeria/miniature/$r_photo[file]'/></a></td>\n");
 							$i ++;
@@ -92,7 +92,7 @@
 						echo "</tr>\n</table>\n";
 						$q_count = mysqli_query($con, "SELECT album FROM photo_album WHERE album = $r[id];");
 						if (mysqli_num_rows($q_count) == 1){
-							echo "<h3 class='entry_title'><a href='$proto$http_host/galeria/$r[permalink]'>$r[title]</a></h3>\n";
+							echo "<h3 class='entry_title' itemprop='name'><a href='$proto$http_host/galeria/$r[permalink]'>$r[title]</a></h3>\n";
 							echo("1 $lng[gallery_photos_singular]");
 						}
 						else{