Remove Google
[infodrom.org/infocon.infodrom.org] / src / logbook / index.wml
index adeafef..7705dd7 100644 (file)
@@ -55,8 +55,8 @@ function teaserlink($teaser)
     echo ("<channel>\n");
     printf ("   <lastBuildDate>%s</lastBuildDate>\n", date("D, d M Y H:i:s T"));
 ?>
-  <title>Information & Consulting Logbook</title>
-  <description>Information & Consulting Logbook</description>
+  <title>Information & Consulting Logbuch</title>
+  <description>Information & Consulting Logbuch</description>
   <link>http://infocon.infodrom.org/logbook/</link>
   <managingEditor>joey@infodrom.org</managingEditor>
   <generator>InfoCon</generator>
@@ -65,12 +65,9 @@ function teaserlink($teaser)
     for ($nr=0; $nr < pg_NumRows ($sth); $nr++) {
       $row = pg_fetch_array ($sth, $nr);
 
-      $body = ereg_replace ("<", "&lt;",
-               ereg_replace (">", "&gt;", 
-                 ereg_replace ("&", "&amp;", 
-                   str_replace ("\\\n", "",
-                     str_replace ("\r", "",
-                       $row['body'])))));
+      $body = str_replace(array('<','>','&',"\\\n","\r"),
+                         array('&lt;', '&gt;', '&amp;', '', ''),
+                         $row['body']);
       $date = explode (" ", $row['created']);
       $time = explode (":", $date[1]);
       $tz = substr($time[2], 2);
@@ -101,26 +98,6 @@ function teaserlink($teaser)
   }
 
 <protect>
-  $adv_index = '<div align="center"><script type="text/javascript"><!-- google_ad_client = "pub-3134552371074068";
-/* InfoCon Log Index */
-google_ad_slot = "0940423249";
-google_ad_width = 728;
-google_ad_height = 90;
-//-->
-</script>
-<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
-</script></div>';
-
-  $adv_entry = '<div align="center"><script type="text/javascript"><!-- google_ad_client = "pub-3134552371074068";
-/* InfoCon Log Entry */
-google_ad_slot = "7571618571";
-google_ad_width = 728;
-google_ad_height = 90;
-//-->
-</script>
-<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
-</script></div>';
-
   $kontaktlink = '<p style="margin-left: -20px;"><strong><a href="../kontaktform.html">Zum Kontakformular</a></strong></p>';
 </protect>
 
@@ -128,7 +105,7 @@ google_ad_height = 90;
 
 #include <infocon.style>
 
-<page title="Logbook" alternates="logbook.rdf|Logbook" lang="de">
+<page title="Logbuch" alternates="logbook.rdf|Logbuch" lang="de">
 
 <?
   $dbh = pg_pconnect ("<dbhost>", "<dbport>", "<dbname>")
@@ -149,7 +126,7 @@ google_ad_height = 90;
                       ."WHERE public = 1 "
                       ."AND created >= '%d-01-01' AND created < '%d-01-01' ORDER BY created ASC",
                       $this_year, $next_year);
-      $title = sprintf ("Logbook %d", $this_year);
+      $title = sprintf ("Logbuch %d", $this_year);
     }
     echo ("<div id=\"logenv\"><div id=\"logbody\">");
     printf ("<h3 id=\"logtitle\">%s</h3>", $title);
@@ -181,7 +158,7 @@ google_ad_height = 90;
                        addslashes ($_SERVER[QUERY_STRING]));
     } else {
       $query = "SELECT * FROM <logbook> WHERE public = 1 " .
-              "ORDER BY created DESC LIMIT 5";
+              "ORDER BY created DESC LIMIT 8";
     }
 
     $sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
@@ -203,13 +180,13 @@ google_ad_height = 90;
       printf ("<div id=\"logcontent\">%s</div>", str_replace ("\\\n", "", str_replace ("\r", "", $row['body'])));
       echo   ("\n<div class=\"logfoot\">");
       echo   ("<div class=\"logfootleft\">");
-      echo   add_social ("http://infocon.infodrom.org/logbook/".$url, $row['teaser']);
+#      echo   add_social ("http://infocon.infodrom.org/logbook/".$url, $row['teaser']);
       echo   ("</div>");
       echo   ("<div class=\"logfootright\">");
       printf ("%s | %s | <a href=\"%s\">permanent link</a>", $date, $row['category'], $url);
       echo   ("</div></div>");
       echo   ("</div></div>");
-      if ($nr == 1)
+      if ($nr == 0 || $nr == 4 || $nr == 7)
        echo $adv_index;
       if (strlen ($_SERVER[QUERY_STRING]) > 0)
        echo $kontaktlink;