Copy name and city into page keywords
[infodrom.org/www.zeitungsliste.de] / lib / layout.inc
index 90a093f..54e1f7c 100644 (file)
@@ -41,8 +41,12 @@ function pageheader()
   $ret .= '<meta name="Language" content="de">';
   
   if ($zlist['page'] == 'index') {
-    $ret .= '<meta name="Keywords" content="Zeitung, Zeitungen, Liste, Zeitungsliste, Online-Zeitungen, Zeitungen im Web, Forum, Community">';
+    $ret .= '<meta name="Keywords" content="Zeitung, Zeitungen, Liste, Zeitungsliste, Online-Zeitungen, Zeitungen im Web, Forum, Community, '.
+      'Liste aller Zeitungen">';
     $ret .= sprintf('<link rel="alternate" type="application/rss+xml" title="Zeitungen" href="%szeitungen.rdf">', $cfg['basepath']);
+  } elseif ($cfg['dir'] == 'zeitung') {
+    $ret .= '<meta name="Keywords" content="Zeitung, Zeitungsliste, Online-Zeitung, Zeitung im Web, Forum, Community, '.
+      $zlist['newspaper'] . ', ' . $zlist['city'] . '">';
   }
 
   if (is_spider())
@@ -236,11 +240,11 @@ function layout_sitemap()
 
   $sth = db_query($query);
 
-  if ($sth !== false && pg_NumRows($sth) > 0) {
-    $ret .= '<h3>Tags bzw. Merkmale</h3>';
+  if ($sth !== false && pg_num_rows($sth) > 0) {
+    $ret .= '<h3>User-Tags (Merkmale)</h3>';
     $ret .= '<ul class="gold">';
 
-    for ($i=0; $i < pg_NumRows($sth); $i++) {
+    for ($i=0; $i < pg_num_rows($sth); $i++) {
       $row = pg_fetch_array($sth, $i);
 
       $ret .= sprintf('<li><a href="%stag/%s.html">%s</a></li>',
@@ -255,10 +259,10 @@ function layout_sitemap()
 
   $sth = db_query($query);
 
-  if ($sth !== false && pg_NumRows($sth) > 0) {
+  if ($sth !== false && pg_num_rows($sth) > 0) {
     $ret .= '<h3>Zeitungen und Magazine</h3>';
     $ret .= '<ul class="gold">';
-    for ($i=0; $i < pg_NumRows($sth); $i++) {
+    for ($i=0; $i < pg_num_rows($sth); $i++) {
       $row = pg_fetch_array($sth, $i);
 
       $ret .= sprintf('<li><a href="%szeitung/%d.html">%s</a>, %s</li>',
@@ -267,14 +271,14 @@ function layout_sitemap()
     $ret .= '</ul>';
   }
 
-  $query = 'SELECT id,topic FROM topics WHERE ORDER BY created';
+  $query = 'SELECT id,topic FROM topics ORDER BY created';
 
   $sth = db_query($query);
 
-  if ($sth !== false && pg_NumRows($sth) > 0) {
+  if ($sth !== false && pg_num_rows($sth) > 0) {
     $ret .= '<h3>Diskussionen</h3>';
     $ret .= '<ul class="gold">';
-    for ($i=0; $i < pg_NumRows($sth); $i++) {
+    for ($i=0; $i < pg_num_rows($sth); $i++) {
       $row = pg_fetch_array($sth, $i);
 
       $ret .= sprintf('<li><a href="%stopic/%d.html">%s</a></li>',
@@ -337,11 +341,11 @@ function layout_archive()
 
       $sth = db_query($query);
 
-      if (!$sth || pg_NumRows ($sth) == 0)
+      if (!$sth || pg_num_rows ($sth) == 0)
        $ret .= warning('Kein Archiv gefunden.');
       else {
        $ret .= '<p><ul class="gold">';
-       for ($i=0; $i < pg_NumRows ($sth); $i++) {
+       for ($i=0; $i < pg_num_rows ($sth); $i++) {
          $row = pg_fetch_array($sth, $i);
          $ret .= sprintf('<li><a href="%stopic/%d.html">%s</a></li>',
                          $cfg['basepath'], $row['id'], $row['topic']);
@@ -376,14 +380,14 @@ function layout_showtag()
     $sth = db_query($query);
 
     $zlist['tag'] = htmlspecialchars($tagname);
-    if (!$sth || pg_NumRows ($sth) == 0) {
+    if (!$sth || pg_num_rows ($sth) == 0) {
       $ret .= warning('Keine Zeitungen oder Magazine mit diesem Merkmal gefunden.');
       unset($zlist['newspaper']);
     } else {
       $headlines = array('Mäßige','Mittelmäßige','Gute','Häufige','Häufigste');
       $oldtag = -1;
 
-      for ($i=0; $i < pg_NumRows ($sth); $i++) {
+      for ($i=0; $i < pg_num_rows ($sth); $i++) {
        $row = pg_fetch_array ($sth, $i);
        $tag = tag_class($row['count']);