Browse Source

Wyświetlanie tekstu głównego komentarza dla katalogu

k4be 1 year ago
parent
commit
f7072b49a6
1 changed files with 6 additions and 0 deletions
  1. 6 0
      dir.php

+ 6 - 0
dir.php

@@ -28,6 +28,11 @@ $dirname = htmlspecialchars($dirinfo['name']);
 $comments_data = get_comments($dirinfo['id'], 'dir');
 $comments = generate_comment_field($comments_data, 'dir', $dirinfo['id']);
 
+$topcomment = '';
+if ($dirinfo['comment']) {
+	$topcomment = '<h3>' . htmlspecialchars($dirinfo['comment']) . '</h3>';
+}
+
 ?><!DOCTYPE html>
 <html>
 <head>
@@ -45,6 +50,7 @@ const scriptUrlPrefix = <?=$config['basepath']?>;
 <h1>Obrazki: <?=$dirname?></h1>
 <div id="image-list">
 <a class="gora" href="."></a><h2>... wybierz dowolny obrazek, najlepiej pierwszy.</h2>
+<?=$topcomment?>
 <?=$content?>
 </div>
 <div id="comments">